From 32e3a428dc048db43c4c278b12e1a51357be471e Mon Sep 17 00:00:00 2001 From: Souban Quadri Date: Fri, 24 Mar 2023 13:05:24 +0000 Subject: [PATCH] fixed issue with drag and drop reordering --- dist/css/field.css | 39 +- dist/js/field.js | 9224 ++++++++++++++++++++++- resources/js/components/FormField.vue | 19 +- webpack.mix.js.dist => webpack.mix | 0 yarn.lock | 9884 +++++++++++++------------ 5 files changed, 14279 insertions(+), 4887 deletions(-) rename webpack.mix.js.dist => webpack.mix (100%) diff --git a/dist/css/field.css b/dist/css/field.css index 115c62e5..d53513a3 100644 --- a/dist/css/field.css +++ b/dist/css/field.css @@ -1 +1,38 @@ -.flexible-search-menu-multiselect{--ms-font-size:0.875rem;--ms-option-font-size:0.875rem;--ms-ring-color:rgb(var(--colors-primary-100));--ms-border-color:rgb(var(--colors-gray-300))}html.dark .flexible-search-menu-multiselect{--ms-ring-color:rgb(var(--colors-gray-700));--ms-border-color:rgb(var(--colors-gray-700));--ms-dropdown-border-color:var(--ms-border-color);--ms-bg:rgb(var(--colors-gray-900));--ms-dropdown-bg:var(--ms-bg);--ms-option-bg-pointed:rgb(var(--colors-gray-700));--ms-option-color-pointed:rgb(var(--colors-gray-400))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(var(--colors-gray-50),var(--tw-bg-opacity))}.dark .dark\:hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgba(var(--colors-gray-900),var(--tw-bg-opacity))}.nova-flexible-content-sortable-ghost{opacity:.5}.nova-flexible-content-sortable-drag{background-color:rgba(var(--colors-gray-100),var(--tw-bg-opacity));border-radius:10px}.dark .nova-flexible-content-sortable-drag{background-color:rgba(var(--colors-gray-900),var(--tw-bg-opacity))} +.flexible-search-menu-multiselect { + --ms-font-size: 0.875rem; + --ms-option-font-size: 0.875rem; + --ms-ring-color: rgb(var(--colors-primary-100)); + --ms-border-color: rgb(var(--colors-gray-300)); +} +html.dark .flexible-search-menu-multiselect { + --ms-ring-color: rgb(var(--colors-gray-700)); + --ms-border-color: rgb(var(--colors-gray-700)); + --ms-dropdown-border-color: var(--ms-border-color); + --ms-bg: rgb(var(--colors-gray-900)); + --ms-dropdown-bg: var(--ms-bg); + --ms-option-bg-pointed: rgb(var(--colors-gray-700)); + --ms-option-color-pointed: rgb(var(--colors-gray-400)); +} + +.hover\:bg-gray-50:hover { + --tw-bg-opacity: 1; + background-color: rgba(var(--colors-gray-50), var(--tw-bg-opacity)); +} + +.dark .dark\:hover\:bg-gray-900:hover { + --tw-bg-opacity: 1; + background-color: rgba(var(--colors-gray-900), var(--tw-bg-opacity)); +} + +.nova-flexible-content-sortable-ghost { + opacity: 0.5; +} + +.nova-flexible-content-sortable-drag { + background-color: rgba(var(--colors-gray-100), var(--tw-bg-opacity)); + border-radius: 10px; +} + +.dark .nova-flexible-content-sortable-drag { + background-color: rgba(var(--colors-gray-900), var(--tw-bg-opacity)); +} diff --git a/dist/js/field.js b/dist/js/field.js index a63f9e53..9396361b 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,2 +1,9222 @@ -/*! For license information please see field.js.LICENSE.txt */ -(()=>{var e,t={757:(e,t,o)=>{Nova.booting((function(e){e.component("detail-nova-flexible-content",o(725).Z),e.component("detail-nova-flexible-content-group",o(669).Z),e.component("form-nova-flexible-content",o(477).Z),e.component("form-nova-flexible-content-group",o(698).Z),e.component("flexible-drop-menu",o(526).Z),e.component("flexible-search-menu",o(944).Z),e.component("delete-flexible-content-group-modal",o(496).Z)}))},181:(e,t,o)=>{"use strict";function r(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(e,t)}(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var r=0,l=function(){};return{s:l,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==o.return||o.return()}finally{if(s)throw a}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);oi});var i=function(){function e(t,o,r,n,a){var i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];l(this,e),this.name=t,this.title=o,this.fields=r,this.key=a||this.getTemporaryUniqueKey(n.attribute),this.collapsed=i,this.readonly=n.readonly,this.renameFields()}var t,o,n;return t=e,(o=[{key:"values",value:function(){for(var e=new FormData,t=0;t=0;t--)this.fields[t].attribute=this.key+"__"+this.fields[t].attribute,this.fields[t].validationKey=this.fields[t].attribute,this.fields[t].dependsOn&&Object.keys(this.fields[t].dependsOn).forEach((function(o){e.fields[t].dependsOn["".concat(e.key,"__").concat(o)]=e.fields[t].dependsOn[o],delete e.fields[t].dependsOn[o]}))}}])&&a(t.prototype,o),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},878:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var r=o(645),n=o.n(r)()((function(e){return e[1]}));n.push([e.id,".flexible-search-menu-multiselect .multiselect{align-items:center;background:var(--ms-bg,#fff);border:var(--ms-border-width,1px) solid var(--ms-border-color,#d1d5db);border-radius:var(--ms-radius,4px);box-sizing:border-box;cursor:pointer;display:flex;font-size:var(--ms-font-size,1rem);justify-content:flex-end;margin:0 auto;min-height:calc(var(--ms-border-width, 1px)*2 + var(--ms-font-size, 1rem)*var(--ms-line-height, 1.375) + var(--ms-py, .5rem)*2);outline:none;position:relative;width:100%}.flexible-search-menu-multiselect .multiselect.is-open{border-radius:var(--ms-radius,4px) var(--ms-radius,4px) 0 0}.flexible-search-menu-multiselect .multiselect.is-open-top{border-radius:0 0 var(--ms-radius,4px) var(--ms-radius,4px)}.flexible-search-menu-multiselect .multiselect.is-disabled{background:var(--ms-bg-disabled,#f3f4f6);cursor:default}.flexible-search-menu-multiselect .multiselect.is-active{box-shadow:0 0 0 var(--ms-ring-width,3px) var(--ms-ring-color,rgba(16,185,129,.188))}.flexible-search-menu-multiselect .multiselect-multiple-label,.flexible-search-menu-multiselect .multiselect-placeholder,.flexible-search-menu-multiselect .multiselect-single-label{align-items:center;background:transparent;box-sizing:border-box;display:flex;height:100%;left:0;line-height:var(--ms-line-height,1.375);max-width:100%;padding-left:var(--ms-px,.875rem);padding-right:calc(1.25rem + var(--ms-px, .875rem)*3);pointer-events:none;position:absolute;top:0}.flexible-search-menu-multiselect .multiselect-placeholder{color:var(--ms-placeholder-color,#9ca3af)}.flexible-search-menu-multiselect .multiselect-single-label-text{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flexible-search-menu-multiselect .multiselect-search{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ms-bg,#fff);border:0;border-radius:var(--ms-radius,4px);bottom:0;box-sizing:border-box;font-family:inherit;font-size:inherit;height:100%;left:0;outline:none;padding-left:var(--ms-px,.875rem);position:absolute;right:0;top:0;width:100%}.flexible-search-menu-multiselect .multiselect-search::-webkit-search-cancel-button,.flexible-search-menu-multiselect .multiselect-search::-webkit-search-decoration,.flexible-search-menu-multiselect .multiselect-search::-webkit-search-results-button,.flexible-search-menu-multiselect .multiselect-search::-webkit-search-results-decoration{-webkit-appearance:none}.flexible-search-menu-multiselect .multiselect-tags{align-items:center;display:flex;flex-grow:1;flex-shrink:1;flex-wrap:wrap;margin:var(--ms-tag-my,.25rem) 0 0;padding-left:var(--ms-py,.5rem)}.flexible-search-menu-multiselect .multiselect-tag{align-items:center;background:var(--ms-tag-bg,#10b981);border-radius:var(--ms-tag-radius,4px);color:var(--ms-tag-color,#fff);display:flex;font-size:var(--ms-tag-font-size,.875rem);font-weight:var(--ms-tag-font-weight,600);line-height:var(--ms-tag-line-height,1.25rem);margin-bottom:var(--ms-tag-my,.25rem);margin-right:var(--ms-tag-mx,.25rem);padding:var(--ms-tag-py,.125rem) 0 var(--ms-tag-py,.125rem) var(--ms-tag-px,.5rem);white-space:nowrap}.flexible-search-menu-multiselect .multiselect-tag.is-disabled{background:var(--ms-tag-bg-disabled,#9ca3af);color:var(--ms-tag-color-disabled,#fff);padding-right:var(--ms-tag-px,.5rem)}.flexible-search-menu-multiselect .multiselect-tag-remove{align-items:center;border-radius:var(--ms-tag-remove-radius,4px);display:flex;justify-content:center;margin:var(--ms-tag-remove-my,0) var(--ms-tag-remove-mx,.125rem);padding:var(--ms-tag-remove-py,.25rem) var(--ms-tag-remove-px,.25rem)}.flexible-search-menu-multiselect .multiselect-tag-remove:hover{background:rgba(0,0,0,.063)}.flexible-search-menu-multiselect .multiselect-tag-remove-icon{background-color:currentColor;display:inline-block;height:.75rem;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E\");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;opacity:.8;width:.75rem}.flexible-search-menu-multiselect .multiselect-tags-search-wrapper{display:inline-block;flex-grow:1;flex-shrink:1;height:100%;margin:0 var(--ms-tag-mx,4px) var(--ms-tag-my,4px);position:relative}.flexible-search-menu-multiselect .multiselect-tags-search-copy{display:inline-block;height:1px;visibility:hidden;white-space:pre-wrap;width:100%}.flexible-search-menu-multiselect .multiselect-tags-search{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;bottom:0;box-sizing:border-box;font-family:inherit;font-size:inherit;left:0;outline:none;padding:0;position:absolute;right:0;top:0;width:100%}.flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-cancel-button,.flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-decoration,.flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-results-button,.flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-results-decoration{-webkit-appearance:none}.flexible-search-menu-multiselect .multiselect-inifite{align-items:center;display:flex;justify-content:center;min-height:calc(var(--ms-border-width, 1px)*2 + var(--ms-font-size, 1rem)*var(--ms-line-height, 1.375) + var(--ms-py, .5rem)*2);width:100%}.flexible-search-menu-multiselect .multiselect-inifite-spinner,.flexible-search-menu-multiselect .multiselect-spinner{-webkit-animation:multiselect-spin 1s linear infinite;animation:multiselect-spin 1s linear infinite;background-color:var(--ms-spinner-color,#10b981);flex-grow:0;flex-shrink:0;height:1rem;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 512 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m456.433 371.72-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 512 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m456.433 371.72-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z'/%3E%3C/svg%3E\");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:1rem;z-index:10}.flexible-search-menu-multiselect .multiselect-spinner{margin:0 var(--ms-px,.875rem) 0 0}.flexible-search-menu-multiselect .multiselect-clear{display:flex;flex-grow:0;flex-shrink:0;opacity:1;padding:0 var(--ms-px,.875rem) 0 0;position:relative;transition:.3s;z-index:10}.flexible-search-menu-multiselect .multiselect-clear:hover .multiselect-clear-icon{background-color:var(--ms-clear-color-hover,#000)}.flexible-search-menu-multiselect .multiselect-clear-icon{background-color:var(--ms-clear-color,#999);display:inline-block;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m207.6 256 107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'/%3E%3C/svg%3E\");transition:.3s}.flexible-search-menu-multiselect .multiselect-caret,.flexible-search-menu-multiselect .multiselect-clear-icon{height:1.125rem;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:.625rem}.flexible-search-menu-multiselect .multiselect-caret{background-color:var(--ms-caret-color,#999);flex-grow:0;flex-shrink:0;margin:0 var(--ms-px,.875rem) 0 0;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z'/%3E%3C/svg%3E\");pointer-events:none;position:relative;transform:rotate(0deg);transition:transform .3s;z-index:10}.flexible-search-menu-multiselect .multiselect-caret.is-open{pointer-events:auto;transform:rotate(180deg)}.flexible-search-menu-multiselect .multiselect-dropdown{-webkit-overflow-scrolling:touch;background:var(--ms-dropdown-bg,#fff);border:var(--ms-dropdown-border-width,1px) solid var(--ms-dropdown-border-color,#d1d5db);border-radius:0 0 var(--ms-dropdown-radius,4px) var(--ms-dropdown-radius,4px);bottom:0;display:flex;flex-direction:column;left:calc(var(--ms-border-width, 1px)*-1);margin-top:calc(var(--ms-border-width, 1px)*-1);max-height:15rem;max-height:var(--ms-max-height,10rem);outline:none;overflow-y:scroll;position:absolute;right:calc(var(--ms-border-width, 1px)*-1);transform:translateY(100%);z-index:100}.flexible-search-menu-multiselect .multiselect-dropdown.is-top{border-radius:var(--ms-dropdown-radius,4px) var(--ms-dropdown-radius,4px) 0 0;bottom:auto;top:var(--ms-border-width,1px);transform:translateY(-100%)}.flexible-search-menu-multiselect .multiselect-dropdown.is-hidden{display:none}.flexible-search-menu-multiselect .multiselect-options{display:flex;flex-direction:column;list-style:none;margin:0;padding:0}.flexible-search-menu-multiselect .multiselect-group{margin:0;padding:0}.flexible-search-menu-multiselect .multiselect-group-label{align-items:center;background:var(--ms-group-label-bg,#e5e7eb);box-sizing:border-box;color:var(--ms-group-label-color,#374151);cursor:default;display:flex;font-size:.875rem;font-weight:600;justify-content:flex-start;line-height:var(--ms-group-label-line-height,1.375);padding:var(--ms-group-label-py,.3rem) var(--ms-group-label-px,.75rem);text-align:left;text-decoration:none}.flexible-search-menu-multiselect .multiselect-group-label.is-pointable{cursor:pointer}.flexible-search-menu-multiselect .multiselect-group-label.is-pointed{background:var(--ms-group-label-bg-pointed,#d1d5db);color:var(--ms-group-label-color-pointed,#374151)}.flexible-search-menu-multiselect .multiselect-group-label.is-selected{background:var(--ms-group-label-bg-selected,#059669);color:var(--ms-group-label-color-selected,#fff)}.flexible-search-menu-multiselect .multiselect-group-label.is-disabled{background:var(--ms-group-label-bg-disabled,#f3f4f6);color:var(--ms-group-label-color-disabled,#d1d5db);cursor:not-allowed}.flexible-search-menu-multiselect .multiselect-group-label.is-selected.is-pointed{background:var(--ms-group-label-bg-selected-pointed,#0c9e70);color:var(--ms-group-label-color-selected-pointed,#fff)}.flexible-search-menu-multiselect .multiselect-group-label.is-selected.is-disabled{background:var(--ms-group-label-bg-selected-disabled,#75cfb1);color:var(--ms-group-label-color-selected-disabled,#d1fae5)}.flexible-search-menu-multiselect .multiselect-group-options{margin:0;padding:0}.flexible-search-menu-multiselect .multiselect-option{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;font-size:var(--ms-option-font-size,1rem);justify-content:flex-start;line-height:var(--ms-option-line-height,1.375);padding:var(--ms-option-py,.5rem) var(--ms-option-px,.75rem);text-align:left;text-decoration:none}.flexible-search-menu-multiselect .multiselect-option.is-pointed{background:var(--ms-option-bg-pointed,#f3f4f6);color:var(--ms-option-color-pointed,#1f2937)}.flexible-search-menu-multiselect .multiselect-option.is-selected{background:var(--ms-option-bg-selected,#10b981);color:var(--ms-option-color-selected,#fff)}.flexible-search-menu-multiselect .multiselect-option.is-disabled{background:var(--ms-option-bg-disabled,#fff);color:var(--ms-option-color-disabled,#d1d5db);cursor:not-allowed}.flexible-search-menu-multiselect .multiselect-option.is-selected.is-pointed{background:var(--ms-option-bg-selected-pointed,#26c08e);color:var(--ms-option-color-selected-pointed,#fff)}.flexible-search-menu-multiselect .multiselect-option.is-selected.is-disabled{background:var(--ms-option-bg-selected-disabled,#87dcc0);color:var(--ms-option-color-selected-disabled,#d1fae5)}.flexible-search-menu-multiselect .multiselect-no-options,.flexible-search-menu-multiselect .multiselect-no-results{color:var(--ms-empty-color,#4b5563);padding:var(--ms-option-py,.5rem) var(--ms-option-px,.75rem)}.flexible-search-menu-multiselect .multiselect-fake-input{background:transparent;border:0;bottom:-1px;font-size:0;height:1px;left:0;outline:none;padding:0;position:absolute;right:0;width:100%}.flexible-search-menu-multiselect .multiselect-fake-input:active,.flexible-search-menu-multiselect .multiselect-fake-input:focus{outline:none}.flexible-search-menu-multiselect .multiselect-spacer{display:none}.flexible-search-menu-multiselect [dir=rtl] .multiselect-multiple-label,.flexible-search-menu-multiselect [dir=rtl] .multiselect-placeholder,.flexible-search-menu-multiselect [dir=rtl] .multiselect-single-label{left:auto;padding-left:calc(1.25rem + var(--ms-px, .875rem)*3);padding-right:var(--ms-px,.875rem);right:0}.flexible-search-menu-multiselect [dir=rtl] .multiselect-search{padding-left:0;padding-right:var(--ms-px,.875rem)}.flexible-search-menu-multiselect [dir=rtl] .multiselect-tags{padding-left:0;padding-right:var(--ms-py,.5rem)}.flexible-search-menu-multiselect [dir=rtl] .multiselect-tag{margin-left:var(--ms-tag-mx,.25rem);margin-right:0;padding:var(--ms-tag-py,.125rem) var(--ms-tag-px,.5rem) var(--ms-tag-py,.125rem) 0}.flexible-search-menu-multiselect [dir=rtl] .multiselect-tag.is-disabled{padding-left:var(--ms-tag-px,.5rem)}.flexible-search-menu-multiselect [dir=rtl] .multiselect-caret,.flexible-search-menu-multiselect [dir=rtl] .multiselect-spinner{margin:0 0 0 var(--ms-px,.875rem)}.flexible-search-menu-multiselect [dir=rtl] .multiselect-clear{padding:0 0 0 var(--ms-px,.875rem)}@-webkit-keyframes multiselect-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes multiselect-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}",""]);const l=n},202:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var r=o(645),n=o.n(r)()((function(e){return e[1]}));n.push([e.id,".group-control:focus{outline:none}.group-control:hover{color:rgb(var(--colors-primary-400))}.confirm-message{background-color:var(--20);border:1px solid #b7cad6;border-radius:4px;bottom:0;overflow:visible;padding:6px 7px;position:absolute;right:38px;white-space:nowrap;width:auto}[dir=rtl] .confirm-message{left:35px;right:auto}.confirm-message .text-danger{color:#ee3f22}.rounded-l{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-b-lg{border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem}.box-content{box-sizing:content-box}.grow{flex-grow:1}.grow-0{flex-grow:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}",""]);const l=n},606:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var r=o(645),n=o.n(r)()((function(e){return e[1]}));n.push([e.id,".pin-b,.top-full{top:100%}.pin-b{bottom:auto}.pin-t{bottom:100%;top:auto}",""]);const l=n},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,r){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(r)for(var l=0;l{},379:(e,t,o)=>{"use strict";var r,n=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},l=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),a=[];function i(e){for(var t=-1,o=0;o{"use strict";t.Z=(e,t)=>{const o=e.__vccOpts||e;for(const[e,r]of t)o[e]=r;return o}},496:(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var r=o(311),n={key:0,class:"leading-normal"},l={key:1,class:"leading-normal"},a={class:"ml-auto"};const i={props:["message","yes","no"],emits:["close","confirm"],mounted:function(){this.$nextTick((function(){}))}};const s=(0,o(744).Z)(i,[["render",function(e,t,o,i,s,u){var c=this,d=(0,r.resolveComponent)("ModalHeader"),p=(0,r.resolveComponent)("ModalContent"),m=(0,r.resolveComponent)("link-button"),v=(0,r.resolveComponent)("danger-button"),f=(0,r.resolveComponent)("ModalFooter"),h=(0,r.resolveComponent)("Modal");return(0,r.openBlock)(),(0,r.createBlock)(h,{show:!0},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("form",{onSubmit:t[1]||(t[1]=(0,r.withModifiers)((function(t){return e.$emit("confirm")}),["prevent"])),class:"mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden"},[(0,r.renderSlot)(e.$slots,"default",{},(function(){return[(0,r.createVNode)(d,{textContent:(0,r.toDisplayString)(e.__("Delete Group"))},null,8,["textContent"]),(0,r.createVNode)(p,null,{default:(0,r.withCtx)((function(){return[o.message?((0,r.openBlock)(),(0,r.createElementBlock)("p",n,(0,r.toDisplayString)(o.message),1)):((0,r.openBlock)(),(0,r.createElementBlock)("p",l,(0,r.toDisplayString)(e.__("Are you sure you want to delete this group?")),1))]})),_:1})]})),(0,r.createVNode)(f,null,{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",a,[(0,r.createVNode)(m,{type:"button","data-testid":"cancel-button",dusk:"cancel-delete-button",onClick:t[0]||(t[0]=(0,r.withModifiers)((function(e){return c.$emit("close")}),["prevent"])),class:"mr-3"},{default:(0,r.withCtx)((function(){return[(0,r.createTextVNode)((0,r.toDisplayString)(o.no),1)]})),_:1}),(0,r.createVNode)(v,{ref:"confirmButton",dusk:"confirm-delete-button",processing:e.working,disabled:e.working,type:"submit"},{default:(0,r.withCtx)((function(){return[(0,r.createTextVNode)((0,r.toDisplayString)(o.yes),1)]})),_:1},8,["processing","disabled"])])]})),_:1})],32)]})),_:3})}]])},725:(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});var r=o(311);var n=o(181);const l={props:["resource","resourceName","resourceId","field"],computed:{groups:function(){var e,t=this;return this.field.value.reduce((function(o,r){return(e=t.getGroup(r))?(o.push(e),o):o}),[])}},methods:{getLayout:function(e){if(this.field.layouts)return this.field.layouts.find((function(t){return t.name==e}))},getGroup:function(e){var t=this.getLayout(e.layout);if(t)return new n.Z(t.name,t.title,e.attributes,this.field,e.key)}}};const a=(0,o(744).Z)(l,[["render",function(e,t,o,n,l,a){var i=(0,r.resolveComponent)("detail-nova-flexible-content-group"),s=(0,r.resolveComponent)("PanelItem");return(0,r.openBlock)(),(0,r.createBlock)(s,{field:o.field},{value:(0,r.withCtx)((function(){return[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(a.groups,(function(e,t){return(0,r.openBlock)(),(0,r.createElementBlock)("div",null,[(0,r.createVNode)(i,{index:t,last:t===a.groups.length-1,group:e,resourceName:o.resourceName,resourceId:o.resourceId,attribute:o.field.attribute},null,8,["index","last","group","resourceName","resourceId","attribute"])])})),256))]})),_:1},8,["field"])}]]),i=a},669:(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var r=o(311),n=["dusk"],l={class:"block float-left border-r border-gray-100 dark:border-gray-700 pr-4 mr-4"},a=(0,r.createElementVNode)("span",{class:"text-60 text-xs"},"#",-1),i={class:"text-80"},s={class:"font-bold"};const u={props:["attribute","group","index","last","resource","resourceName","resourceId"],computed:{componentStyle:function(){return this.last?[]:["border-b border-50 pb-4 mb-4"]},titleStyle:function(){return["pb-4","border-b","border-gray-100","dark:border-gray-700"]}}};const c=(0,o(744).Z)(u,[["render",function(e,t,o,u,c,d){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(d.componentStyle),dusk:"detail-"+o.attribute+"-"+o.index},[o.group.title?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(d.titleStyle)},[(0,r.createElementVNode)("span",l,[a,(0,r.createElementVNode)("span",i,(0,r.toDisplayString)(o.index+1),1)]),(0,r.createElementVNode)("span",s,(0,r.toDisplayString)(o.group.title),1)],2)):(0,r.createCommentVNode)("",!0),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.group.fields,(function(e,t){return(0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)("detail-"+e.component),{key:t,"resource-name":o.resourceName,"resource-id":o.resourceId,field:e,"validation-errors":null,class:(0,r.normalizeClass)({"remove-bottom-border":t==o.group.fields.length-1})},null,8,["resource-name","resource-id","field","class"])})),128))],10,n)}]])},477:(e,t,o)=>{"use strict";o.d(t,{Z:()=>Et});var r=o(311),n={ref:"flexibleFieldContainer"};var l={class:"py-6 px-8 w-full"},a={key:0,class:"mb-6"},i={key:0,class:"text-danger text-sm"};var s=o(226);function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function c(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const d={mixins:[s.HandlesValidationErrors],props:function(e){for(var t=1;t=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function w(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var x=w(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),k=w(/Edge/i),C=w(/firefox/i),E=w(/safari/i)&&!w(/chrome/i)&&!w(/android/i),S=w(/iP(ad|od|hone)/i),O=w(/chrome/i)&&w(/android/i),_={capture:!1,passive:!1};function D(e,t,o){e.addEventListener(t,o,!x&&_)}function N(e,t,o){e.removeEventListener(t,o,!x&&_)}function L(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function T(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function B(e,t,o,r){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&L(e,t):L(e,t))||r&&e===o)return e;if(e===o)break}while(e=T(e))}return null}var P,V=/\s+/g;function I(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(V," ").replace(" "+t+" "," ");e.className=(r+(o?" "+t:"")).replace(V," ")}}function M(e,t,o){var r=e&&e.style;if(r){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=o+("string"==typeof o?"":"px")}}function j(e,t){var o="";if("string"==typeof e)o=e;else do{var r=M(e,"transform");r&&"none"!==r&&(o=r+" "+o)}while(!t&&(e=e.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(o)}function A(e,t,o){if(e){var r=e.getElementsByTagName(t),n=0,l=r.length;if(o)for(;n=l:n<=l))return r;if(r===z())break;r=$(r,!1)}return!1}function q(e,t,o,r){for(var n=0,l=0,a=e.children;l2&&void 0!==arguments[2]?arguments[2]:{},r=o.evt,n=y(o,re);te.pluginEvent.bind(Ue)(e,t,f({dragEl:ae,parentEl:ie,ghostEl:se,rootEl:ue,nextEl:ce,lastDownEl:de,cloneEl:pe,cloneHidden:me,dragStarted:Oe,putSortable:ye,activeSortable:Ue.active,originalEvent:r,oldIndex:ve,oldDraggableIndex:he,newIndex:fe,newDraggableIndex:ge,hideGhostForTarget:$e,unhideGhostForTarget:Ge,cloneNowHidden:function(){me=!0},cloneNowShown:function(){me=!1},dispatchSortableEvent:function(e){le({sortable:t,name:e,originalEvent:r})}},n))};function le(e){oe(f({putSortable:ye,cloneEl:pe,targetEl:ae,rootEl:ue,oldIndex:ve,oldDraggableIndex:he,newIndex:fe,newDraggableIndex:ge},e))}var ae,ie,se,ue,ce,de,pe,me,ve,fe,he,ge,be,ye,we,xe,ke,Ce,Ee,Se,Oe,_e,De,Ne,Le,Te=!1,Be=!1,Pe=[],Ve=!1,Ie=!1,Me=[],je=!1,Ae=[],ze="undefined"!=typeof document,Re=S,Fe=k||x?"cssFloat":"float",qe=ze&&!O&&!S&&"draggable"in document.createElement("div"),He=function(){if(ze){if(x)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ye=function(e,t){var o=M(e),r=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),n=q(e,0,t),l=q(e,1,t),a=n&&M(n),i=l&&M(l),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+R(n).width,u=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+R(l).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!l||"both"!==i.clear&&i.clear!==c?"horizontal":"vertical"}return n&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=r&&"none"===o[Fe]||l&&"none"===o[Fe]&&s+u>r)?"vertical":"horizontal"},Xe=function(e){function t(e,o){return function(r,n,l,a){var i=r.options.group.name&&n.options.group.name&&r.options.group.name===n.options.group.name;if(null==e&&(o||i))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(r,n,l,a),o)(r,n,l,a);var s=(o?r:n).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var o={},r=e.group;r&&"object"==h(r)||(r={name:r}),o.name=r.name,o.checkPull=t(r.pull,!0),o.checkPut=t(r.put),o.revertClone=r.revertClone,e.group=o},$e=function(){!He&&se&&M(se,"display","none")},Ge=function(){!He&&se&&M(se,"display","")};ze&&!O&&document.addEventListener("click",(function(e){if(Be)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Be=!1,!1}),!0);var Ze=function(e){if(ae){e=e.touches?e.touches[0]:e;var t=(n=e.clientX,l=e.clientY,Pe.some((function(e){var t=e[K].options.emptyInsertThreshold;if(t&&!H(e)){var o=R(e),r=n>=o.left-t&&n<=o.right+t,i=l>=o.top-t&&l<=o.bottom+t;return r&&i?a=e:void 0}})),a);if(t){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[K]._onDragOver(o)}}var n,l,a},We=function(e){ae&&ae.parentNode[K]._isOutsideThisEl(e.target)};function Ue(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=b({},t),e[K]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ye(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ue.supportPointer&&"PointerEvent"in window&&!E,emptyInsertThreshold:5};for(var r in te.initializePlugins(this,e,o),o)!(r in t)&&(t[r]=o[r]);for(var n in Xe(t),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!t.forceFallback&&qe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?D(e,"pointerdown",this._onTapStart):(D(e,"mousedown",this._onTapStart),D(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(D(e,"dragover",this),D(e,"dragenter",this)),Pe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),b(this,J())}function Ke(e,t,o,r,n,l,a,i){var s,u,c=e[K],d=c.options.onMove;return!window.CustomEvent||x||k?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=o,s.draggedRect=r,s.related=n||t,s.relatedRect=l||R(t),s.willInsertAfter=i,s.originalEvent=a,e.dispatchEvent(s),d&&(u=d.call(c,s,a)),u}function Je(e){e.draggable=!1}function Qe(){je=!1}function et(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,r=0;o--;)r+=t.charCodeAt(o);return r.toString(36)}function tt(e){return setTimeout(e,0)}function ot(e){return clearTimeout(e)}Ue.prototype={constructor:Ue,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(_e=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,ae):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,r=this.options,n=r.preventOnFilter,l=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,i=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||i,u=r.filter;if(function(e){Ae.length=0;var t=e.getElementsByTagName("input"),o=t.length;for(;o--;){var r=t[o];r.checked&&Ae.push(r)}}(o),!ae&&!(/mousedown|pointerdown/.test(l)&&0!==e.button||r.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!E||!i||"SELECT"!==i.tagName.toUpperCase())&&!((i=B(i,r.draggable,o,!1))&&i.animated||de===i)){if(ve=Y(i),he=Y(i,r.draggable),"function"==typeof u){if(u.call(this,e,i,this))return le({sortable:t,rootEl:s,name:"filter",targetEl:i,toEl:o,fromEl:o}),ne("filter",t,{evt:e}),void(n&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=B(s,r.trim(),o,!1))return le({sortable:t,rootEl:r,name:"filter",targetEl:i,fromEl:o,toEl:o}),ne("filter",t,{evt:e}),!0}))))return void(n&&e.cancelable&&e.preventDefault());r.handle&&!B(s,r.handle,o,!1)||this._prepareDragStart(e,a,i)}}},_prepareDragStart:function(e,t,o){var r,n=this,l=n.el,a=n.options,i=l.ownerDocument;if(o&&!ae&&o.parentNode===l){var s=R(o);if(ue=l,ie=(ae=o).parentNode,ce=ae.nextSibling,de=o,be=a.group,Ue.dragged=ae,we={target:ae,clientX:(t||e).clientX,clientY:(t||e).clientY},Ee=we.clientX-s.left,Se=we.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,ae.style["will-change"]="all",r=function(){ne("delayEnded",n,{evt:e}),Ue.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!C&&n.nativeDraggable&&(ae.draggable=!0),n._triggerDragStart(e,t),le({sortable:n,name:"choose",originalEvent:e}),I(ae,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){A(ae,e.trim(),Je)})),D(i,"dragover",Ze),D(i,"mousemove",Ze),D(i,"touchmove",Ze),D(i,"mouseup",n._onDrop),D(i,"touchend",n._onDrop),D(i,"touchcancel",n._onDrop),C&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ae.draggable=!0),ne("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(k||x))r();else{if(Ue.eventCanceled)return void this._onDrop();D(i,"mouseup",n._disableDelayedDrag),D(i,"touchend",n._disableDelayedDrag),D(i,"touchcancel",n._disableDelayedDrag),D(i,"mousemove",n._delayedDragTouchMoveHandler),D(i,"touchmove",n._delayedDragTouchMoveHandler),a.supportPointer&&D(i,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ae&&Je(ae),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;N(e,"mouseup",this._disableDelayedDrag),N(e,"touchend",this._disableDelayedDrag),N(e,"touchcancel",this._disableDelayedDrag),N(e,"mousemove",this._delayedDragTouchMoveHandler),N(e,"touchmove",this._delayedDragTouchMoveHandler),N(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?D(document,"pointermove",this._onTouchMove):D(document,t?"touchmove":"mousemove",this._onTouchMove):(D(ae,"dragend",this),D(ue,"dragstart",this._onDragStart));try{document.selection?tt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Te=!1,ue&&ae){ne("dragStarted",this,{evt:t}),this.nativeDraggable&&D(document,"dragover",We);var o=this.options;!e&&I(ae,o.dragClass,!1),I(ae,o.ghostClass,!0),Ue.active=this,e&&this._appendGhost(),le({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(xe){this._lastX=xe.clientX,this._lastY=xe.clientY,$e();for(var e=document.elementFromPoint(xe.clientX,xe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(xe.clientX,xe.clientY))!==t;)t=e;if(ae.parentNode[K]._isOutsideThisEl(e),t)do{if(t[K]){if(t[K]._onDragOver({clientX:xe.clientX,clientY:xe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ge()}},_onTouchMove:function(e){if(we){var t=this.options,o=t.fallbackTolerance,r=t.fallbackOffset,n=e.touches?e.touches[0]:e,l=se&&j(se,!0),a=se&&l&&l.a,i=se&&l&&l.d,s=Re&&Le&&X(Le),u=(n.clientX-we.clientX+r.x)/(a||1)+(s?s[0]-Me[0]:0)/(a||1),c=(n.clientY-we.clientY+r.y)/(i||1)+(s?s[1]-Me[1]:0)/(i||1);if(!Ue.active&&!Te){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))r.right+n||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+n}(e,n,this)&&!h.animated){if(h===ae)return P(!1);if(h&&l===e.target&&(a=h),a&&(o=R(a)),!1!==Ke(ue,l,ae,t,a,o,e,!!a))return T(),h&&h.nextSibling?l.insertBefore(ae,h.nextSibling):l.appendChild(ae),ie=l,V(),P(!0)}else if(h&&function(e,t,o){var r=R(q(o.el,0,o.options,!0)),n=10;return t?e.clientXc+u*l/2:sd-Ne)return-De}else if(s>c+u*(1-n)/2&&sd-u*l/2))return s>c+u/2?1:-1;return 0}(e,a,o,n,k?1:i.swapThreshold,null==i.invertedSwapThreshold?i.swapThreshold:i.invertedSwapThreshold,Ie,_e===a),0!==b){var O=Y(ae);do{O-=b,w=ie.children[O]}while(w&&("none"===M(w,"display")||w===se))}if(0===b||w===a)return P(!1);_e=a,De=b;var _=a.nextElementSibling,D=!1,N=Ke(ue,l,ae,t,a,o,e,D=1===b);if(!1!==N)return 1!==N&&-1!==N||(D=1===N),je=!0,setTimeout(Qe,30),T(),D&&!_?l.appendChild(ae):a.parentNode.insertBefore(ae,D?_:a),E&&W(E,0,S-E.scrollTop),ie=ae.parentNode,void 0===y||Ie||(Ne=Math.abs(y-R(a)[C])),V(),P(!0)}if(l.contains(ae))return P(!1)}return!1}function L(i,s){ne(i,m,f({evt:e,isOwner:c,axis:n?"vertical":"horizontal",revert:r,dragRect:t,targetRect:o,canSort:d,fromSortable:p,target:a,completed:P,onMove:function(o,r){return Ke(ue,l,ae,t,o,R(o),e,r)},changed:V},s))}function T(){L("dragOverAnimationCapture"),m.captureAnimationState(),m!==p&&p.captureAnimationState()}function P(t){return L("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(m),m!==p&&(I(ae,ye?ye.options.ghostClass:u.options.ghostClass,!1),I(ae,i.ghostClass,!0)),ye!==m&&m!==Ue.active?ye=m:m===Ue.active&&ye&&(ye=null),p===m&&(m._ignoreWhileAnimating=a),m.animateAll((function(){L("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===ae&&!ae.animated||a===l&&!a.animated)&&(_e=null),i.dragoverBubble||e.rootEl||a===document||(ae.parentNode[K]._isOutsideThisEl(e.target),!t&&Ze(e)),!i.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function V(){fe=Y(ae),ge=Y(ae,i.draggable),le({sortable:m,name:"change",toEl:l,newIndex:fe,newDraggableIndex:ge,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){N(document,"mousemove",this._onTouchMove),N(document,"touchmove",this._onTouchMove),N(document,"pointermove",this._onTouchMove),N(document,"dragover",Ze),N(document,"mousemove",Ze),N(document,"touchmove",Ze)},_offUpEvents:function(){var e=this.el.ownerDocument;N(e,"mouseup",this._onDrop),N(e,"touchend",this._onDrop),N(e,"pointerup",this._onDrop),N(e,"touchcancel",this._onDrop),N(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;fe=Y(ae),ge=Y(ae,o.draggable),ne("drop",this,{evt:e}),ie=ae&&ae.parentNode,fe=Y(ae),ge=Y(ae,o.draggable),Ue.eventCanceled||(Te=!1,Ie=!1,Ve=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ot(this.cloneId),ot(this._dragStartId),this.nativeDraggable&&(N(document,"drop",this),N(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),E&&M(document.body,"user-select",""),M(ae,"transform",""),e&&(Oe&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),se&&se.parentNode&&se.parentNode.removeChild(se),(ue===ie||ye&&"clone"!==ye.lastPutMode)&&pe&&pe.parentNode&&pe.parentNode.removeChild(pe),ae&&(this.nativeDraggable&&N(ae,"dragend",this),Je(ae),ae.style["will-change"]="",Oe&&!Te&&I(ae,ye?ye.options.ghostClass:this.options.ghostClass,!1),I(ae,this.options.chosenClass,!1),le({sortable:this,name:"unchoose",toEl:ie,newIndex:null,newDraggableIndex:null,originalEvent:e}),ue!==ie?(fe>=0&&(le({rootEl:ie,name:"add",toEl:ie,fromEl:ue,originalEvent:e}),le({sortable:this,name:"remove",toEl:ie,originalEvent:e}),le({rootEl:ie,name:"sort",toEl:ie,fromEl:ue,originalEvent:e}),le({sortable:this,name:"sort",toEl:ie,originalEvent:e})),ye&&ye.save()):fe!==ve&&fe>=0&&(le({sortable:this,name:"update",toEl:ie,originalEvent:e}),le({sortable:this,name:"sort",toEl:ie,originalEvent:e})),Ue.active&&(null!=fe&&-1!==fe||(fe=ve,ge=he),le({sortable:this,name:"end",toEl:ie,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){ne("nulling",this),ue=ae=ie=se=ce=pe=de=me=we=xe=Oe=fe=ge=ve=he=_e=De=ye=be=Ue.dragged=Ue.ghost=Ue.clone=Ue.active=null,Ae.forEach((function(e){e.checked=!0})),Ae.length=ke=Ce=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":ae&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,r=0,n=o.length,l=this.options;r=this.order.length-1||this.order.splice(t+1,0,this.order.splice(t,1)[0])},remove:function(e){var t=this.order.indexOf(e);t<0||(this.order.splice(t,1),delete this.groups[e])},initSortable:function(){var e=this,t=this.$refs.flexibleFieldContainer;t&&!this.sortableInstance&&(this.sortableInstance=gt.create(t,{ghostClass:"nova-flexible-content-sortable-ghost",dragClass:"nova-flexible-content-sortable-drag",chosenClass:"nova-flexible-content-sortable-chosen",direction:"vertical",handle:".nova-flexible-content-drag-button",scrollSpeed:5,animation:500,onEnd:function(t){var o=t.item.id,r=t.oldIndex,n=t.newIndex;nr&&e.moveDown(o)}}))}}},Ct=(0,p.Z)(kt,[["render",function(e,t,o,l,a,i){var s=(0,r.resolveComponent)("form-nova-flexible-content-group");return(0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.currentField.fullWidth?"FullWidthField":"default-field"),{dusk:e.currentField.attribute,field:e.currentField,errors:e.errors,"show-help-text":e.showHelpText,"full-width-content":""},{field:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",n,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(i.orderedGroups,(function(t,o){return(0,r.openBlock)(),(0,r.createBlock)(s,{dusk:e.currentField.attribute+"-"+o,key:t.key,field:e.currentField,group:t,index:o,"resource-name":e.resourceName,"resource-id":e.resourceId,errors:e.errors,mode:e.mode,onMoveUp:function(e){return i.moveUp(t.key)},onMoveDown:function(e){return i.moveDown(t.key)},onRemove:function(e){return i.remove(t.key)}},null,8,["dusk","field","group","index","resource-name","resource-id","errors","mode","onMoveUp","onMoveDown","onRemove"])})),128))],512),((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.currentField.menu.component),{layouts:i.layouts,field:e.currentField,"limit-counter":i.limitCounter,"limit-per-layout-counter":i.limitPerLayoutCounter,errors:e.errors,"resource-name":e.resourceName,"resource-id":e.resourceId,onAddGroup:t[0]||(t[0]=function(e){return i.addGroup(e)})},null,40,["layouts","field","limit-counter","limit-per-layout-counter","errors","resource-name","resource-id"]))]})),_:1},8,["dusk","field","errors","show-help-text"])}]]),Et=Ct},698:(e,t,o)=>{"use strict";o.d(t,{Z:()=>k});var r=o(311),n=["id"],l={class:"w-full shrink"},a=["title"],i=["title"],s={class:"text-80 grow px-4"},u={class:"mr-3 font-semibold"},c={key:2,class:"flex"},d=["title"],p=["title"],m=["title"],v=["title"];function f(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function h(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const g={mixins:[{emits:["actionExecuted"],props:["resourceName","resourceId","resource","panel"],methods:{actionExecuted:function(){this.$emit("actionExecuted")}}}],props:function(e){for(var t=1;t{"use strict";o.d(t,{Z:()=>m});var r=o(311),n={key:0,class:"relative"},l={class:"list-reset"},a=["dusk","onClick"],i={class:"text-90"};const s={props:["layouts","field","resourceName","resourceId","resource","errors","limitCounter","limitPerLayoutCounter"],emits:["addGroup"],data:function(){return{isLayoutsDropdownOpen:!1,dropdownOrientation:"bottom"}},computed:{filteredLayouts:function(){var e=this;return this.layouts.filter((function(t){var o=e.limitPerLayoutCounter[t.name];return null===o||o>0||void 0===o}))},isBelowLayoutLimits:function(){return(this.limitCounter>0||null===this.limitCounter)&&this.filteredLayouts.length>0},dropdownClasses:function(){return{"mt-3":"bottom"===this.dropdownOrientation,"pin-b":"bottom"===this.dropdownOrientation,"mb-3":"top"===this.dropdownOrientation,"pin-t":"top"===this.dropdownOrientation}}},methods:{toggleLayoutsDropdownOrAddDefault:function(e){var t=this;if(1===this.layouts.length)return this.addGroup(this.layouts[0]);this.isLayoutsDropdownOpen=!this.isLayoutsDropdownOpen,this.$nextTick((function(){t.isLayoutsDropdownOpen?t.$refs.dropdown.getBoundingClientRect().bottom>window.innerHeight&&(t.dropdownOrientation="top"):t.dropdownOrientation="bottom"}))},addGroup:function(e){e&&(this.$emit("addGroup",e),Nova.$emit("nova-flexible-content-add-group",e),this.isLayoutsDropdownOpen=!1,this.dropdownOrientation="top")}}};var u=o(379),c=o.n(u),d=o(606),p={insert:"head",singleton:!1};c()(d.Z,p);d.Z.locals;const m=(0,o(744).Z)(s,[["render",function(e,t,o,s,u,c){var d=(0,r.resolveComponent)("default-button");return o.layouts?((0,r.openBlock)(),(0,r.createElementBlock)("div",n,[u.isLayoutsDropdownOpen&&o.layouts.length>1?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,ref:"dropdown",class:(0,r.normalizeClass)(["z-20 absolute rounded-lg shadow-lg max-w-full max-h-search overflow-y-auto border border-40",c.dropdownClasses])},[(0,r.createElementVNode)("ul",l,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(c.filteredLayouts,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("li",{class:"border-b border-gray-100 dark:border-gray-700",key:"add-"+e.name},[(0,r.createElementVNode)("a",{dusk:"add-"+e.name,onClick:function(t){return c.addGroup(e)},class:"cursor-pointer flex items-center hover:bg-gray-50 dark:hover:bg-gray-900 block py-2 px-3 no-underline font-normal bg-white dark:bg-gray-800"},[(0,r.createElementVNode)("div",null,[(0,r.createElementVNode)("p",i,(0,r.toDisplayString)(e.title),1)])],8,a)])})),128))])],2)):(0,r.createCommentVNode)("",!0),c.isBelowLayoutLimits?((0,r.openBlock)(),(0,r.createBlock)(d,{key:1,dusk:"toggle-layouts-dropdown-or-add-default",type:"button",tabindex:"0",ref:"dropdownButton",onClick:c.toggleLayoutsDropdownOrAddDefault},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(o.field.button),1)]})),_:1},8,["onClick"])):(0,r.createCommentVNode)("",!0)])):(0,r.createCommentVNode)("",!0)}]])},944:(e,t,o)=>{"use strict";o.d(t,{Z:()=>W});var r=o(311),n={key:0,class:"w-3/5"},l={key:0},a={key:0},i={key:1},s={style:{"min-width":"300px"}},u={class:"flexible-search-menu-multiselect"};function c(e){return-1!==[null,void 0].indexOf(e)}function d(e,t,o){const{object:n,valueProp:l,mode:a}=(0,r.toRefs)(e),i=(0,r.getCurrentInstance)().proxy,s=o.iv,u=e=>n.value||c(e)?e:Array.isArray(e)?e.map((e=>e[l.value])):e[l.value],d=e=>c(e)?"single"===a.value?{}:[]:e;return{update:e=>{s.value=d(e);const o=u(e);t.emit("change",o,i),t.emit("input",o),t.emit("update:modelValue",o)}}}function p(e,t){const{value:o,modelValue:n,mode:l,valueProp:a}=(0,r.toRefs)(e),i=(0,r.ref)("single"!==l.value?[]:{}),s=n&&void 0!==n.value?n:o,u=(0,r.computed)((()=>"single"===l.value?i.value[a.value]:i.value.map((e=>e[a.value])))),c=(0,r.computed)((()=>"single"!==l.value?i.value.map((e=>e[a.value])).join(","):i.value[a.value]));return{iv:i,internalValue:i,ev:s,externalValue:s,textValue:c,plainValue:u}}function m(e,t,o){const{regex:n}=(0,r.toRefs)(e),l=(0,r.getCurrentInstance)().proxy,a=o.isOpen,i=o.open,s=(0,r.ref)(null),u=(0,r.ref)(null);return(0,r.watch)(s,(e=>{!a.value&&e&&i(),t.emit("search-change",e,l)})),{search:s,input:u,clearSearch:()=>{s.value=""},handleSearchInput:e=>{s.value=e.target.value},handleKeypress:e=>{if(n&&n.value){let t=n.value;"string"==typeof t&&(t=new RegExp(t)),e.key.match(t)||e.preventDefault()}},handlePaste:e=>{if(n&&n.value){let t=(e.clipboardData||window.clipboardData).getData("Text"),o=n.value;"string"==typeof o&&(o=new RegExp(o)),t.split("").every((e=>!!e.match(o)))||e.preventDefault()}t.emit("paste",e,l)}}}function v(e,t,o){const{groupSelect:n,mode:l,groups:a,disabledProp:i}=(0,r.toRefs)(e),s=(0,r.ref)(null),u=e=>{void 0===e||null!==e&&e[i.value]||a.value&&e&&e.group&&("single"===l.value||!n.value)||(s.value=e)};return{pointer:s,setPointer:u,clearPointer:()=>{u(null)}}}function f(e,t=!0){return t?String(e).toLowerCase().trim():String(e).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function h(e,t,o){const{options:n,mode:l,trackBy:a,limit:i,hideSelected:s,createTag:u,createOption:d,label:p,appendNewTag:m,appendNewOption:v,multipleLabel:h,object:g,loading:b,delay:y,resolveOnLoad:w,minChars:x,filterResults:k,clearOnSearch:C,clearOnSelect:E,valueProp:S,canDeselect:O,max:_,strict:D,closeOnSelect:N,groups:L,reverse:T,infinite:B,groupOptions:P,groupHideEmpty:V,groupSelect:I,onCreate:M,disabledProp:j,searchStart:A}=(0,r.toRefs)(e),z=(0,r.getCurrentInstance)().proxy,R=o.iv,F=o.ev,q=o.search,H=o.clearSearch,Y=o.update,X=o.pointer,$=o.clearPointer,G=o.focus,Z=o.deactivate,W=o.close,U=(0,r.ref)([]),K=(0,r.ref)([]),J=(0,r.ref)(!1),Q=(0,r.ref)(null),ee=(0,r.ref)(B.value&&-1===i.value?10:i.value),te=(0,r.computed)((()=>u.value||d.value||!1)),oe=(0,r.computed)((()=>void 0!==m.value?m.value:void 0===v.value||v.value)),re=(0,r.computed)((()=>{if(L.value){let e=K.value||[],t=[];return e.forEach((e=>{Be(e[P.value]).forEach((o=>{t.push(Object.assign({},o,e[j.value]?{[j.value]:!0}:{}))}))})),t}{let e=Be(K.value||[]);return U.value.length&&(e=e.concat(U.value)),e}})),ne=(0,r.computed)((()=>L.value?Le((K.value||[]).map((e=>{const t=Be(e[P.value]);return{...e,group:!0,[P.value]:Te(t,!1).map((t=>Object.assign({},t,e[j.value]?{[j.value]:!0}:{}))),__VISIBLE__:Te(t).map((t=>Object.assign({},t,e[j.value]?{[j.value]:!0}:{})))}}))):[])),le=(0,r.computed)((()=>{let e=re.value;return T.value&&(e=e.reverse()),de.value.length&&(e=de.value.concat(e)),Te(e)})),ae=(0,r.computed)((()=>{let e=le.value;return ee.value>0&&(e=e.slice(0,ee.value)),e})),ie=(0,r.computed)((()=>{switch(l.value){case"single":return!c(R.value[S.value]);case"multiple":case"tags":return!c(R.value)&&R.value.length>0}})),se=(0,r.computed)((()=>void 0!==h&&void 0!==h.value?h.value(R.value,z):R.value&&R.value.length>1?`${R.value.length} options selected`:"1 option selected")),ue=(0,r.computed)((()=>!re.value.length&&!J.value&&!de.value.length)),ce=(0,r.computed)((()=>re.value.length>0&&0==ae.value.length&&(q.value&&L.value||!L.value))),de=(0,r.computed)((()=>!1!==te.value&&q.value?-1!==De(q.value)?[]:[{[S.value]:q.value,[p.value]:q.value,[pe.value]:q.value,__CREATE__:!0}]:[])),pe=(0,r.computed)((()=>a.value||p.value)),me=(0,r.computed)((()=>{switch(l.value){case"single":return null;case"multiple":case"tags":return[]}})),ve=(0,r.computed)((()=>b.value||J.value)),fe=e=>{switch("object"!=typeof e&&(e=_e(e)),l.value){case"single":Y(e);break;case"multiple":case"tags":Y(R.value.concat(e))}t.emit("select",ge(e),e,z)},he=e=>{switch("object"!=typeof e&&(e=_e(e)),l.value){case"single":ye();break;case"tags":case"multiple":Y(Array.isArray(e)?R.value.filter((t=>-1===e.map((e=>e[S.value])).indexOf(t[S.value]))):R.value.filter((t=>t[S.value]!=e[S.value])))}t.emit("deselect",ge(e),e,z)},ge=e=>g.value?e:e[S.value],be=e=>{he(e)},ye=()=>{t.emit("clear",z),Y(me.value)},we=e=>{if(void 0!==e.group)return"single"!==l.value&&(Oe(e[P.value])&&e[P.value].length);switch(l.value){case"single":return!c(R.value)&&R.value[S.value]==e[S.value];case"tags":case"multiple":return!c(R.value)&&-1!==R.value.map((e=>e[S.value])).indexOf(e[S.value])}},xe=e=>!0===e[j.value],ke=()=>!(void 0===_||-1===_.value||!ie.value&&_.value>0)&&R.value.length>=_.value,Ce=e=>{switch(e.__CREATE__&&delete(e={...e}).__CREATE__,l.value){case"single":if(e&&we(e))return void(O.value&&he(e));e&&Ee(e),E.value&&H(),N.value&&($(),W()),e&&fe(e);break;case"multiple":if(e&&we(e))return void he(e);if(ke())return;e&&(Ee(e),fe(e)),E.value&&H(),s.value&&$(),N.value&&W();break;case"tags":if(e&&we(e))return void he(e);if(ke())return;e&&Ee(e),E.value&&H(),e&&fe(e),s.value&&$(),N.value&&W()}N.value||G()},Ee=e=>{void 0===_e(e[S.value])&&te.value&&(t.emit("tag",e[S.value],z),t.emit("option",e[S.value],z),oe.value&&Ne(e),H())},Se=e=>void 0===e.find((e=>!we(e)&&!e[j.value])),Oe=e=>void 0===e.find((e=>!we(e))),_e=e=>re.value[re.value.map((e=>String(e[S.value]))).indexOf(String(e))],De=(e,t=!0)=>re.value.map((e=>parseInt(e[pe.value])==e[pe.value]?parseInt(e[pe.value]):e[pe.value])).indexOf(parseInt(e)==e?parseInt(e):e),Ne=e=>{U.value.push(e)},Le=e=>V.value?e.filter((e=>q.value?e.__VISIBLE__.length:e[P.value].length)):e.filter((e=>!q.value||e.__VISIBLE__.length)),Te=(e,t=!0)=>{let o=e;return q.value&&k.value&&(o=o.filter((e=>A.value?f(e[pe.value],D.value).startsWith(f(q.value,D.value)):-1!==f(e[pe.value],D.value).indexOf(f(q.value,D.value))))),s.value&&t&&(o=o.filter((e=>!(e=>-1!==["tags","multiple"].indexOf(l.value)&&s.value&&we(e))(e)))),o},Be=e=>{let t=e;var o;return o=t,"[object Object]"===Object.prototype.toString.call(o)&&(t=Object.keys(t).map((e=>{let o=t[e];return{[S.value]:e,[pe.value]:o,[p.value]:o}}))),t=t.map((e=>"object"==typeof e?e:{[S.value]:e,[pe.value]:e,[p.value]:e})),t},Pe=()=>{c(F.value)||(R.value=Me(F.value))},Ve=e=>(J.value=!0,new Promise(((t,o)=>{n.value(q.value,z).then((t=>{K.value=t||[],"function"==typeof e&&e(t),J.value=!1})).catch((e=>{console.error(e),K.value=[],J.value=!1})).finally((()=>{t()}))}))),Ie=()=>{if(ie.value)if("single"===l.value){let e=_e(R.value[S.value]);if(void 0!==e){let t=e[p.value];R.value[p.value]=t,g.value&&(F.value[p.value]=t)}}else R.value.forEach(((e,t)=>{let o=_e(R.value[t][S.value]);if(void 0!==o){let e=o[p.value];R.value[t][p.value]=e,g.value&&(F.value[t][p.value]=e)}}))},Me=e=>c(e)?"single"===l.value?{}:[]:g.value?e:"single"===l.value?_e(e)||{}:e.filter((e=>!!_e(e))).map((e=>_e(e))),je=()=>{Q.value=(0,r.watch)(q,(e=>{e.length{e==q.value&&n.value(q.value,z).then((t=>{e!=q.value&&q.value||(K.value=t,X.value=ae.value.filter((e=>!0!==e[j.value]))[0]||null,J.value=!1)})).catch((e=>{console.error(e)}))}),y.value))}),{flush:"sync"})};if("single"!==l.value&&!c(F.value)&&!Array.isArray(F.value))throw new Error(`v-model must be an array when using "${l.value}" mode`);return n&&"function"==typeof n.value?w.value?Ve(Pe):1==g.value&&Pe():(K.value=n.value,Pe()),y.value>-1&&je(),(0,r.watch)(y,((e,t)=>{Q.value&&Q.value(),e>=0&&je()})),(0,r.watch)(F,(e=>{if(c(e))R.value=Me(e);else switch(l.value){case"single":(g.value?e[S.value]!=R.value[S.value]:e!=R.value[S.value])&&(R.value=Me(e));break;case"multiple":case"tags":(function(e,t){const o=t.slice().sort();return e.length===t.length&&e.slice().sort().every((function(e,t){return e===o[t]}))})(g.value?e.map((e=>e[S.value])):e,R.value.map((e=>e[S.value])))||(R.value=Me(e))}}),{deep:!0}),(0,r.watch)(n,((t,o)=>{"function"==typeof e.options?w.value&&Ve():(K.value=e.options,Object.keys(R.value).length||Pe(),Ie())})),(0,r.watch)(p,Ie),{pfo:le,fo:ae,filteredOptions:ae,hasSelected:ie,multipleLabelText:se,eo:re,extendedOptions:re,fg:ne,filteredGroups:ne,noOptions:ue,noResults:ce,resolving:J,busy:ve,offset:ee,select:fe,deselect:he,remove:be,selectAll:()=>{"single"!==l.value&&fe(ae.value)},clear:ye,isSelected:we,isDisabled:xe,isMax:ke,getOption:_e,handleOptionClick:e=>{if(!xe(e))return M&&M.value&&!we(e)&&e.__CREATE__&&(delete(e={...e}).__CREATE__,(e=M.value(e,z))instanceof Promise)?(J.value=!0,void e.then((e=>{J.value=!1,Ce(e)}))):void Ce(e)},handleGroupClick:e=>{if(!xe(e)&&"single"!==l.value&&I.value){switch(l.value){case"multiple":case"tags":Se(e[P.value])?he(e[P.value]):fe(e[P.value].filter((e=>-1===R.value.map((e=>e[S.value])).indexOf(e[S.value]))).filter((e=>!e[j.value])).filter(((e,t)=>R.value.length+1+t<=_.value||-1===_.value)))}N.value&&Z()}},handleTagRemove:(e,t)=>{0===t.button?be(e):t.preventDefault()},refreshOptions:e=>{Ve(e)},resolveOptions:Ve,refreshLabels:Ie}}function g(e,t,o){const{valueProp:n,showOptions:l,searchable:a,groupLabel:i,groups:s,mode:u,groupSelect:c,disabledProp:d}=(0,r.toRefs)(e),p=o.fo,m=o.fg,v=o.handleOptionClick,f=o.handleGroupClick,h=o.search,g=o.pointer,b=o.setPointer,y=o.clearPointer,w=o.multiselect,x=o.isOpen,k=(0,r.computed)((()=>p.value.filter((e=>!e[d.value])))),C=(0,r.computed)((()=>m.value.filter((e=>!e[d.value])))),E=(0,r.computed)((()=>"single"!==u.value&&c.value)),S=(0,r.computed)((()=>g.value&&g.value.group)),O=(0,r.computed)((()=>M(g.value))),_=(0,r.computed)((()=>{const e=S.value?g.value:M(g.value),t=C.value.map((e=>e[i.value])).indexOf(e[i.value]);let o=C.value[t-1];return void 0===o&&(o=N.value),o})),D=(0,r.computed)((()=>{let e=C.value.map((e=>e.label)).indexOf(S.value?g.value[i.value]:M(g.value)[i.value])+1;return C.value.length<=e&&(e=0),C.value[e]})),N=(0,r.computed)((()=>[...C.value].slice(-1)[0])),L=(0,r.computed)((()=>g.value.__VISIBLE__.filter((e=>!e[d.value]))[0])),T=(0,r.computed)((()=>{const e=O.value.__VISIBLE__.filter((e=>!e[d.value]));return e[e.map((e=>e[n.value])).indexOf(g.value[n.value])-1]})),B=(0,r.computed)((()=>{const e=M(g.value).__VISIBLE__.filter((e=>!e[d.value]));return e[e.map((e=>e[n.value])).indexOf(g.value[n.value])+1]})),P=(0,r.computed)((()=>[..._.value.__VISIBLE__.filter((e=>!e[d.value]))].slice(-1)[0])),V=(0,r.computed)((()=>[...N.value.__VISIBLE__.filter((e=>!e[d.value]))].slice(-1)[0])),I=()=>{b(k.value[0]||null)},M=e=>C.value.find((t=>-1!==t.__VISIBLE__.map((e=>e[n.value])).indexOf(e[n.value]))),j=()=>{let e=w.value.querySelector("[data-pointed]");if(!e)return;let t=e.parentElement.parentElement;s.value&&(t=S.value?e.parentElement.parentElement.parentElement:e.parentElement.parentElement.parentElement.parentElement),e.offsetTop+e.offsetHeight>t.clientHeight+t.scrollTop&&(t.scrollTop=e.offsetTop+e.offsetHeight-t.clientHeight),e.offsetTop{a.value&&(e.length&&l.value?I():y())})),(0,r.watch)(x,(e=>{if(e){let e=w.value.querySelectorAll("[data-selected]")[0];if(!e)return;let t=e.parentElement.parentElement;(0,r.nextTick)((()=>{t.scrollTop>0||(t.scrollTop=e.offsetTop)}))}})),{pointer:g,canPointGroups:E,isPointed:e=>!(!g.value||!(!e.group&&g.value[n.value]==e[n.value]||void 0!==e.group&&g.value[i.value]==e[i.value]))||void 0,setPointerFirst:I,selectPointer:()=>{g.value&&!0!==g.value[d.value]&&(S.value?f(g.value):v(g.value))},forwardPointer:()=>{if(null===g.value)b((s.value&&E.value?C.value[0]:k.value[0])||null);else if(s.value&&E.value){let e=S.value?L.value:B.value;void 0===e&&(e=D.value),b(e||null)}else{let e=k.value.map((e=>e[n.value])).indexOf(g.value[n.value])+1;k.value.length<=e&&(e=0),b(k.value[e]||null)}(0,r.nextTick)((()=>{j()}))},backwardPointer:()=>{if(null===g.value){let e=k.value[k.value.length-1];s.value&&E.value&&(e=V.value,void 0===e&&(e=N.value)),b(e||null)}else if(s.value&&E.value){let e=S.value?P.value:T.value;void 0===e&&(e=S.value?_.value:O.value),b(e||null)}else{let e=k.value.map((e=>e[n.value])).indexOf(g.value[n.value])-1;e<0&&(e=k.value.length-1),b(k.value[e]||null)}(0,r.nextTick)((()=>{j()}))}}}function b(e,t,o){const{disabled:n}=(0,r.toRefs)(e),l=(0,r.getCurrentInstance)().proxy,a=(0,r.ref)(!1);return{isOpen:a,open:()=>{a.value||n.value||(a.value=!0,t.emit("open",l))},close:()=>{a.value&&(a.value=!1,t.emit("close",l))}}}function y(e,t,o){const{searchable:n,disabled:l}=(0,r.toRefs)(e),a=o.input,i=o.open,s=o.close,u=o.clearSearch,c=o.isOpen,d=(0,r.ref)(null),p=(0,r.ref)(null),m=(0,r.ref)(!1),v=(0,r.computed)((()=>n.value||l.value?-1:0)),f=()=>{n.value&&a.value.blur(),d.value.blur()},h=()=>{n.value&&!l.value&&a.value.focus()},g=()=>{l.value||(m.value=!0,i())},b=()=>{m.value=!1,setTimeout((()=>{m.value||(s(),u())}),1)};return{multiselect:d,tags:p,tabindex:v,isActive:m,blur:f,focus:h,handleFocus:()=>{h()},activate:g,deactivate:b,handleCaretClick:()=>{b(),f()},handleMousedown:e=>{c.value&&(e.target.isEqualNode(d.value)||e.target.isEqualNode(p.value))?setTimeout((()=>{b()}),0):document.activeElement.isEqualNode(d.value)&&!c.value&&g()}}}function w(e,t,o){const{mode:n,addTagOn:l,openDirection:a,searchable:i,showOptions:s,valueProp:u,groups:c,addOptionOn:d,createTag:p,createOption:m,reverse:v}=(0,r.toRefs)(e),f=(0,r.getCurrentInstance)().proxy,h=o.iv,g=o.update,b=o.search,y=o.setPointer,w=o.selectPointer,x=o.backwardPointer,k=o.forwardPointer,C=o.isOpen,E=o.open,S=o.blur,O=o.fo,_=(0,r.computed)((()=>p.value||m.value||!1)),D=(0,r.computed)((()=>void 0!==l.value?l.value:void 0!==d.value?d.value:["enter"])),N=()=>{"tags"===n.value&&!s.value&&_.value&&i.value&&!c.value&&y(O.value[O.value.map((e=>e[u.value])).indexOf(b.value)])};return{handleKeydown:e=>{switch(t.emit("keydown",e,f),e.key){case"Backspace":if("single"===n.value)return;if(i.value&&-1===[null,""].indexOf(b.value))return;if(0===h.value.length)return;g([...h.value].slice(0,-1));break;case"Enter":if(e.preventDefault(),-1===D.value.indexOf("enter")&&_.value)return;N(),w();break;case" ":if(!_.value&&!i.value)return e.preventDefault(),N(),void w();if(!_.value)return!1;if(-1===D.value.indexOf("space")&&_.value)return;e.preventDefault(),N(),w();break;case"Tab":case";":case",":if(-1===D.value.indexOf(e.key.toLowerCase())||!_.value)return;N(),w(),e.preventDefault();break;case"Escape":S();break;case"ArrowUp":if(e.preventDefault(),!s.value)return;C.value||E(),x();break;case"ArrowDown":if(e.preventDefault(),!s.value)return;C.value||E(),k()}},handleKeyup:e=>{t.emit("keyup",e,f)},preparePointer:N}}function x(e,t,o){const{classes:n,disabled:l,openDirection:a,showOptions:i}=(0,r.toRefs)(e),s=o.isOpen,u=o.isPointed,c=o.isSelected,d=o.isDisabled,p=o.isActive,m=o.canPointGroups,v=o.resolving,f=o.fo,h=(0,r.computed)((()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",spacer:"multiselect-spacer",...n.value}))),g=(0,r.computed)((()=>!!(s.value&&i.value&&(!v.value||v.value&&f.value.length))));return{classList:(0,r.computed)((()=>{const e=h.value;return{container:[e.container].concat(l.value?e.containerDisabled:[]).concat(g.value&&"top"===a.value?e.containerOpenTop:[]).concat(g.value&&"top"!==a.value?e.containerOpen:[]).concat(p.value?e.containerActive:[]),spacer:e.spacer,singleLabel:e.singleLabel,singleLabelText:e.singleLabelText,multipleLabel:e.multipleLabel,search:e.search,tags:e.tags,tag:[e.tag].concat(l.value?e.tagDisabled:[]),tagRemove:e.tagRemove,tagRemoveIcon:e.tagRemoveIcon,tagsSearchWrapper:e.tagsSearchWrapper,tagsSearch:e.tagsSearch,tagsSearchCopy:e.tagsSearchCopy,placeholder:e.placeholder,caret:[e.caret].concat(s.value?e.caretOpen:[]),clear:e.clear,clearIcon:e.clearIcon,spinner:e.spinner,inifinite:e.inifinite,inifiniteSpinner:e.inifiniteSpinner,dropdown:[e.dropdown].concat("top"===a.value?e.dropdownTop:[]).concat(s.value&&i.value&&g.value?[]:e.dropdownHidden),options:[e.options].concat("top"===a.value?e.optionsTop:[]),group:e.group,groupLabel:t=>{let o=[e.groupLabel];return u(t)?o.push(c(t)?e.groupLabelSelectedPointed:e.groupLabelPointed):c(t)&&m.value?o.push(d(t)?e.groupLabelSelectedDisabled:e.groupLabelSelected):d(t)&&o.push(e.groupLabelDisabled),m.value&&o.push(e.groupLabelPointable),o},groupOptions:e.groupOptions,option:(t,o)=>{let r=[e.option];return u(t)?r.push(c(t)?e.optionSelectedPointed:e.optionPointed):c(t)?r.push(d(t)?e.optionSelectedDisabled:e.optionSelected):(d(t)||o&&d(o))&&r.push(e.optionDisabled),r},noOptions:e.noOptions,noResults:e.noResults,fakeInput:e.fakeInput}})),showDropdown:g}}function k(e,t,o){const{limit:n,infinite:l}=(0,r.toRefs)(e),a=o.isOpen,i=o.offset,s=o.search,u=o.pfo,c=o.eo,d=(0,r.ref)(null),p=(0,r.ref)(null),m=(0,r.computed)((()=>i.value{const{isIntersecting:t,target:o}=e[0];if(t){const e=o.offsetParent,t=e.scrollTop;i.value+=-1==n.value?10:n.value,(0,r.nextTick)((()=>{e.scrollTop=t}))}},f=()=>{a.value&&i.value{l.value&&f()})),(0,r.watch)(s,(()=>{l.value&&(i.value=n.value,f())}),{flush:"post"}),(0,r.watch)(c,(()=>{l.value&&f()}),{immediate:!1,flush:"post"}),(0,r.onMounted)((()=>{window&&window.IntersectionObserver&&(d.value=new IntersectionObserver(v))})),{hasMore:m,infiniteLoader:p}}function C(e,t,o){const{placeholder:n,id:l,valueProp:a,label:i,mode:s,groupLabel:u}=(0,r.toRefs)(e),c=o.pointer,d=o.iv,p=o.isSelected,m=o.hasSelected,v=o.multipleLabelText,f=(0,r.ref)(null),h=(0,r.computed)((()=>{let e=[];return l&&l.value&&e.push(l.value),e.push("multiselect-options"),e.join("-")})),g=(0,r.computed)((()=>{let e=[];if(l&&l.value&&e.push(l.value),e.push("multiselect-option"),c.value&&void 0!==c.value[a.value])return e.push(c.value[a.value]),e.join("-")})),b=(0,r.computed)((()=>{let e=[];return f.value&&e.push(f.value),n.value&&!m.value&&e.push(n.value),"single"===s.value&&d.value&&void 0!==d.value[i.value]&&e.push(d.value[i.value]),"multiple"===s.value&&m.value&&e.push(v.value),"tags"===s.value&&m.value&&e.push(...d.value.map((e=>e[i.value]))),e.join(", ")})),y=(0,r.computed)((()=>b.value));return(0,r.onMounted)((()=>{if(l&&l.value&&document&&document.querySelector){let e=document.querySelector(`[for="${l.value}"]`);f.value=e?e.innerText:null}})),{ariaOwns:h,ariaLabel:b,ariaPlaceholder:y,ariaActiveDescendant:g,ariaOptionId:e=>{let t=[];return l&&l.value&&t.push(l.value),t.push("multiselect-option"),t.push(e[a.value]),t.join("-")},ariaOptionLabel:e=>{let t=[];return p(e)&&t.push("✓"),t.push(e[i.value]),t.join(" ")},ariaGroupLabel:e=>{let t=[];return t.push(e[u.value]),t.join(" ")}}}var E={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:String,required:!1,default:"The list is empty"},noResultsText:{type:String,required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1}},setup:(e,t)=>function(e,t,o,r={}){return o.forEach((o=>{o&&(r={...r,...o(e,t,r)})})),r}(e,t,[p,v,b,m,d,y,h,k,g,w,x,C])};const S=["tabindex","id","dir","aria-owns","aria-expanded","aria-label","aria-placeholder","aria-activedescendant"],O=["type","modelValue","value","autocomplete","id","aria-owns","aria-expanded","aria-label","aria-placeholder","aria-activedescendant"],_=["onClick"],D=["type","modelValue","value","id","autocomplete","aria-owns","aria-expanded","aria-label","aria-placeholder","aria-activedescendant"],N=["innerHTML"],L=["innerHTML"],T=["id"],B=["data-pointed","onMouseenter","onClick"],P=["innerHTML"],V=["aria-label"],I=["data-pointed","data-selected","id","aria-label","onMouseenter","onClick"],M=["innerHTML"],j=["id","aria-label","data-pointed","data-selected","onMouseenter","onClick"],A=["innerHTML"],z=["innerHTML"],R=["innerHTML"],F=["value"],q=["name","value"],H=["name","value"];E.render=function(e,t,o,n,l,a){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{ref:"multiselect",tabindex:e.tabindex,class:(0,r.normalizeClass)(e.classList.container),id:o.searchable?void 0:o.id,dir:o.rtl?"rtl":void 0,"aria-owns":e.ariaOwns,"aria-expanded":e.isOpen,"aria-label":e.ariaLabel,"aria-placeholder":e.ariaPlaceholder,"aria-activedescendant":e.ariaActiveDescendant,onFocusin:t[8]||(t[8]=(...t)=>e.activate&&e.activate(...t)),onFocusout:t[9]||(t[9]=(...t)=>e.deactivate&&e.deactivate(...t)),onKeydown:t[10]||(t[10]=(...t)=>e.handleKeydown&&e.handleKeydown(...t)),onKeyup:t[11]||(t[11]=(...t)=>e.handleKeyup&&e.handleKeyup(...t)),onFocus:t[12]||(t[12]=(...t)=>e.handleFocus&&e.handleFocus(...t)),onMousedown:t[13]||(t[13]=(...t)=>e.handleMousedown&&e.handleMousedown(...t)),role:"combobox"},[(0,r.createCommentVNode)(" Search "),"tags"!==o.mode&&o.searchable&&!o.disabled?((0,r.openBlock)(),(0,r.createElementBlock)("input",(0,r.mergeProps)({key:0,type:o.inputType,modelValue:e.search,value:e.search,class:e.classList.search,autocomplete:o.autocomplete,id:o.searchable?o.id:void 0},o.attrs,{"aria-owns":e.ariaOwns,"aria-expanded":e.isOpen,"aria-label":e.ariaLabel,"aria-placeholder":e.ariaPlaceholder,"aria-activedescendant":e.ariaActiveDescendant,onInput:t[0]||(t[0]=(...t)=>e.handleSearchInput&&e.handleSearchInput(...t)),onKeypress:t[1]||(t[1]=(...t)=>e.handleKeypress&&e.handleKeypress(...t)),onPaste:t[2]||(t[2]=(0,r.withModifiers)(((...t)=>e.handlePaste&&e.handlePaste(...t)),["stop"])),ref:"input",role:"combobox"}),null,16,O)):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Tags (with search) "),"tags"==o.mode?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:1,class:(0,r.normalizeClass)(e.classList.tags)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.iv,((t,n,l)=>(0,r.renderSlot)(e.$slots,"tag",{option:t,handleTagRemove:e.handleTagRemove,disabled:o.disabled},(()=>[((0,r.openBlock)(),(0,r.createElementBlock)("span",{class:(0,r.normalizeClass)(e.classList.tag),key:l},[(0,r.createTextVNode)((0,r.toDisplayString)(t[o.label])+" ",1),o.disabled?(0,r.createCommentVNode)("v-if",!0):((0,r.openBlock)(),(0,r.createElementBlock)("span",{key:0,class:(0,r.normalizeClass)(e.classList.tagRemove),onClick:o=>e.handleTagRemove(t,o)},[(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.tagRemoveIcon)},null,2)],10,_))],2))])))),256)),(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.tagsSearchWrapper),ref:"tags"},[(0,r.createCommentVNode)(" Used for measuring search width "),(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.tagsSearchCopy)},(0,r.toDisplayString)(e.search),3),(0,r.createCommentVNode)(" Actual search input "),o.searchable&&!o.disabled?((0,r.openBlock)(),(0,r.createElementBlock)("input",(0,r.mergeProps)({key:0,type:o.inputType,modelValue:e.search,value:e.search,class:e.classList.tagsSearch,id:o.searchable?o.id:void 0,autocomplete:o.autocomplete},o.attrs,{"aria-owns":e.ariaOwns,"aria-expanded":e.isOpen,"aria-label":e.ariaLabel,"aria-placeholder":e.ariaPlaceholder,"aria-activedescendant":e.ariaActiveDescendant,onInput:t[3]||(t[3]=(...t)=>e.handleSearchInput&&e.handleSearchInput(...t)),onKeypress:t[4]||(t[4]=(...t)=>e.handleKeypress&&e.handleKeypress(...t)),onPaste:t[5]||(t[5]=(0,r.withModifiers)(((...t)=>e.handlePaste&&e.handlePaste(...t)),["stop"])),ref:"input",role:"combobox"}),null,16,D)):(0,r.createCommentVNode)("v-if",!0)],2)],2)):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Single label "),"single"==o.mode&&e.hasSelected&&!e.search&&e.iv?(0,r.renderSlot)(e.$slots,"singlelabel",{key:2,value:e.iv},(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.singleLabel)},[(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.singleLabelText),innerHTML:e.iv[o.label]},null,10,N)],2)])):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Multiple label "),"multiple"==o.mode&&e.hasSelected&&!e.search?(0,r.renderSlot)(e.$slots,"multiplelabel",{key:3,values:e.iv},(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.multipleLabel),innerHTML:e.multipleLabelText},null,10,L)])):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Placeholder "),!o.placeholder||e.hasSelected||e.search?(0,r.createCommentVNode)("v-if",!0):(0,r.renderSlot)(e.$slots,"placeholder",{key:4},(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.placeholder)},(0,r.toDisplayString)(o.placeholder),3)])),(0,r.createCommentVNode)(" Spinner "),o.loading||e.resolving?(0,r.renderSlot)(e.$slots,"spinner",{key:5},(()=>[(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.spinner)},null,2)])):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Clear "),e.hasSelected&&!o.disabled&&o.canClear&&!e.busy?(0,r.renderSlot)(e.$slots,"clear",{key:6,clear:e.clear},(()=>[(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.clear),onClick:t[6]||(t[6]=(...t)=>e.clear&&e.clear(...t))},[(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.clearIcon)},null,2)],2)])):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Caret "),o.caret&&o.showOptions?(0,r.renderSlot)(e.$slots,"caret",{key:7},(()=>[(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.caret),onClick:t[7]||(t[7]=(...t)=>e.handleCaretClick&&e.handleCaretClick(...t))},null,2)])):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Options "),(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.dropdown),tabindex:"-1"},[(0,r.renderSlot)(e.$slots,"beforelist",{options:e.fo}),(0,r.createElementVNode)("ul",{class:(0,r.normalizeClass)(e.classList.options),id:e.ariaOwns,role:"listbox"},[o.groups?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(e.fg,((t,n,l)=>((0,r.openBlock)(),(0,r.createElementBlock)("li",{class:(0,r.normalizeClass)(e.classList.group),key:l},[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.groupLabel(t)),"data-pointed":e.isPointed(t),onMouseenter:o=>e.setPointer(t),onClick:o=>e.handleGroupClick(t),role:"none"},[(0,r.renderSlot)(e.$slots,"grouplabel",{group:t,isSelected:e.isSelected,isPointed:e.isPointed},(()=>[(0,r.createElementVNode)("span",{innerHTML:t[o.groupLabel]},null,8,P)]))],42,B),(0,r.createElementVNode)("ul",{class:(0,r.normalizeClass)(e.classList.groupOptions),"aria-label":e.ariaGroupLabel(t),role:"group"},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(t.__VISIBLE__,((n,l,a)=>((0,r.openBlock)(),(0,r.createElementBlock)("li",{class:(0,r.normalizeClass)(e.classList.option(n,t)),key:a,"data-pointed":e.isPointed(n),"data-selected":e.isSelected(n)||void 0,id:e.ariaOptionId(n),"aria-label":e.ariaOptionLabel(n),onMouseenter:t=>e.setPointer(n),onClick:t=>e.handleOptionClick(n),role:"option"},[(0,r.renderSlot)(e.$slots,"option",{option:n,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},(()=>[(0,r.createElementVNode)("span",{innerHTML:n[o.label]},null,8,M)]))],42,I)))),128))],10,V)],2)))),128)):((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(e.fo,((t,n,l)=>((0,r.openBlock)(),(0,r.createElementBlock)("li",{id:e.ariaOptionId(t),"aria-label":e.ariaOptionLabel(t),class:(0,r.normalizeClass)(e.classList.option(t)),key:l,"data-pointed":e.isPointed(t),"data-selected":e.isSelected(t)||void 0,onMouseenter:o=>e.setPointer(t),onClick:o=>e.handleOptionClick(t),role:"option"},[(0,r.renderSlot)(e.$slots,"option",{option:t,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},(()=>[(0,r.createElementVNode)("span",{innerHTML:t[o.label]},null,8,A)]))],42,j)))),128))],10,T),e.noOptions?(0,r.renderSlot)(e.$slots,"nooptions",{key:0},(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.noOptions),innerHTML:o.noOptionsText},null,10,z)])):(0,r.createCommentVNode)("v-if",!0),e.noResults?(0,r.renderSlot)(e.$slots,"noresults",{key:1},(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.noResults),innerHTML:o.noResultsText},null,10,R)])):(0,r.createCommentVNode)("v-if",!0),o.infinite&&e.hasMore?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:2,class:(0,r.normalizeClass)(e.classList.inifinite),ref:"infiniteLoader"},[(0,r.renderSlot)(e.$slots,"infinite",{},(()=>[(0,r.createElementVNode)("span",{class:(0,r.normalizeClass)(e.classList.inifiniteSpinner)},null,2)]))],2)):(0,r.createCommentVNode)("v-if",!0),(0,r.renderSlot)(e.$slots,"afterlist",{options:e.fo})],2),(0,r.createCommentVNode)(" Hacky input element to show HTML5 required warning "),o.required?((0,r.openBlock)(),(0,r.createElementBlock)("input",{key:8,class:(0,r.normalizeClass)(e.classList.fakeInput),tabindex:"-1",value:e.textValue,required:""},null,10,F)):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Native input support "),o.nativeSupport?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:9},["single"==o.mode?((0,r.openBlock)(),(0,r.createElementBlock)("input",{key:0,type:"hidden",name:o.name,value:void 0!==e.plainValue?e.plainValue:""},null,8,q)):((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(e.plainValue,((e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)("input",{type:"hidden",name:`${o.name}[]`,value:e,key:t},null,8,H)))),128))],64)):(0,r.createCommentVNode)("v-if",!0),(0,r.createCommentVNode)(" Create height for empty input "),(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(e.classList.spacer)},null,2)],42,S)},E.__file="src/Multiselect.vue";const Y={props:["layouts","field","resourceName","resourceId","resource","errors","limitCounter","limitPerLayoutCounter"],emits:["addGroup"],components:{Multiselect:E},data:function(){return{selectedLayout:null,isLayoutsDropdownOpen:!1}},computed:{attributes:function(){return{selectLabel:this.field.menu.data.selectLabel||this.__("Press enter to select"),label:this.field.menu.data.label||"title",openDirection:this.field.menu.data.openDirection||"bottom"}},availableLayouts:function(){var e=this;return this.layouts.filter((function(t){return null===e.limitPerLayoutCounter[t.name]||e.limitPerLayoutCounter[t.name]>0})).reduce((function(e,t){return e[t.name]=t.title,e}),{})}},methods:{selectLayout:function(e){var t=this.layouts.find((function(t){return t.name===e}));this.addGroup(t)},toggleLayoutsDropdownOrAddDefault:function(e){if(1===this.layouts.length)return this.addGroup(this.layouts[0]);this.isLayoutsDropdownOpen=!this.isLayoutsDropdownOpen},addGroup:function(e){var t=this;e&&(this.$emit("addGroup",e),this.isLayoutsDropdownOpen=!1,setTimeout((function(){t.$refs.select.clear(),t.selectedLayout=null}),100))}}};var X=o(379),$=o.n(X),G=o(878),Z={insert:"head",singleton:!1};$()(G.Z,Z);G.Z.locals;const W=(0,o(744).Z)(Y,[["render",function(e,t,o,c,d,p){var m=(0,r.resolveComponent)("default-button"),v=(0,r.resolveComponent)("Multiselect");return o.layouts?((0,r.openBlock)(),(0,r.createElementBlock)("div",n,[this.limitCounter>0||null===this.limitCounter?((0,r.openBlock)(),(0,r.createElementBlock)("div",l,[1===o.layouts.length?((0,r.openBlock)(),(0,r.createElementBlock)("div",a,[(0,r.createVNode)(m,{dusk:"toggle-layouts-dropdown-or-add-default",type:"button",tabindex:"0",onClick:p.toggleLayoutsDropdownOrAddDefault},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(o.field.button),1)]})),_:1},8,["onClick"])])):(0,r.createCommentVNode)("",!0),o.layouts.length>1?((0,r.openBlock)(),(0,r.createElementBlock)("div",i,[(0,r.createElementVNode)("div",s,[(0,r.createElementVNode)("div",u,[(0,r.createVNode)(v,(0,r.mergeProps)({modelValue:d.selectedLayout,"onUpdate:modelValue":t[0]||(t[0]=function(e){return d.selectedLayout=e}),options:p.availableLayouts,placeholder:o.field.button,onChange:p.selectLayout},p.attributes,{"track-by":"name","show-options":!0,searchable:!0,ref:"select"}),null,16,["modelValue","options","placeholder","onChange"])])])])):(0,r.createCommentVNode)("",!0)])):(0,r.createCommentVNode)("",!0)])):(0,r.createCommentVNode)("",!0)}]])},226:e=>{"use strict";e.exports=LaravelNova},311:e=>{"use strict";e.exports=Vue}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var l=o[e]={id:e,exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,o,n,l)=>{if(!o){var a=1/0;for(c=0;c=l)&&Object.keys(r.O).every((e=>r.O[e](o[s])))?o.splice(s--,1):(i=!1,l0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[o,n,l]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={175:0,546:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var n,l,[a,i,s]=o,u=0;if(a.some((t=>0!==e[t]))){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(s)var c=s(r)}for(t&&t(o);ur(757)));var n=r.O(void 0,[546],(()=>r(129)));n=r.O(n)})(); \ No newline at end of file +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/@vueform/multiselect/dist/multiselect.js": +/*!***************************************************************!*\ + !*** ./node_modules/@vueform/multiselect/dist/multiselect.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ script) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + + +function isNullish (val) { + return [null, undefined].indexOf(val) !== -1 +} + +function useData (props, context, dep) +{ + const { object, valueProp, mode } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + const $this = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)().proxy; + + // ============ DEPENDENCIES ============ + + const iv = dep.iv; + + // =============== METHODS ============== + + const update = (val) => { + // Setting object(s) as internal value + iv.value = makeInternal(val); + + // Setting object(s) or plain value as external + // value based on `option` setting + const externalVal = makeExternal(val); + + context.emit('change', externalVal, $this); + context.emit('input', externalVal); + context.emit('update:modelValue', externalVal); + }; + + // no export + const makeExternal = (val) => { + // If external value should be object + // no transformation is required + if (object.value) { + return val + } + + // No need to transform if empty value + if (isNullish(val)) { + return val + } + + // If external should be plain transform + // value object to plain values + return !Array.isArray(val) ? val[valueProp.value] : val.map(v => v[valueProp.value]) + }; + + // no export + const makeInternal = (val) => { + if (isNullish(val)) { + return mode.value === 'single' ? {} : [] + } + + return val + }; + + return { + update, + } +} + +function useValue (props, context) +{ + const { value, modelValue, mode, valueProp } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + // ================ DATA ================ + + // internalValue + const iv = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(mode.value !== 'single' ? [] : {}); + + // ============== COMPUTED ============== + + /* istanbul ignore next */ + // externalValue + const ev = modelValue && modelValue.value !== undefined ? modelValue : value; + + const plainValue = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return mode.value === 'single' ? iv.value[valueProp.value] : iv.value.map(v=>v[valueProp.value]) + }); + + const textValue = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return mode.value !== 'single' ? iv.value.map(v=>v[valueProp.value]).join(',') : iv.value[valueProp.value] + }); + + return { + iv, + internalValue: iv, + ev, + externalValue: ev, + textValue, + plainValue, + } +} + +function useSearch (props, context, dep) +{ const { regex } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + const $this = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)().proxy; + + // ============ DEPENDENCIES ============ + + const isOpen = dep.isOpen; + const open = dep.open; + + // ================ DATA ================ + + const search = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + const input = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + // =============== METHODS ============== + + const clearSearch = () => { + search.value = ''; + }; + + const handleSearchInput = (e) => { + search.value = e.target.value; + }; + + const handleKeypress = (e) => { + if (regex && regex.value) { + let regexp = regex.value; + + if (typeof regexp === 'string') { + regexp = new RegExp(regexp); + } + + if (!e.key.match(regexp)) { + e.preventDefault(); + } + } + }; + + const handlePaste = (e) => { + if (regex && regex.value) { + let clipboardData = e.clipboardData || /* istanbul ignore next */ window.clipboardData; + let pastedData = clipboardData.getData('Text'); + + let regexp = regex.value; + + if (typeof regexp === 'string') { + regexp = new RegExp(regexp); + } + + if (!pastedData.split('').every(c => !!c.match(regexp))) { + e.preventDefault(); + } + } + + context.emit('paste', e, $this); + }; + + // ============== WATCHERS ============== + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(search, (val) => { + if (!isOpen.value && val) { + open(); + } + + context.emit('search-change', val, $this); + }); + + return { + search, + input, + clearSearch, + handleSearchInput, + handleKeypress, + handlePaste, + } +} + +function usePointer$1 (props, context, dep) +{ + const { groupSelect, mode, groups, disabledProp } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + // ================ DATA ================ + + const pointer = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + // =============== METHODS ============== + + const setPointer = (option) => { + if (option === undefined || (option !== null && option[disabledProp.value])) { + return + } + + if (groups.value && option && option.group && (mode.value === 'single' || !groupSelect.value)) { + return + } + + pointer.value = option; + }; + + const clearPointer = () => { + setPointer(null); + }; + + return { + pointer, + setPointer, + clearPointer, + } +} + +function normalize (str, strict = true) { + return strict + ? String(str).toLowerCase().trim() + : String(str).normalize('NFD').replace(/\p{Diacritic}/gu, '').toLowerCase().trim() +} + +function isObject (variable) { + return Object.prototype.toString.call(variable) === '[object Object]' +} + +function arraysEqual (array1, array2) { + const array2Sorted = array2.slice().sort(); + + return array1.length === array2.length && array1.slice().sort().every(function(value, index) { + return value === array2Sorted[index]; + }) +} + +function useOptions (props, context, dep) +{ + const { + options, mode, trackBy: trackBy_, limit, hideSelected, createTag, createOption: createOption_, label, + appendNewTag, appendNewOption: appendNewOption_, multipleLabel, object, loading, delay, resolveOnLoad, + minChars, filterResults, clearOnSearch, clearOnSelect, valueProp, + canDeselect, max, strict, closeOnSelect, groups: groupped, reverse, infinite, + groupOptions, groupHideEmpty, groupSelect, onCreate, disabledProp, searchStart, + } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + const $this = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)().proxy; + + // ============ DEPENDENCIES ============ + + const iv = dep.iv; + const ev = dep.ev; + const search = dep.search; + const clearSearch = dep.clearSearch; + const update = dep.update; + const pointer = dep.pointer; + const clearPointer = dep.clearPointer; + const focus = dep.focus; + const deactivate = dep.deactivate; + const close = dep.close; + + // ================ DATA ================ + + // no export + // appendedOptions + const ap = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]); + + // no export + // resolvedOptions + const ro = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]); + + const resolving = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false); + + // no export + const searchWatcher = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + const offset = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(infinite.value && limit.value === -1 ? 10 : limit.value); + + // ============== COMPUTED ============== + + // no export + const createOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return createTag.value || createOption_.value || false + }); + + // no export + const appendNewOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + if (appendNewTag.value !== undefined) { + return appendNewTag.value + } else if (appendNewOption_.value !== undefined) { + return appendNewOption_.value + } + + return true + }); + + // no export + // extendedOptions + const eo = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + if (groupped.value) { + let groups = ro.value || /* istanbul ignore next */ []; + + let eo = []; + + groups.forEach((group) => { + optionsToArray(group[groupOptions.value]).forEach((option) => { + eo.push(Object.assign({}, option, group[disabledProp.value] ? { [disabledProp.value]: true } : {})); + }); + }); + + return eo + } else { + let eo = optionsToArray(ro.value || /* istanbul ignore next */ []); + + if (ap.value.length) { + eo = eo.concat(ap.value); + } + + return eo + } + }); + + const fg = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + if (!groupped.value) { + return [] + } + + return filterGroups((ro.value || /* istanbul ignore next */ []).map((group, index) => { + const arrayOptions = optionsToArray(group[groupOptions.value]); + + return { + ...group, + index, + group: true, + [groupOptions.value]: filterOptions(arrayOptions, false).map(o => Object.assign({}, o, group[disabledProp.value] ? { [disabledProp.value]: true } : {})), + __VISIBLE__: filterOptions(arrayOptions).map(o => Object.assign({}, o, group[disabledProp.value] ? { [disabledProp.value]: true } : {})), + } + // Difference between __VISIBLE__ and {groupOptions}: visible does not contain selected options when hideSelected=true + })) + }); + + // preFilteredOptions + const pfo = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + let options = eo.value; + + if (reverse.value) { + options = options.reverse(); + } + + if (createdOption.value.length) { + options = createdOption.value.concat(options); + } + + return filterOptions(options) + }); + + // filteredOptions + const fo = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + let options = pfo.value; + + if (offset.value > 0) { + options = options.slice(0, offset.value); + } + + return options + }); + + const hasSelected = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + switch (mode.value) { + case 'single': + return !isNullish(iv.value[valueProp.value]) + + case 'multiple': + case 'tags': + return !isNullish(iv.value) && iv.value.length > 0 + } + }); + + const multipleLabelText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return multipleLabel !== undefined && multipleLabel.value !== undefined + ? multipleLabel.value(iv.value, $this) + : (iv.value && iv.value.length > 1 ? `${iv.value.length} options selected` : `1 option selected`) + }); + + const noOptions = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return !eo.value.length && !resolving.value && !createdOption.value.length + }); + + + const noResults = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return eo.value.length > 0 && fo.value.length == 0 && ((search.value && groupped.value) || !groupped.value) + }); + + // no export + const createdOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + if (createOption.value === false || !search.value) { + return [] + } + + return getOptionByTrackBy(search.value) !== -1 ? [] : [{ + [valueProp.value]: search.value, + [label.value]: search.value, + [trackBy.value]: search.value, + __CREATE__: true, + }] + }); + + const trackBy = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return trackBy_.value || label.value + }); + + // no export + const nullValue = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + switch (mode.value) { + case 'single': + return null + + case 'multiple': + case 'tags': + return [] + } + }); + + const busy = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return loading.value || resolving.value + }); + + // =============== METHODS ============== + + /** + * @param {array|object|string|number} option + */ + const select = (option) => { + if (typeof option !== 'object') { + option = getOption(option); + } + + switch (mode.value) { + case 'single': + update(option); + break + + case 'multiple': + case 'tags': + update((iv.value).concat(option)); + break + } + + context.emit('select', finalValue(option), option, $this); + }; + + const deselect = (option) => { + if (typeof option !== 'object') { + option = getOption(option); + } + + switch (mode.value) { + case 'single': + clear(); + break + + case 'tags': + case 'multiple': + update(Array.isArray(option) + ? iv.value.filter(v => option.map(o => o[valueProp.value]).indexOf(v[valueProp.value]) === -1) + : iv.value.filter(v => v[valueProp.value] != option[valueProp.value])); + break + } + + context.emit('deselect', finalValue(option), option, $this); + }; + + // no export + const finalValue = (option) => { + return object.value ? option : option[valueProp.value] + }; + + const remove = (option) => { + deselect(option); + }; + + const handleTagRemove = (option, e) => { + if (e.button !== 0) { + e.preventDefault(); + return + } + + remove(option); + }; + + const clear = () => { + context.emit('clear', $this); + update(nullValue.value); + }; + + const isSelected = (option) => { + if (option.group !== undefined) { + return mode.value === 'single' ? false : areAllSelected(option[groupOptions.value]) && option[groupOptions.value].length + } + + switch (mode.value) { + case 'single': + return !isNullish(iv.value) && iv.value[valueProp.value] == option[valueProp.value] + + case 'tags': + case 'multiple': + return !isNullish(iv.value) && iv.value.map(o => o[valueProp.value]).indexOf(option[valueProp.value]) !== -1 + } + }; + + const isDisabled = (option) => { + return option[disabledProp.value] === true + }; + + const isMax = () => { + if (max === undefined || max.value === -1 || (!hasSelected.value && max.value > 0)) { + return false + } + + return iv.value.length >= max.value + }; + + const handleOptionClick = (option) => { + if (isDisabled(option)) { + return + } + + if (onCreate && onCreate.value && !isSelected(option) && option.__CREATE__) { + option = { ...option }; + delete option.__CREATE__; + + option = onCreate.value(option, $this); + + if (option instanceof Promise) { + resolving.value = true; + option.then((result) => { + resolving.value = false; + handleOptionSelect(result); + }); + + return + } + } + + handleOptionSelect(option); + }; + + const handleOptionSelect = (option) => { + if (option.__CREATE__) { + option = { ...option }; + delete option.__CREATE__; + } + + switch (mode.value) { + case 'single': + if (option && isSelected(option)) { + if (canDeselect.value) { + deselect(option); + } + return + } + + if (option) { + handleOptionAppend(option); + } + + /* istanbul ignore else */ + if (clearOnSelect.value) { + clearSearch(); + } + + if (closeOnSelect.value) { + clearPointer(); + close(); + } + + if (option) { + select(option); + } + break + + case 'multiple': + if (option && isSelected(option)) { + deselect(option); + return + } + + if (isMax()) { + return + } + + if (option) { + handleOptionAppend(option); + select(option); + } + + if (clearOnSelect.value) { + clearSearch(); + } + + if (hideSelected.value) { + clearPointer(); + } + + if (closeOnSelect.value) { + close(); + } + break + + case 'tags': + if (option && isSelected(option)) { + deselect(option); + return + } + + if (isMax()) { + return + } + + if (option) { + handleOptionAppend(option); + } + + if (clearOnSelect.value) { + clearSearch(); + } + + if (option) { + select(option); + } + + if (hideSelected.value) { + clearPointer(); + } + + if (closeOnSelect.value) { + close(); + } + break + } + + if (!closeOnSelect.value) { + focus(); + } + }; + + const handleGroupClick = (group) => { + if (isDisabled(group) || mode.value === 'single' || !groupSelect.value) { + return + } + + switch (mode.value) { + case 'multiple': + case 'tags': + if (areAllEnabledSelected(group[groupOptions.value])) { + deselect(group[groupOptions.value]); + } else { + select(group[groupOptions.value] + .filter(o => iv.value.map(v => v[valueProp.value]).indexOf(o[valueProp.value]) === -1) + .filter(o => !o[disabledProp.value]) + .filter((o, k) => iv.value.length + 1 + k <= max.value || max.value === -1) + ); + } + break + } + + if (closeOnSelect.value) { + deactivate(); + } + }; + + const handleOptionAppend = (option) => { + if (getOption(option[valueProp.value]) === undefined && createOption.value) { + context.emit('tag', option[valueProp.value], $this); + context.emit('option', option[valueProp.value], $this); + + if (appendNewOption.value) { + appendOption(option); + } + + clearSearch(); + } + }; + + const selectAll = () => { + if (mode.value === 'single') { + return + } + + select(fo.value); + }; + + // no export + const areAllEnabledSelected = (options) => { + return options.find(o => !isSelected(o) && !o[disabledProp.value]) === undefined + }; + + // no export + const areAllSelected = (options) => { + return options.find(o => !isSelected(o)) === undefined + }; + + const getOption = (val) => { + return eo.value[eo.value.map(o => String(o[valueProp.value])).indexOf(String(val))] + }; + + // no export + const getOptionByTrackBy = (val, norm = true) => { + return eo.value.map(o => parseInt(o[trackBy.value]) == o[trackBy.value] ? parseInt(o[trackBy.value]) : o[trackBy.value]).indexOf( + parseInt(val) == val ? parseInt(val) : val + ) + }; + + // no export + const shouldHideOption = (option) => { + return ['tags', 'multiple'].indexOf(mode.value) !== -1 && hideSelected.value && isSelected(option) + }; + + // no export + const appendOption = (option) => { + ap.value.push(option); + }; + + // no export + const filterGroups = (groups) => { + // If the search has value we need to filter among + // he ones that are visible to the user to avoid + // displaying groups which technically have options + // based on search but that option is already selected. + return groupHideEmpty.value + ? groups.filter(g => search.value + ? g.__VISIBLE__.length + : g[groupOptions.value].length + ) + : groups.filter(g => search.value ? g.__VISIBLE__.length : true) + }; + + // no export + const filterOptions = (options, excludeHideSelected = true) => { + let fo = options; + + if (search.value && filterResults.value) { + fo = fo.filter((option) => { + return searchStart.value + ? normalize(option[trackBy.value], strict.value).startsWith(normalize(search.value, strict.value)) + : normalize(option[trackBy.value], strict.value).indexOf(normalize(search.value, strict.value)) !== -1 + }); + } + + if (hideSelected.value && excludeHideSelected) { + fo = fo.filter((option) => !shouldHideOption(option)); + } + + return fo + }; + + // no export + const optionsToArray = (options) => { + let uo = options; + + // Transforming an object to an array of objects + if (isObject(uo)) { + uo = Object.keys(uo).map((key) => { + let val = uo[key]; + + return { [valueProp.value]: key, [trackBy.value]: val, [label.value]: val} + }); + } + + // Transforming an plain arrays to an array of objects + uo = uo.map((val) => { + return typeof val === 'object' ? val : { [valueProp.value]: val, [trackBy.value]: val, [label.value]: val} + }); + + return uo + }; + + // no export + const initInternalValue = () => { + if (!isNullish(ev.value)) { + iv.value = makeInternal(ev.value); + } + }; + + const resolveOptions = (callback) => { + resolving.value = true; + + return new Promise((resolve, reject) => { + options.value(search.value, $this).then((response) => { + ro.value = response || []; + + if (typeof callback == 'function') { + callback(response); + } + + resolving.value = false; + }).catch((e) => { + console.error(e); + + ro.value = []; + + resolving.value = false; + }).finally(() => { + resolve(); + }); + }) + }; + + // no export + const refreshLabels = () => { + if (!hasSelected.value) { + return + } + + if (mode.value === 'single') { + let option = getOption(iv.value[valueProp.value]); + + /* istanbul ignore else */ + if (option !== undefined) { + let newLabel = option[label.value]; + + iv.value[label.value] = newLabel; + + if (object.value) { + ev.value[label.value] = newLabel; + } + } + } else { + iv.value.forEach((val, i) => { + let option = getOption(iv.value[i][valueProp.value]); + + /* istanbul ignore else */ + if (option !== undefined) { + let newLabel = option[label.value]; + + iv.value[i][label.value] = newLabel; + + if (object.value) { + ev.value[i][label.value] = newLabel; + } + } + }); + } + }; + + const refreshOptions = (callback) => { + resolveOptions(callback); + }; + + // no export + const makeInternal = (val) => { + if (isNullish(val)) { + return mode.value === 'single' ? {} : [] + } + + if (object.value) { + return val + } + + // If external should be plain transform + // value object to plain values + return mode.value === 'single' ? getOption(val) || {} : val.filter(v => !! getOption(v)).map(v => getOption(v)) + }; + + // no export + const initSearchWatcher = () => { + searchWatcher.value = (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(search, (query) => { + if (query.length < minChars.value || (!query && minChars.value !== 0)) { + return + } + + resolving.value = true; + + if (clearOnSearch.value) { + ro.value = []; + } + setTimeout(() => { + if (query != search.value) { + return + } + + options.value(search.value, $this).then((response) => { + if (query == search.value || !search.value) { + ro.value = response; + pointer.value = fo.value.filter(o => o[disabledProp.value] !== true)[0] || null; + resolving.value = false; + } + }).catch( /* istanbul ignore next */ (e) => { + console.error(e); + }); + }, delay.value); + + }, { flush: 'sync' }); + }; + + // ================ HOOKS =============== + + if (mode.value !== 'single' && !isNullish(ev.value) && !Array.isArray(ev.value)) { + throw new Error(`v-model must be an array when using "${mode.value}" mode`) + } + + if (options && typeof options.value == 'function') { + if (resolveOnLoad.value) { + resolveOptions(initInternalValue); + } else if (object.value == true) { + initInternalValue(); + } + } + else { + ro.value = options.value; + + initInternalValue(); + } + + // ============== WATCHERS ============== + + if (delay.value > -1) { + initSearchWatcher(); + } + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(delay, (value, old) => { + /* istanbul ignore else */ + if (searchWatcher.value) { + searchWatcher.value(); + } + + if (value >= 0) { + initSearchWatcher(); + } + }); + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(ev, (newValue) => { + if (isNullish(newValue)) { + iv.value = makeInternal(newValue); + return + } + + switch (mode.value) { + case 'single': + if (object.value ? newValue[valueProp.value] != iv.value[valueProp.value] : newValue != iv.value[valueProp.value]) { + iv.value = makeInternal(newValue); + } + break + + case 'multiple': + case 'tags': + if (!arraysEqual(object.value ? newValue.map(o => o[valueProp.value]) : newValue, iv.value.map(o => o[valueProp.value]))) { + iv.value = makeInternal(newValue); + } + break + } + }, { deep: true }); + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(options, (n, o) => { + if (typeof props.options === 'function') { + if (resolveOnLoad.value && (!o || (n && n.toString() !== o.toString()))) { + resolveOptions(); + } + } else { + ro.value = props.options; + + if (!Object.keys(iv.value).length) { + initInternalValue(); + } + + refreshLabels(); + } + }); + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(label, refreshLabels); + + return { + pfo, + fo, + filteredOptions: fo, + hasSelected, + multipleLabelText, + eo, + extendedOptions: eo, + fg, + filteredGroups: fg, + noOptions, + noResults, + resolving, + busy, + offset, + select, + deselect, + remove, + selectAll, + clear, + isSelected, + isDisabled, + isMax, + getOption, + handleOptionClick, + handleGroupClick, + handleTagRemove, + refreshOptions, + resolveOptions, + refreshLabels, + } +} + +function usePointer (props, context, dep) +{ + const { + valueProp, showOptions, searchable, groupLabel, + groups: groupped, mode, groupSelect, disabledProp, + } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + // ============ DEPENDENCIES ============ + + const fo = dep.fo; + const fg = dep.fg; + const handleOptionClick = dep.handleOptionClick; + const handleGroupClick = dep.handleGroupClick; + const search = dep.search; + const pointer = dep.pointer; + const setPointer = dep.setPointer; + const clearPointer = dep.clearPointer; + const multiselect = dep.multiselect; + const isOpen = dep.isOpen; + + // ============== COMPUTED ============== + + // no export + const options = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return fo.value.filter(o => !o[disabledProp.value]) + }); + + const groups = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return fg.value.filter(o => !o[disabledProp.value]) + }); + + const canPointGroups = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return mode.value !== 'single' && groupSelect.value + }); + + const isPointerGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return pointer.value && pointer.value.group + }); + + const currentGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return getParentGroup(pointer.value) + }); + + const prevGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + const group = isPointerGroup.value ? pointer.value : /* istanbul ignore next */ getParentGroup(pointer.value); + const groupIndex = groups.value.map(g => g[groupLabel.value]).indexOf(group[groupLabel.value]); + let prevGroup = groups.value[groupIndex - 1]; + + if (prevGroup === undefined) { + prevGroup = lastGroup.value; + } + + return prevGroup + }); + + const nextGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + let nextIndex = groups.value.map(g => g.label).indexOf(isPointerGroup.value + ? pointer.value[groupLabel.value] + : getParentGroup(pointer.value)[groupLabel.value]) + 1; + + if (groups.value.length <= nextIndex) { + nextIndex = 0; + } + + return groups.value[nextIndex] + }); + + const lastGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return [...groups.value].slice(-1)[0] + }); + + const currentGroupFirstEnabledOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return pointer.value.__VISIBLE__.filter(o => !o[disabledProp.value])[0] + }); + + const currentGroupPrevEnabledOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + const options = currentGroup.value.__VISIBLE__.filter(o => !o[disabledProp.value]); + return options[options.map(o => o[valueProp.value]).indexOf(pointer.value[valueProp.value]) - 1] + }); + + const currentGroupNextEnabledOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + const options = getParentGroup(pointer.value).__VISIBLE__.filter(o => !o[disabledProp.value]); + return options[options.map(o => o[valueProp.value]).indexOf(pointer.value[valueProp.value]) + 1] + }); + + const prevGroupLastEnabledOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return [...prevGroup.value.__VISIBLE__.filter(o => !o[disabledProp.value])].slice(-1)[0] + }); + + const lastGroupLastEnabledOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return [...lastGroup.value.__VISIBLE__.filter(o => !o[disabledProp.value])].slice(-1)[0] + }); + + // =============== METHODS ============== + + const isPointed = (option) => { + return (!!pointer.value && ( + (!option.group && pointer.value[valueProp.value] == option[valueProp.value]) || + (option.group !== undefined && pointer.value[groupLabel.value] == option[groupLabel.value]) + )) ? true : undefined + }; + + const setPointerFirst = () => { + setPointer(options.value[0] || null); + }; + + const selectPointer = () => { + if (!pointer.value || pointer.value[disabledProp.value] === true) { + return + } + + if (isPointerGroup.value) { + handleGroupClick(pointer.value); + } else { + handleOptionClick(pointer.value); + } + }; + + const forwardPointer = () => { + if (pointer.value === null) { + setPointer((groupped.value && canPointGroups.value ? groups.value[0] : options.value[0]) || null); + } + else if (groupped.value && canPointGroups.value) { + let nextPointer = isPointerGroup.value ? currentGroupFirstEnabledOption.value : currentGroupNextEnabledOption.value; + + if (nextPointer === undefined) { + nextPointer = nextGroup.value; + } + + setPointer(nextPointer || /* istanbul ignore next */ null); + } else { + let next = options.value.map(o => o[valueProp.value]).indexOf(pointer.value[valueProp.value]) + 1; + + if (options.value.length <= next) { + next = 0; + } + + setPointer(options.value[next] || null); + } + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { + adjustWrapperScrollToPointer(); + }); + }; + + const backwardPointer = () => { + if (pointer.value === null) { + let prevPointer = options.value[options.value.length - 1]; + + if (groupped.value && canPointGroups.value) { + prevPointer = lastGroupLastEnabledOption.value; + + if (prevPointer === undefined) { + prevPointer = lastGroup.value; + } + } + + setPointer(prevPointer || null); + } + else if (groupped.value && canPointGroups.value) { + let prevPointer = isPointerGroup.value ? prevGroupLastEnabledOption.value : currentGroupPrevEnabledOption.value; + + if (prevPointer === undefined) { + prevPointer = isPointerGroup.value ? prevGroup.value : currentGroup.value; + } + + setPointer(prevPointer || /* istanbul ignore next */ null); + } else { + let prevIndex = options.value.map(o => o[valueProp.value]).indexOf(pointer.value[valueProp.value]) - 1; + + if (prevIndex < 0) { + prevIndex = options.value.length - 1; + } + + setPointer(options.value[prevIndex] || null); + } + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { + adjustWrapperScrollToPointer(); + }); + }; + + const getParentGroup = (option) => { + return groups.value.find((group) => { + return group.__VISIBLE__.map(o => o[valueProp.value]).indexOf(option[valueProp.value]) !== -1 + }) + }; + + // no export + /* istanbul ignore next */ + const adjustWrapperScrollToPointer = () => { + let pointedOption = multiselect.value.querySelector(`[data-pointed]`); + + if (!pointedOption) { + return + } + + let wrapper = pointedOption.parentElement.parentElement; + + if (groupped.value) { + wrapper = isPointerGroup.value + ? pointedOption.parentElement.parentElement.parentElement + : pointedOption.parentElement.parentElement.parentElement.parentElement; + } + + if (pointedOption.offsetTop + pointedOption.offsetHeight > wrapper.clientHeight + wrapper.scrollTop) { + wrapper.scrollTop = pointedOption.offsetTop + pointedOption.offsetHeight - wrapper.clientHeight; + } + + if (pointedOption.offsetTop < wrapper.scrollTop) { + wrapper.scrollTop = pointedOption.offsetTop; + } + }; + + // ============== WATCHERS ============== + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(search, (val) => { + if (searchable.value) { + if (val.length && showOptions.value) { + setPointerFirst(); + } else { + clearPointer(); + } + } + }); + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(isOpen, (val) => { + if (val) { + let firstSelected = multiselect.value.querySelectorAll(`[data-selected]`)[0]; + + if (!firstSelected) { + return + } + + let wrapper = firstSelected.parentElement.parentElement; + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { + /* istanbul ignore next */ + if (wrapper.scrollTop > 0) { + return + } + + wrapper.scrollTop = firstSelected.offsetTop; + }); + } + }); + + return { + pointer, + canPointGroups, + isPointed, + setPointerFirst, + selectPointer, + forwardPointer, + backwardPointer, + } +} + +function useDropdown (props, context, dep) +{ + const { disabled } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + const $this = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)().proxy; + + // ================ DATA ================ + + const isOpen = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false); + + // =============== METHODS ============== + + const open = () => { + if (isOpen.value || disabled.value) { + return + } + + isOpen.value = true; + context.emit('open', $this); + }; + + const close = () => { + if (!isOpen.value) { + return + } + + isOpen.value = false; + context.emit('close', $this); + }; + + return { + isOpen, + open, + close, + } +} + +function useMultiselect (props, context, dep) +{ + const { searchable, disabled } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + // ============ DEPENDENCIES ============ + + const input = dep.input; + const open = dep.open; + const close = dep.close; + const clearSearch = dep.clearSearch; + const isOpen = dep.isOpen; + + // ================ DATA ================ + + const multiselect = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + const tags = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + const isActive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false); + + const mouseClicked = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false); + + // ============== COMPUTED ============== + + const tabindex = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return searchable.value || disabled.value ? -1 : 0 + }); + + // =============== METHODS ============== + + const blur = () => { + if (searchable.value) { + input.value.blur(); + } + + multiselect.value.blur(); + }; + + const focus = () => { + if (searchable.value && !disabled.value) { + input.value.focus(); + } + }; + + const activate = (shouldOpen = true) => { + if (disabled.value) { + return + } + + isActive.value = true; + + if (shouldOpen) { + open(); + } + }; + + const deactivate = () => { + isActive.value = false; + + setTimeout(() => { + if (!isActive.value) { + close(); + clearSearch(); + } + }, 1); + }; + + const handleFocusIn = () => { + activate(mouseClicked.value); + }; + + const handleFocusOut = () => { + deactivate(); + }; + + const handleCaretClick = () => { + deactivate(); + blur(); + }; + + /* istanbul ignore next */ + const handleMousedown = (e) => { + mouseClicked.value = true; + + if (isOpen.value && (e.target.isEqualNode(multiselect.value) || e.target.isEqualNode(tags.value))) { + setTimeout(() => { + deactivate(); + }, 0); + } else if (document.activeElement.isEqualNode(multiselect.value) && !isOpen.value) { + activate(); + } + + setTimeout(() => { + mouseClicked.value = false; + }, 0); + }; + + return { + multiselect, + tags, + tabindex, + isActive, + mouseClicked, + blur, + focus, + activate, + deactivate, + handleFocusIn, + handleFocusOut, + handleCaretClick, + handleMousedown, + } +} + +function useKeyboard (props, context, dep) +{ + const { + mode, addTagOn, openDirection, searchable, + showOptions, valueProp, groups: groupped, + addOptionOn: addOptionOn_, createTag, createOption: createOption_, + reverse, + } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + const $this = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)().proxy; + + // ============ DEPENDENCIES ============ + + const iv = dep.iv; + const update = dep.update; + const search = dep.search; + const setPointer = dep.setPointer; + const selectPointer = dep.selectPointer; + const backwardPointer = dep.backwardPointer; + const forwardPointer = dep.forwardPointer; + const multiselect = dep.multiselect; + const tags = dep.tags; + const isOpen = dep.isOpen; + const open = dep.open; + const blur = dep.blur; + const fo = dep.fo; + + // ============== COMPUTED ============== + + // no export + const createOption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return createTag.value || createOption_.value || false + }); + + // no export + const addOptionOn = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + if (addTagOn.value !== undefined) { + return addTagOn.value + } + else if (addOptionOn_.value !== undefined) { + return addOptionOn_.value + } + + return ['enter'] + }); + + // =============== METHODS ============== + + // no export + const preparePointer = () => { + // When options are hidden and creating tags is allowed + // no pointer will be set (because options are hidden). + // In such case we need to set the pointer manually to the + // first option, which equals to the option created from + // the search value. + if (mode.value === 'tags' && !showOptions.value && createOption.value && searchable.value && !groupped.value) { + setPointer(fo.value[fo.value.map(o => o[valueProp.value]).indexOf(search.value)]); + } + }; + + const handleKeydown = (e) => { + context.emit('keydown', e, $this); + + let tagList; + let activeIndex; + + if (['ArrowLeft', 'ArrowRight', 'Enter'].indexOf(e.key) !== -1 && mode.value === 'tags') { + tagList = [...(multiselect.value.querySelectorAll(`[data-tags] > *`))].filter(e => e !== tags.value); + activeIndex = tagList.findIndex(e => e === document.activeElement); + } + + switch (e.key) { + case 'Backspace': + if (mode.value === 'single') { + return + } + + if (searchable.value && [null, ''].indexOf(search.value) === -1) { + return + } + + if (iv.value.length === 0) { + return + } + + update([...iv.value].slice(0,-1)); + break + + case 'Enter': + e.preventDefault(); + + if (activeIndex !== -1 && activeIndex !== undefined) { + update([...iv.value].filter((v, k) => k !== activeIndex)); + + if (activeIndex === tagList.length - 1) { + if (tagList.length - 1) { + tagList[tagList.length - 2].focus(); + } else if (searchable.value) { + tags.value.querySelector('input').focus(); + } else { + multiselect.value.focus(); + } + } + return + } + + if (addOptionOn.value.indexOf('enter') === -1 && createOption.value) { + return + } + + preparePointer(); + selectPointer(); + break + + case ' ': + if (!createOption.value && !searchable.value) { + e.preventDefault(); + + preparePointer(); + selectPointer(); + return + } + + if (!createOption.value) { + return false + } + + if (addOptionOn.value.indexOf('space') === -1 && createOption.value) { + return + } + + e.preventDefault(); + + preparePointer(); + selectPointer(); + break + + case 'Tab': + case ';': + case ',': + if (addOptionOn.value.indexOf(e.key.toLowerCase()) === -1 || !createOption.value) { + return + } + + preparePointer(); + selectPointer(); + e.preventDefault(); + break + + case 'Escape': + blur(); + break + + case 'ArrowUp': + e.preventDefault(); + + if (!showOptions.value) { + return + } + + /* istanbul ignore else */ + if (!isOpen.value) { + open(); + } + + backwardPointer(); + break + + case 'ArrowDown': + e.preventDefault(); + + if (!showOptions.value) { + return + } + + /* istanbul ignore else */ + if (!isOpen.value) { + open(); + } + + forwardPointer(); + break + + case 'ArrowLeft': + if ((searchable.value && tags.value.querySelector('input').selectionStart) || e.shiftKey || mode.value !== 'tags' || !iv.value || !iv.value.length) { + return + } + + e.preventDefault(); + + if (activeIndex === -1) { + tagList[tagList.length-1].focus(); + } + else if (activeIndex > 0) { + tagList[activeIndex-1].focus(); + } + break + + case 'ArrowRight': + if (activeIndex === -1 || e.shiftKey || mode.value !== 'tags' || !iv.value || !iv.value.length) { + return + } + + e.preventDefault(); + + /* istanbul ignore else */ + if (tagList.length > activeIndex + 1) { + tagList[activeIndex+1].focus(); + } + else if (searchable.value) { + tags.value.querySelector('input').focus(); + } + else if (!searchable.value) { + multiselect.value.focus(); + } + + break + } + }; + + const handleKeyup = (e) => { + context.emit('keyup', e, $this); + }; + + return { + handleKeydown, + handleKeyup, + preparePointer, + } +} + +function useClasses (props, context, dependencies) +{const { + classes: classes_, disabled, openDirection, showOptions + } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + // ============ DEPENDENCIES ============ + + const isOpen = dependencies.isOpen; + const isPointed = dependencies.isPointed; + const isSelected = dependencies.isSelected; + const isDisabled = dependencies.isDisabled; + const isActive = dependencies.isActive; + const canPointGroups = dependencies.canPointGroups; + const resolving = dependencies.resolving; + const fo = dependencies.fo; + + const classes = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ + container: 'multiselect', + containerDisabled: 'is-disabled', + containerOpen: 'is-open', + containerOpenTop: 'is-open-top', + containerActive: 'is-active', + singleLabel: 'multiselect-single-label', + singleLabelText: 'multiselect-single-label-text', + multipleLabel: 'multiselect-multiple-label', + search: 'multiselect-search', + tags: 'multiselect-tags', + tag: 'multiselect-tag', + tagDisabled: 'is-disabled', + tagRemove: 'multiselect-tag-remove', + tagRemoveIcon: 'multiselect-tag-remove-icon', + tagsSearchWrapper: 'multiselect-tags-search-wrapper', + tagsSearch: 'multiselect-tags-search', + tagsSearchCopy: 'multiselect-tags-search-copy', + placeholder: 'multiselect-placeholder', + caret: 'multiselect-caret', + caretOpen: 'is-open', + clear: 'multiselect-clear', + clearIcon: 'multiselect-clear-icon', + spinner: 'multiselect-spinner', + inifinite: 'multiselect-inifite', + inifiniteSpinner: 'multiselect-inifite-spinner', + dropdown: 'multiselect-dropdown', + dropdownTop: 'is-top', + dropdownHidden: 'is-hidden', + options: 'multiselect-options', + optionsTop: 'is-top', + group: 'multiselect-group', + groupLabel: 'multiselect-group-label', + groupLabelPointable: 'is-pointable', + groupLabelPointed: 'is-pointed', + groupLabelSelected: 'is-selected', + groupLabelDisabled: 'is-disabled', + groupLabelSelectedPointed: 'is-selected is-pointed', + groupLabelSelectedDisabled: 'is-selected is-disabled', + groupOptions: 'multiselect-group-options', + option: 'multiselect-option', + optionPointed: 'is-pointed', + optionSelected: 'is-selected', + optionDisabled: 'is-disabled', + optionSelectedPointed: 'is-selected is-pointed', + optionSelectedDisabled: 'is-selected is-disabled', + noOptions: 'multiselect-no-options', + noResults: 'multiselect-no-results', + fakeInput: 'multiselect-fake-input', + spacer: 'multiselect-spacer', + ...classes_.value, + })); + + // ============== COMPUTED ============== + + const showDropdown = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return !!(isOpen.value && showOptions.value && (!resolving.value || (resolving.value && fo.value.length))) + }); + + const classList = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + const c = classes.value; + + return { + container: [c.container] + .concat(disabled.value ? c.containerDisabled : []) + .concat(showDropdown.value && openDirection.value === 'top' ? c.containerOpenTop : []) + .concat(showDropdown.value && openDirection.value !== 'top' ? c.containerOpen : []) + .concat(isActive.value ? c.containerActive : []), + spacer: c.spacer, + singleLabel: c.singleLabel, + singleLabelText: c.singleLabelText, + multipleLabel: c.multipleLabel, + search: c.search, + tags: c.tags, + tag: [c.tag] + .concat(disabled.value ? c.tagDisabled : []), + tagRemove: c.tagRemove, + tagRemoveIcon: c.tagRemoveIcon, + tagsSearchWrapper: c.tagsSearchWrapper, + tagsSearch: c.tagsSearch, + tagsSearchCopy: c.tagsSearchCopy, + placeholder: c.placeholder, + caret: [c.caret] + .concat(isOpen.value ? c.caretOpen : []), + clear: c.clear, + clearIcon: c.clearIcon, + spinner: c.spinner, + inifinite: c.inifinite, + inifiniteSpinner: c.inifiniteSpinner, + dropdown: [c.dropdown] + .concat(openDirection.value === 'top' ? c.dropdownTop : []) + .concat(!isOpen.value || !showOptions.value || !showDropdown.value ? c.dropdownHidden : []), + options: [c.options] + .concat(openDirection.value === 'top' ? c.optionsTop : []), + group: c.group, + groupLabel: (g) => { + let groupLabel = [c.groupLabel]; + + if (isPointed(g)) { + groupLabel.push(isSelected(g) ? c.groupLabelSelectedPointed : c.groupLabelPointed); + } else if (isSelected(g) && canPointGroups.value) { + groupLabel.push(isDisabled(g) ? c.groupLabelSelectedDisabled : c.groupLabelSelected); + } else if (isDisabled(g)) { + groupLabel.push(c.groupLabelDisabled); + } + + if (canPointGroups.value) { + groupLabel.push(c.groupLabelPointable); + } + + return groupLabel + }, + groupOptions: c.groupOptions, + option: (o, g) => { + let option = [c.option]; + + if (isPointed(o)) { + option.push(isSelected(o) ? c.optionSelectedPointed : c.optionPointed); + } else if (isSelected(o)) { + option.push(isDisabled(o) ? c.optionSelectedDisabled : c.optionSelected); + } else if (isDisabled(o) || (g && isDisabled(g))) { + option.push(c.optionDisabled); + } + + return option + }, + noOptions: c.noOptions, + noResults: c.noResults, + fakeInput: c.fakeInput, + } + }); + + return { + classList, + showDropdown, + } +} + +function useScroll$1 (props, context, dep) +{ + const { + limit, infinite, + } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + // ============ DEPENDENCIES ============ + + const isOpen = dep.isOpen; + const offset = dep.offset; + const search = dep.search; + const pfo = dep.pfo; + const eo = dep.eo; + + // ================ DATA ================ + + // no export + const observer = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + const infiniteLoader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + // ============== COMPUTED ============== + + const hasMore = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return offset.value < pfo.value.length + }); + + // =============== METHODS ============== + + // no export + /* istanbul ignore next */ + const handleIntersectionObserver = (entries) => { + const { isIntersecting, target } = entries[0]; + + if (isIntersecting) { + const parent = target.offsetParent; + const scrollTop = parent.scrollTop; + + offset.value += limit.value == -1 ? 10 : limit.value; + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { + parent.scrollTop = scrollTop; + }); + } + }; + + const observe = () => { + /* istanbul ignore else */ + if (isOpen.value && offset.value < pfo.value.length) { + observer.value.observe(infiniteLoader.value); + } else if (!isOpen.value && observer.value) { + observer.value.disconnect(); + } + }; + + // ============== WATCHERS ============== + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(isOpen, () => { + if (!infinite.value) { + return + } + + observe(); + }); + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(search, () => { + if (!infinite.value) { + return + } + + offset.value = limit.value; + + observe(); + }, { flush: 'post' }); + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(eo, () => { + if (!infinite.value) { + return + } + + observe(); + }, { immediate: false, flush: 'post' }); + + // ================ HOOKS =============== + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { + /* istanbul ignore else */ + if (window && window.IntersectionObserver) { + observer.value = new IntersectionObserver(handleIntersectionObserver); + } + }); + + return { + hasMore, + infiniteLoader, + } +} + +function useScroll (props, context, dep) +{ + const { placeholder, id, valueProp, label: labelProp, mode, groupLabel } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props); + + // ============ DEPENDENCIES ============ + + const pointer = dep.pointer; + dep.iv; + dep.hasSelected; + dep.multipleLabelText; + dep.isOpen; + + // ================ DATA ================ + + const label = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); + + // ============== COMPUTED ============== + + const ariaOwns = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + let texts = []; + + if (id && id.value) { + texts.push(id.value); + } + + texts.push('multiselect-options'); + + return texts.join('-') + }); + + const ariaActiveDescendant = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + let texts = []; + + if (id && id.value) { + texts.push(id.value); + } + + if (pointer.value) { + texts.push(pointer.value.group ? 'multiselect-group' : 'multiselect-option'); + + texts.push(pointer.value.group ? pointer.value.index : pointer.value[valueProp.value]); + + return texts.join('-') + } + }); + + + + const ariaPlaceholder = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return placeholder.value + }); + + const ariaMultiselectable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { + return mode.value !== 'single' + }); + + // =============== METHODS ============== + + const ariaOptionId = (option) => { + let texts = []; + + if (id && id.value) { + texts.push(id.value); + } + + texts.push('multiselect-option'); + + texts.push(option[valueProp.value]); + + return texts.join('-') + }; + + const ariaGroupId = (option) => { + let texts = []; + + if (id && id.value) { + texts.push(id.value); + } + + texts.push('multiselect-group'); + + texts.push(option.index); + + return texts.join('-') + }; + + const ariaOptionLabel = (option) => { + let texts = []; + + texts.push(option[labelProp.value]); + + return texts.join(' ') + }; + + const ariaGroupLabel = (group) => { + let texts = []; + + texts.push(group[groupLabel.value]); + + return texts.join(' ') + }; + + const ariaTagLabel = (label) => { + return `${label} ❎` + }; + + // =============== HOOKS ================ + + (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { + /* istanbul ignore next */ + if (id && id.value && document && document.querySelector) { + let forTag = document.querySelector(`[for="${id.value}"]`); + label.value = forTag ? forTag.innerText : null; + } + }); + + return { + ariaOwns, + ariaPlaceholder, + ariaMultiselectable, + ariaActiveDescendant, + ariaOptionId, + ariaOptionLabel, + ariaGroupId, + ariaGroupLabel, + ariaTagLabel, + } +} + +function resolveDeps (props, context, features, deps = {}) { + features.forEach((composable) => { + /* istanbul ignore else */ + if (composable) { + deps = { + ...deps, + ...composable(props, context, deps) + }; + } + + }); + + return deps +} + +var script = { + name: 'Multiselect', + emits: [ + 'paste', 'open', 'close', 'select', 'deselect', + 'input', 'search-change', 'tag', 'option', 'update:modelValue', + 'change', 'clear', 'keydown', 'keyup', + ], + props: { + value: { + required: false, + }, + modelValue: { + required: false, + }, + options: { + type: [Array, Object, Function], + required: false, + default: () => ([]) + }, + id: { + type: [String, Number], + required: false, + }, + name: { + type: [String, Number], + required: false, + default: 'multiselect', + }, + disabled: { + type: Boolean, + required: false, + default: false, + }, + label: { + type: String, + required: false, + default: 'label', + }, + trackBy: { + type: String, + required: false, + default: undefined, + }, + valueProp: { + type: String, + required: false, + default: 'value', + }, + placeholder: { + type: String, + required: false, + default: null, + }, + mode: { + type: String, + required: false, + default: 'single', // single|multiple|tags + }, + searchable: { + type: Boolean, + required: false, + default: false, + }, + limit: { + type: Number, + required: false, + default: -1, + }, + hideSelected: { + type: Boolean, + required: false, + default: true, + }, + createTag: { + type: Boolean, + required: false, + default: undefined, + }, + createOption: { + type: Boolean, + required: false, + default: undefined, + }, + appendNewTag: { + type: Boolean, + required: false, + default: undefined, + }, + appendNewOption: { + type: Boolean, + required: false, + default: undefined, + }, + addTagOn: { + type: Array, + required: false, + default: undefined, + }, + addOptionOn: { + type: Array, + required: false, + default: undefined, + }, + caret: { + type: Boolean, + required: false, + default: true, + }, + loading: { + type: Boolean, + required: false, + default: false, + }, + noOptionsText: { + type: String, + required: false, + default: 'The list is empty', + }, + noResultsText: { + type: String, + required: false, + default: 'No results found', + }, + multipleLabel: { + type: Function, + required: false, + }, + object: { + type: Boolean, + required: false, + default: false, + }, + delay: { + type: Number, + required: false, + default: -1, + }, + minChars: { + type: Number, + required: false, + default: 0, + }, + resolveOnLoad: { + type: Boolean, + required: false, + default: true, + }, + filterResults: { + type: Boolean, + required: false, + default: true, + }, + clearOnSearch: { + type: Boolean, + required: false, + default: false, + }, + clearOnSelect: { + type: Boolean, + required: false, + default: true, + }, + canDeselect: { + type: Boolean, + required: false, + default: true, + }, + canClear: { + type: Boolean, + required: false, + default: true, + }, + max: { + type: Number, + required: false, + default: -1, + }, + showOptions: { + type: Boolean, + required: false, + default: true, + }, + required: { + type: Boolean, + required: false, + default: false, + }, + openDirection: { + type: String, + required: false, + default: 'bottom', + }, + nativeSupport: { + type: Boolean, + required: false, + default: false, + }, + classes: { + type: Object, + required: false, + default: () => ({}) + }, + strict: { + type: Boolean, + required: false, + default: true, + }, + closeOnSelect: { + type: Boolean, + required: false, + default: true, + }, + autocomplete: { + type: String, + required: false, + }, + groups: { + type: Boolean, + required: false, + default: false, + }, + groupLabel: { + type: String, + required: false, + default: 'label', + }, + groupOptions: { + type: String, + required: false, + default: 'options', + }, + groupHideEmpty: { + type: Boolean, + required: false, + default: false, + }, + groupSelect: { + type: Boolean, + required: false, + default: true, + }, + inputType: { + type: String, + required: false, + default: 'text', + }, + attrs: { + required: false, + type: Object, + default: () => ({}), + }, + onCreate: { + required: false, + type: Function, + }, + disabledProp: { + type: String, + required: false, + default: 'disabled', + }, + searchStart: { + type: Boolean, + required: false, + default: false, + }, + reverse: { + type: Boolean, + required: false, + default: false, + }, + regex: { + type: [Object, String, RegExp], + required: false, + default: undefined, + }, + rtl: { + type: Boolean, + required: false, + default: false, + }, + infinite: { + type: Boolean, + required: false, + default: false, + }, + aria: { + required: false, + type: Object, + default: () => ({}), + }, + }, + setup(props, context) + { + return resolveDeps(props, context, [ + useValue, + usePointer$1, + useDropdown, + useSearch, + useData, + useMultiselect, + useOptions, + useScroll$1, + usePointer, + useKeyboard, + useClasses, + useScroll, + ]) + } + }; + +const _hoisted_1 = ["tabindex", "id", "dir", "aria-owns", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable", "role"]; +const _hoisted_2 = ["type", "modelValue", "value", "autocomplete", "id", "aria-owns", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable"]; +const _hoisted_3 = ["onKeyup", "aria-label"]; +const _hoisted_4 = ["onClick"]; +const _hoisted_5 = ["type", "modelValue", "value", "id", "autocomplete", "aria-owns", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable"]; +const _hoisted_6 = ["innerHTML"]; +const _hoisted_7 = ["innerHTML"]; +const _hoisted_8 = ["id"]; +const _hoisted_9 = ["id", "aria-label", "aria-selected"]; +const _hoisted_10 = ["data-pointed", "onMouseenter", "onClick"]; +const _hoisted_11 = ["innerHTML"]; +const _hoisted_12 = ["aria-label"]; +const _hoisted_13 = ["data-pointed", "data-selected", "onMouseenter", "onClick", "id", "aria-selected", "aria-label"]; +const _hoisted_14 = ["innerHTML"]; +const _hoisted_15 = ["data-pointed", "data-selected", "onMouseenter", "onClick", "id", "aria-selected", "aria-label"]; +const _hoisted_16 = ["innerHTML"]; +const _hoisted_17 = ["innerHTML"]; +const _hoisted_18 = ["innerHTML"]; +const _hoisted_19 = ["value"]; +const _hoisted_20 = ["name", "value"]; +const _hoisted_21 = ["name", "value"]; + +function render(_ctx, _cache, $props, $setup, $data, $options) { + return ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ + ref: "multiselect", + tabindex: _ctx.tabindex, + class: _ctx.classList.container, + id: $props.searchable ? undefined : $props.id, + dir: $props.rtl ? 'rtl' : undefined, + onFocusin: _cache[9] || (_cache[9] = (...args) => (_ctx.handleFocusIn && _ctx.handleFocusIn(...args))), + onFocusout: _cache[10] || (_cache[10] = (...args) => (_ctx.handleFocusOut && _ctx.handleFocusOut(...args))), + onKeydown: _cache[11] || (_cache[11] = (...args) => (_ctx.handleKeydown && _ctx.handleKeydown(...args))), + onKeyup: _cache[12] || (_cache[12] = (...args) => (_ctx.handleKeyup && _ctx.handleKeyup(...args))), + onMousedown: _cache[13] || (_cache[13] = (...args) => (_ctx.handleMousedown && _ctx.handleMousedown(...args))), + "aria-owns": !$props.searchable ? _ctx.ariaOwns : undefined, + "aria-placeholder": !$props.searchable ? _ctx.ariaPlaceholder : undefined, + "aria-expanded": !$props.searchable ? _ctx.isOpen : undefined, + "aria-activedescendant": !$props.searchable ? _ctx.ariaActiveDescendant : undefined, + "aria-multiselectable": !$props.searchable ? _ctx.ariaMultiselectable : undefined, + role: !$props.searchable ? 'listbox' : undefined + }, !$props.searchable ? $props.aria : {}), [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Search "), + ($props.mode !== 'tags' && $props.searchable && !$props.disabled) + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("input", (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ + key: 0, + type: $props.inputType, + modelValue: _ctx.search, + value: _ctx.search, + class: _ctx.classList.search, + autocomplete: $props.autocomplete, + id: $props.searchable ? $props.id : undefined, + onInput: _cache[0] || (_cache[0] = (...args) => (_ctx.handleSearchInput && _ctx.handleSearchInput(...args))), + onKeypress: _cache[1] || (_cache[1] = (...args) => (_ctx.handleKeypress && _ctx.handleKeypress(...args))), + onPaste: _cache[2] || (_cache[2] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)((...args) => (_ctx.handlePaste && _ctx.handlePaste(...args)), ["stop"])), + ref: "input", + "aria-owns": _ctx.ariaOwns, + "aria-placeholder": _ctx.ariaPlaceholder, + "aria-expanded": _ctx.isOpen, + "aria-activedescendant": _ctx.ariaActiveDescendant, + "aria-multiselectable": _ctx.ariaMultiselectable, + role: "listbox" + }, { + ...$props.attrs, + ...$props.aria, + }), null, 16 /* FULL_PROPS */, _hoisted_2)) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Tags (with search) "), + ($props.mode == 'tags') + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { + key: 1, + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.tags), + "data-tags": "" + }, [ + ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(_ctx.iv, (option, i, key) => { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "tag", { + option: option, + handleTagRemove: _ctx.handleTagRemove, + disabled: $props.disabled + }, () => [ + ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.tag), + tabindex: "-1", + onKeyup: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withKeys)($event => (_ctx.handleTagRemove(option, $event)), ["enter"]), + key: key, + "aria-label": _ctx.ariaTagLabel(option[$props.label]) + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(option[$props.label]) + " ", 1 /* TEXT */), + (!$props.disabled) + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", { + key: 0, + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.tagRemove), + onClick: $event => (_ctx.handleTagRemove(option, $event)) + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.tagRemoveIcon) + }, null, 2 /* CLASS */) + ], 10 /* CLASS, PROPS */, _hoisted_4)) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true) + ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_3)) + ]) + }), 256 /* UNKEYED_FRAGMENT */)), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.tagsSearchWrapper), + ref: "tags" + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Used for measuring search width "), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.tagsSearchCopy) + }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.search), 3 /* TEXT, CLASS */), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Actual search input "), + ($props.searchable && !$props.disabled) + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("input", (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ + key: 0, + type: $props.inputType, + modelValue: _ctx.search, + value: _ctx.search, + class: _ctx.classList.tagsSearch, + id: $props.searchable ? $props.id : undefined, + autocomplete: $props.autocomplete, + onInput: _cache[3] || (_cache[3] = (...args) => (_ctx.handleSearchInput && _ctx.handleSearchInput(...args))), + onKeypress: _cache[4] || (_cache[4] = (...args) => (_ctx.handleKeypress && _ctx.handleKeypress(...args))), + onPaste: _cache[5] || (_cache[5] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)((...args) => (_ctx.handlePaste && _ctx.handlePaste(...args)), ["stop"])), + ref: "input", + "aria-owns": _ctx.ariaOwns, + "aria-placeholder": _ctx.ariaPlaceholder, + "aria-expanded": _ctx.isOpen, + "aria-activedescendant": _ctx.ariaActiveDescendant, + "aria-multiselectable": _ctx.ariaMultiselectable, + role: "listbox" + }, { + ...$props.attrs, + ...$props.aria, + }), null, 16 /* FULL_PROPS */, _hoisted_5)) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true) + ], 2 /* CLASS */) + ], 2 /* CLASS */)) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Single label "), + ($props.mode == 'single' && _ctx.hasSelected && !_ctx.search && _ctx.iv) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "singlelabel", { + key: 2, + value: _ctx.iv + }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.singleLabel), + "aria-hidden": "true" + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.singleLabelText), + innerHTML: _ctx.iv[$props.label] + }, null, 10 /* CLASS, PROPS */, _hoisted_6) + ], 2 /* CLASS */) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Multiple label "), + ($props.mode == 'multiple' && _ctx.hasSelected && !_ctx.search) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "multiplelabel", { + key: 3, + values: _ctx.iv + }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.multipleLabel), + innerHTML: _ctx.multipleLabelText, + "aria-hidden": "true" + }, null, 10 /* CLASS, PROPS */, _hoisted_7) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Placeholder "), + ($props.placeholder && !_ctx.hasSelected && !_ctx.search) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "placeholder", { key: 4 }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.placeholder), + "aria-hidden": "true" + }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.placeholder), 3 /* TEXT, CLASS */) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Spinner "), + ($props.loading || _ctx.resolving) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "spinner", { key: 5 }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.spinner), + "aria-hidden": "true" + }, null, 2 /* CLASS */) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Clear "), + (_ctx.hasSelected && !$props.disabled && $props.canClear && !_ctx.busy) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "clear", { + key: 6, + clear: _ctx.clear + }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + tabindex: "0", + role: "button", + "aria-label": "❎", + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.clear), + onClick: _cache[6] || (_cache[6] = (...args) => (_ctx.clear && _ctx.clear(...args))), + onKeyup: _cache[7] || (_cache[7] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withKeys)((...args) => (_ctx.clear && _ctx.clear(...args)), ["enter"])) + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.clearIcon) + }, null, 2 /* CLASS */) + ], 34 /* CLASS, HYDRATE_EVENTS */) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Caret "), + ($props.caret && $props.showOptions) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "caret", { key: 7 }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.caret), + onClick: _cache[8] || (_cache[8] = (...args) => (_ctx.handleCaretClick && _ctx.handleCaretClick(...args))), + "aria-hidden": "true" + }, null, 2 /* CLASS */) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Options "), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.dropdown), + tabindex: "-1" + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "beforelist", { options: _ctx.fo }), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.options), + id: _ctx.ariaOwns + }, [ + ($props.groups) + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 0 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(_ctx.fg, (group, i, key) => { + return ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.group), + key: key, + id: _ctx.ariaGroupId(group), + "aria-label": _ctx.ariaGroupLabel(group), + "aria-selected": _ctx.isSelected(group), + role: "option" + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.groupLabel(group)), + "data-pointed": _ctx.isPointed(group), + onMouseenter: $event => (_ctx.setPointer(group, i)), + onClick: $event => (_ctx.handleGroupClick(group)) + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "grouplabel", { + group: group, + isSelected: _ctx.isSelected, + isPointed: _ctx.isPointed + }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + innerHTML: group[$props.groupLabel] + }, null, 8 /* PROPS */, _hoisted_11) + ]) + ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.groupOptions), + "aria-label": _ctx.ariaGroupLabel(group), + role: "group" + }, [ + ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(group.__VISIBLE__, (option, i, key) => { + return ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.option(option, group)), + "data-pointed": _ctx.isPointed(option), + "data-selected": _ctx.isSelected(option) || undefined, + key: key, + onMouseenter: $event => (_ctx.setPointer(option)), + onClick: $event => (_ctx.handleOptionClick(option)), + id: _ctx.ariaOptionId(option), + "aria-selected": _ctx.isSelected(option), + "aria-label": _ctx.ariaOptionLabel(option), + role: "option" + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "option", { + option: option, + isSelected: _ctx.isSelected, + isPointed: _ctx.isPointed, + search: _ctx.search + }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + innerHTML: option[$props.label] + }, null, 8 /* PROPS */, _hoisted_14) + ]) + ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13)) + }), 128 /* KEYED_FRAGMENT */)) + ], 10 /* CLASS, PROPS */, _hoisted_12) + ], 10 /* CLASS, PROPS */, _hoisted_9)) + }), 128 /* KEYED_FRAGMENT */)) + : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(_ctx.fo, (option, i, key) => { + return ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.option(option)), + "data-pointed": _ctx.isPointed(option), + "data-selected": _ctx.isSelected(option) || undefined, + key: key, + onMouseenter: $event => (_ctx.setPointer(option)), + onClick: $event => (_ctx.handleOptionClick(option)), + id: _ctx.ariaOptionId(option), + "aria-selected": _ctx.isSelected(option), + "aria-label": _ctx.ariaOptionLabel(option), + role: "option" + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "option", { + option: option, + isSelected: _ctx.isSelected, + isPointed: _ctx.isPointed, + search: _ctx.search + }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + innerHTML: option[$props.label] + }, null, 8 /* PROPS */, _hoisted_16) + ]) + ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_15)) + }), 128 /* KEYED_FRAGMENT */)) + ], 10 /* CLASS, PROPS */, _hoisted_8), + (_ctx.noOptions) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "nooptions", { key: 0 }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.noOptions), + innerHTML: $props.noOptionsText + }, null, 10 /* CLASS, PROPS */, _hoisted_17) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (_ctx.noResults) + ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "noresults", { key: 1 }, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.noResults), + innerHTML: $props.noResultsText + }, null, 10 /* CLASS, PROPS */, _hoisted_18) + ]) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + ($props.infinite && _ctx.hasMore) + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { + key: 2, + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.inifinite), + ref: "infiniteLoader" + }, [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "infinite", {}, () => [ + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.inifiniteSpinner) + }, null, 2 /* CLASS */) + ]) + ], 2 /* CLASS */)) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "afterlist", { options: _ctx.fo }) + ], 2 /* CLASS */), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Hacky input element to show HTML5 required warning "), + ($props.required) + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("input", { + key: 8, + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.fakeInput), + tabindex: "-1", + value: _ctx.textValue, + required: "" + }, null, 10 /* CLASS, PROPS */, _hoisted_19)) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Native input support "), + ($props.nativeSupport) + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 9 }, [ + ($props.mode == 'single') + ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("input", { + key: 0, + type: "hidden", + name: $props.name, + value: _ctx.plainValue !== undefined ? _ctx.plainValue : '' + }, null, 8 /* PROPS */, _hoisted_20)) + : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(_ctx.plainValue, (v, i) => { + return ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("input", { + type: "hidden", + name: `${$props.name}[]`, + value: v, + key: i + }, null, 8 /* PROPS */, _hoisted_21)) + }), 128 /* KEYED_FRAGMENT */)) + ], 64 /* STABLE_FRAGMENT */)) + : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Create height for empty input "), + (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classList.spacer) + }, null, 2 /* CLASS */) + ], 16 /* FULL_PROPS */, _hoisted_1)) +} + +script.render = render; +script.__file = "src/Multiselect.vue"; + + + + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DeleteGroupModal.vue?vue&type=script&lang=js": +/*!**********************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DeleteGroupModal.vue?vue&type=script&lang=js ***! + \**********************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: ['message', 'yes', 'no'], + emits: ['close', 'confirm'], + /** + * Mount the component. + */ + mounted: function mounted() { + this.$nextTick(function () { + // this.$refs.confirmButton.button.focus() + }); + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=script&lang=js": +/*!*****************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=script&lang=js ***! + \*****************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../group */ "./resources/js/group.js"); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: ['resource', 'resourceName', 'resourceId', 'field'], + computed: { + groups: function groups() { + var _this = this; + var group; + return this.field.value.reduce(function (groups, item) { + if (!(group = _this.getGroup(item))) return groups; + groups.push(group); + return groups; + }, []); + } + }, + methods: { + /** + * Retrieve layout definition from its name + */ + getLayout: function getLayout(name) { + if (!this.field.layouts) return; + return this.field.layouts.find(function (layout) { + return layout.name == name; + }); + }, + /** + * create group instance from raw field value + */ + getGroup: function getGroup(item) { + var layout = this.getLayout(item.layout); + if (!layout) return; + return new _group__WEBPACK_IMPORTED_MODULE_0__["default"](layout.name, layout.title, item.attributes, this.field, item.key); + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailGroup.vue?vue&type=script&lang=js": +/*!*****************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailGroup.vue?vue&type=script&lang=js ***! + \*****************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: ['attribute', 'group', 'index', 'last', 'resource', 'resourceName', 'resourceId'], + computed: { + componentStyle: function componentStyle() { + return this.last ? [] : ['border-b border-50 pb-4 mb-4']; + }, + titleStyle: function titleStyle() { + return ['pb-4', 'border-b', 'border-gray-100', 'dark:border-gray-700']; + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=script&lang=js": +/*!***************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=script&lang=js ***! + \***************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _FullWidthField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FullWidthField */ "./resources/js/components/FullWidthField.vue"); +/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! sortablejs */ "./node_modules/sortablejs/modular/sortable.esm.js"); +/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! laravel-nova */ "laravel-nova"); +/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(laravel_nova__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../group */ "./resources/js/group.js"); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + mixins: [laravel_nova__WEBPACK_IMPORTED_MODULE_2__.HandlesValidationErrors, laravel_nova__WEBPACK_IMPORTED_MODULE_2__.DependentFormField], + props: _objectSpread({}, (0,laravel_nova__WEBPACK_IMPORTED_MODULE_2__.mapProps)(['mode'])), + components: { + FullWidthField: _FullWidthField__WEBPACK_IMPORTED_MODULE_0__["default"] + }, + computed: { + layouts: function layouts() { + return this.currentField.layouts || false; + }, + orderedGroups: function orderedGroups() { + var _this = this; + return this.order.reduce(function (groups, key) { + groups.push(_this.groups[key]); + return groups; + }, []); + }, + limitCounter: function limitCounter() { + if (this.currentField.limit === null || typeof this.currentField.limit == "undefined") { + return null; + } + return this.currentField.limit - Object.keys(this.groups).length; + }, + limitPerLayoutCounter: function limitPerLayoutCounter() { + var _this2 = this; + return this.layouts.reduce(function (layoutCounts, layout) { + if (layout.limit === null) { + layoutCounts[layout.name] = null; + return layoutCounts; + } + var count = Object.values(_this2.groups).filter(function (group) { + return group.name === layout.name; + }).length; + layoutCounts[layout.name] = layout.limit - count; + return layoutCounts; + }, {}); + } + }, + data: function data() { + return { + order: [], + groups: {}, + files: {}, + sortableInstance: null + }; + }, + beforeUnmount: function beforeUnmount() { + if (this.sortableInstance) { + this.sortableInstance.destroy(); + } + }, + methods: { + /* + * Set the initial, internal value for the field. + */ + setInitialValue: function setInitialValue() { + this.value = this.currentField.value || []; + this.files = {}; + this.populateGroups(); + this.$nextTick(this.initSortable.bind(this)); + }, + /** + * Fill the given FormData object with the field's internal value. + */ + fill: function fill(formData) { + var key, group; + this.value = []; + this.files = {}; + for (var i = 0; i < this.order.length; i++) { + key = this.order[i]; + group = this.groups[key].serialize(); + + // Only serialize the group's non-file attributes + this.value.push({ + layout: group.layout, + key: group.key, + attributes: group.attributes + }); + + // Attach the files for formData appending + this.files = _objectSpread(_objectSpread({}, this.files), group.files); + } + this.appendFieldAttribute(formData, this.currentField.attribute); + formData.append(this.currentField.attribute, this.value.length ? JSON.stringify(this.value) : ''); + + // Append file uploads + for (var file in this.files) { + formData.append(file, this.files[file]); + } + this.$nextTick(this.initSortable.bind(this)); + }, + /** + * Register given field attribute into the parsable flexible fields register + */ + appendFieldAttribute: function appendFieldAttribute(formData, attribute) { + var registered = []; + if (formData.has('___nova_flexible_content_fields')) { + registered = JSON.parse(formData.get('___nova_flexible_content_fields')); + } + registered.push(attribute); + formData.set('___nova_flexible_content_fields', JSON.stringify(registered)); + }, + /** + * Update the field's internal value. + */ + handleChange: function handleChange(value) { + this.value = value || []; + this.files = {}; + this.populateGroups(); + }, + /** + * Set the displayed layouts from the field's current value + */ + populateGroups: function populateGroups() { + this.order.splice(0, this.order.length); + this.groups = {}; + for (var i = 0; i < this.value.length; i++) { + this.addGroup(this.getLayout(this.value[i].layout), this.value[i].attributes, this.value[i].key, this.currentField.collapsed); + } + }, + /** + * Retrieve layout definition from its name + */ + getLayout: function getLayout(name) { + if (!this.layouts) return; + return this.layouts.find(function (layout) { + return layout.name == name; + }); + }, + /** + * Append the given layout to flexible content's list + */ + addGroup: function addGroup(layout, attributes, key, collapsed) { + if (!layout) return; + collapsed = collapsed || false; + var fields = attributes || JSON.parse(JSON.stringify(layout.fields)), + group = new _group__WEBPACK_IMPORTED_MODULE_3__["default"](layout.name, layout.title, fields, this.currentField, key, collapsed); + this.groups[group.key] = group; + this.order.push(group.key); + }, + /** + * Move a group up + */ + moveUp: function moveUp(key) { + var index = this.order.indexOf(key); + if (index <= 0) return; + this.order.splice(index - 1, 0, this.order.splice(index, 1)[0]); + }, + /** + * Move a group down + */ + moveDown: function moveDown(key) { + var index = this.order.indexOf(key); + if (index < 0 || index >= this.order.length - 1) return; + this.order.splice(index + 1, 0, this.order.splice(index, 1)[0]); + }, + /** + * Remove a group + */ + remove: function remove(key) { + var index = this.order.indexOf(key); + if (index < 0) return; + this.order.splice(index, 1); + delete this.groups[key]; + }, + initSortable: function initSortable() { + var _this3 = this; + var containerRef = this.$refs['flexibleFieldContainer']; + if (!containerRef || this.sortableInstance) { + return; + } + this.sortableInstance = sortablejs__WEBPACK_IMPORTED_MODULE_1__["default"].create(containerRef, { + ghostClass: 'nova-flexible-content-sortable-ghost', + dragClass: 'nova-flexible-content-sortable-drag', + chosenClass: 'nova-flexible-content-sortable-chosen', + direction: 'vertical', + handle: '.nova-flexible-content-drag-button', + scrollSpeed: 5, + animation: 500, + onEnd: function onEnd(evt) { + var neighborIndex; + _this3.order.splice(_this3.order.indexOf(evt.item.id), 1); + if (evt.oldIndex < evt.newIndex) { + neighborIndex = _this3.order.indexOf(evt.item.previousElementSibling.id) + 1; + } else { + neighborIndex = _this3.order.indexOf(evt.item.nextElementSibling.id); + } + _this3.order.splice(neighborIndex, 0, evt.item.id); + } + }); + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=script&lang=js": +/*!***************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=script&lang=js ***! + \***************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var nova_mixins_BehavesAsPanel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! nova-mixins/BehavesAsPanel */ "./vendor/laravel/nova/resources/js/mixins/BehavesAsPanel.js"); +/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! laravel-nova */ "laravel-nova"); +/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(laravel_nova__WEBPACK_IMPORTED_MODULE_1__); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + mixins: [nova_mixins_BehavesAsPanel__WEBPACK_IMPORTED_MODULE_0__["default"]], + props: _objectSpread({ + errors: {}, + group: {}, + index: {}, + field: {} + }, (0,laravel_nova__WEBPACK_IMPORTED_MODULE_1__.mapProps)(['mode'])), + emits: ['move-up', 'move-down', 'remove'], + data: function data() { + return { + removeMessage: false, + collapsed: this.group.collapsed, + readonly: this.group.readonly + }; + }, + computed: { + titleStyle: function titleStyle() { + var classes = ['border-t', 'border-r', 'border-l', 'border-gray-200', 'dark:border-gray-700', 'rounded-t-lg']; + if (this.collapsed) { + classes.push('border-b rounded-b-lg'); + } + return classes; + }, + containerStyle: function containerStyle() { + var classes = ['grow', 'border-b', 'border-r', 'border-l', 'border-gray-200', 'dark:border-gray-700', 'rounded-b-lg']; + if (!this.group.title) { + classes.push('border-t'); + classes.push('rounded-tr-lg'); + } + if (this.collapsed) { + classes.push('hidden'); + } + return classes; + } + }, + methods: { + /** + * Move this group up + */ + moveUp: function moveUp() { + this.$emit('move-up'); + }, + /** + * Move this group down + */ + moveDown: function moveDown() { + this.$emit('move-down'); + }, + /** + * Remove this group + */ + remove: function remove() { + this.$emit('remove'); + }, + /** + * Confirm remove message + */ + confirmRemove: function confirmRemove() { + if (this.field.confirmRemove) { + this.removeMessage = true; + } else { + this.remove(); + } + }, + /** + * Expand fields + */ + expand: function expand() { + this.collapsed = false; + }, + /** + * Collapse fields + */ + collapse: function collapse() { + this.collapsed = true; + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FullWidthField.vue?vue&type=script&lang=js": +/*!********************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FullWidthField.vue?vue&type=script&lang=js ***! + \********************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! laravel-nova */ "laravel-nova"); +/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(laravel_nova__WEBPACK_IMPORTED_MODULE_0__); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + mixins: [laravel_nova__WEBPACK_IMPORTED_MODULE_0__.HandlesValidationErrors], + props: _objectSpread({ + field: { + type: Object, + required: true + }, + fieldName: { + type: String + }, + showErrors: { + type: Boolean, + "default": true + } + }, (0,laravel_nova__WEBPACK_IMPORTED_MODULE_0__.mapProps)(['showHelpText'])), + computed: { + fieldLabel: function fieldLabel() { + // If the field name is purposefully empty, hide the label altogether + if (this.fieldName === '') { + return false; + } + return this.fieldName || this.field.singularLabel || this.field.name; + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=script&lang=js": +/*!**********************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=script&lang=js ***! + \**********************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: ['layouts', 'field', 'resourceName', 'resourceId', 'resource', 'errors', 'limitCounter', 'limitPerLayoutCounter'], + emits: ['addGroup'], + data: function data() { + return { + isLayoutsDropdownOpen: false, + dropdownOrientation: 'bottom' + }; + }, + computed: { + filteredLayouts: function filteredLayouts() { + var _this = this; + return this.layouts.filter(function (layout) { + var count = _this.limitPerLayoutCounter[layout.name]; + return count === null || count > 0 || typeof count === 'undefined'; + }); + }, + isBelowLayoutLimits: function isBelowLayoutLimits() { + return (this.limitCounter > 0 || this.limitCounter === null) && this.filteredLayouts.length > 0; + }, + dropdownClasses: function dropdownClasses() { + return { + 'mt-3': this.dropdownOrientation === 'bottom', + 'pin-b': this.dropdownOrientation === 'bottom', + 'mb-3': this.dropdownOrientation === 'top', + 'pin-t': this.dropdownOrientation === 'top' + }; + } + }, + methods: { + /** + * Display or hide the layouts choice dropdown if there are multiple layouts + * or directly add the only available layout. + */ + toggleLayoutsDropdownOrAddDefault: function toggleLayoutsDropdownOrAddDefault(event) { + var _this2 = this; + if (this.layouts.length === 1) { + return this.addGroup(this.layouts[0]); + } + this.isLayoutsDropdownOpen = !this.isLayoutsDropdownOpen; + this.$nextTick(function () { + if (_this2.isLayoutsDropdownOpen) { + var _this2$$refs$dropdown = _this2.$refs.dropdown.getBoundingClientRect(), + dropdownBottom = _this2$$refs$dropdown.bottom; + + // If the dropdown is popping out of the bottom of the window, pin it to the top of the button. + if (dropdownBottom > window.innerHeight) { + _this2.dropdownOrientation = 'top'; + } + } else { + // Reset the orientation. + _this2.dropdownOrientation = 'bottom'; + } + }); + }, + /** + * Append the given layout to flexible content's list + */ + addGroup: function addGroup(layout) { + if (!layout) return; + this.$emit('addGroup', layout); + Nova.$emit('nova-flexible-content-add-group', layout); + this.isLayoutsDropdownOpen = false; + + // Reset the orientation. + this.dropdownOrientation = 'top'; + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=script&lang=js": +/*!****************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=script&lang=js ***! + \****************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _vueform_multiselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vueform/multiselect */ "./node_modules/@vueform/multiselect/dist/multiselect.js"); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: ['layouts', 'field', 'resourceName', 'resourceId', 'resource', 'errors', 'limitCounter', 'limitPerLayoutCounter'], + emits: ['addGroup'], + components: { + Multiselect: _vueform_multiselect__WEBPACK_IMPORTED_MODULE_0__["default"] + }, + data: function data() { + return { + selectedLayout: null, + isLayoutsDropdownOpen: false + }; + }, + computed: { + attributes: function attributes() { + return { + selectLabel: this.field.menu.data.selectLabel || this.__('Press enter to select'), + label: this.field.menu.data.label || 'title', + openDirection: this.field.menu.data.openDirection || 'bottom' + }; + }, + availableLayouts: function availableLayouts() { + var _this = this; + return this.layouts.filter(function (layout) { + return _this.limitPerLayoutCounter[layout.name] === null || _this.limitPerLayoutCounter[layout.name] > 0; + }).reduce(function (carry, layout) { + carry[layout.name] = layout.title; + return carry; + }, {}); + } + }, + methods: { + selectLayout: function selectLayout(layoutName) { + var layout = this.layouts.find(function (layout) { + return layout.name === layoutName; + }); + this.addGroup(layout); + }, + /** + * Display or hide the layouts choice dropdown if there are multiple layouts + * or directly add the only available layout. + */ + toggleLayoutsDropdownOrAddDefault: function toggleLayoutsDropdownOrAddDefault(event) { + if (this.layouts.length === 1) { + return this.addGroup(this.layouts[0]); + } + this.isLayoutsDropdownOpen = !this.isLayoutsDropdownOpen; + }, + /** + * Append the given layout to flexible content's list + */ + addGroup: function addGroup(layout) { + var _this2 = this; + if (!layout) return; + this.$emit('addGroup', layout); + this.isLayoutsDropdownOpen = false; + setTimeout(function () { + _this2.$refs.select.clear(); + _this2.selectedLayout = null; + }, 100); + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DeleteGroupModal.vue?vue&type=template&id=610f0164": +/*!**************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DeleteGroupModal.vue?vue&type=template&id=610f0164 ***! + \**************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = { + key: 0, + "class": "leading-normal" +}; +var _hoisted_2 = { + key: 1, + "class": "leading-normal" +}; +var _hoisted_3 = { + "class": "ml-auto" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _this = this; + var _component_ModalHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ModalHeader"); + var _component_ModalContent = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ModalContent"); + var _component_link_button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("link-button"); + var _component_danger_button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("danger-button"); + var _component_ModalFooter = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ModalFooter"); + var _component_Modal = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Modal"); + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Modal, { + show: true + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("form", { + onSubmit: _cache[1] || (_cache[1] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) { + return _ctx.$emit('confirm'); + }, ["prevent"])), + "class": "mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden" + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "default", {}, function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ModalHeader, { + textContent: (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Delete Group')) + }, null, 8 /* PROPS */, ["textContent"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ModalContent, null, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [$props.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("p", _hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.message), 1 /* TEXT */)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("p", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Are you sure you want to delete this group?')), 1 /* TEXT */))]; + }), + + _: 1 /* STABLE */ + })]; + }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ModalFooter, null, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_link_button, { + type: "button", + "data-testid": "cancel-button", + dusk: "cancel-delete-button", + onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) { + return _this.$emit('close'); + }, ["prevent"])), + "class": "mr-3" + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.no), 1 /* TEXT */)]; + }), + + _: 1 /* STABLE */ + }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_danger_button, { + ref: "confirmButton", + dusk: "confirm-delete-button", + processing: _ctx.working, + disabled: _ctx.working, + type: "submit" + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.yes), 1 /* TEXT */)]; + }), + + _: 1 /* STABLE */ + }, 8 /* PROPS */, ["processing", "disabled"])])]; + }), + _: 1 /* STABLE */ + })], 32 /* HYDRATE_EVENTS */)]; + }), + + _: 3 /* FORWARDED */ + }); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=template&id=0224618e": +/*!*********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=template&id=0224618e ***! + \*********************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_detail_nova_flexible_content_group = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("detail-nova-flexible-content-group"); + var _component_PanelItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("PanelItem"); + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_PanelItem, { + field: $props.field + }, { + value: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($options.groups, function (group, index) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_detail_nova_flexible_content_group, { + index: index, + last: index === $options.groups.length - 1, + group: group, + resourceName: $props.resourceName, + resourceId: $props.resourceId, + attribute: $props.field.attribute + }, null, 8 /* PROPS */, ["index", "last", "group", "resourceName", "resourceId", "attribute"])]); + }), 256 /* UNKEYED_FRAGMENT */))]; + }), + + _: 1 /* STABLE */ + }, 8 /* PROPS */, ["field"]); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailGroup.vue?vue&type=template&id=5e566c93": +/*!*********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailGroup.vue?vue&type=template&id=5e566c93 ***! + \*********************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = ["dusk"]; +var _hoisted_2 = { + "class": "block float-left border-r border-gray-100 dark:border-gray-700 pr-4 mr-4" +}; +var _hoisted_3 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { + "class": "text-60 text-xs" +}, "#", -1 /* HOISTED */); +var _hoisted_4 = { + "class": "text-80" +}; +var _hoisted_5 = { + "class": "font-bold" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($options.componentStyle), + dusk: 'detail-' + $props.attribute + '-' + $props.index + }, [$props.group.title ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { + key: 0, + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($options.titleStyle) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("\n "), _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("\n "), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.index + 1), 1 /* TEXT */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.group.title), 1 /* TEXT */)], 2 /* CLASS */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.group.fields, function (item, index) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)('detail-' + item.component), { + key: index, + "resource-name": $props.resourceName, + "resource-id": $props.resourceId, + field: item, + "validation-errors": null, + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ + 'remove-bottom-border': index == $props.group.fields.length - 1 + }) + }, null, 8 /* PROPS */, ["resource-name", "resource-id", "field", "class"]); + }), 128 /* KEYED_FRAGMENT */))], 10 /* CLASS, PROPS */, _hoisted_1); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=template&id=c023248a": +/*!*******************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=template&id=c023248a ***! + \*******************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = { + ref: "flexibleFieldContainer" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_form_nova_flexible_content_group = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("form-nova-flexible-content-group"); + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)(_ctx.currentField.fullWidth ? 'FullWidthField' : 'default-field'), { + dusk: _ctx.currentField.attribute, + field: _ctx.currentField, + errors: _ctx.errors, + "show-help-text": _ctx.showHelpText, + "full-width-content": "" + }, { + field: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($options.orderedGroups, function (group, index) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_form_nova_flexible_content_group, { + dusk: _ctx.currentField.attribute + '-' + index, + key: group.key, + field: _ctx.currentField, + group: group, + index: index, + "resource-name": _ctx.resourceName, + "resource-id": _ctx.resourceId, + errors: _ctx.errors, + mode: _ctx.mode, + onMoveUp: function onMoveUp($event) { + return $options.moveUp(group.key); + }, + onMoveDown: function onMoveDown($event) { + return $options.moveDown(group.key); + }, + onRemove: function onRemove($event) { + return $options.remove(group.key); + } + }, null, 8 /* PROPS */, ["dusk", "field", "group", "index", "resource-name", "resource-id", "errors", "mode", "onMoveUp", "onMoveDown", "onRemove"]); + }), 128 /* KEYED_FRAGMENT */))], 512 /* NEED_PATCH */), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)(_ctx.currentField.menu.component), { + layouts: $options.layouts, + field: _ctx.currentField, + "limit-counter": $options.limitCounter, + "limit-per-layout-counter": $options.limitPerLayoutCounter, + errors: _ctx.errors, + "resource-name": _ctx.resourceName, + "resource-id": _ctx.resourceId, + onAddGroup: _cache[0] || (_cache[0] = function ($event) { + return $options.addGroup($event); + }) + }, null, 40 /* PROPS, HYDRATE_EVENTS */, ["layouts", "field", "limit-counter", "limit-per-layout-counter", "errors", "resource-name", "resource-id"]))]; + }), + _: 1 /* STABLE */ + }, 8 /* PROPS */, ["dusk", "field", "errors", "show-help-text"]); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=template&id=07bf0e80": +/*!*******************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=template&id=07bf0e80 ***! + \*******************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = ["id"]; +var _hoisted_2 = { + "class": "w-full shrink" +}; +var _hoisted_3 = ["title"]; +var _hoisted_4 = ["title"]; +var _hoisted_5 = { + "class": "text-80 grow px-4" +}; +var _hoisted_6 = { + "class": "mr-3 font-semibold" +}; +var _hoisted_7 = { + key: 2, + "class": "flex" +}; +var _hoisted_8 = ["title"]; +var _hoisted_9 = ["title"]; +var _hoisted_10 = ["title"]; +var _hoisted_11 = ["title"]; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_icon = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("icon"); + var _component_delete_flexible_content_group_modal = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("delete-flexible-content-group-modal"); + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { + "class": "relative mb-4 pb-1", + id: $props.group.key + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [$props.group.title ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { + key: 0, + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($options.titleStyle) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["h-8 leading-normal h-full flex items-center box-content", { + 'border-b border-gray-200 dark:border-gray-700 ': !$data.collapsed + }]) + }, [$data.collapsed ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { + key: 0, + dusk: "expand-group", + type: "button", + "class": "shrink-0 group-control btn border-r border-gray-200 dark:border-gray-700 w-8 h-8 block", + title: _ctx.__('Expand'), + onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () { + return $options.expand && $options.expand.apply($options, arguments); + }, ["prevent"])) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_icon, { + type: "plus", + "class": "align-top", + width: "16", + height: "16" + })], 8 /* PROPS */, _hoisted_3)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { + key: 1, + dusk: "collapse-group", + type: "button", + "class": "group-control btn border-r border-gray-200 dark:border-gray-700 w-8 h-8 block", + title: _ctx.__('Collapse'), + onClick: _cache[1] || (_cache[1] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () { + return $options.collapse && $options.collapse.apply($options, arguments); + }, ["prevent"])) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_icon, { + type: "minus", + "class": "align-top", + width: "16", + height: "16" + })], 8 /* PROPS */, _hoisted_4)), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_6, "#" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.index + 1), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.group.title), 1 /* TEXT */)]), !$data.readonly ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { + dusk: "drag-group", + type: "button", + "class": "group-control btn border-l border-gray-200 dark:border-gray-700 w-8 h-8 block nova-flexible-content-drag-button", + title: _ctx.__('Drag') + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_icon, { + type: "selector", + "class": "align-top", + width: "16", + height: "16" + })], 8 /* PROPS */, _hoisted_8), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { + dusk: "move-up-group", + type: "button", + "class": "group-control btn border-l border-gray-200 dark:border-gray-700 w-8 h-8 block", + title: _ctx.__('Move up'), + onClick: _cache[2] || (_cache[2] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () { + return $options.moveUp && $options.moveUp.apply($options, arguments); + }, ["prevent"])) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_icon, { + type: "arrow-up", + "class": "align-top", + width: "16", + height: "16" + })], 8 /* PROPS */, _hoisted_9), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { + dusk: "move-down-group", + type: "button", + "class": "group-control btn border-l border-gray-200 dark:border-gray-700 w-8 h-8 block", + title: _ctx.__('Move down'), + onClick: _cache[3] || (_cache[3] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () { + return $options.moveDown && $options.moveDown.apply($options, arguments); + }, ["prevent"])) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_icon, { + type: "arrow-down", + "class": "align-top", + width: "16", + height: "16" + })], 8 /* PROPS */, _hoisted_10), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { + dusk: "delete-group", + type: "button", + "class": "group-control btn border-l border-gray-200 dark:border-gray-700 w-8 h-8 block", + title: _ctx.__('Delete'), + onClick: _cache[4] || (_cache[4] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () { + return $options.confirmRemove && $options.confirmRemove.apply($options, arguments); + }, ["prevent"])) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_icon, { + type: "trash", + width: "16", + height: "16" + })], 8 /* PROPS */, _hoisted_11), $data.removeMessage ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_delete_flexible_content_group_modal, { + key: 0, + onConfirm: $options.remove, + onClose: _cache[5] || (_cache[5] = function ($event) { + return $data.removeMessage = false; + }), + message: $props.field.confirmRemoveMessage, + yes: $props.field.confirmRemoveYes, + no: $props.field.confirmRemoveNo + }, null, 8 /* PROPS */, ["onConfirm", "message", "yes", "no"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 2 /* CLASS */)], 2 /* CLASS */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($options.containerStyle) + }, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.group.fields, function (item, index) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)('form-' + item.component), { + key: index, + "resource-name": _ctx.resourceName, + "resource-id": _ctx.resourceId, + field: item, + errors: $props.errors, + mode: _ctx.mode, + "show-help-text": item.helpText != null, + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ + 'remove-bottom-border': index == $props.group.fields.length - 1 + }) + }, null, 8 /* PROPS */, ["resource-name", "resource-id", "field", "errors", "mode", "show-help-text", "class"]); + }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)])], 8 /* PROPS */, _hoisted_1); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FullWidthField.vue?vue&type=template&id=7851d86e": +/*!************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FullWidthField.vue?vue&type=template&id=7851d86e ***! + \************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = { + "class": "py-6 px-8 w-full" +}; +var _hoisted_2 = { + key: 0, + "class": "mb-6" +}; +var _hoisted_3 = { + key: 0, + "class": "text-danger text-sm" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_form_label = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("form-label"); + var _component_help_text = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("help-text"); + var _component_field_wrapper = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("field-wrapper"); + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_field_wrapper, null, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [$options.fieldLabel ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_form_label, { + "for": $props.field.attribute, + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ + 'mb-2': $props.field.helpText && _ctx.showHelpText + }) + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.fieldLabel) + " ", 1 /* TEXT */), $props.field.required ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('*')), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]; + }), + _: 1 /* STABLE */ + }, 8 /* PROPS */, ["for", "class"]), _ctx.showHelpText ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_help_text, { + key: 0 + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.field.helpText), 1 /* TEXT */)]; + }), + + _: 1 /* STABLE */ + })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "field"), $props.showErrors && _ctx.hasError ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_help_text, { + key: 1, + "class": "error-text mt-2 text-danger" + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.firstError), 1 /* TEXT */)]; + }), + + _: 1 /* STABLE */ + })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]; + }), + _: 3 /* FORWARDED */ + }); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=template&id=9b307e6c": +/*!**************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=template&id=9b307e6c ***! + \**************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = { + key: 0, + "class": "relative" +}; +var _hoisted_2 = { + "class": "list-reset" +}; +var _hoisted_3 = ["dusk", "onClick"]; +var _hoisted_4 = { + "class": "text-90" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_default_button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("default-button"); + return $props.layouts ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [$data.isLayoutsDropdownOpen && $props.layouts.length > 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { + key: 0, + ref: "dropdown", + "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["z-20 absolute rounded-lg shadow-lg max-w-full max-h-search overflow-y-auto border border-40", $options.dropdownClasses]) + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_2, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($options.filteredLayouts, function (layout) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", { + "class": "border-b border-gray-100 dark:border-gray-700", + key: 'add-' + layout.name + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", { + dusk: 'add-' + layout.name, + onClick: function onClick($event) { + return $options.addGroup(layout); + }, + "class": "cursor-pointer flex items-center hover:bg-gray-50 dark:hover:bg-gray-900 block py-2 px-3 no-underline font-normal bg-white dark:bg-gray-800" + }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(layout.title), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_3)]); + }), 128 /* KEYED_FRAGMENT */))])], 2 /* CLASS */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $options.isBelowLayoutLimits ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_default_button, { + key: 1, + dusk: "toggle-layouts-dropdown-or-add-default", + type: "button", + tabindex: "0", + ref: "dropdownButton", + onClick: $options.toggleLayoutsDropdownOrAddDefault + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.field.button), 1 /* TEXT */)]; + }), + + _: 1 /* STABLE */ + }, 8 /* PROPS */, ["onClick"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=template&id=2fa4c75c": +/*!********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=template&id=2fa4c75c ***! + \********************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = { + key: 0, + "class": "w-3/5" +}; +var _hoisted_2 = { + key: 0 +}; +var _hoisted_3 = { + key: 0 +}; +var _hoisted_4 = { + key: 1 +}; +var _hoisted_5 = { + style: { + "min-width": "300px" + } +}; +var _hoisted_6 = { + "class": "flexible-search-menu-multiselect" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_default_button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("default-button"); + var _component_Multiselect = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Multiselect"); + return $props.layouts ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [this.limitCounter > 0 || this.limitCounter === null ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_2, [$props.layouts.length === 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_default_button, { + dusk: "toggle-layouts-dropdown-or-add-default", + type: "button", + tabindex: "0", + onClick: $options.toggleLayoutsDropdownOrAddDefault + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.field.button), 1 /* TEXT */)]; + }), + + _: 1 /* STABLE */ + }, 8 /* PROPS */, ["onClick"])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.layouts.length > 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Multiselect, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ + modelValue: $data.selectedLayout, + "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { + return $data.selectedLayout = $event; + }), + options: $options.availableLayouts, + placeholder: $props.field.button, + onChange: $options.selectLayout + }, $options.attributes, { + "track-by": "name", + "show-options": true, + searchable: true, + ref: "select" + }), null, 16 /* FULL_PROPS */, ["modelValue", "options", "placeholder", "onChange"])])])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true); +} + +/***/ }), + +/***/ "./resources/js/field.js": +/*!*******************************!*\ + !*** ./resources/js/field.js ***! + \*******************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + +Nova.booting(function (Vue) { + // Vue.component('index-nova-flexible-content', require('./components/IndexField').default) + Vue.component('detail-nova-flexible-content', (__webpack_require__(/*! ./components/DetailField.vue */ "./resources/js/components/DetailField.vue")["default"])); + Vue.component('detail-nova-flexible-content-group', (__webpack_require__(/*! ./components/DetailGroup.vue */ "./resources/js/components/DetailGroup.vue")["default"])); + Vue.component('form-nova-flexible-content', (__webpack_require__(/*! ./components/FormField.vue */ "./resources/js/components/FormField.vue")["default"])); + Vue.component('form-nova-flexible-content-group', (__webpack_require__(/*! ./components/FormGroup.vue */ "./resources/js/components/FormGroup.vue")["default"])); + Vue.component('flexible-drop-menu', (__webpack_require__(/*! ./components/OriginalDropMenu.vue */ "./resources/js/components/OriginalDropMenu.vue")["default"])); + Vue.component('flexible-search-menu', (__webpack_require__(/*! ./components/SearchMenu.vue */ "./resources/js/components/SearchMenu.vue")["default"])); + Vue.component('delete-flexible-content-group-modal', (__webpack_require__(/*! ./components/DeleteGroupModal.vue */ "./resources/js/components/DeleteGroupModal.vue")["default"])); +}); + +/***/ }), + +/***/ "./resources/js/group.js": +/*!*******************************!*\ + !*** ./resources/js/group.js ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Group) +/* harmony export */ }); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var Group = /*#__PURE__*/function () { + function Group(name, title, fields, field, key) { + var collapsed = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + _classCallCheck(this, Group); + this.name = name; + this.title = title; + this.fields = fields; + this.key = key || this.getTemporaryUniqueKey(field.attribute); + this.collapsed = collapsed; + this.readonly = field.readonly; + this.renameFields(); + } + + /** + * Retrieve the layout's filled FormData + */ + _createClass(Group, [{ + key: "values", + value: function values() { + var formData = new FormData(); + for (var i = 0; i < this.fields.length; i++) { + this.fields[i].fill(formData); + } + return formData; + } + + /** + * Retrieve the layout's filled object + */ + }, { + key: "serialize", + value: function serialize() { + var data = { + layout: this.name, + key: this.key, + attributes: {}, + files: {} + }; + var _iterator = _createForOfIteratorHelper(this.values()), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var item = _step.value; + if (item[0].indexOf('___upload-') == 0) { + // Previously nested file attribute + data.files[item[0]] = item[1]; + continue; + } + if (!(item[1] instanceof File || item[1] instanceof Blob)) { + // Simple input value, no need to attach files + data.attributes[item[0]] = item[1]; + continue; + } + + // File object, attach its file for upload + data.attributes[item[0]] = '___upload-' + item[0]; + data.files['___upload-' + item[0]] = item[1]; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + return data; + } + + /** + * Generate a unique string for current group + */ + }, { + key: "getTemporaryUniqueKey", + value: function getTemporaryUniqueKey(attribute) { + return this.randomString(16); + } + }, { + key: "randomString", + value: function randomString(len, charSet) { + charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + var randomString = ''; + for (var i = 0; i < len - 1; i++) { + var randomPoz = Math.floor(Math.random() * charSet.length); + randomString += charSet.substring(randomPoz, randomPoz + 1); + } + return 'c' + randomString; + } + + /** + * Assign a new unique field name to each field + */ + }, { + key: "renameFields", + value: function renameFields() { + var _this = this; + for (var i = this.fields.length - 1; i >= 0; i--) { + this.fields[i].attribute = this.key + '__' + this.fields[i].attribute; + this.fields[i].validationKey = this.fields[i].attribute; + if (this.fields[i].dependsOn) { + Object.keys(this.fields[i].dependsOn).forEach(function (key) { + _this.fields[i].dependsOn["".concat(_this.key, "__").concat(key)] = _this.fields[i].dependsOn[key]; + delete _this.fields[i].dependsOn[key]; + }); + } + } + } + }]); + return Group; +}(); + + +/***/ }), + +/***/ "./vendor/laravel/nova/resources/js/mixins/BehavesAsPanel.js": +/*!*******************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/BehavesAsPanel.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + emits: ['actionExecuted'], + props: ['resourceName', 'resourceId', 'resource', 'panel'], + methods: { + /** + * Handle the actionExecuted event and pass it up the chain. + */ + actionExecuted: function actionExecuted() { + this.$emit('actionExecuted'); + } + } +}); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=style&index=0&id=2fa4c75c&lang=scss": +/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=style&index=0&id=2fa4c75c&lang=scss ***! + \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); +// Imports + +var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ".flexible-search-menu-multiselect .multiselect {\n position: relative;\n margin: 0 auto;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n cursor: pointer;\n outline: none;\n border: var(--ms-border-width, 1px) solid var(--ms-border-color, #D1D5DB);\n border-radius: var(--ms-radius, 4px);\n background: var(--ms-bg, #FFFFFF);\n font-size: var(--ms-font-size, 1rem);\n min-height: calc(2 * var(--ms-border-width, 1px) + var(--ms-font-size, 1rem) * var(--ms-line-height, 1.375) + 2 * var(--ms-py, 0.5rem));\n}\n.flexible-search-menu-multiselect .multiselect.is-open {\n border-radius: var(--ms-radius, 4px) var(--ms-radius, 4px) 0 0;\n}\n.flexible-search-menu-multiselect .multiselect.is-open-top {\n border-radius: 0 0 var(--ms-radius, 4px) var(--ms-radius, 4px);\n}\n.flexible-search-menu-multiselect .multiselect.is-disabled {\n cursor: default;\n background: var(--ms-bg-disabled, #F3F4F6);\n}\n.flexible-search-menu-multiselect .multiselect.is-active {\n box-shadow: 0 0 0 var(--ms-ring-width, 3px) var(--ms-ring-color, rgba(16, 185, 129, 0.1882352941));\n}\n.flexible-search-menu-multiselect .multiselect-multiple-label,\n.flexible-search-menu-multiselect .multiselect-single-label,\n.flexible-search-menu-multiselect .multiselect-placeholder {\n display: flex;\n align-items: center;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n background: transparent;\n line-height: var(--ms-line-height, 1.375);\n padding-left: var(--ms-px, 0.875rem);\n padding-right: calc(1.25rem + var(--ms-px, 0.875rem) * 3);\n box-sizing: border-box;\n max-width: 100%;\n}\n.flexible-search-menu-multiselect .multiselect-placeholder {\n color: var(--ms-placeholder-color, #9CA3AF);\n}\n.flexible-search-menu-multiselect .multiselect-single-label-text {\n overflow: hidden;\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: 100%;\n}\n.flexible-search-menu-multiselect .multiselect-search {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0px;\n bottom: 0px;\n left: 0px;\n right: 0px;\n outline: none;\n box-sizing: border-box;\n border: 0;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: inherit;\n font-family: inherit;\n background: var(--ms-bg, #FFFFFF);\n border-radius: var(--ms-radius, 4px);\n padding-left: var(--ms-px, 0.875rem);\n}\n.flexible-search-menu-multiselect .multiselect-search::-webkit-search-decoration, .flexible-search-menu-multiselect .multiselect-search::-webkit-search-cancel-button, .flexible-search-menu-multiselect .multiselect-search::-webkit-search-results-button, .flexible-search-menu-multiselect .multiselect-search::-webkit-search-results-decoration {\n -webkit-appearance: none;\n}\n.flexible-search-menu-multiselect .multiselect-tags {\n flex-grow: 1;\n flex-shrink: 1;\n display: flex;\n flex-wrap: wrap;\n margin: var(--ms-tag-my, 0.25rem) 0 0;\n padding-left: var(--ms-py, 0.5rem);\n align-items: center;\n}\n.flexible-search-menu-multiselect .multiselect-tag {\n background: var(--ms-tag-bg, #10B981);\n color: var(--ms-tag-color, #FFFFFF);\n font-size: var(--ms-tag-font-size, 0.875rem);\n line-height: var(--ms-tag-line-height, 1.25rem);\n font-weight: var(--ms-tag-font-weight, 600);\n padding: var(--ms-tag-py, 0.125rem) 0 var(--ms-tag-py, 0.125rem) var(--ms-tag-px, 0.5rem);\n border-radius: var(--ms-tag-radius, 4px);\n margin-right: var(--ms-tag-mx, 0.25rem);\n margin-bottom: var(--ms-tag-my, 0.25rem);\n display: flex;\n align-items: center;\n white-space: nowrap;\n}\n.flexible-search-menu-multiselect .multiselect-tag.is-disabled {\n padding-right: var(--ms-tag-px, 0.5rem);\n background: var(--ms-tag-bg-disabled, #9CA3AF);\n color: var(--ms-tag-color-disabled, #FFFFFF);\n}\n.flexible-search-menu-multiselect .multiselect-tag-remove {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--ms-tag-remove-py, 0.25rem) var(--ms-tag-remove-px, 0.25rem);\n margin: var(--ms-tag-remove-my, 0rem) var(--ms-tag-remove-mx, 0.125rem);\n border-radius: var(--ms-tag-remove-radius, 4px);\n}\n.flexible-search-menu-multiselect .multiselect-tag-remove:hover {\n background: rgba(0, 0, 0, 0.062745098);\n}\n.flexible-search-menu-multiselect .multiselect-tag-remove-icon {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'%3E%3C/path%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'%3E%3C/path%3E%3C/svg%3E\");\n -webkit-mask-position: center;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n mask-size: contain;\n background-color: currentColor;\n opacity: 0.8;\n display: inline-block;\n width: 0.75rem;\n height: 0.75rem;\n}\n.flexible-search-menu-multiselect .multiselect-tags-search-wrapper {\n display: inline-block;\n position: relative;\n margin: 0 var(--ms-tag-mx, 4px) var(--ms-tag-my, 4px);\n flex-grow: 1;\n flex-shrink: 1;\n height: 100%;\n}\n.flexible-search-menu-multiselect .multiselect-tags-search-copy {\n visibility: hidden;\n white-space: pre-wrap;\n display: inline-block;\n height: 1px;\n width: 100%;\n}\n.flexible-search-menu-multiselect .multiselect-tags-search {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border: 0;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n outline: none;\n padding: 0;\n font-size: inherit;\n font-family: inherit;\n box-sizing: border-box;\n width: 100%;\n appearance: none;\n}\n.flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-decoration, .flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-cancel-button, .flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-results-button, .flexible-search-menu-multiselect .multiselect-tags-search::-webkit-search-results-decoration {\n -webkit-appearance: none;\n}\n.flexible-search-menu-multiselect .multiselect-inifite {\n display: flex;\n width: 100%;\n justify-content: center;\n align-items: center;\n min-height: calc(2 * var(--ms-border-width, 1px) + var(--ms-font-size, 1rem) * var(--ms-line-height, 1.375) + 2 * var(--ms-py, 0.5rem));\n}\n.flexible-search-menu-multiselect .multiselect-spinner,\n.flexible-search-menu-multiselect .multiselect-inifite-spinner {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 512 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M456.433 371.72l-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z'%3E%3C/path%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 512 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M456.433 371.72l-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z'%3E%3C/path%3E%3C/svg%3E\");\n -webkit-mask-position: center;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n mask-size: contain;\n background-color: var(--ms-spinner-color, #10B981);\n width: 1rem;\n height: 1rem;\n z-index: 10;\n animation: multiselect-spin 1s linear infinite;\n flex-shrink: 0;\n flex-grow: 0;\n}\n.flexible-search-menu-multiselect .multiselect-spinner {\n margin: 0 var(--ms-px, 0.875rem) 0 0;\n}\n.flexible-search-menu-multiselect .multiselect-clear {\n padding: 0 var(--ms-px, 0.875rem) 0 0px;\n position: relative;\n z-index: 10;\n opacity: 1;\n transition: 0.3s;\n flex-shrink: 0;\n flex-grow: 0;\n display: flex;\n}\n.flexible-search-menu-multiselect .multiselect-clear:hover .multiselect-clear-icon {\n background-color: var(--ms-clear-color-hover, #000000);\n}\n.flexible-search-menu-multiselect .multiselect-clear-icon {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'%3E%3C/path%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'%3E%3C/path%3E%3C/svg%3E\");\n -webkit-mask-position: center;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n mask-size: contain;\n background-color: var(--ms-clear-color, #999999);\n width: 0.625rem;\n height: 1.125rem;\n display: inline-block;\n transition: 0.3s;\n}\n.flexible-search-menu-multiselect .multiselect-caret {\n transform: rotate(0deg);\n transition: 0.3s transform;\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z'%3E%3C/path%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z'%3E%3C/path%3E%3C/svg%3E\");\n -webkit-mask-position: center;\n mask-position: center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n mask-size: contain;\n background-color: var(--ms-caret-color, #999999);\n width: 0.625rem;\n height: 1.125rem;\n margin: 0 var(--ms-px, 0.875rem) 0 0;\n position: relative;\n z-index: 10;\n flex-shrink: 0;\n flex-grow: 0;\n pointer-events: none;\n}\n.flexible-search-menu-multiselect .multiselect-caret.is-open {\n transform: rotate(180deg);\n pointer-events: auto;\n}\n.flexible-search-menu-multiselect .multiselect-dropdown {\n position: absolute;\n left: calc(var(--ms-border-width, 1px) * -1);\n right: calc(var(--ms-border-width, 1px) * -1);\n bottom: 0;\n transform: translateY(100%);\n border: var(--ms-dropdown-border-width, 1px) solid var(--ms-dropdown-border-color, #D1D5DB);\n margin-top: calc(var(--ms-border-width, 1px) * -1);\n max-height: 15rem;\n overflow-y: scroll;\n -webkit-overflow-scrolling: touch;\n z-index: 100;\n background: var(--ms-dropdown-bg, #FFFFFF);\n display: flex;\n flex-direction: column;\n border-radius: 0 0 var(--ms-dropdown-radius, 4px) var(--ms-dropdown-radius, 4px);\n outline: none;\n max-height: var(--ms-max-height, 10rem);\n}\n.flexible-search-menu-multiselect .multiselect-dropdown.is-top {\n transform: translateY(-100%);\n top: var(--ms-border-width, 1px);\n bottom: auto;\n border-radius: var(--ms-dropdown-radius, 4px) var(--ms-dropdown-radius, 4px) 0 0;\n}\n.flexible-search-menu-multiselect .multiselect-dropdown.is-hidden {\n display: none;\n}\n.flexible-search-menu-multiselect .multiselect-options {\n padding: 0;\n margin: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n}\n.flexible-search-menu-multiselect .multiselect-group {\n padding: 0;\n margin: 0;\n}\n.flexible-search-menu-multiselect .multiselect-group-label {\n padding: var(--ms-group-label-py, 0.3rem) var(--ms-group-label-px, 0.75rem);\n font-size: 0.875rem;\n font-weight: 600;\n background: var(--ms-group-label-bg, #E5E7EB);\n color: var(--ms-group-label-color, #374151);\n cursor: default;\n line-height: var(--ms-group-label-line-height, 1.375);\n display: flex;\n box-sizing: border-box;\n text-decoration: none;\n align-items: center;\n justify-content: flex-start;\n text-align: left;\n}\n.flexible-search-menu-multiselect .multiselect-group-label.is-pointable {\n cursor: pointer;\n}\n.flexible-search-menu-multiselect .multiselect-group-label.is-pointed {\n background: var(--ms-group-label-bg-pointed, #D1D5DB);\n color: var(--ms-group-label-color-pointed, #374151);\n}\n.flexible-search-menu-multiselect .multiselect-group-label.is-selected {\n background: var(--ms-group-label-bg-selected, #059669);\n color: var(--ms-group-label-color-selected, #FFFFFF);\n}\n.flexible-search-menu-multiselect .multiselect-group-label.is-disabled {\n background: var(--ms-group-label-bg-disabled, #F3F4F6);\n color: var(--ms-group-label-color-disabled, #D1D5DB);\n cursor: not-allowed;\n}\n.flexible-search-menu-multiselect .multiselect-group-label.is-selected.is-pointed {\n background: var(--ms-group-label-bg-selected-pointed, #0c9e70);\n color: var(--ms-group-label-color-selected-pointed, #FFFFFF);\n}\n.flexible-search-menu-multiselect .multiselect-group-label.is-selected.is-disabled {\n background: var(--ms-group-label-bg-selected-disabled, #75cfb1);\n color: var(--ms-group-label-color-selected-disabled, #D1FAE5);\n}\n.flexible-search-menu-multiselect .multiselect-group-options {\n padding: 0;\n margin: 0;\n}\n.flexible-search-menu-multiselect .multiselect-option {\n padding: var(--ms-option-py, 0.5rem) var(--ms-option-px, 0.75rem);\n font-size: var(--ms-option-font-size, 1rem);\n line-height: var(--ms-option-line-height, 1.375);\n cursor: pointer;\n display: flex;\n box-sizing: border-box;\n text-decoration: none;\n align-items: center;\n justify-content: flex-start;\n text-align: left;\n}\n.flexible-search-menu-multiselect .multiselect-option.is-pointed {\n background: var(--ms-option-bg-pointed, #F3F4F6);\n color: var(--ms-option-color-pointed, #1F2937);\n}\n.flexible-search-menu-multiselect .multiselect-option.is-selected {\n background: var(--ms-option-bg-selected, #10B981);\n color: var(--ms-option-color-selected, #FFFFFF);\n}\n.flexible-search-menu-multiselect .multiselect-option.is-disabled {\n background: var(--ms-option-bg-disabled, #FFFFFF);\n color: var(--ms-option-color-disabled, #D1D5DB);\n cursor: not-allowed;\n}\n.flexible-search-menu-multiselect .multiselect-option.is-selected.is-pointed {\n background: var(--ms-option-bg-selected-pointed, #26c08e);\n color: var(--ms-option-color-selected-pointed, #FFFFFF);\n}\n.flexible-search-menu-multiselect .multiselect-option.is-selected.is-disabled {\n background: var(--ms-option-bg-selected-disabled, #87dcc0);\n color: var(--ms-option-color-selected-disabled, #D1FAE5);\n}\n.flexible-search-menu-multiselect .multiselect-no-options,\n.flexible-search-menu-multiselect .multiselect-no-results {\n padding: var(--ms-option-py, 0.5rem) var(--ms-option-px, 0.75rem);\n color: var(--ms-empty-color, #4B5563);\n}\n.flexible-search-menu-multiselect .multiselect-fake-input {\n background: transparent;\n position: absolute;\n left: 0;\n right: 0;\n bottom: -1px;\n width: 100%;\n height: 1px;\n border: 0;\n padding: 0;\n font-size: 0;\n outline: none;\n}\n.flexible-search-menu-multiselect .multiselect-fake-input:active, .flexible-search-menu-multiselect .multiselect-fake-input:focus {\n outline: none;\n}\n.flexible-search-menu-multiselect .multiselect-spacer {\n display: none;\n}\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-multiple-label,\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-single-label,\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-placeholder {\n padding-right: var(--ms-px, 0.875rem);\n padding-left: calc(1.25rem + var(--ms-px, 0.875rem) * 3);\n left: auto;\n right: 0;\n}\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-search {\n padding-left: 0;\n padding-right: var(--ms-px, 0.875rem);\n}\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-tags {\n padding-left: 0;\n padding-right: var(--ms-py, 0.5rem);\n}\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-tag {\n padding: var(--ms-tag-py, 0.125rem) var(--ms-tag-px, 0.5rem) var(--ms-tag-py, 0.125rem) 0;\n margin-right: 0;\n margin-left: var(--ms-tag-mx, 0.25rem);\n}\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-tag.is-disabled {\n padding-left: var(--ms-tag-px, 0.5rem);\n}\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-spinner,\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-caret {\n margin: 0 0 0 var(--ms-px, 0.875rem);\n}\n.flexible-search-menu-multiselect [dir=rtl] .multiselect-clear {\n padding: 0 0 0 var(--ms-px, 0.875rem);\n}\n@keyframes multiselect-spin {\nfrom {\n transform: rotate(0);\n}\nto {\n transform: rotate(360deg);\n}\n}", ""]); +// Exports +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); + + +/***/ }), + +/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=style&index=0&id=07bf0e80&lang=css": +/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=style&index=0&id=07bf0e80&lang=css ***! + \****************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); +// Imports + +var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); +// Module +___CSS_LOADER_EXPORT___.push([module.id, "\n.group-control:focus {\n outline: none;\n}\n.group-control:hover {\n color: rgb(var(--colors-primary-400));\n}\n.confirm-message{\n position: absolute;\n overflow: visible;\n right: 38px;\n bottom: 0;\n width: auto;\n border-radius: 4px;\n padding: 6px 7px;\n border: 1px solid #B7CAD6;\n background-color: var(--20);\n white-space: nowrap;\n}\n[dir=rtl] .confirm-message{\n right: auto;\n left: 35px;\n}\n.confirm-message .text-danger {\n color: #ee3f22;\n}\n.rounded-l {\n border-top-left-radius: 0.25rem; /* 4px */\n border-bottom-left-radius: 0.25rem; /* 4px */\n}\n.rounded-t-lg {\n border-top-right-radius: 0.5rem; /* 8px */\n border-top-left-radius: 0.5rem; /* 8px */\n}\n.rounded-b-lg {\n border-bottom-left-radius: 0.5rem; /* 8px */\n border-bottom-right-radius: 0.5rem; /* 8px */\n}\n.box-content {\n box-sizing: content-box;\n}\n.grow {\n flex-grow: 1;\n}\n.grow-0 {\n flex-grow: 0;\n}\n.shrink {\n flex-shrink: 1;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n", ""]); +// Exports +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); + + +/***/ }), + +/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=style&index=0&id=9b307e6c&lang=css": +/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=style&index=0&id=9b307e6c&lang=css ***! + \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); +// Imports + +var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); +// Module +___CSS_LOADER_EXPORT___.push([module.id, "\n.top-full {\n top: 100%\n}\n.pin-b {\n top: 100%;\n bottom: auto;\n}\n.pin-t {\n top: auto;\n bottom: 100%;\n}\n", ""]); +// Exports +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); + + +/***/ }), + +/***/ "./node_modules/css-loader/dist/runtime/api.js": +/*!*****************************************************!*\ + !*** ./node_modules/css-loader/dist/runtime/api.js ***! + \*****************************************************/ +/***/ ((module) => { + +"use strict"; + + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +// eslint-disable-next-line func-names +module.exports = function (cssWithMappingToString) { + var list = []; // return the list of modules as css string + + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item); + + if (item[2]) { + return "@media ".concat(item[2], " {").concat(content, "}"); + } + + return content; + }).join(""); + }; // import a list of modules into the list + // eslint-disable-next-line func-names + + + list.i = function (modules, mediaQuery, dedupe) { + if (typeof modules === "string") { + // eslint-disable-next-line no-param-reassign + modules = [[null, modules, ""]]; + } + + var alreadyImportedModules = {}; + + if (dedupe) { + for (var i = 0; i < this.length; i++) { + // eslint-disable-next-line prefer-destructuring + var id = this[i][0]; + + if (id != null) { + alreadyImportedModules[id] = true; + } + } + } + + for (var _i = 0; _i < modules.length; _i++) { + var item = [].concat(modules[_i]); + + if (dedupe && alreadyImportedModules[item[0]]) { + // eslint-disable-next-line no-continue + continue; + } + + if (mediaQuery) { + if (!item[2]) { + item[2] = mediaQuery; + } else { + item[2] = "".concat(mediaQuery, " and ").concat(item[2]); + } + } + + list.push(item); + } + }; + + return list; +}; + +/***/ }), + +/***/ "./resources/sass/field.scss": +/*!***********************************!*\ + !*** ./resources/sass/field.scss ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./node_modules/sortablejs/modular/sortable.esm.js": +/*!*********************************************************!*\ + !*** ./node_modules/sortablejs/modular/sortable.esm.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "MultiDrag": () => (/* binding */ MultiDragPlugin), +/* harmony export */ "Sortable": () => (/* binding */ Sortable), +/* harmony export */ "Swap": () => (/* binding */ SwapPlugin), +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/**! + * Sortable 1.15.0 + * @author RubaXa + * @author owenm + * @license MIT + */ +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); +} + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +var version = "1.15.0"; + +function userAgent(pattern) { + if (typeof window !== 'undefined' && window.navigator) { + return !! /*@__PURE__*/navigator.userAgent.match(pattern); + } +} + +var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i); +var Edge = userAgent(/Edge/i); +var FireFox = userAgent(/firefox/i); +var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i); +var IOS = userAgent(/iP(ad|od|hone)/i); +var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i); + +var captureMode = { + capture: false, + passive: false +}; + +function on(el, event, fn) { + el.addEventListener(event, fn, !IE11OrLess && captureMode); +} + +function off(el, event, fn) { + el.removeEventListener(event, fn, !IE11OrLess && captureMode); +} + +function matches( +/**HTMLElement*/ +el, +/**String*/ +selector) { + if (!selector) return; + selector[0] === '>' && (selector = selector.substring(1)); + + if (el) { + try { + if (el.matches) { + return el.matches(selector); + } else if (el.msMatchesSelector) { + return el.msMatchesSelector(selector); + } else if (el.webkitMatchesSelector) { + return el.webkitMatchesSelector(selector); + } + } catch (_) { + return false; + } + } + + return false; +} + +function getParentOrHost(el) { + return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode; +} + +function closest( +/**HTMLElement*/ +el, +/**String*/ +selector, +/**HTMLElement*/ +ctx, includeCTX) { + if (el) { + ctx = ctx || document; + + do { + if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) { + return el; + } + + if (el === ctx) break; + /* jshint boss:true */ + } while (el = getParentOrHost(el)); + } + + return null; +} + +var R_SPACE = /\s+/g; + +function toggleClass(el, name, state) { + if (el && name) { + if (el.classList) { + el.classList[state ? 'add' : 'remove'](name); + } else { + var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' '); + el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' '); + } + } +} + +function css(el, prop, val) { + var style = el && el.style; + + if (style) { + if (val === void 0) { + if (document.defaultView && document.defaultView.getComputedStyle) { + val = document.defaultView.getComputedStyle(el, ''); + } else if (el.currentStyle) { + val = el.currentStyle; + } + + return prop === void 0 ? val : val[prop]; + } else { + if (!(prop in style) && prop.indexOf('webkit') === -1) { + prop = '-webkit-' + prop; + } + + style[prop] = val + (typeof val === 'string' ? '' : 'px'); + } + } +} + +function matrix(el, selfOnly) { + var appliedTransforms = ''; + + if (typeof el === 'string') { + appliedTransforms = el; + } else { + do { + var transform = css(el, 'transform'); + + if (transform && transform !== 'none') { + appliedTransforms = transform + ' ' + appliedTransforms; + } + /* jshint boss:true */ + + } while (!selfOnly && (el = el.parentNode)); + } + + var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; + /*jshint -W056 */ + + return matrixFn && new matrixFn(appliedTransforms); +} + +function find(ctx, tagName, iterator) { + if (ctx) { + var list = ctx.getElementsByTagName(tagName), + i = 0, + n = list.length; + + if (iterator) { + for (; i < n; i++) { + iterator(list[i], i); + } + } + + return list; + } + + return []; +} + +function getWindowScrollingElement() { + var scrollingElement = document.scrollingElement; + + if (scrollingElement) { + return scrollingElement; + } else { + return document.documentElement; + } +} +/** + * Returns the "bounding client rect" of given element + * @param {HTMLElement} el The element whose boundingClientRect is wanted + * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container + * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr + * @param {[Boolean]} undoScale Whether the container's scale() should be undone + * @param {[HTMLElement]} container The parent the element will be placed in + * @return {Object} The boundingClientRect of el, with specified adjustments + */ + + +function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) { + if (!el.getBoundingClientRect && el !== window) return; + var elRect, top, left, bottom, right, height, width; + + if (el !== window && el.parentNode && el !== getWindowScrollingElement()) { + elRect = el.getBoundingClientRect(); + top = elRect.top; + left = elRect.left; + bottom = elRect.bottom; + right = elRect.right; + height = elRect.height; + width = elRect.width; + } else { + top = 0; + left = 0; + bottom = window.innerHeight; + right = window.innerWidth; + height = window.innerHeight; + width = window.innerWidth; + } + + if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) { + // Adjust for translate() + container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312) + // Not needed on <= IE11 + + if (!IE11OrLess) { + do { + if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) { + var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container + + top -= containerRect.top + parseInt(css(container, 'border-top-width')); + left -= containerRect.left + parseInt(css(container, 'border-left-width')); + bottom = top + elRect.height; + right = left + elRect.width; + break; + } + /* jshint boss:true */ + + } while (container = container.parentNode); + } + } + + if (undoScale && el !== window) { + // Adjust for scale() + var elMatrix = matrix(container || el), + scaleX = elMatrix && elMatrix.a, + scaleY = elMatrix && elMatrix.d; + + if (elMatrix) { + top /= scaleY; + left /= scaleX; + width /= scaleX; + height /= scaleY; + bottom = top + height; + right = left + width; + } + } + + return { + top: top, + left: left, + bottom: bottom, + right: right, + width: width, + height: height + }; +} +/** + * Checks if a side of an element is scrolled past a side of its parents + * @param {HTMLElement} el The element who's side being scrolled out of view is in question + * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom') + * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom') + * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element + */ + + +function isScrolledPast(el, elSide, parentSide) { + var parent = getParentAutoScrollElement(el, true), + elSideVal = getRect(el)[elSide]; + /* jshint boss:true */ + + while (parent) { + var parentSideVal = getRect(parent)[parentSide], + visible = void 0; + + if (parentSide === 'top' || parentSide === 'left') { + visible = elSideVal >= parentSideVal; + } else { + visible = elSideVal <= parentSideVal; + } + + if (!visible) return parent; + if (parent === getWindowScrollingElement()) break; + parent = getParentAutoScrollElement(parent, false); + } + + return false; +} +/** + * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible) + * and non-draggable elements + * @param {HTMLElement} el The parent element + * @param {Number} childNum The index of the child + * @param {Object} options Parent Sortable's options + * @return {HTMLElement} The child at index childNum, or null if not found + */ + + +function getChild(el, childNum, options, includeDragEl) { + var currentChild = 0, + i = 0, + children = el.children; + + while (i < children.length) { + if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) { + if (currentChild === childNum) { + return children[i]; + } + + currentChild++; + } + + i++; + } + + return null; +} +/** + * Gets the last child in the el, ignoring ghostEl or invisible elements (clones) + * @param {HTMLElement} el Parent element + * @param {selector} selector Any other elements that should be ignored + * @return {HTMLElement} The last child, ignoring ghostEl + */ + + +function lastChild(el, selector) { + var last = el.lastElementChild; + + while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) { + last = last.previousElementSibling; + } + + return last || null; +} +/** + * Returns the index of an element within its parent for a selected set of + * elements + * @param {HTMLElement} el + * @param {selector} selector + * @return {number} + */ + + +function index(el, selector) { + var index = 0; + + if (!el || !el.parentNode) { + return -1; + } + /* jshint boss:true */ + + + while (el = el.previousElementSibling) { + if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) { + index++; + } + } + + return index; +} +/** + * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements. + * The value is returned in real pixels. + * @param {HTMLElement} el + * @return {Array} Offsets in the format of [left, top] + */ + + +function getRelativeScrollOffset(el) { + var offsetLeft = 0, + offsetTop = 0, + winScroller = getWindowScrollingElement(); + + if (el) { + do { + var elMatrix = matrix(el), + scaleX = elMatrix.a, + scaleY = elMatrix.d; + offsetLeft += el.scrollLeft * scaleX; + offsetTop += el.scrollTop * scaleY; + } while (el !== winScroller && (el = el.parentNode)); + } + + return [offsetLeft, offsetTop]; +} +/** + * Returns the index of the object within the given array + * @param {Array} arr Array that may or may not hold the object + * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find + * @return {Number} The index of the object in the array, or -1 + */ + + +function indexOfObject(arr, obj) { + for (var i in arr) { + if (!arr.hasOwnProperty(i)) continue; + + for (var key in obj) { + if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i); + } + } + + return -1; +} + +function getParentAutoScrollElement(el, includeSelf) { + // skip to window + if (!el || !el.getBoundingClientRect) return getWindowScrollingElement(); + var elem = el; + var gotSelf = false; + + do { + // we don't need to get elem css if it isn't even overflowing in the first place (performance) + if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) { + var elemCSS = css(elem); + + if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) { + if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement(); + if (gotSelf || includeSelf) return elem; + gotSelf = true; + } + } + /* jshint boss:true */ + + } while (elem = elem.parentNode); + + return getWindowScrollingElement(); +} + +function extend(dst, src) { + if (dst && src) { + for (var key in src) { + if (src.hasOwnProperty(key)) { + dst[key] = src[key]; + } + } + } + + return dst; +} + +function isRectEqual(rect1, rect2) { + return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width); +} + +var _throttleTimeout; + +function throttle(callback, ms) { + return function () { + if (!_throttleTimeout) { + var args = arguments, + _this = this; + + if (args.length === 1) { + callback.call(_this, args[0]); + } else { + callback.apply(_this, args); + } + + _throttleTimeout = setTimeout(function () { + _throttleTimeout = void 0; + }, ms); + } + }; +} + +function cancelThrottle() { + clearTimeout(_throttleTimeout); + _throttleTimeout = void 0; +} + +function scrollBy(el, x, y) { + el.scrollLeft += x; + el.scrollTop += y; +} + +function clone(el) { + var Polymer = window.Polymer; + var $ = window.jQuery || window.Zepto; + + if (Polymer && Polymer.dom) { + return Polymer.dom(el).cloneNode(true); + } else if ($) { + return $(el).clone(true)[0]; + } else { + return el.cloneNode(true); + } +} + +function setRect(el, rect) { + css(el, 'position', 'absolute'); + css(el, 'top', rect.top); + css(el, 'left', rect.left); + css(el, 'width', rect.width); + css(el, 'height', rect.height); +} + +function unsetRect(el) { + css(el, 'position', ''); + css(el, 'top', ''); + css(el, 'left', ''); + css(el, 'width', ''); + css(el, 'height', ''); +} + +var expando = 'Sortable' + new Date().getTime(); + +function AnimationStateManager() { + var animationStates = [], + animationCallbackId; + return { + captureAnimationState: function captureAnimationState() { + animationStates = []; + if (!this.options.animation) return; + var children = [].slice.call(this.el.children); + children.forEach(function (child) { + if (css(child, 'display') === 'none' || child === Sortable.ghost) return; + animationStates.push({ + target: child, + rect: getRect(child) + }); + + var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation + + + if (child.thisAnimationDuration) { + var childMatrix = matrix(child, true); + + if (childMatrix) { + fromRect.top -= childMatrix.f; + fromRect.left -= childMatrix.e; + } + } + + child.fromRect = fromRect; + }); + }, + addAnimationState: function addAnimationState(state) { + animationStates.push(state); + }, + removeAnimationState: function removeAnimationState(target) { + animationStates.splice(indexOfObject(animationStates, { + target: target + }), 1); + }, + animateAll: function animateAll(callback) { + var _this = this; + + if (!this.options.animation) { + clearTimeout(animationCallbackId); + if (typeof callback === 'function') callback(); + return; + } + + var animating = false, + animationTime = 0; + animationStates.forEach(function (state) { + var time = 0, + target = state.target, + fromRect = target.fromRect, + toRect = getRect(target), + prevFromRect = target.prevFromRect, + prevToRect = target.prevToRect, + animatingRect = state.rect, + targetMatrix = matrix(target, true); + + if (targetMatrix) { + // Compensate for current animation + toRect.top -= targetMatrix.f; + toRect.left -= targetMatrix.e; + } + + target.toRect = toRect; + + if (target.thisAnimationDuration) { + // Could also check if animatingRect is between fromRect and toRect + if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect + (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) { + // If returning to same place as started from animation and on same axis + time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options); + } + } // if fromRect != toRect: animate + + + if (!isRectEqual(toRect, fromRect)) { + target.prevFromRect = fromRect; + target.prevToRect = toRect; + + if (!time) { + time = _this.options.animation; + } + + _this.animate(target, animatingRect, toRect, time); + } + + if (time) { + animating = true; + animationTime = Math.max(animationTime, time); + clearTimeout(target.animationResetTimer); + target.animationResetTimer = setTimeout(function () { + target.animationTime = 0; + target.prevFromRect = null; + target.fromRect = null; + target.prevToRect = null; + target.thisAnimationDuration = null; + }, time); + target.thisAnimationDuration = time; + } + }); + clearTimeout(animationCallbackId); + + if (!animating) { + if (typeof callback === 'function') callback(); + } else { + animationCallbackId = setTimeout(function () { + if (typeof callback === 'function') callback(); + }, animationTime); + } + + animationStates = []; + }, + animate: function animate(target, currentRect, toRect, duration) { + if (duration) { + css(target, 'transition', ''); + css(target, 'transform', ''); + var elMatrix = matrix(this.el), + scaleX = elMatrix && elMatrix.a, + scaleY = elMatrix && elMatrix.d, + translateX = (currentRect.left - toRect.left) / (scaleX || 1), + translateY = (currentRect.top - toRect.top) / (scaleY || 1); + target.animatingX = !!translateX; + target.animatingY = !!translateY; + css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)'); + this.forRepaintDummy = repaint(target); // repaint + + css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : '')); + css(target, 'transform', 'translate3d(0,0,0)'); + typeof target.animated === 'number' && clearTimeout(target.animated); + target.animated = setTimeout(function () { + css(target, 'transition', ''); + css(target, 'transform', ''); + target.animated = false; + target.animatingX = false; + target.animatingY = false; + }, duration); + } + } + }; +} + +function repaint(target) { + return target.offsetWidth; +} + +function calculateRealTime(animatingRect, fromRect, toRect, options) { + return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation; +} + +var plugins = []; +var defaults = { + initializeByDefault: true +}; +var PluginManager = { + mount: function mount(plugin) { + // Set default static properties + for (var option in defaults) { + if (defaults.hasOwnProperty(option) && !(option in plugin)) { + plugin[option] = defaults[option]; + } + } + + plugins.forEach(function (p) { + if (p.pluginName === plugin.pluginName) { + throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once"); + } + }); + plugins.push(plugin); + }, + pluginEvent: function pluginEvent(eventName, sortable, evt) { + var _this = this; + + this.eventCanceled = false; + + evt.cancel = function () { + _this.eventCanceled = true; + }; + + var eventNameGlobal = eventName + 'Global'; + plugins.forEach(function (plugin) { + if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable + + if (sortable[plugin.pluginName][eventNameGlobal]) { + sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({ + sortable: sortable + }, evt)); + } // Only fire plugin event if plugin is enabled in this sortable, + // and plugin has event defined + + + if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) { + sortable[plugin.pluginName][eventName](_objectSpread2({ + sortable: sortable + }, evt)); + } + }); + }, + initializePlugins: function initializePlugins(sortable, el, defaults, options) { + plugins.forEach(function (plugin) { + var pluginName = plugin.pluginName; + if (!sortable.options[pluginName] && !plugin.initializeByDefault) return; + var initialized = new plugin(sortable, el, sortable.options); + initialized.sortable = sortable; + initialized.options = sortable.options; + sortable[pluginName] = initialized; // Add default options from plugin + + _extends(defaults, initialized.defaults); + }); + + for (var option in sortable.options) { + if (!sortable.options.hasOwnProperty(option)) continue; + var modified = this.modifyOption(sortable, option, sortable.options[option]); + + if (typeof modified !== 'undefined') { + sortable.options[option] = modified; + } + } + }, + getEventProperties: function getEventProperties(name, sortable) { + var eventProperties = {}; + plugins.forEach(function (plugin) { + if (typeof plugin.eventProperties !== 'function') return; + + _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name)); + }); + return eventProperties; + }, + modifyOption: function modifyOption(sortable, name, value) { + var modifiedValue; + plugins.forEach(function (plugin) { + // Plugin must exist on the Sortable + if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin + + if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') { + modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value); + } + }); + return modifiedValue; + } +}; + +function dispatchEvent(_ref) { + var sortable = _ref.sortable, + rootEl = _ref.rootEl, + name = _ref.name, + targetEl = _ref.targetEl, + cloneEl = _ref.cloneEl, + toEl = _ref.toEl, + fromEl = _ref.fromEl, + oldIndex = _ref.oldIndex, + newIndex = _ref.newIndex, + oldDraggableIndex = _ref.oldDraggableIndex, + newDraggableIndex = _ref.newDraggableIndex, + originalEvent = _ref.originalEvent, + putSortable = _ref.putSortable, + extraEventProperties = _ref.extraEventProperties; + sortable = sortable || rootEl && rootEl[expando]; + if (!sortable) return; + var evt, + options = sortable.options, + onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature + + if (window.CustomEvent && !IE11OrLess && !Edge) { + evt = new CustomEvent(name, { + bubbles: true, + cancelable: true + }); + } else { + evt = document.createEvent('Event'); + evt.initEvent(name, true, true); + } + + evt.to = toEl || rootEl; + evt.from = fromEl || rootEl; + evt.item = targetEl || rootEl; + evt.clone = cloneEl; + evt.oldIndex = oldIndex; + evt.newIndex = newIndex; + evt.oldDraggableIndex = oldDraggableIndex; + evt.newDraggableIndex = newDraggableIndex; + evt.originalEvent = originalEvent; + evt.pullMode = putSortable ? putSortable.lastPutMode : undefined; + + var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable)); + + for (var option in allEventProperties) { + evt[option] = allEventProperties[option]; + } + + if (rootEl) { + rootEl.dispatchEvent(evt); + } + + if (options[onName]) { + options[onName].call(sortable, evt); + } +} + +var _excluded = ["evt"]; + +var pluginEvent = function pluginEvent(eventName, sortable) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + originalEvent = _ref.evt, + data = _objectWithoutProperties(_ref, _excluded); + + PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({ + dragEl: dragEl, + parentEl: parentEl, + ghostEl: ghostEl, + rootEl: rootEl, + nextEl: nextEl, + lastDownEl: lastDownEl, + cloneEl: cloneEl, + cloneHidden: cloneHidden, + dragStarted: moved, + putSortable: putSortable, + activeSortable: Sortable.active, + originalEvent: originalEvent, + oldIndex: oldIndex, + oldDraggableIndex: oldDraggableIndex, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex, + hideGhostForTarget: _hideGhostForTarget, + unhideGhostForTarget: _unhideGhostForTarget, + cloneNowHidden: function cloneNowHidden() { + cloneHidden = true; + }, + cloneNowShown: function cloneNowShown() { + cloneHidden = false; + }, + dispatchSortableEvent: function dispatchSortableEvent(name) { + _dispatchEvent({ + sortable: sortable, + name: name, + originalEvent: originalEvent + }); + } + }, data)); +}; + +function _dispatchEvent(info) { + dispatchEvent(_objectSpread2({ + putSortable: putSortable, + cloneEl: cloneEl, + targetEl: dragEl, + rootEl: rootEl, + oldIndex: oldIndex, + oldDraggableIndex: oldDraggableIndex, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex + }, info)); +} + +var dragEl, + parentEl, + ghostEl, + rootEl, + nextEl, + lastDownEl, + cloneEl, + cloneHidden, + oldIndex, + newIndex, + oldDraggableIndex, + newDraggableIndex, + activeGroup, + putSortable, + awaitingDragStarted = false, + ignoreNextClick = false, + sortables = [], + tapEvt, + touchEvt, + lastDx, + lastDy, + tapDistanceLeft, + tapDistanceTop, + moved, + lastTarget, + lastDirection, + pastFirstInvertThresh = false, + isCircumstantialInvert = false, + targetMoveDistance, + // For positioning ghost absolutely +ghostRelativeParent, + ghostRelativeParentInitialScroll = [], + // (left, top) +_silent = false, + savedInputChecked = []; +/** @const */ + +var documentExists = typeof document !== 'undefined', + PositionGhostAbsolutely = IOS, + CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float', + // This will not pass for IE9, because IE9 DnD only works on anchors +supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'), + supportCssPointerEvents = function () { + if (!documentExists) return; // false when <= IE11 + + if (IE11OrLess) { + return false; + } + + var el = document.createElement('x'); + el.style.cssText = 'pointer-events:auto'; + return el.style.pointerEvents === 'auto'; +}(), + _detectDirection = function _detectDirection(el, options) { + var elCSS = css(el), + elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), + child1 = getChild(el, 0, options), + child2 = getChild(el, 1, options), + firstChildCSS = child1 && css(child1), + secondChildCSS = child2 && css(child2), + firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, + secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width; + + if (elCSS.display === 'flex') { + return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal'; + } + + if (elCSS.display === 'grid') { + return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal'; + } + + if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') { + var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right'; + return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal'; + } + + return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal'; +}, + _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) { + var dragElS1Opp = vertical ? dragRect.left : dragRect.top, + dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, + dragElOppLength = vertical ? dragRect.width : dragRect.height, + targetS1Opp = vertical ? targetRect.left : targetRect.top, + targetS2Opp = vertical ? targetRect.right : targetRect.bottom, + targetOppLength = vertical ? targetRect.width : targetRect.height; + return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2; +}, + +/** + * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold. + * @param {Number} x X position + * @param {Number} y Y position + * @return {HTMLElement} Element of the first found nearest Sortable + */ +_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) { + var ret; + sortables.some(function (sortable) { + var threshold = sortable[expando].options.emptyInsertThreshold; + if (!threshold || lastChild(sortable)) return; + var rect = getRect(sortable), + insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, + insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold; + + if (insideHorizontally && insideVertically) { + return ret = sortable; + } + }); + return ret; +}, + _prepareGroup = function _prepareGroup(options) { + function toFn(value, pull) { + return function (to, from, dragEl, evt) { + var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name; + + if (value == null && (pull || sameGroup)) { + // Default pull value + // Default pull and put value if same group + return true; + } else if (value == null || value === false) { + return false; + } else if (pull && value === 'clone') { + return value; + } else if (typeof value === 'function') { + return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt); + } else { + var otherGroup = (pull ? to : from).options.group.name; + return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1; + } + }; + } + + var group = {}; + var originalGroup = options.group; + + if (!originalGroup || _typeof(originalGroup) != 'object') { + originalGroup = { + name: originalGroup + }; + } + + group.name = originalGroup.name; + group.checkPull = toFn(originalGroup.pull, true); + group.checkPut = toFn(originalGroup.put); + group.revertClone = originalGroup.revertClone; + options.group = group; +}, + _hideGhostForTarget = function _hideGhostForTarget() { + if (!supportCssPointerEvents && ghostEl) { + css(ghostEl, 'display', 'none'); + } +}, + _unhideGhostForTarget = function _unhideGhostForTarget() { + if (!supportCssPointerEvents && ghostEl) { + css(ghostEl, 'display', ''); + } +}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position + + +if (documentExists && !ChromeForAndroid) { + document.addEventListener('click', function (evt) { + if (ignoreNextClick) { + evt.preventDefault(); + evt.stopPropagation && evt.stopPropagation(); + evt.stopImmediatePropagation && evt.stopImmediatePropagation(); + ignoreNextClick = false; + return false; + } + }, true); +} + +var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) { + if (dragEl) { + evt = evt.touches ? evt.touches[0] : evt; + + var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY); + + if (nearest) { + // Create imitation event + var event = {}; + + for (var i in evt) { + if (evt.hasOwnProperty(i)) { + event[i] = evt[i]; + } + } + + event.target = event.rootEl = nearest; + event.preventDefault = void 0; + event.stopPropagation = void 0; + + nearest[expando]._onDragOver(event); + } + } +}; + +var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) { + if (dragEl) { + dragEl.parentNode[expando]._isOutsideThisEl(evt.target); + } +}; +/** + * @class Sortable + * @param {HTMLElement} el + * @param {Object} [options] + */ + + +function Sortable(el, options) { + if (!(el && el.nodeType && el.nodeType === 1)) { + throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el)); + } + + this.el = el; // root element + + this.options = options = _extends({}, options); // Export instance + + el[expando] = this; + var defaults = { + group: null, + sort: true, + disabled: false, + store: null, + handle: null, + draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*', + swapThreshold: 1, + // percentage; 0 <= x <= 1 + invertSwap: false, + // invert always + invertedSwapThreshold: null, + // will be set to same as swapThreshold if default + removeCloneOnHide: true, + direction: function direction() { + return _detectDirection(el, this.options); + }, + ghostClass: 'sortable-ghost', + chosenClass: 'sortable-chosen', + dragClass: 'sortable-drag', + ignore: 'a, img', + filter: null, + preventOnFilter: true, + animation: 0, + easing: null, + setData: function setData(dataTransfer, dragEl) { + dataTransfer.setData('Text', dragEl.textContent); + }, + dropBubble: false, + dragoverBubble: false, + dataIdAttr: 'data-id', + delay: 0, + delayOnTouchOnly: false, + touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1, + forceFallback: false, + fallbackClass: 'sortable-fallback', + fallbackOnBody: false, + fallbackTolerance: 0, + fallbackOffset: { + x: 0, + y: 0 + }, + supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari, + emptyInsertThreshold: 5 + }; + PluginManager.initializePlugins(this, el, defaults); // Set default options + + for (var name in defaults) { + !(name in options) && (options[name] = defaults[name]); + } + + _prepareGroup(options); // Bind all private methods + + + for (var fn in this) { + if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { + this[fn] = this[fn].bind(this); + } + } // Setup drag mode + + + this.nativeDraggable = options.forceFallback ? false : supportDraggable; + + if (this.nativeDraggable) { + // Touch start threshold cannot be greater than the native dragstart threshold + this.options.touchStartThreshold = 1; + } // Bind events + + + if (options.supportPointer) { + on(el, 'pointerdown', this._onTapStart); + } else { + on(el, 'mousedown', this._onTapStart); + on(el, 'touchstart', this._onTapStart); + } + + if (this.nativeDraggable) { + on(el, 'dragover', this); + on(el, 'dragenter', this); + } + + sortables.push(this.el); // Restore sorting + + options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager + + _extends(this, AnimationStateManager()); +} + +Sortable.prototype = +/** @lends Sortable.prototype */ +{ + constructor: Sortable, + _isOutsideThisEl: function _isOutsideThisEl(target) { + if (!this.el.contains(target) && target !== this.el) { + lastTarget = null; + } + }, + _getDirection: function _getDirection(evt, target) { + return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction; + }, + _onTapStart: function _onTapStart( + /** Event|TouchEvent */ + evt) { + if (!evt.cancelable) return; + + var _this = this, + el = this.el, + options = this.options, + preventOnFilter = options.preventOnFilter, + type = evt.type, + touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt, + target = (touch || evt).target, + originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, + filter = options.filter; + + _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group. + + + if (dragEl) { + return; + } + + if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) { + return; // only left button and enabled + } // cancel dnd if original target is content editable + + + if (originalTarget.isContentEditable) { + return; + } // Safari ignores further event handling after mousedown + + + if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') { + return; + } + + target = closest(target, options.draggable, el, false); + + if (target && target.animated) { + return; + } + + if (lastDownEl === target) { + // Ignoring duplicate `down` + return; + } // Get the index of the dragged element within its parent + + + oldIndex = index(target); + oldDraggableIndex = index(target, options.draggable); // Check filter + + if (typeof filter === 'function') { + if (filter.call(this, evt, target, this)) { + _dispatchEvent({ + sortable: _this, + rootEl: originalTarget, + name: 'filter', + targetEl: target, + toEl: el, + fromEl: el + }); + + pluginEvent('filter', _this, { + evt: evt + }); + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } else if (filter) { + filter = filter.split(',').some(function (criteria) { + criteria = closest(originalTarget, criteria.trim(), el, false); + + if (criteria) { + _dispatchEvent({ + sortable: _this, + rootEl: criteria, + name: 'filter', + targetEl: target, + fromEl: el, + toEl: el + }); + + pluginEvent('filter', _this, { + evt: evt + }); + return true; + } + }); + + if (filter) { + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } + + if (options.handle && !closest(originalTarget, options.handle, el, false)) { + return; + } // Prepare `dragstart` + + + this._prepareDragStart(evt, touch, target); + }, + _prepareDragStart: function _prepareDragStart( + /** Event */ + evt, + /** Touch */ + touch, + /** HTMLElement */ + target) { + var _this = this, + el = _this.el, + options = _this.options, + ownerDocument = el.ownerDocument, + dragStartFn; + + if (target && !dragEl && target.parentNode === el) { + var dragRect = getRect(target); + rootEl = el; + dragEl = target; + parentEl = dragEl.parentNode; + nextEl = dragEl.nextSibling; + lastDownEl = target; + activeGroup = options.group; + Sortable.dragged = dragEl; + tapEvt = { + target: dragEl, + clientX: (touch || evt).clientX, + clientY: (touch || evt).clientY + }; + tapDistanceLeft = tapEvt.clientX - dragRect.left; + tapDistanceTop = tapEvt.clientY - dragRect.top; + this._lastX = (touch || evt).clientX; + this._lastY = (touch || evt).clientY; + dragEl.style['will-change'] = 'all'; + + dragStartFn = function dragStartFn() { + pluginEvent('delayEnded', _this, { + evt: evt + }); + + if (Sortable.eventCanceled) { + _this._onDrop(); + + return; + } // Delayed drag has been triggered + // we can re-enable the events: touchmove/mousemove + + + _this._disableDelayedDragEvents(); + + if (!FireFox && _this.nativeDraggable) { + dragEl.draggable = true; + } // Bind the events: dragstart/dragend + + + _this._triggerDragStart(evt, touch); // Drag start event + + + _dispatchEvent({ + sortable: _this, + name: 'choose', + originalEvent: evt + }); // Chosen item + + + toggleClass(dragEl, options.chosenClass, true); + }; // Disable "draggable" + + + options.ignore.split(',').forEach(function (criteria) { + find(dragEl, criteria.trim(), _disableDraggable); + }); + on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'mouseup', _this._onDrop); + on(ownerDocument, 'touchend', _this._onDrop); + on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox) + + if (FireFox && this.nativeDraggable) { + this.options.touchStartThreshold = 4; + dragEl.draggable = true; + } + + pluginEvent('delayStart', this, { + evt: evt + }); // Delay is impossible for native DnD in Edge or IE + + if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) { + if (Sortable.eventCanceled) { + this._onDrop(); + + return; + } // If the user moves the pointer or let go the click or touch + // before the delay has been reached: + // disable the delayed drag + + + on(ownerDocument, 'mouseup', _this._disableDelayedDrag); + on(ownerDocument, 'touchend', _this._disableDelayedDrag); + on(ownerDocument, 'touchcancel', _this._disableDelayedDrag); + on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler); + on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler); + options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler); + _this._dragStartTimer = setTimeout(dragStartFn, options.delay); + } else { + dragStartFn(); + } + } + }, + _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( + /** TouchEvent|PointerEvent **/ + e) { + var touch = e.touches ? e.touches[0] : e; + + if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) { + this._disableDelayedDrag(); + } + }, + _disableDelayedDrag: function _disableDelayedDrag() { + dragEl && _disableDraggable(dragEl); + clearTimeout(this._dragStartTimer); + + this._disableDelayedDragEvents(); + }, + _disableDelayedDragEvents: function _disableDelayedDragEvents() { + var ownerDocument = this.el.ownerDocument; + off(ownerDocument, 'mouseup', this._disableDelayedDrag); + off(ownerDocument, 'touchend', this._disableDelayedDrag); + off(ownerDocument, 'touchcancel', this._disableDelayedDrag); + off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler); + off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler); + off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler); + }, + _triggerDragStart: function _triggerDragStart( + /** Event */ + evt, + /** Touch */ + touch) { + touch = touch || evt.pointerType == 'touch' && evt; + + if (!this.nativeDraggable || touch) { + if (this.options.supportPointer) { + on(document, 'pointermove', this._onTouchMove); + } else if (touch) { + on(document, 'touchmove', this._onTouchMove); + } else { + on(document, 'mousemove', this._onTouchMove); + } + } else { + on(dragEl, 'dragend', this); + on(rootEl, 'dragstart', this._onDragStart); + } + + try { + if (document.selection) { + // Timeout neccessary for IE9 + _nextTick(function () { + document.selection.empty(); + }); + } else { + window.getSelection().removeAllRanges(); + } + } catch (err) {} + }, + _dragStarted: function _dragStarted(fallback, evt) { + + awaitingDragStarted = false; + + if (rootEl && dragEl) { + pluginEvent('dragStarted', this, { + evt: evt + }); + + if (this.nativeDraggable) { + on(document, 'dragover', _checkOutsideTargetEl); + } + + var options = this.options; // Apply effect + + !fallback && toggleClass(dragEl, options.dragClass, false); + toggleClass(dragEl, options.ghostClass, true); + Sortable.active = this; + fallback && this._appendGhost(); // Drag start event + + _dispatchEvent({ + sortable: this, + name: 'start', + originalEvent: evt + }); + } else { + this._nulling(); + } + }, + _emulateDragOver: function _emulateDragOver() { + if (touchEvt) { + this._lastX = touchEvt.clientX; + this._lastY = touchEvt.clientY; + + _hideGhostForTarget(); + + var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY); + var parent = target; + + while (target && target.shadowRoot) { + target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY); + if (target === parent) break; + parent = target; + } + + dragEl.parentNode[expando]._isOutsideThisEl(target); + + if (parent) { + do { + if (parent[expando]) { + var inserted = void 0; + inserted = parent[expando]._onDragOver({ + clientX: touchEvt.clientX, + clientY: touchEvt.clientY, + target: target, + rootEl: parent + }); + + if (inserted && !this.options.dragoverBubble) { + break; + } + } + + target = parent; // store last element + } + /* jshint boss:true */ + while (parent = parent.parentNode); + } + + _unhideGhostForTarget(); + } + }, + _onTouchMove: function _onTouchMove( + /**TouchEvent*/ + evt) { + if (tapEvt) { + var options = this.options, + fallbackTolerance = options.fallbackTolerance, + fallbackOffset = options.fallbackOffset, + touch = evt.touches ? evt.touches[0] : evt, + ghostMatrix = ghostEl && matrix(ghostEl, true), + scaleX = ghostEl && ghostMatrix && ghostMatrix.a, + scaleY = ghostEl && ghostMatrix && ghostMatrix.d, + relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), + dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), + dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging + + if (!Sortable.active && !awaitingDragStarted) { + if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) { + return; + } + + this._onDragStart(evt, true); + } + + if (ghostEl) { + if (ghostMatrix) { + ghostMatrix.e += dx - (lastDx || 0); + ghostMatrix.f += dy - (lastDy || 0); + } else { + ghostMatrix = { + a: 1, + b: 0, + c: 0, + d: 1, + e: dx, + f: dy + }; + } + + var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")"); + css(ghostEl, 'webkitTransform', cssMatrix); + css(ghostEl, 'mozTransform', cssMatrix); + css(ghostEl, 'msTransform', cssMatrix); + css(ghostEl, 'transform', cssMatrix); + lastDx = dx; + lastDy = dy; + touchEvt = touch; + } + + evt.cancelable && evt.preventDefault(); + } + }, + _appendGhost: function _appendGhost() { + // Bug if using scale(): https://stackoverflow.com/questions/2637058 + // Not being adjusted for + if (!ghostEl) { + var container = this.options.fallbackOnBody ? document.body : rootEl, + rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), + options = this.options; // Position absolutely + + if (PositionGhostAbsolutely) { + // Get relatively positioned parent + ghostRelativeParent = container; + + while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) { + ghostRelativeParent = ghostRelativeParent.parentNode; + } + + if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) { + if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement(); + rect.top += ghostRelativeParent.scrollTop; + rect.left += ghostRelativeParent.scrollLeft; + } else { + ghostRelativeParent = getWindowScrollingElement(); + } + + ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent); + } + + ghostEl = dragEl.cloneNode(true); + toggleClass(ghostEl, options.ghostClass, false); + toggleClass(ghostEl, options.fallbackClass, true); + toggleClass(ghostEl, options.dragClass, true); + css(ghostEl, 'transition', ''); + css(ghostEl, 'transform', ''); + css(ghostEl, 'box-sizing', 'border-box'); + css(ghostEl, 'margin', 0); + css(ghostEl, 'top', rect.top); + css(ghostEl, 'left', rect.left); + css(ghostEl, 'width', rect.width); + css(ghostEl, 'height', rect.height); + css(ghostEl, 'opacity', '0.8'); + css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed'); + css(ghostEl, 'zIndex', '100000'); + css(ghostEl, 'pointerEvents', 'none'); + Sortable.ghost = ghostEl; + container.appendChild(ghostEl); // Set transform-origin + + css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%'); + } + }, + _onDragStart: function _onDragStart( + /**Event*/ + evt, + /**boolean*/ + fallback) { + var _this = this; + + var dataTransfer = evt.dataTransfer; + var options = _this.options; + pluginEvent('dragStart', this, { + evt: evt + }); + + if (Sortable.eventCanceled) { + this._onDrop(); + + return; + } + + pluginEvent('setupClone', this); + + if (!Sortable.eventCanceled) { + cloneEl = clone(dragEl); + cloneEl.removeAttribute("id"); + cloneEl.draggable = false; + cloneEl.style['will-change'] = ''; + + this._hideClone(); + + toggleClass(cloneEl, this.options.chosenClass, false); + Sortable.clone = cloneEl; + } // #1143: IFrame support workaround + + + _this.cloneId = _nextTick(function () { + pluginEvent('clone', _this); + if (Sortable.eventCanceled) return; + + if (!_this.options.removeCloneOnHide) { + rootEl.insertBefore(cloneEl, dragEl); + } + + _this._hideClone(); + + _dispatchEvent({ + sortable: _this, + name: 'clone' + }); + }); + !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events + + if (fallback) { + ignoreNextClick = true; + _this._loopId = setInterval(_this._emulateDragOver, 50); + } else { + // Undo what was set in _prepareDragStart before drag started + off(document, 'mouseup', _this._onDrop); + off(document, 'touchend', _this._onDrop); + off(document, 'touchcancel', _this._onDrop); + + if (dataTransfer) { + dataTransfer.effectAllowed = 'move'; + options.setData && options.setData.call(_this, dataTransfer, dragEl); + } + + on(document, 'drop', _this); // #1276 fix: + + css(dragEl, 'transform', 'translateZ(0)'); + } + + awaitingDragStarted = true; + _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt)); + on(document, 'selectstart', _this); + moved = true; + + if (Safari) { + css(document.body, 'user-select', 'none'); + } + }, + // Returns true - if no further action is needed (either inserted or another condition) + _onDragOver: function _onDragOver( + /**Event*/ + evt) { + var el = this.el, + target = evt.target, + dragRect, + targetRect, + revert, + options = this.options, + group = options.group, + activeSortable = Sortable.active, + isOwner = activeGroup === group, + canSort = options.sort, + fromSortable = putSortable || activeSortable, + vertical, + _this = this, + completedFired = false; + + if (_silent) return; + + function dragOverEvent(name, extra) { + pluginEvent(name, _this, _objectSpread2({ + evt: evt, + isOwner: isOwner, + axis: vertical ? 'vertical' : 'horizontal', + revert: revert, + dragRect: dragRect, + targetRect: targetRect, + canSort: canSort, + fromSortable: fromSortable, + target: target, + completed: completed, + onMove: function onMove(target, after) { + return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after); + }, + changed: changed + }, extra)); + } // Capture animation state + + + function capture() { + dragOverEvent('dragOverAnimationCapture'); + + _this.captureAnimationState(); + + if (_this !== fromSortable) { + fromSortable.captureAnimationState(); + } + } // Return invocation when dragEl is inserted (or completed) + + + function completed(insertion) { + dragOverEvent('dragOverCompleted', { + insertion: insertion + }); + + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) { + activeSortable._hideClone(); + } else { + activeSortable._showClone(_this); + } + + if (_this !== fromSortable) { + // Set ghost class to new sortable's ghost class + toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false); + toggleClass(dragEl, options.ghostClass, true); + } + + if (putSortable !== _this && _this !== Sortable.active) { + putSortable = _this; + } else if (_this === Sortable.active && putSortable) { + putSortable = null; + } // Animation + + + if (fromSortable === _this) { + _this._ignoreWhileAnimating = target; + } + + _this.animateAll(function () { + dragOverEvent('dragOverAnimationComplete'); + _this._ignoreWhileAnimating = null; + }); + + if (_this !== fromSortable) { + fromSortable.animateAll(); + fromSortable._ignoreWhileAnimating = null; + } + } // Null lastTarget if it is not inside a previously swapped element + + + if (target === dragEl && !dragEl.animated || target === el && !target.animated) { + lastTarget = null; + } // no bubbling and not fallback + + + if (!options.dragoverBubble && !evt.rootEl && target !== document) { + dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted + + + !insertion && nearestEmptyInsertDetectEvent(evt); + } + + !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation(); + return completedFired = true; + } // Call when dragEl has been inserted + + + function changed() { + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + + _dispatchEvent({ + sortable: _this, + name: 'change', + toEl: el, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex, + originalEvent: evt + }); + } + + if (evt.preventDefault !== void 0) { + evt.cancelable && evt.preventDefault(); + } + + target = closest(target, options.draggable, el, true); + dragOverEvent('dragOver'); + if (Sortable.eventCanceled) return completedFired; + + if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) { + return completed(false); + } + + ignoreNextClick = false; + + if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list + : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) { + vertical = this._getDirection(evt, target) === 'vertical'; + dragRect = getRect(dragEl); + dragOverEvent('dragOverValid'); + if (Sortable.eventCanceled) return completedFired; + + if (revert) { + parentEl = rootEl; // actualization + + capture(); + + this._hideClone(); + + dragOverEvent('revert'); + + if (!Sortable.eventCanceled) { + if (nextEl) { + rootEl.insertBefore(dragEl, nextEl); + } else { + rootEl.appendChild(dragEl); + } + } + + return completed(true); + } + + var elLastChild = lastChild(el, options.draggable); + + if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) { + // Insert to end of list + // If already at end of list: Do not insert + if (elLastChild === dragEl) { + return completed(false); + } // if there is a last element, it is the target + + + if (elLastChild && el === evt.target) { + target = elLastChild; + } + + if (target) { + targetRect = getRect(target); + } + + if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) { + capture(); + + if (elLastChild && elLastChild.nextSibling) { + // the last draggable element is not the last node + el.insertBefore(dragEl, elLastChild.nextSibling); + } else { + el.appendChild(dragEl); + } + + parentEl = el; // actualization + + changed(); + return completed(true); + } + } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) { + // Insert to start of list + var firstChild = getChild(el, 0, options, true); + + if (firstChild === dragEl) { + return completed(false); + } + + target = firstChild; + targetRect = getRect(target); + + if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) { + capture(); + el.insertBefore(dragEl, firstChild); + parentEl = el; // actualization + + changed(); + return completed(true); + } + } else if (target.parentNode === el) { + targetRect = getRect(target); + var direction = 0, + targetBeforeFirstSwap, + differentLevel = dragEl.parentNode !== el, + differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), + side1 = vertical ? 'top' : 'left', + scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'), + scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0; + + if (lastTarget !== target) { + targetBeforeFirstSwap = targetRect[side1]; + pastFirstInvertThresh = false; + isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel; + } + + direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target); + var sibling; + + if (direction !== 0) { + // Check if target is beside dragEl in respective direction (ignoring hidden elements) + var dragIndex = index(dragEl); + + do { + dragIndex -= direction; + sibling = parentEl.children[dragIndex]; + } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl)); + } // If dragEl is already beside target: Do not insert + + + if (direction === 0 || sibling === target) { + return completed(false); + } + + lastTarget = target; + lastDirection = direction; + var nextSibling = target.nextElementSibling, + after = false; + after = direction === 1; + + var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after); + + if (moveVector !== false) { + if (moveVector === 1 || moveVector === -1) { + after = moveVector === 1; + } + + _silent = true; + setTimeout(_unsilent, 30); + capture(); + + if (after && !nextSibling) { + el.appendChild(dragEl); + } else { + target.parentNode.insertBefore(dragEl, after ? nextSibling : target); + } // Undo chrome's scroll adjustment (has no effect on other browsers) + + + if (scrolledPastTop) { + scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop); + } + + parentEl = dragEl.parentNode; // actualization + // must be done before animation + + if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) { + targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]); + } + + changed(); + return completed(true); + } + } + + if (el.contains(dragEl)) { + return completed(false); + } + } + + return false; + }, + _ignoreWhileAnimating: null, + _offMoveEvents: function _offMoveEvents() { + off(document, 'mousemove', this._onTouchMove); + off(document, 'touchmove', this._onTouchMove); + off(document, 'pointermove', this._onTouchMove); + off(document, 'dragover', nearestEmptyInsertDetectEvent); + off(document, 'mousemove', nearestEmptyInsertDetectEvent); + off(document, 'touchmove', nearestEmptyInsertDetectEvent); + }, + _offUpEvents: function _offUpEvents() { + var ownerDocument = this.el.ownerDocument; + off(ownerDocument, 'mouseup', this._onDrop); + off(ownerDocument, 'touchend', this._onDrop); + off(ownerDocument, 'pointerup', this._onDrop); + off(ownerDocument, 'touchcancel', this._onDrop); + off(document, 'selectstart', this); + }, + _onDrop: function _onDrop( + /**Event*/ + evt) { + var el = this.el, + options = this.options; // Get the index of the dragged element within its parent + + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + pluginEvent('drop', this, { + evt: evt + }); + parentEl = dragEl && dragEl.parentNode; // Get again after plugin event + + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + + if (Sortable.eventCanceled) { + this._nulling(); + + return; + } + + awaitingDragStarted = false; + isCircumstantialInvert = false; + pastFirstInvertThresh = false; + clearInterval(this._loopId); + clearTimeout(this._dragStartTimer); + + _cancelNextTick(this.cloneId); + + _cancelNextTick(this._dragStartId); // Unbind events + + + if (this.nativeDraggable) { + off(document, 'drop', this); + off(el, 'dragstart', this._onDragStart); + } + + this._offMoveEvents(); + + this._offUpEvents(); + + if (Safari) { + css(document.body, 'user-select', ''); + } + + css(dragEl, 'transform', ''); + + if (evt) { + if (moved) { + evt.cancelable && evt.preventDefault(); + !options.dropBubble && evt.stopPropagation(); + } + + ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl); + + if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') { + // Remove clone(s) + cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl); + } + + if (dragEl) { + if (this.nativeDraggable) { + off(dragEl, 'dragend', this); + } + + _disableDraggable(dragEl); + + dragEl.style['will-change'] = ''; // Remove classes + // ghostClass is added in dragStarted + + if (moved && !awaitingDragStarted) { + toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false); + } + + toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event + + _dispatchEvent({ + sortable: this, + name: 'unchoose', + toEl: parentEl, + newIndex: null, + newDraggableIndex: null, + originalEvent: evt + }); + + if (rootEl !== parentEl) { + if (newIndex >= 0) { + // Add event + _dispatchEvent({ + rootEl: parentEl, + name: 'add', + toEl: parentEl, + fromEl: rootEl, + originalEvent: evt + }); // Remove event + + + _dispatchEvent({ + sortable: this, + name: 'remove', + toEl: parentEl, + originalEvent: evt + }); // drag from one list and drop into another + + + _dispatchEvent({ + rootEl: parentEl, + name: 'sort', + toEl: parentEl, + fromEl: rootEl, + originalEvent: evt + }); + + _dispatchEvent({ + sortable: this, + name: 'sort', + toEl: parentEl, + originalEvent: evt + }); + } + + putSortable && putSortable.save(); + } else { + if (newIndex !== oldIndex) { + if (newIndex >= 0) { + // drag & drop within the same list + _dispatchEvent({ + sortable: this, + name: 'update', + toEl: parentEl, + originalEvent: evt + }); + + _dispatchEvent({ + sortable: this, + name: 'sort', + toEl: parentEl, + originalEvent: evt + }); + } + } + } + + if (Sortable.active) { + /* jshint eqnull:true */ + if (newIndex == null || newIndex === -1) { + newIndex = oldIndex; + newDraggableIndex = oldDraggableIndex; + } + + _dispatchEvent({ + sortable: this, + name: 'end', + toEl: parentEl, + originalEvent: evt + }); // Save sorting + + + this.save(); + } + } + } + + this._nulling(); + }, + _nulling: function _nulling() { + pluginEvent('nulling', this); + rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null; + savedInputChecked.forEach(function (el) { + el.checked = true; + }); + savedInputChecked.length = lastDx = lastDy = 0; + }, + handleEvent: function handleEvent( + /**Event*/ + evt) { + switch (evt.type) { + case 'drop': + case 'dragend': + this._onDrop(evt); + + break; + + case 'dragenter': + case 'dragover': + if (dragEl) { + this._onDragOver(evt); + + _globalDragOver(evt); + } + + break; + + case 'selectstart': + evt.preventDefault(); + break; + } + }, + + /** + * Serializes the item into an array of string. + * @returns {String[]} + */ + toArray: function toArray() { + var order = [], + el, + children = this.el.children, + i = 0, + n = children.length, + options = this.options; + + for (; i < n; i++) { + el = children[i]; + + if (closest(el, options.draggable, this.el, false)) { + order.push(el.getAttribute(options.dataIdAttr) || _generateId(el)); + } + } + + return order; + }, + + /** + * Sorts the elements according to the array. + * @param {String[]} order order of the items + */ + sort: function sort(order, useAnimation) { + var items = {}, + rootEl = this.el; + this.toArray().forEach(function (id, i) { + var el = rootEl.children[i]; + + if (closest(el, this.options.draggable, rootEl, false)) { + items[id] = el; + } + }, this); + useAnimation && this.captureAnimationState(); + order.forEach(function (id) { + if (items[id]) { + rootEl.removeChild(items[id]); + rootEl.appendChild(items[id]); + } + }); + useAnimation && this.animateAll(); + }, + + /** + * Save the current sorting + */ + save: function save() { + var store = this.options.store; + store && store.set && store.set(this); + }, + + /** + * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. + * @param {HTMLElement} el + * @param {String} [selector] default: `options.draggable` + * @returns {HTMLElement|null} + */ + closest: function closest$1(el, selector) { + return closest(el, selector || this.options.draggable, this.el, false); + }, + + /** + * Set/get option + * @param {string} name + * @param {*} [value] + * @returns {*} + */ + option: function option(name, value) { + var options = this.options; + + if (value === void 0) { + return options[name]; + } else { + var modifiedValue = PluginManager.modifyOption(this, name, value); + + if (typeof modifiedValue !== 'undefined') { + options[name] = modifiedValue; + } else { + options[name] = value; + } + + if (name === 'group') { + _prepareGroup(options); + } + } + }, + + /** + * Destroy + */ + destroy: function destroy() { + pluginEvent('destroy', this); + var el = this.el; + el[expando] = null; + off(el, 'mousedown', this._onTapStart); + off(el, 'touchstart', this._onTapStart); + off(el, 'pointerdown', this._onTapStart); + + if (this.nativeDraggable) { + off(el, 'dragover', this); + off(el, 'dragenter', this); + } // Remove draggable attributes + + + Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) { + el.removeAttribute('draggable'); + }); + + this._onDrop(); + + this._disableDelayedDragEvents(); + + sortables.splice(sortables.indexOf(this.el), 1); + this.el = el = null; + }, + _hideClone: function _hideClone() { + if (!cloneHidden) { + pluginEvent('hideClone', this); + if (Sortable.eventCanceled) return; + css(cloneEl, 'display', 'none'); + + if (this.options.removeCloneOnHide && cloneEl.parentNode) { + cloneEl.parentNode.removeChild(cloneEl); + } + + cloneHidden = true; + } + }, + _showClone: function _showClone(putSortable) { + if (putSortable.lastPutMode !== 'clone') { + this._hideClone(); + + return; + } + + if (cloneHidden) { + pluginEvent('showClone', this); + if (Sortable.eventCanceled) return; // show clone at dragEl or original position + + if (dragEl.parentNode == rootEl && !this.options.group.revertClone) { + rootEl.insertBefore(cloneEl, dragEl); + } else if (nextEl) { + rootEl.insertBefore(cloneEl, nextEl); + } else { + rootEl.appendChild(cloneEl); + } + + if (this.options.group.revertClone) { + this.animate(dragEl, cloneEl); + } + + css(cloneEl, 'display', ''); + cloneHidden = false; + } + } +}; + +function _globalDragOver( +/**Event*/ +evt) { + if (evt.dataTransfer) { + evt.dataTransfer.dropEffect = 'move'; + } + + evt.cancelable && evt.preventDefault(); +} + +function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) { + var evt, + sortable = fromEl[expando], + onMoveFn = sortable.options.onMove, + retVal; // Support for new CustomEvent feature + + if (window.CustomEvent && !IE11OrLess && !Edge) { + evt = new CustomEvent('move', { + bubbles: true, + cancelable: true + }); + } else { + evt = document.createEvent('Event'); + evt.initEvent('move', true, true); + } + + evt.to = toEl; + evt.from = fromEl; + evt.dragged = dragEl; + evt.draggedRect = dragRect; + evt.related = targetEl || toEl; + evt.relatedRect = targetRect || getRect(toEl); + evt.willInsertAfter = willInsertAfter; + evt.originalEvent = originalEvent; + fromEl.dispatchEvent(evt); + + if (onMoveFn) { + retVal = onMoveFn.call(sortable, evt, originalEvent); + } + + return retVal; +} + +function _disableDraggable(el) { + el.draggable = false; +} + +function _unsilent() { + _silent = false; +} + +function _ghostIsFirst(evt, vertical, sortable) { + var rect = getRect(getChild(sortable.el, 0, sortable.options, true)); + var spacer = 10; + return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left; +} + +function _ghostIsLast(evt, vertical, sortable) { + var rect = getRect(lastChild(sortable.el, sortable.options.draggable)); + var spacer = 10; + return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer; +} + +function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) { + var mouseOnAxis = vertical ? evt.clientY : evt.clientX, + targetLength = vertical ? targetRect.height : targetRect.width, + targetS1 = vertical ? targetRect.top : targetRect.left, + targetS2 = vertical ? targetRect.bottom : targetRect.right, + invert = false; + + if (!invertSwap) { + // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold + if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) { + // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2 + // check if past first invert threshold on side opposite of lastDirection + if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) { + // past first invert threshold, do not restrict inverted threshold to dragEl shadow + pastFirstInvertThresh = true; + } + + if (!pastFirstInvertThresh) { + // dragEl shadow (target move distance shadow) + if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow + : mouseOnAxis > targetS2 - targetMoveDistance) { + return -lastDirection; + } + } else { + invert = true; + } + } else { + // Regular + if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) { + return _getInsertDirection(target); + } + } + } + + invert = invert || invertSwap; + + if (invert) { + // Invert of regular + if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) { + return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1; + } + } + + return 0; +} +/** + * Gets the direction dragEl must be swapped relative to target in order to make it + * seem that dragEl has been "inserted" into that element's position + * @param {HTMLElement} target The target whose position dragEl is being inserted at + * @return {Number} Direction dragEl must be swapped + */ + + +function _getInsertDirection(target) { + if (index(dragEl) < index(target)) { + return 1; + } else { + return -1; + } +} +/** + * Generate id + * @param {HTMLElement} el + * @returns {String} + * @private + */ + + +function _generateId(el) { + var str = el.tagName + el.className + el.src + el.href + el.textContent, + i = str.length, + sum = 0; + + while (i--) { + sum += str.charCodeAt(i); + } + + return sum.toString(36); +} + +function _saveInputCheckedState(root) { + savedInputChecked.length = 0; + var inputs = root.getElementsByTagName('input'); + var idx = inputs.length; + + while (idx--) { + var el = inputs[idx]; + el.checked && savedInputChecked.push(el); + } +} + +function _nextTick(fn) { + return setTimeout(fn, 0); +} + +function _cancelNextTick(id) { + return clearTimeout(id); +} // Fixed #973: + + +if (documentExists) { + on(document, 'touchmove', function (evt) { + if ((Sortable.active || awaitingDragStarted) && evt.cancelable) { + evt.preventDefault(); + } + }); +} // Export utils + + +Sortable.utils = { + on: on, + off: off, + css: css, + find: find, + is: function is(el, selector) { + return !!closest(el, selector, el, false); + }, + extend: extend, + throttle: throttle, + closest: closest, + toggleClass: toggleClass, + clone: clone, + index: index, + nextTick: _nextTick, + cancelNextTick: _cancelNextTick, + detectDirection: _detectDirection, + getChild: getChild +}; +/** + * Get the Sortable instance of an element + * @param {HTMLElement} element The element + * @return {Sortable|undefined} The instance of Sortable + */ + +Sortable.get = function (element) { + return element[expando]; +}; +/** + * Mount a plugin to Sortable + * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted + */ + + +Sortable.mount = function () { + for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) { + plugins[_key] = arguments[_key]; + } + + if (plugins[0].constructor === Array) plugins = plugins[0]; + plugins.forEach(function (plugin) { + if (!plugin.prototype || !plugin.prototype.constructor) { + throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin)); + } + + if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils); + PluginManager.mount(plugin); + }); +}; +/** + * Create sortable instance + * @param {HTMLElement} el + * @param {Object} [options] + */ + + +Sortable.create = function (el, options) { + return new Sortable(el, options); +}; // Export + + +Sortable.version = version; + +var autoScrolls = [], + scrollEl, + scrollRootEl, + scrolling = false, + lastAutoScrollX, + lastAutoScrollY, + touchEvt$1, + pointerElemChangedInterval; + +function AutoScrollPlugin() { + function AutoScroll() { + this.defaults = { + scroll: true, + forceAutoScrollFallback: false, + scrollSensitivity: 30, + scrollSpeed: 10, + bubbleScroll: true + }; // Bind all private methods + + for (var fn in this) { + if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { + this[fn] = this[fn].bind(this); + } + } + } + + AutoScroll.prototype = { + dragStarted: function dragStarted(_ref) { + var originalEvent = _ref.originalEvent; + + if (this.sortable.nativeDraggable) { + on(document, 'dragover', this._handleAutoScroll); + } else { + if (this.options.supportPointer) { + on(document, 'pointermove', this._handleFallbackAutoScroll); + } else if (originalEvent.touches) { + on(document, 'touchmove', this._handleFallbackAutoScroll); + } else { + on(document, 'mousemove', this._handleFallbackAutoScroll); + } + } + }, + dragOverCompleted: function dragOverCompleted(_ref2) { + var originalEvent = _ref2.originalEvent; + + // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached) + if (!this.options.dragOverBubble && !originalEvent.rootEl) { + this._handleAutoScroll(originalEvent); + } + }, + drop: function drop() { + if (this.sortable.nativeDraggable) { + off(document, 'dragover', this._handleAutoScroll); + } else { + off(document, 'pointermove', this._handleFallbackAutoScroll); + off(document, 'touchmove', this._handleFallbackAutoScroll); + off(document, 'mousemove', this._handleFallbackAutoScroll); + } + + clearPointerElemChangedInterval(); + clearAutoScrolls(); + cancelThrottle(); + }, + nulling: function nulling() { + touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null; + autoScrolls.length = 0; + }, + _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) { + this._handleAutoScroll(evt, true); + }, + _handleAutoScroll: function _handleAutoScroll(evt, fallback) { + var _this = this; + + var x = (evt.touches ? evt.touches[0] : evt).clientX, + y = (evt.touches ? evt.touches[0] : evt).clientY, + elem = document.elementFromPoint(x, y); + touchEvt$1 = evt; // IE does not seem to have native autoscroll, + // Edge's autoscroll seems too conditional, + // MACOS Safari does not have autoscroll, + // Firefox and Chrome are good + + if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) { + autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change + + var ogElemScroller = getParentAutoScrollElement(elem, true); + + if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) { + pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour + + pointerElemChangedInterval = setInterval(function () { + var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true); + + if (newElem !== ogElemScroller) { + ogElemScroller = newElem; + clearAutoScrolls(); + } + + autoScroll(evt, _this.options, newElem, fallback); + }, 10); + lastAutoScrollX = x; + lastAutoScrollY = y; + } + } else { + // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll + if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) { + clearAutoScrolls(); + return; + } + + autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false); + } + } + }; + return _extends(AutoScroll, { + pluginName: 'scroll', + initializeByDefault: true + }); +} + +function clearAutoScrolls() { + autoScrolls.forEach(function (autoScroll) { + clearInterval(autoScroll.pid); + }); + autoScrolls = []; +} + +function clearPointerElemChangedInterval() { + clearInterval(pointerElemChangedInterval); +} + +var autoScroll = throttle(function (evt, options, rootEl, isFallback) { + // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521 + if (!options.scroll) return; + var x = (evt.touches ? evt.touches[0] : evt).clientX, + y = (evt.touches ? evt.touches[0] : evt).clientY, + sens = options.scrollSensitivity, + speed = options.scrollSpeed, + winScroller = getWindowScrollingElement(); + var scrollThisInstance = false, + scrollCustomFn; // New scroll root, set scrollEl + + if (scrollRootEl !== rootEl) { + scrollRootEl = rootEl; + clearAutoScrolls(); + scrollEl = options.scroll; + scrollCustomFn = options.scrollFn; + + if (scrollEl === true) { + scrollEl = getParentAutoScrollElement(rootEl, true); + } + } + + var layersOut = 0; + var currentParent = scrollEl; + + do { + var el = currentParent, + rect = getRect(el), + top = rect.top, + bottom = rect.bottom, + left = rect.left, + right = rect.right, + width = rect.width, + height = rect.height, + canScrollX = void 0, + canScrollY = void 0, + scrollWidth = el.scrollWidth, + scrollHeight = el.scrollHeight, + elCSS = css(el), + scrollPosX = el.scrollLeft, + scrollPosY = el.scrollTop; + + if (el === winScroller) { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible'); + } else { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll'); + } + + var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX); + var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY); + + if (!autoScrolls[layersOut]) { + for (var i = 0; i <= layersOut; i++) { + if (!autoScrolls[i]) { + autoScrolls[i] = {}; + } + } + } + + if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) { + autoScrolls[layersOut].el = el; + autoScrolls[layersOut].vx = vx; + autoScrolls[layersOut].vy = vy; + clearInterval(autoScrolls[layersOut].pid); + + if (vx != 0 || vy != 0) { + scrollThisInstance = true; + /* jshint loopfunc:true */ + + autoScrolls[layersOut].pid = setInterval(function () { + // emulate drag over during autoscroll (fallback), emulating native DnD behaviour + if (isFallback && this.layer === 0) { + Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely + + } + + var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0; + var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0; + + if (typeof scrollCustomFn === 'function') { + if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') { + return; + } + } + + scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY); + }.bind({ + layer: layersOut + }), 24); + } + } + + layersOut++; + } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false))); + + scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not +}, 30); + +var drop = function drop(_ref) { + var originalEvent = _ref.originalEvent, + putSortable = _ref.putSortable, + dragEl = _ref.dragEl, + activeSortable = _ref.activeSortable, + dispatchSortableEvent = _ref.dispatchSortableEvent, + hideGhostForTarget = _ref.hideGhostForTarget, + unhideGhostForTarget = _ref.unhideGhostForTarget; + if (!originalEvent) return; + var toSortable = putSortable || activeSortable; + hideGhostForTarget(); + var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + unhideGhostForTarget(); + + if (toSortable && !toSortable.el.contains(target)) { + dispatchSortableEvent('spill'); + this.onSpill({ + dragEl: dragEl, + putSortable: putSortable + }); + } +}; + +function Revert() {} + +Revert.prototype = { + startIndex: null, + dragStart: function dragStart(_ref2) { + var oldDraggableIndex = _ref2.oldDraggableIndex; + this.startIndex = oldDraggableIndex; + }, + onSpill: function onSpill(_ref3) { + var dragEl = _ref3.dragEl, + putSortable = _ref3.putSortable; + this.sortable.captureAnimationState(); + + if (putSortable) { + putSortable.captureAnimationState(); + } + + var nextSibling = getChild(this.sortable.el, this.startIndex, this.options); + + if (nextSibling) { + this.sortable.el.insertBefore(dragEl, nextSibling); + } else { + this.sortable.el.appendChild(dragEl); + } + + this.sortable.animateAll(); + + if (putSortable) { + putSortable.animateAll(); + } + }, + drop: drop +}; + +_extends(Revert, { + pluginName: 'revertOnSpill' +}); + +function Remove() {} + +Remove.prototype = { + onSpill: function onSpill(_ref4) { + var dragEl = _ref4.dragEl, + putSortable = _ref4.putSortable; + var parentSortable = putSortable || this.sortable; + parentSortable.captureAnimationState(); + dragEl.parentNode && dragEl.parentNode.removeChild(dragEl); + parentSortable.animateAll(); + }, + drop: drop +}; + +_extends(Remove, { + pluginName: 'removeOnSpill' +}); + +var lastSwapEl; + +function SwapPlugin() { + function Swap() { + this.defaults = { + swapClass: 'sortable-swap-highlight' + }; + } + + Swap.prototype = { + dragStart: function dragStart(_ref) { + var dragEl = _ref.dragEl; + lastSwapEl = dragEl; + }, + dragOverValid: function dragOverValid(_ref2) { + var completed = _ref2.completed, + target = _ref2.target, + onMove = _ref2.onMove, + activeSortable = _ref2.activeSortable, + changed = _ref2.changed, + cancel = _ref2.cancel; + if (!activeSortable.options.swap) return; + var el = this.sortable.el, + options = this.options; + + if (target && target !== el) { + var prevSwapEl = lastSwapEl; + + if (onMove(target) !== false) { + toggleClass(target, options.swapClass, true); + lastSwapEl = target; + } else { + lastSwapEl = null; + } + + if (prevSwapEl && prevSwapEl !== lastSwapEl) { + toggleClass(prevSwapEl, options.swapClass, false); + } + } + + changed(); + completed(true); + cancel(); + }, + drop: function drop(_ref3) { + var activeSortable = _ref3.activeSortable, + putSortable = _ref3.putSortable, + dragEl = _ref3.dragEl; + var toSortable = putSortable || this.sortable; + var options = this.options; + lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false); + + if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) { + if (dragEl !== lastSwapEl) { + toSortable.captureAnimationState(); + if (toSortable !== activeSortable) activeSortable.captureAnimationState(); + swapNodes(dragEl, lastSwapEl); + toSortable.animateAll(); + if (toSortable !== activeSortable) activeSortable.animateAll(); + } + } + }, + nulling: function nulling() { + lastSwapEl = null; + } + }; + return _extends(Swap, { + pluginName: 'swap', + eventProperties: function eventProperties() { + return { + swapItem: lastSwapEl + }; + } + }); +} + +function swapNodes(n1, n2) { + var p1 = n1.parentNode, + p2 = n2.parentNode, + i1, + i2; + if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return; + i1 = index(n1); + i2 = index(n2); + + if (p1.isEqualNode(p2) && i1 < i2) { + i2++; + } + + p1.insertBefore(n2, p1.children[i1]); + p2.insertBefore(n1, p2.children[i2]); +} + +var multiDragElements = [], + multiDragClones = [], + lastMultiDragSelect, + // for selection with modifier key down (SHIFT) +multiDragSortable, + initialFolding = false, + // Initial multi-drag fold when drag started +folding = false, + // Folding any other time +dragStarted = false, + dragEl$1, + clonesFromRect, + clonesHidden; + +function MultiDragPlugin() { + function MultiDrag(sortable) { + // Bind all private methods + for (var fn in this) { + if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { + this[fn] = this[fn].bind(this); + } + } + + if (!sortable.options.avoidImplicitDeselect) { + if (sortable.options.supportPointer) { + on(document, 'pointerup', this._deselectMultiDrag); + } else { + on(document, 'mouseup', this._deselectMultiDrag); + on(document, 'touchend', this._deselectMultiDrag); + } + } + + on(document, 'keydown', this._checkKeyDown); + on(document, 'keyup', this._checkKeyUp); + this.defaults = { + selectedClass: 'sortable-selected', + multiDragKey: null, + avoidImplicitDeselect: false, + setData: function setData(dataTransfer, dragEl) { + var data = ''; + + if (multiDragElements.length && multiDragSortable === sortable) { + multiDragElements.forEach(function (multiDragElement, i) { + data += (!i ? '' : ', ') + multiDragElement.textContent; + }); + } else { + data = dragEl.textContent; + } + + dataTransfer.setData('Text', data); + } + }; + } + + MultiDrag.prototype = { + multiDragKeyDown: false, + isMultiDrag: false, + delayStartGlobal: function delayStartGlobal(_ref) { + var dragged = _ref.dragEl; + dragEl$1 = dragged; + }, + delayEnded: function delayEnded() { + this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1); + }, + setupClone: function setupClone(_ref2) { + var sortable = _ref2.sortable, + cancel = _ref2.cancel; + if (!this.isMultiDrag) return; + + for (var i = 0; i < multiDragElements.length; i++) { + multiDragClones.push(clone(multiDragElements[i])); + multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex; + multiDragClones[i].draggable = false; + multiDragClones[i].style['will-change'] = ''; + toggleClass(multiDragClones[i], this.options.selectedClass, false); + multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false); + } + + sortable._hideClone(); + + cancel(); + }, + clone: function clone(_ref3) { + var sortable = _ref3.sortable, + rootEl = _ref3.rootEl, + dispatchSortableEvent = _ref3.dispatchSortableEvent, + cancel = _ref3.cancel; + if (!this.isMultiDrag) return; + + if (!this.options.removeCloneOnHide) { + if (multiDragElements.length && multiDragSortable === sortable) { + insertMultiDragClones(true, rootEl); + dispatchSortableEvent('clone'); + cancel(); + } + } + }, + showClone: function showClone(_ref4) { + var cloneNowShown = _ref4.cloneNowShown, + rootEl = _ref4.rootEl, + cancel = _ref4.cancel; + if (!this.isMultiDrag) return; + insertMultiDragClones(false, rootEl); + multiDragClones.forEach(function (clone) { + css(clone, 'display', ''); + }); + cloneNowShown(); + clonesHidden = false; + cancel(); + }, + hideClone: function hideClone(_ref5) { + var _this = this; + + var sortable = _ref5.sortable, + cloneNowHidden = _ref5.cloneNowHidden, + cancel = _ref5.cancel; + if (!this.isMultiDrag) return; + multiDragClones.forEach(function (clone) { + css(clone, 'display', 'none'); + + if (_this.options.removeCloneOnHide && clone.parentNode) { + clone.parentNode.removeChild(clone); + } + }); + cloneNowHidden(); + clonesHidden = true; + cancel(); + }, + dragStartGlobal: function dragStartGlobal(_ref6) { + var sortable = _ref6.sortable; + + if (!this.isMultiDrag && multiDragSortable) { + multiDragSortable.multiDrag._deselectMultiDrag(); + } + + multiDragElements.forEach(function (multiDragElement) { + multiDragElement.sortableIndex = index(multiDragElement); + }); // Sort multi-drag elements + + multiDragElements = multiDragElements.sort(function (a, b) { + return a.sortableIndex - b.sortableIndex; + }); + dragStarted = true; + }, + dragStarted: function dragStarted(_ref7) { + var _this2 = this; + + var sortable = _ref7.sortable; + if (!this.isMultiDrag) return; + + if (this.options.sort) { + // Capture rects, + // hide multi drag elements (by positioning them absolute), + // set multi drag elements rects to dragRect, + // show multi drag elements, + // animate to rects, + // unset rects & remove from DOM + sortable.captureAnimationState(); + + if (this.options.animation) { + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + css(multiDragElement, 'position', 'absolute'); + }); + var dragRect = getRect(dragEl$1, false, true, true); + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + setRect(multiDragElement, dragRect); + }); + folding = true; + initialFolding = true; + } + } + + sortable.animateAll(function () { + folding = false; + initialFolding = false; + + if (_this2.options.animation) { + multiDragElements.forEach(function (multiDragElement) { + unsetRect(multiDragElement); + }); + } // Remove all auxiliary multidrag items from el, if sorting enabled + + + if (_this2.options.sort) { + removeMultiDragElements(); + } + }); + }, + dragOver: function dragOver(_ref8) { + var target = _ref8.target, + completed = _ref8.completed, + cancel = _ref8.cancel; + + if (folding && ~multiDragElements.indexOf(target)) { + completed(false); + cancel(); + } + }, + revert: function revert(_ref9) { + var fromSortable = _ref9.fromSortable, + rootEl = _ref9.rootEl, + sortable = _ref9.sortable, + dragRect = _ref9.dragRect; + + if (multiDragElements.length > 1) { + // Setup unfold animation + multiDragElements.forEach(function (multiDragElement) { + sortable.addAnimationState({ + target: multiDragElement, + rect: folding ? getRect(multiDragElement) : dragRect + }); + unsetRect(multiDragElement); + multiDragElement.fromRect = dragRect; + fromSortable.removeAnimationState(multiDragElement); + }); + folding = false; + insertMultiDragElements(!this.options.removeCloneOnHide, rootEl); + } + }, + dragOverCompleted: function dragOverCompleted(_ref10) { + var sortable = _ref10.sortable, + isOwner = _ref10.isOwner, + insertion = _ref10.insertion, + activeSortable = _ref10.activeSortable, + parentEl = _ref10.parentEl, + putSortable = _ref10.putSortable; + var options = this.options; + + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) { + activeSortable._hideClone(); + } + + initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location + + if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) { + // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible + var dragRectAbsolute = getRect(dragEl$1, false, true, true); + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted + // while folding, and so that we can capture them again because old sortable will no longer be fromSortable + + parentEl.appendChild(multiDragElement); + }); + folding = true; + } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out + + + if (!isOwner) { + // Only remove if not folding (folding will remove them anyways) + if (!folding) { + removeMultiDragElements(); + } + + if (multiDragElements.length > 1) { + var clonesHiddenBefore = clonesHidden; + + activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden + + + if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) { + multiDragClones.forEach(function (clone) { + activeSortable.addAnimationState({ + target: clone, + rect: clonesFromRect + }); + clone.fromRect = clonesFromRect; + clone.thisAnimationDuration = null; + }); + } + } else { + activeSortable._showClone(sortable); + } + } + } + }, + dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) { + var dragRect = _ref11.dragRect, + isOwner = _ref11.isOwner, + activeSortable = _ref11.activeSortable; + multiDragElements.forEach(function (multiDragElement) { + multiDragElement.thisAnimationDuration = null; + }); + + if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) { + clonesFromRect = _extends({}, dragRect); + var dragMatrix = matrix(dragEl$1, true); + clonesFromRect.top -= dragMatrix.f; + clonesFromRect.left -= dragMatrix.e; + } + }, + dragOverAnimationComplete: function dragOverAnimationComplete() { + if (folding) { + folding = false; + removeMultiDragElements(); + } + }, + drop: function drop(_ref12) { + var evt = _ref12.originalEvent, + rootEl = _ref12.rootEl, + parentEl = _ref12.parentEl, + sortable = _ref12.sortable, + dispatchSortableEvent = _ref12.dispatchSortableEvent, + oldIndex = _ref12.oldIndex, + putSortable = _ref12.putSortable; + var toSortable = putSortable || this.sortable; + if (!evt) return; + var options = this.options, + children = parentEl.children; // Multi-drag selection + + if (!dragStarted) { + if (options.multiDragKey && !this.multiDragKeyDown) { + this._deselectMultiDrag(); + } + + toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1)); + + if (!~multiDragElements.indexOf(dragEl$1)) { + multiDragElements.push(dragEl$1); + dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'select', + targetEl: dragEl$1, + originalEvent: evt + }); // Modifier activated, select from last to dragEl + + if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) { + var lastIndex = index(lastMultiDragSelect), + currentIndex = index(dragEl$1); + + if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) { + // Must include lastMultiDragSelect (select it), in case modified selection from no selection + // (but previous selection existed) + var n, i; + + if (currentIndex > lastIndex) { + i = lastIndex; + n = currentIndex; + } else { + i = currentIndex; + n = lastIndex + 1; + } + + for (; i < n; i++) { + if (~multiDragElements.indexOf(children[i])) continue; + toggleClass(children[i], options.selectedClass, true); + multiDragElements.push(children[i]); + dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'select', + targetEl: children[i], + originalEvent: evt + }); + } + } + } else { + lastMultiDragSelect = dragEl$1; + } + + multiDragSortable = toSortable; + } else { + multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1); + lastMultiDragSelect = null; + dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'deselect', + targetEl: dragEl$1, + originalEvent: evt + }); + } + } // Multi-drag drop + + + if (dragStarted && this.isMultiDrag) { + folding = false; // Do not "unfold" after around dragEl if reverted + + if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) { + var dragRect = getRect(dragEl$1), + multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')'); + if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null; + toSortable.captureAnimationState(); + + if (!initialFolding) { + if (options.animation) { + dragEl$1.fromRect = dragRect; + multiDragElements.forEach(function (multiDragElement) { + multiDragElement.thisAnimationDuration = null; + + if (multiDragElement !== dragEl$1) { + var rect = folding ? getRect(multiDragElement) : dragRect; + multiDragElement.fromRect = rect; // Prepare unfold animation + + toSortable.addAnimationState({ + target: multiDragElement, + rect: rect + }); + } + }); + } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert + // properly they must all be removed + + + removeMultiDragElements(); + multiDragElements.forEach(function (multiDragElement) { + if (children[multiDragIndex]) { + parentEl.insertBefore(multiDragElement, children[multiDragIndex]); + } else { + parentEl.appendChild(multiDragElement); + } + + multiDragIndex++; + }); // If initial folding is done, the elements may have changed position because they are now + // unfolding around dragEl, even though dragEl may not have his index changed, so update event + // must be fired here as Sortable will not. + + if (oldIndex === index(dragEl$1)) { + var update = false; + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement.sortableIndex !== index(multiDragElement)) { + update = true; + return; + } + }); + + if (update) { + dispatchSortableEvent('update'); + } + } + } // Must be done after capturing individual rects (scroll bar) + + + multiDragElements.forEach(function (multiDragElement) { + unsetRect(multiDragElement); + }); + toSortable.animateAll(); + } + + multiDragSortable = toSortable; + } // Remove clones if necessary + + + if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') { + multiDragClones.forEach(function (clone) { + clone.parentNode && clone.parentNode.removeChild(clone); + }); + } + }, + nullingGlobal: function nullingGlobal() { + this.isMultiDrag = dragStarted = false; + multiDragClones.length = 0; + }, + destroyGlobal: function destroyGlobal() { + this._deselectMultiDrag(); + + off(document, 'pointerup', this._deselectMultiDrag); + off(document, 'mouseup', this._deselectMultiDrag); + off(document, 'touchend', this._deselectMultiDrag); + off(document, 'keydown', this._checkKeyDown); + off(document, 'keyup', this._checkKeyUp); + }, + _deselectMultiDrag: function _deselectMultiDrag(evt) { + if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable + + if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable + + if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click + + if (evt && evt.button !== 0) return; + + while (multiDragElements.length) { + var el = multiDragElements[0]; + toggleClass(el, this.options.selectedClass, false); + multiDragElements.shift(); + dispatchEvent({ + sortable: this.sortable, + rootEl: this.sortable.el, + name: 'deselect', + targetEl: el, + originalEvent: evt + }); + } + }, + _checkKeyDown: function _checkKeyDown(evt) { + if (evt.key === this.options.multiDragKey) { + this.multiDragKeyDown = true; + } + }, + _checkKeyUp: function _checkKeyUp(evt) { + if (evt.key === this.options.multiDragKey) { + this.multiDragKeyDown = false; + } + } + }; + return _extends(MultiDrag, { + // Static methods & properties + pluginName: 'multiDrag', + utils: { + /** + * Selects the provided multi-drag item + * @param {HTMLElement} el The element to be selected + */ + select: function select(el) { + var sortable = el.parentNode[expando]; + if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return; + + if (multiDragSortable && multiDragSortable !== sortable) { + multiDragSortable.multiDrag._deselectMultiDrag(); + + multiDragSortable = sortable; + } + + toggleClass(el, sortable.options.selectedClass, true); + multiDragElements.push(el); + }, + + /** + * Deselects the provided multi-drag item + * @param {HTMLElement} el The element to be deselected + */ + deselect: function deselect(el) { + var sortable = el.parentNode[expando], + index = multiDragElements.indexOf(el); + if (!sortable || !sortable.options.multiDrag || !~index) return; + toggleClass(el, sortable.options.selectedClass, false); + multiDragElements.splice(index, 1); + } + }, + eventProperties: function eventProperties() { + var _this3 = this; + + var oldIndicies = [], + newIndicies = []; + multiDragElements.forEach(function (multiDragElement) { + oldIndicies.push({ + multiDragElement: multiDragElement, + index: multiDragElement.sortableIndex + }); // multiDragElements will already be sorted if folding + + var newIndex; + + if (folding && multiDragElement !== dragEl$1) { + newIndex = -1; + } else if (folding) { + newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')'); + } else { + newIndex = index(multiDragElement); + } + + newIndicies.push({ + multiDragElement: multiDragElement, + index: newIndex + }); + }); + return { + items: _toConsumableArray(multiDragElements), + clones: [].concat(multiDragClones), + oldIndicies: oldIndicies, + newIndicies: newIndicies + }; + }, + optionListeners: { + multiDragKey: function multiDragKey(key) { + key = key.toLowerCase(); + + if (key === 'ctrl') { + key = 'Control'; + } else if (key.length > 1) { + key = key.charAt(0).toUpperCase() + key.substr(1); + } + + return key; + } + } + }); +} + +function insertMultiDragElements(clonesInserted, rootEl) { + multiDragElements.forEach(function (multiDragElement, i) { + var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)]; + + if (target) { + rootEl.insertBefore(multiDragElement, target); + } else { + rootEl.appendChild(multiDragElement); + } + }); +} +/** + * Insert multi-drag clones + * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted + * @param {HTMLElement} rootEl + */ + + +function insertMultiDragClones(elementsInserted, rootEl) { + multiDragClones.forEach(function (clone, i) { + var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)]; + + if (target) { + rootEl.insertBefore(clone, target); + } else { + rootEl.appendChild(clone); + } + }); +} + +function removeMultiDragElements() { + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement); + }); +} + +Sortable.mount(new AutoScrollPlugin()); +Sortable.mount(Remove, Revert); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sortable); + + + +/***/ }), + +/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=style&index=0&id=2fa4c75c&lang=scss": +/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=style&index=0&id=2fa4c75c&lang=scss ***! + \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_12_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_12_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_12_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SearchMenu_vue_vue_type_style_index_0_id_2fa4c75c_lang_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-12.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SearchMenu.vue?vue&type=style&index=0&id=2fa4c75c&lang=scss */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/SearchMenu.vue?vue&type=style&index=0&id=2fa4c75c&lang=scss"); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_12_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_12_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_12_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SearchMenu_vue_vue_type_style_index_0_id_2fa4c75c_lang_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_12_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_12_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_12_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SearchMenu_vue_vue_type_style_index_0_id_2fa4c75c_lang_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + +/***/ }), + +/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=style&index=0&id=07bf0e80&lang=css": +/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=style&index=0&id=07bf0e80&lang=css ***! + \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_FormGroup_vue_vue_type_style_index_0_id_07bf0e80_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./FormGroup.vue?vue&type=style&index=0&id=07bf0e80&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormGroup.vue?vue&type=style&index=0&id=07bf0e80&lang=css"); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_FormGroup_vue_vue_type_style_index_0_id_07bf0e80_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_FormGroup_vue_vue_type_style_index_0_id_07bf0e80_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + +/***/ }), + +/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=style&index=0&id=9b307e6c&lang=css": +/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=style&index=0&id=9b307e6c&lang=css ***! + \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_OriginalDropMenu_vue_vue_type_style_index_0_id_9b307e6c_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./OriginalDropMenu.vue?vue&type=style&index=0&id=9b307e6c&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/OriginalDropMenu.vue?vue&type=style&index=0&id=9b307e6c&lang=css"); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_OriginalDropMenu_vue_vue_type_style_index_0_id_9b307e6c_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_OriginalDropMenu_vue_vue_type_style_index_0_id_9b307e6c_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + +/***/ }), + +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": +/*!****************************************************************************!*\ + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! + \****************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var isOldIE = function isOldIE() { + var memo; + return function memorize() { + if (typeof memo === 'undefined') { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + memo = Boolean(window && document && document.all && !window.atob); + } + + return memo; + }; +}(); + +var getTarget = function getTarget() { + var memo = {}; + return function memorize(target) { + if (typeof memo[target] === 'undefined') { + var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself + + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch (e) { + // istanbul ignore next + styleTarget = null; + } + } + + memo[target] = styleTarget; + } + + return memo[target]; + }; +}(); + +var stylesInDom = []; + +function getIndexByIdentifier(identifier) { + var result = -1; + + for (var i = 0; i < stylesInDom.length; i++) { + if (stylesInDom[i].identifier === identifier) { + result = i; + break; + } + } + + return result; +} + +function modulesToDom(list, options) { + var idCountMap = {}; + var identifiers = []; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var id = options.base ? item[0] + options.base : item[0]; + var count = idCountMap[id] || 0; + var identifier = "".concat(id, " ").concat(count); + idCountMap[id] = count + 1; + var index = getIndexByIdentifier(identifier); + var obj = { + css: item[1], + media: item[2], + sourceMap: item[3] + }; + + if (index !== -1) { + stylesInDom[index].references++; + stylesInDom[index].updater(obj); + } else { + stylesInDom.push({ + identifier: identifier, + updater: addStyle(obj, options), + references: 1 + }); + } + + identifiers.push(identifier); + } + + return identifiers; +} + +function insertStyleElement(options) { + var style = document.createElement('style'); + var attributes = options.attributes || {}; + + if (typeof attributes.nonce === 'undefined') { + var nonce = true ? __webpack_require__.nc : 0; + + if (nonce) { + attributes.nonce = nonce; + } + } + + Object.keys(attributes).forEach(function (key) { + style.setAttribute(key, attributes[key]); + }); + + if (typeof options.insert === 'function') { + options.insert(style); + } else { + var target = getTarget(options.insert || 'head'); + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + } + + target.appendChild(style); + } + + return style; +} + +function removeStyleElement(style) { + // istanbul ignore if + if (style.parentNode === null) { + return false; + } + + style.parentNode.removeChild(style); +} +/* istanbul ignore next */ + + +var replaceText = function replaceText() { + var textStore = []; + return function replace(index, replacement) { + textStore[index] = replacement; + return textStore.filter(Boolean).join('\n'); + }; +}(); + +function applyToSingletonTag(style, index, remove, obj) { + var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE + + /* istanbul ignore if */ + + if (style.styleSheet) { + style.styleSheet.cssText = replaceText(index, css); + } else { + var cssNode = document.createTextNode(css); + var childNodes = style.childNodes; + + if (childNodes[index]) { + style.removeChild(childNodes[index]); + } + + if (childNodes.length) { + style.insertBefore(cssNode, childNodes[index]); + } else { + style.appendChild(cssNode); + } + } +} + +function applyToTag(style, options, obj) { + var css = obj.css; + var media = obj.media; + var sourceMap = obj.sourceMap; + + if (media) { + style.setAttribute('media', media); + } else { + style.removeAttribute('media'); + } + + if (sourceMap && typeof btoa !== 'undefined') { + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); + } // For old IE + + /* istanbul ignore if */ + + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + while (style.firstChild) { + style.removeChild(style.firstChild); + } + + style.appendChild(document.createTextNode(css)); + } +} + +var singleton = null; +var singletonCounter = 0; + +function addStyle(obj, options) { + var style; + var update; + var remove; + + if (options.singleton) { + var styleIndex = singletonCounter++; + style = singleton || (singleton = insertStyleElement(options)); + update = applyToSingletonTag.bind(null, style, styleIndex, false); + remove = applyToSingletonTag.bind(null, style, styleIndex, true); + } else { + style = insertStyleElement(options); + update = applyToTag.bind(null, style, options); + + remove = function remove() { + removeStyleElement(style); + }; + } + + update(obj); + return function updateStyle(newObj) { + if (newObj) { + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { + return; + } + + update(obj = newObj); + } else { + remove(); + } + }; +} + +module.exports = function (list, options) { + options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of