diff --git a/README.md b/README.md index a7c573f6..73d4b826 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ An easy & complete Flexible Field for Laravel Nova, perfect for repeated and fle ![Laravel Nova Flexible Content in action](https://user-images.githubusercontent.com/9298484/164532562-6e4e4179-8a53-470c-97c8-237e9a2c2ebb.gif) +## We are looking for someone to help us maintain this package! + +We'd love to accept someone who uses this package a lot to help us review and merge incoming PRs. Shoot us a message at hello@whitecube.be if you're willing to help! + ## Quick start Here's a very condensed guide to get you started asap. diff --git a/composer.json b/composer.json index 6ed55c25..22726d8e 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": "^7.3|^8.0", "ext-json": "*", - "laravel/framework": "^8.0|^9.0|^10.0", + "laravel/framework": "^8.0|^9.0|^10.0|^11.0", "laravel/nova": "^4.0", "nova-kit/nova-packages-tool": "^1.3.1" }, diff --git a/dist/css/field.css b/dist/css/field.css index 115c62e5..7de287c5 100644 --- a/dist/css/field.css +++ b/dist/css/field.css @@ -1 +1 @@ -.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))} +@charset "UTF-8";.flexible-search-menu-multiselect .multiselect__spinner{position:absolute;right:1px;top:1px;width:3rem;height:2.1875rem;background:#fff;display:block}.flexible-search-menu-multiselect .multiselect__spinner:after,.flexible-search-menu-multiselect .multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:.875rem 0 0 .875rem;width:1rem;height:1rem;border-radius:100%;border:2px solid transparent;border-top:2px solid var(--primary);box-shadow:0 0 0 1px transparent}.flexible-search-menu-multiselect .multiselect__spinner:before{-webkit-animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.flexible-search-menu-multiselect .multiselect__spinner:after{-webkit-animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.flexible-search-menu-multiselect .multiselect__loading-transition{transition:opacity .4s ease-in-out;opacity:1}.flexible-search-menu-multiselect .multiselect__loading-enter,.flexible-search-menu-multiselect .multiselect__loading-leave{opacity:0}.flexible-search-menu-multiselect .multiselect,.flexible-search-menu-multiselect .multiselect__input,.flexible-search-menu-multiselect .multiselect__single{font-family:inherit;font-size:.875rem;font-weight:lighter}.flexible-search-menu-multiselect .multiselect{box-sizing:content-box;display:block;position:relative;width:100%;min-height:2.5rem;text-align:left;color:#35495e}.flexible-search-menu-multiselect .multiselect *{box-sizing:border-box}.flexible-search-menu-multiselect .multiselect:focus{outline:none}.flexible-search-menu-multiselect .multiselect--active{z-index:50}.flexible-search-menu-multiselect .multiselect--active .multiselect__current,.flexible-search-menu-multiselect .multiselect--active .multiselect__input,.flexible-search-menu-multiselect .multiselect--active .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.flexible-search-menu-multiselect .multiselect--active .multiselect__select{transform:rotate(180deg)}.flexible-search-menu-multiselect .multiselect__input,.flexible-search-menu-multiselect .multiselect__single{position:relative;display:inline-block;min-height:1.25rem;line-height:1.25rem;border:none;border-radius:.5rem;background:#fff;padding:1px 0 0 .5rem;width:auto;transition:border .1s ease;box-sizing:border-box;margin-bottom:.5rem}.flexible-search-menu-multiselect .multiselect__input:hover,.flexible-search-menu-multiselect .multiselect__single:hover{border-color:#b3b9bf}.flexible-search-menu-multiselect .multiselect__input:focus,.flexible-search-menu-multiselect .multiselect__single:focus{border-color:#3c4b5f;outline:none}.flexible-search-menu-multiselect .multiselect__single{padding-left:.375rem;margin-bottom:.5rem}.flexible-search-menu-multiselect .multiselect__tags{min-height:2.5rem;display:block;padding:.5rem 2.5rem 0 .5rem;border-radius:.5rem;border:1px solid #bacad6;background:#fff}.flexible-search-menu-multiselect .multiselect__tag{position:relative;display:inline-block;padding:.25rem 1.625rem .25rem .625rem;border-radius:.5rem;margin-right:.625rem;color:#fff;line-height:1;background:var(--primary);margin-bottom:.5rem}.flexible-search-menu-multiselect .multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:normal;width:1.375rem;text-align:center;line-height:1.375rem;transition:all .2s ease;border-radius:.5rem}.flexible-search-menu-multiselect .multiselect__tag-icon:after{content:"×";color:var(--primary-dark);font-size:.875rem}.flexible-search-menu-multiselect .multiselect__tag-icon:focus,.flexible-search-menu-multiselect .multiselect__tag-icon:hover{background:var(--primary-dark)}.flexible-search-menu-multiselect .multiselect__tag-icon:focus:after,.flexible-search-menu-multiselect .multiselect__tag-icon:hover:after{color:#fff}.flexible-search-menu-multiselect .multiselect__current{line-height:1rem;min-height:2.5rem;box-sizing:border-box;display:block;overflow:hidden;padding:.5rem 1.875rem 0 .75rem;white-space:nowrap;margin:0;text-decoration:none;border-radius:.5rem;border:1px solid #bacad6;cursor:pointer}.flexible-search-menu-multiselect .multiselect__select{line-height:1rem;display:block;position:absolute;box-sizing:border-box;width:2.5rem;height:2.375rem;right:1px;top:1px;padding:.25rem .5rem;margin:0;text-decoration:none;text-align:center;cursor:pointer;transition:transform .2s ease}.flexible-search-menu-multiselect .multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:.25rem;border-color:#999 transparent transparent;border-style:solid;border-width:.5rem .5rem 0;content:""}.flexible-search-menu-multiselect .multiselect__placeholder{color:#7c858e;display:inline-block;margin-bottom:.625rem;padding-top:.125rem}.multiselect--active .flexible-search-menu-multiselect .multiselect__placeholder{display:none}.flexible-search-menu-multiselect .multiselect__content{position:absolute;list-style:none;display:block;background:#fff;width:100%;max-height:15rem;overflow:auto;padding:0;margin:0;border:1px solid #bacad6;border-top:none;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;z-index:50}.flexible-search-menu-multiselect .multiselect__content::webkit-scrollbar{display:none}.flexible-search-menu-multiselect .multiselect__option{display:block;padding:.75rem;min-height:2.5rem;line-height:1rem;font-weight:300;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer}.flexible-search-menu-multiselect .multiselect__option:after{top:0;right:0;position:absolute;line-height:2.5rem;padding-right:.75rem;padding-left:1.25rem}.flexible-search-menu-multiselect .multiselect__option--highlight{background:var(--primary);outline:none;color:#fff}.flexible-search-menu-multiselect .multiselect__option--highlight:after{content:attr(data-select);color:#fff}.flexible-search-menu-multiselect .multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.flexible-search-menu-multiselect .multiselect__option--selected:after{content:attr(data-selected);font-weight:300;color:silver}.flexible-search-menu-multiselect .multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff;font-weight:lighter}.flexible-search-menu-multiselect .multiselect__option--selected.multiselect__option--highlight:after{content:attr(data-deselect);color:#fff}.flexible-search-menu-multiselect .multiselect--disabled{background:#ededed;pointer-events:none}.flexible-search-menu-multiselect .multiselect--disabled .multiselect__current,.flexible-search-menu-multiselect .multiselect--disabled .multiselect__select{background:#ededed;color:#a6a6a6}.flexible-search-menu-multiselect .multiselect__option--disabled{background:#ededed;color:#a6a6a6;cursor:text;pointer-events:none}.flexible-search-menu-multiselect .multiselect__option--disabled:visited{color:#a6a6a6}.flexible-search-menu-multiselect .multiselect__option--disabled:focus,.flexible-search-menu-multiselect .multiselect__option--disabled:hover{background:var(--primary-dark)}.flexible-search-menu-multiselect .multiselect-transition{transition:all .3s ease}.flexible-search-menu-multiselect .multiselect-enter,.flexible-search-menu-multiselect .multiselect-leave{opacity:0;max-height:0!important} diff --git a/dist/js/field.js b/dist/js/field.js index a63f9e53..9f6838ce 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,2 +1,2 @@ /*! 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 +(()=>{var e,t={757:(e,t,r)=>{Nova.booting((function(e){e.component("detail-nova-flexible-content",r(465).Z),e.component("detail-nova-flexible-content-group",r(669).Z),e.component("form-nova-flexible-content",r(477).Z),e.component("form-nova-flexible-content-group",r(872).Z),e.component("flexible-drop-menu",r(526).Z),e.component("flexible-search-menu",r(944).Z),e.component("delete-flexible-content-group-modal",r(707).Z)}))},181:(e,t,r)=>{"use strict";function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,l=function(){};return{s:l,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);ri});var i=function(){function e(t,r,o,n,a){var i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];l(this,e),this.name=t,this.title=r,this.fields=o,this.key=a||this.getTemporaryUniqueKey(n.attribute),this.collapsed=i,this.readonly=n.readonly,this.renameFields()}var t,r,n;return t=e,(r=[{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(r){e.fields[t].dependsOn["".concat(e.key,"__").concat(r)]=e.fields[t].dependsOn[r],delete e.fields[t].dependsOn[r]}))}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},878:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var o=r(645),n=r.n(o)()((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{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)}@keyframes multiselect-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}",""]);const l=n},134:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var o=r(645),n=r.n(o)()((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,r)=>{"use strict";r.d(t,{Z:()=>l});var o=r(645),n=r.n(o)()((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 r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,o){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(o)for(var l=0;l{},379:(e,t,r)=>{"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},l=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=[];function i(e){for(var t=-1,r=0;r{"use strict";t.Z=(e,t)=>{const r=e.__vccOpts||e;for(const[e,o]of t)r[e]=o;return r}},707:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var o=r(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,r(744).Z)(i,[["render",function(e,t,r,i,s,u){var c=this,d=(0,o.resolveComponent)("ModalHeader"),p=(0,o.resolveComponent)("ModalContent"),m=(0,o.resolveComponent)("link-button"),v=(0,o.resolveComponent)("danger-button"),f=(0,o.resolveComponent)("ModalFooter"),h=(0,o.resolveComponent)("Modal");return(0,o.openBlock)(),(0,o.createBlock)(h,{show:!0},{default:(0,o.withCtx)((function(){return[(0,o.createElementVNode)("form",{onSubmit:t[1]||(t[1]=(0,o.withModifiers)((function(t){return e.$emit("confirm")}),["prevent"])),class:"mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden"},[(0,o.renderSlot)(e.$slots,"default",{},(function(){return[(0,o.createVNode)(d,{textContent:(0,o.toDisplayString)(e.__("Delete Group"))},null,8,["textContent"]),(0,o.createVNode)(p,null,{default:(0,o.withCtx)((function(){return[r.message?((0,o.openBlock)(),(0,o.createElementBlock)("p",n,(0,o.toDisplayString)(r.message),1)):((0,o.openBlock)(),(0,o.createElementBlock)("p",l,(0,o.toDisplayString)(e.__("Are you sure you want to delete this group?")),1))]})),_:1})]})),(0,o.createVNode)(f,null,{default:(0,o.withCtx)((function(){return[(0,o.createElementVNode)("div",a,[(0,o.createVNode)(m,{type:"button","data-testid":"cancel-button",dusk:"cancel-delete-button",onClick:t[0]||(t[0]=(0,o.withModifiers)((function(e){return c.$emit("close")}),["prevent"])),class:"mr-3"},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)(r.no),1)]})),_:1}),(0,o.createVNode)(v,{ref:"confirmButton",dusk:"confirm-delete-button",processing:e.working,disabled:e.working,type:"submit"},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)(r.yes),1)]})),_:1},8,["processing","disabled"])])]})),_:1})],32)]})),_:3})}]])},465:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var o=r(311);var n=r(181);const l={props:["resource","resourceName","resourceId","field"],data:function(){return{order:[],groups:{}}},computed:{layouts:function(){return this.field.layouts||!1},orderedGroups:function(){var e=this;return this.value=this.field.value||[],this.populateGroups(),this.order.reduce((function(t,r){return t.push(e.groups[r]),t}),[])}},methods:{populateGroups:function(){this.order.splice(0,this.order.length),this.groups={};for(var e=0;e{"use strict";r.d(t,{Z:()=>c});var o=r(311),n=["dusk"],l={class:"block float-left border-r border-gray-100 dark:border-gray-700 pr-4 mr-4"},a=(0,o.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,r(744).Z)(u,[["render",function(e,t,r,u,c,d){return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(d.componentStyle),dusk:"detail-"+r.attribute+"-"+r.index},[r.group.title?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(d.titleStyle)},[(0,o.createElementVNode)("span",l,[a,(0,o.createElementVNode)("span",i,(0,o.toDisplayString)(r.index+1),1)]),(0,o.createElementVNode)("span",s,(0,o.toDisplayString)(r.group.title),1)],2)):(0,o.createCommentVNode)("",!0),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(r.group.fields,(function(e,t){return(0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)("detail-"+e.component),{key:t,"resource-name":r.resourceName,"resource-id":r.resourceId,field:e,"validation-errors":null,class:(0,o.normalizeClass)({"remove-bottom-border":t==r.group.fields.length-1})},null,8,["resource-name","resource-id","field","class"])})),128))],10,n)}]])},477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Et});var o=r(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=r(226);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d={mixins:[s.HandlesValidationErrors],props:function(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}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,r){e.addEventListener(t,r,!x&&_)}function N(e,t,r){e.removeEventListener(t,r,!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,r,o){if(e){r=r||document;do{if(null!=t&&(">"===t[0]?e.parentNode===r&&L(e,t):L(e,t))||o&&e===r)return e;if(e===r)break}while(e=T(e))}return null}var P,V=/\s+/g;function I(e,t,r){if(e&&t)if(e.classList)e.classList[r?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(V," ").replace(" "+t+" "," ");e.className=(o+(r?" "+t:"")).replace(V," ")}}function M(e,t,r){var o=e&&e.style;if(o){if(void 0===r)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),void 0===t?r:r[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=r+("string"==typeof r?"":"px")}}function A(e,t){var r="";if("string"==typeof e)r=e;else do{var o=M(e,"transform");o&&"none"!==o&&(r=o+" "+r)}while(!t&&(e=e.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(r)}function j(e,t,r){if(e){var o=e.getElementsByTagName(t),n=0,l=o.length;if(r)for(;n=l:n<=l))return o;if(o===z())break;o=X(o,!1)}return!1}function q(e,t,r,o){for(var n=0,l=0,a=e.children;l2&&void 0!==arguments[2]?arguments[2]:{},o=r.evt,n=y(r,oe);te.pluginEvent.bind(We)(e,t,f({dragEl:ae,parentEl:ie,ghostEl:se,rootEl:ue,nextEl:ce,lastDownEl:de,cloneEl:pe,cloneHidden:me,dragStarted:Oe,putSortable:ye,activeSortable:We.active,originalEvent:o,oldIndex:ve,oldDraggableIndex:he,newIndex:fe,newDraggableIndex:ge,hideGhostForTarget:Xe,unhideGhostForTarget:$e,cloneNowHidden:function(){me=!0},cloneNowShown:function(){me=!1},dispatchSortableEvent:function(e){le({sortable:t,name:e,originalEvent:o})}},n))};function le(e){re(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=[],Ae=!1,je=[],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}}(),Ge=function(e,t){var r=M(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.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"===r.display)return"column"===r.flexDirection||"column-reverse"===r.flexDirection?"vertical":"horizontal";if("grid"===r.display)return r.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>=o&&"none"===r[Fe]||l&&"none"===r[Fe]&&s+u>o)?"vertical":"horizontal"},Ye=function(e){function t(e,r){return function(o,n,l,a){var i=o.options.group.name&&n.options.group.name&&o.options.group.name===n.options.group.name;if(null==e&&(r||i))return!0;if(null==e||!1===e)return!1;if(r&&"clone"===e)return e;if("function"==typeof e)return t(e(o,n,l,a),r)(o,n,l,a);var s=(r?o:n).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var r={},o=e.group;o&&"object"==h(o)||(o={name:o}),r.name=o.name,r.checkPull=t(o.pull,!0),r.checkPut=t(o.put),r.revertClone=o.revertClone,e.group=r},Xe=function(){!He&&se&&M(se,"display","none")},$e=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[U].options.emptyInsertThreshold;if(t&&!H(e)){var r=R(e),o=n>=r.left-t&&n<=r.right+t,i=l>=r.top-t&&l<=r.bottom+t;return o&&i?a=e:void 0}})),a);if(t){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[U]._onDragOver(r)}}var n,l,a},Ke=function(e){ae&&ae.parentNode[U]._isOutsideThisEl(e.target)};function We(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[U]=this;var r={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 Ge(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!==We.supportPointer&&"PointerEvent"in window&&!E,emptyInsertThreshold:5};for(var o in te.initializePlugins(this,e,r),r)!(o in t)&&(t[o]=r[o]);for(var n in Ye(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 Ue(e,t,r,o,n,l,a,i){var s,u,c=e[U],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=r,s.draggedRect=o,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(){Ae=!1}function et(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,r=t.length,o=0;r--;)o+=t.charCodeAt(r);return o.toString(36)}function tt(e){return setTimeout(e,0)}function rt(e){return clearTimeout(e)}We.prototype={constructor:We,_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,r=this.el,o=this.options,n=o.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=o.filter;if(function(e){je.length=0;var t=e.getElementsByTagName("input"),r=t.length;for(;r--;){var o=t[r];o.checked&&je.push(o)}}(r),!ae&&!(/mousedown|pointerdown/.test(l)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!E||!i||"SELECT"!==i.tagName.toUpperCase())&&!((i=B(i,o.draggable,r,!1))&&i.animated||de===i)){if(ve=G(i),he=G(i,o.draggable),"function"==typeof u){if(u.call(this,e,i,this))return le({sortable:t,rootEl:s,name:"filter",targetEl:i,toEl:r,fromEl:r}),ne("filter",t,{evt:e}),void(n&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=B(s,o.trim(),r,!1))return le({sortable:t,rootEl:o,name:"filter",targetEl:i,fromEl:r,toEl:r}),ne("filter",t,{evt:e}),!0}))))return void(n&&e.cancelable&&e.preventDefault());o.handle&&!B(s,o.handle,r,!1)||this._prepareDragStart(e,a,i)}}},_prepareDragStart:function(e,t,r){var o,n=this,l=n.el,a=n.options,i=l.ownerDocument;if(r&&!ae&&r.parentNode===l){var s=R(r);if(ue=l,ie=(ae=r).parentNode,ce=ae.nextSibling,de=r,be=a.group,We.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",o=function(){ne("delayEnded",n,{evt:e}),We.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){j(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))o();else{if(We.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(o,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",Ke);var r=this.options;!e&&I(ae,r.dragClass,!1),I(ae,r.ghostClass,!0),We.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,Xe();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[U]._isOutsideThisEl(e),t)do{if(t[U]){if(t[U]._onDragOver({clientX:xe.clientX,clientY:xe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);$e()}},_onTouchMove:function(e){if(we){var t=this.options,r=t.fallbackTolerance,o=t.fallbackOffset,n=e.touches?e.touches[0]:e,l=se&&A(se,!0),a=se&&l&&l.a,i=se&&l&&l.d,s=Re&&Le&&Y(Le),u=(n.clientX-we.clientX+o.x)/(a||1)+(s?s[0]-Me[0]:0)/(a||1),c=(n.clientY-we.clientY+o.y)/(i||1)+(s?s[1]-Me[1]:0)/(i||1);if(!We.active&&!Te){if(r&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))o.right+n||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+n}(e,n,this)&&!h.animated){if(h===ae)return P(!1);if(h&&l===e.target&&(a=h),a&&(r=R(a)),!1!==Ue(ue,l,ae,t,a,r,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,r){var o=R(q(r.el,0,r.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,r,n,k?1:i.swapThreshold,null==i.invertedSwapThreshold?i.swapThreshold:i.invertedSwapThreshold,Ie,_e===a),0!==b){var O=G(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=Ue(ue,l,ae,t,a,r,e,D=1===b);if(!1!==N)return 1!==N&&-1!==N||(D=1===N),Ae=!0,setTimeout(Qe,30),T(),D&&!_?l.appendChild(ae):a.parentNode.insertBefore(ae,D?_:a),E&&K(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:o,dragRect:t,targetRect:r,canSort:d,fromSortable:p,target:a,completed:P,onMove:function(r,o){return Ue(ue,l,ae,t,r,R(r),e,o)},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!==We.active?ye=m:m===We.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[U]._isOutsideThisEl(e.target),!t&&Ze(e)),!i.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function V(){fe=G(ae),ge=G(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,r=this.options;fe=G(ae),ge=G(ae,r.draggable),ne("drop",this,{evt:e}),ie=ae&&ae.parentNode,fe=G(ae),ge=G(ae,r.draggable),We.eventCanceled||(Te=!1,Ie=!1,Ve=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),rt(this.cloneId),rt(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(),!r.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})),We.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=We.dragged=We.ghost=We.clone=We.active=null,je.forEach((function(e){e.checked=!0})),je.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=[],r=this.el.children,o=0,n=r.length,l=this.options;o=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 r=t.item.id,o=t.oldIndex,n=t.newIndex;no&&e.moveDown(r)}}))}}},Ct=(0,p.Z)(kt,[["render",function(e,t,r,l,a,i){var s=(0,o.resolveComponent)("form-nova-flexible-content-group");return(0,o.openBlock)(),(0,o.createBlock)((0,o.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,o.withCtx)((function(){return[(0,o.createElementVNode)("div",n,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(i.orderedGroups,(function(t,r){return(0,o.openBlock)(),(0,o.createBlock)(s,{dusk:e.currentField.attribute+"-"+r,key:t.key,field:e.currentField,group:t,index:r,"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,o.openBlock)(),(0,o.createBlock)((0,o.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},872:(e,t,r)=>{"use strict";r.d(t,{Z:()=>k});var o=r(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 r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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";r.d(t,{Z:()=>m});var o=r(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 r=e.limitPerLayoutCounter[t.name];return null===r||r>0||void 0===r}))},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=r(379),c=r.n(u),d=r(606),p={insert:"head",singleton:!1};c()(d.Z,p);d.Z.locals;const m=(0,r(744).Z)(s,[["render",function(e,t,r,s,u,c){var d=(0,o.resolveComponent)("default-button");return r.layouts?((0,o.openBlock)(),(0,o.createElementBlock)("div",n,[u.isLayoutsDropdownOpen&&r.layouts.length>1?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,ref:"dropdown",class:(0,o.normalizeClass)(["z-20 absolute rounded-lg shadow-lg max-w-full max-h-search overflow-y-auto border border-40",c.dropdownClasses])},[(0,o.createElementVNode)("ul",l,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(c.filteredLayouts,(function(e){return(0,o.openBlock)(),(0,o.createElementBlock)("li",{class:"border-b border-gray-100 dark:border-gray-700",key:"add-"+e.name},[(0,o.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,o.createElementVNode)("div",null,[(0,o.createElementVNode)("p",i,(0,o.toDisplayString)(e.title),1)])],8,a)])})),128))])],2)):(0,o.createCommentVNode)("",!0),c.isBelowLayoutLimits?((0,o.openBlock)(),(0,o.createBlock)(d,{key:1,dusk:"toggle-layouts-dropdown-or-add-default",type:"button",tabindex:"0",ref:"dropdownButton",onClick:c.toggleLayoutsDropdownOrAddDefault},{default:(0,o.withCtx)((function(){return[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(r.field.button),1)]})),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0)])):(0,o.createCommentVNode)("",!0)}]])},944:(e,t,r)=>{"use strict";r.d(t,{Z:()=>U});var o=r(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,r){const{object:n,valueProp:l,mode:a}=(0,o.toRefs)(e),i=(0,o.getCurrentInstance)().proxy,s=r.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 r=u(e);t.emit("change",r,i),t.emit("input",r),t.emit("update:modelValue",r)}}}function p(e,t){const{value:r,modelValue:n,mode:l,valueProp:a}=(0,o.toRefs)(e),i=(0,o.ref)("single"!==l.value?[]:{}),s=n&&void 0!==n.value?n:r,u=(0,o.computed)((()=>"single"===l.value?i.value[a.value]:i.value.map((e=>e[a.value])))),c=(0,o.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,r){const{regex:n}=(0,o.toRefs)(e),l=(0,o.getCurrentInstance)().proxy,a=r.isOpen,i=r.open,s=(0,o.ref)(null),u=(0,o.ref)(null);return(0,o.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"),r=n.value;"string"==typeof r&&(r=new RegExp(r)),t.split("").every((e=>!!e.match(r)))||e.preventDefault()}t.emit("paste",e,l)}}}function v(e,t,r){const{groupSelect:n,mode:l,groups:a,disabledProp:i}=(0,o.toRefs)(e),s=(0,o.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,r){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:A,searchStart:j}=(0,o.toRefs)(e),z=(0,o.getCurrentInstance)().proxy,R=r.iv,F=r.ev,q=r.search,H=r.clearSearch,G=r.update,Y=r.pointer,X=r.clearPointer,$=r.focus,Z=r.deactivate,K=r.close,W=(0,o.ref)([]),U=(0,o.ref)([]),J=(0,o.ref)(!1),Q=(0,o.ref)(null),ee=(0,o.ref)(B.value&&-1===i.value?10:i.value),te=(0,o.computed)((()=>u.value||d.value||!1)),re=(0,o.computed)((()=>void 0!==m.value?m.value:void 0===v.value||v.value)),oe=(0,o.computed)((()=>{if(L.value){let e=U.value||[],t=[];return e.forEach((e=>{Be(e[P.value]).forEach((r=>{t.push(Object.assign({},r,e[A.value]?{[A.value]:!0}:{}))}))})),t}{let e=Be(U.value||[]);return W.value.length&&(e=e.concat(W.value)),e}})),ne=(0,o.computed)((()=>L.value?Le((U.value||[]).map(((e,t)=>{const r=Be(e[P.value]);return{...e,index:t,group:!0,[P.value]:Te(r,!1).map((t=>Object.assign({},t,e[A.value]?{[A.value]:!0}:{}))),__VISIBLE__:Te(r).map((t=>Object.assign({},t,e[A.value]?{[A.value]:!0}:{})))}}))):[])),le=(0,o.computed)((()=>{let e=oe.value;return T.value&&(e=e.reverse()),de.value.length&&(e=de.value.concat(e)),Te(e)})),ae=(0,o.computed)((()=>{let e=le.value;return ee.value>0&&(e=e.slice(0,ee.value)),e})),ie=(0,o.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,o.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,o.computed)((()=>!oe.value.length&&!J.value&&!de.value.length)),ce=(0,o.computed)((()=>oe.value.length>0&&0==ae.value.length&&(q.value&&L.value||!L.value))),de=(0,o.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,o.computed)((()=>a.value||p.value)),me=(0,o.computed)((()=>{switch(l.value){case"single":return null;case"multiple":case"tags":return[]}})),ve=(0,o.computed)((()=>b.value||J.value)),fe=e=>{switch("object"!=typeof e&&(e=_e(e)),l.value){case"single":G(e);break;case"multiple":case"tags":G(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":G(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),G(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[A.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&&(X(),K()),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&&X(),N.value&&K();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&&X(),N.value&&K()}N.value||$()},Ee=e=>{void 0===_e(e[S.value])&&te.value&&(t.emit("tag",e[S.value],z),t.emit("option",e[S.value],z),re.value&&Ne(e),H())},Se=e=>void 0===e.find((e=>!we(e)&&!e[A.value])),Oe=e=>void 0===e.find((e=>!we(e))),_e=e=>oe.value[oe.value.map((e=>String(e[S.value]))).indexOf(String(e))],De=(e,t=!0)=>oe.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=>{W.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 r=e;return q.value&&k.value&&(r=r.filter((e=>j.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&&(r=r.filter((e=>!(e=>-1!==["tags","multiple"].indexOf(l.value)&&s.value&&we(e))(e)))),r},Be=e=>{let t=e;var r;return r=t,"[object Object]"===Object.prototype.toString.call(r)&&(t=Object.keys(t).map((e=>{let r=t[e];return{[S.value]:e,[pe.value]:r,[p.value]:r}}))),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,r)=>{n.value(q.value,z).then((t=>{U.value=t||[],"function"==typeof e&&e(t),J.value=!1})).catch((e=>{console.error(e),U.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 r=_e(R.value[t][S.value]);if(void 0!==r){let e=r[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))),Ae=()=>{Q.value=(0,o.watch)(q,(e=>{e.length{e==q.value&&n.value(q.value,z).then((t=>{e!=q.value&&q.value||(U.value=t,Y.value=ae.value.filter((e=>!0!==e[A.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():(U.value=n.value,Pe()),y.value>-1&&Ae(),(0,o.watch)(y,((e,t)=>{Q.value&&Q.value(),e>=0&&Ae()})),(0,o.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 r=t.slice().sort();return e.length===t.length&&e.slice().sort().every((function(e,t){return e===r[t]}))})(g.value?e.map((e=>e[S.value])):e,R.value.map((e=>e[S.value])))||(R.value=Me(e))}}),{deep:!0}),(0,o.watch)(n,((t,r)=>{"function"==typeof e.options?w.value&&(!r||t&&t.toString()!==r.toString())&&Ve():(U.value=e.options,Object.keys(R.value).length||Pe(),Ie())})),(0,o.watch)(p,Ie),{pfo:le,fo:ae,filteredOptions:ae,hasSelected:ie,multipleLabelText:se,eo:oe,extendedOptions:oe,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[A.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,r){const{valueProp:n,showOptions:l,searchable:a,groupLabel:i,groups:s,mode:u,groupSelect:c,disabledProp:d}=(0,o.toRefs)(e),p=r.fo,m=r.fg,v=r.handleOptionClick,f=r.handleGroupClick,h=r.search,g=r.pointer,b=r.setPointer,y=r.clearPointer,w=r.multiselect,x=r.isOpen,k=(0,o.computed)((()=>p.value.filter((e=>!e[d.value])))),C=(0,o.computed)((()=>m.value.filter((e=>!e[d.value])))),E=(0,o.computed)((()=>"single"!==u.value&&c.value)),S=(0,o.computed)((()=>g.value&&g.value.group)),O=(0,o.computed)((()=>M(g.value))),_=(0,o.computed)((()=>{const e=S.value?g.value:M(g.value),t=C.value.map((e=>e[i.value])).indexOf(e[i.value]);let r=C.value[t-1];return void 0===r&&(r=N.value),r})),D=(0,o.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,o.computed)((()=>[...C.value].slice(-1)[0])),L=(0,o.computed)((()=>g.value.__VISIBLE__.filter((e=>!e[d.value]))[0])),T=(0,o.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,o.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,o.computed)((()=>[..._.value.__VISIBLE__.filter((e=>!e[d.value]))].slice(-1)[0])),V=(0,o.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]))),A=()=>{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,o.watch)(x,(e=>{if(e){let e=w.value.querySelectorAll("[data-selected]")[0];if(!e)return;let t=e.parentElement.parentElement;(0,o.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,o.nextTick)((()=>{A()}))},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,o.nextTick)((()=>{A()}))}}}function b(e,t,r){const{disabled:n}=(0,o.toRefs)(e),l=(0,o.getCurrentInstance)().proxy,a=(0,o.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,r){const{searchable:n,disabled:l}=(0,o.toRefs)(e),a=r.input,i=r.open,s=r.close,u=r.clearSearch,c=r.isOpen,d=(0,o.ref)(null),p=(0,o.ref)(null),m=(0,o.ref)(!1),v=(0,o.ref)(!1),f=(0,o.computed)((()=>n.value||l.value?-1:0)),h=()=>{n.value&&a.value.blur(),d.value.blur()},g=(e=!0)=>{l.value||(m.value=!0,e&&i())},b=()=>{m.value=!1,setTimeout((()=>{m.value||(s(),u())}),1)};return{multiselect:d,tags:p,tabindex:f,isActive:m,mouseClicked:v,blur:h,focus:()=>{n.value&&!l.value&&a.value.focus()},activate:g,deactivate:b,handleFocusIn:()=>{g(v.value)},handleFocusOut:()=>{b()},handleCaretClick:()=>{b(),h()},handleMousedown:e=>{v.value=!0,c.value&&(e.target.isEqualNode(d.value)||e.target.isEqualNode(p.value))?setTimeout((()=>{b()}),0):document.activeElement.isEqualNode(d.value)&&!c.value&&g(),setTimeout((()=>{v.value=!1}),0)}}}function w(e,t,r){const{mode:n,addTagOn:l,openDirection:a,searchable:i,showOptions:s,valueProp:u,groups:c,addOptionOn:d,createTag:p,createOption:m,reverse:v}=(0,o.toRefs)(e),f=(0,o.getCurrentInstance)().proxy,h=r.iv,g=r.update,b=r.search,y=r.setPointer,w=r.selectPointer,x=r.backwardPointer,k=r.forwardPointer,C=r.multiselect,E=r.tags,S=r.isOpen,O=r.open,_=r.blur,D=r.fo,N=(0,o.computed)((()=>p.value||m.value||!1)),L=(0,o.computed)((()=>void 0!==l.value?l.value:void 0!==d.value?d.value:["enter"])),T=()=>{"tags"===n.value&&!s.value&&N.value&&i.value&&!c.value&&y(D.value[D.value.map((e=>e[u.value])).indexOf(b.value)])};return{handleKeydown:e=>{let r,o;switch(t.emit("keydown",e,f),-1!==["ArrowLeft","ArrowRight","Enter"].indexOf(e.key)&&"tags"===n.value&&(r=[...C.value.querySelectorAll("[data-tags] > *")].filter((e=>e!==E.value)),o=r.findIndex((e=>e===document.activeElement))),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!==o&&void 0!==o)return g([...h.value].filter(((e,t)=>t!==o))),void(o===r.length-1&&(r.length-1?r[r.length-2].focus():i.value?E.value.querySelector("input").focus():C.value.focus()));if(-1===L.value.indexOf("enter")&&N.value)return;T(),w();break;case" ":if(!N.value&&!i.value)return e.preventDefault(),T(),void w();if(!N.value)return!1;if(-1===L.value.indexOf("space")&&N.value)return;e.preventDefault(),T(),w();break;case"Tab":case";":case",":if(-1===L.value.indexOf(e.key.toLowerCase())||!N.value)return;T(),w(),e.preventDefault();break;case"Escape":_();break;case"ArrowUp":if(e.preventDefault(),!s.value)return;S.value||O(),x();break;case"ArrowDown":if(e.preventDefault(),!s.value)return;S.value||O(),k();break;case"ArrowLeft":if(i.value&&E.value.querySelector("input").selectionStart||e.shiftKey||"tags"!==n.value||!h.value||!h.value.length)return;e.preventDefault(),-1===o?r[r.length-1].focus():o>0&&r[o-1].focus();break;case"ArrowRight":if(-1===o||e.shiftKey||"tags"!==n.value||!h.value||!h.value.length)return;e.preventDefault(),r.length>o+1?r[o+1].focus():i.value?E.value.querySelector("input").focus():i.value||C.value.focus()}},handleKeyup:e=>{t.emit("keyup",e,f)},preparePointer:T}}function x(e,t,r){const{classes:n,disabled:l,openDirection:a,showOptions:i}=(0,o.toRefs)(e),s=r.isOpen,u=r.isPointed,c=r.isSelected,d=r.isDisabled,p=r.isActive,m=r.canPointGroups,v=r.resolving,f=r.fo,h=(0,o.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,o.computed)((()=>!!(s.value&&i.value&&(!v.value||v.value&&f.value.length))));return{classList:(0,o.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 r=[e.groupLabel];return u(t)?r.push(c(t)?e.groupLabelSelectedPointed:e.groupLabelPointed):c(t)&&m.value?r.push(d(t)?e.groupLabelSelectedDisabled:e.groupLabelSelected):d(t)&&r.push(e.groupLabelDisabled),m.value&&r.push(e.groupLabelPointable),r},groupOptions:e.groupOptions,option:(t,r)=>{let o=[e.option];return u(t)?o.push(c(t)?e.optionSelectedPointed:e.optionPointed):c(t)?o.push(d(t)?e.optionSelectedDisabled:e.optionSelected):(d(t)||r&&d(r))&&o.push(e.optionDisabled),o},noOptions:e.noOptions,noResults:e.noResults,fakeInput:e.fakeInput}})),showDropdown:g}}function k(e,t,r){const{limit:n,infinite:l}=(0,o.toRefs)(e),a=r.isOpen,i=r.offset,s=r.search,u=r.pfo,c=r.eo,d=(0,o.ref)(null),p=(0,o.ref)(null),m=(0,o.computed)((()=>i.value{const{isIntersecting:t,target:r}=e[0];if(t){const e=r.offsetParent,t=e.scrollTop;i.value+=-1==n.value?10:n.value,(0,o.nextTick)((()=>{e.scrollTop=t}))}},f=()=>{a.value&&i.value{l.value&&f()})),(0,o.watch)(s,(()=>{l.value&&(i.value=n.value,f())}),{flush:"post"}),(0,o.watch)(c,(()=>{l.value&&f()}),{immediate:!1,flush:"post"}),(0,o.onMounted)((()=>{window&&window.IntersectionObserver&&(d.value=new IntersectionObserver(v))})),{hasMore:m,infiniteLoader:p}}function C(e,t,r){const{placeholder:n,id:l,valueProp:a,label:i,mode:s,groupLabel:u}=(0,o.toRefs)(e),c=r.pointer;r.iv,r.hasSelected,r.multipleLabelText,r.isOpen;const d=(0,o.ref)(null),p=(0,o.computed)((()=>{let e=[];return l&&l.value&&e.push(l.value),e.push("multiselect-options"),e.join("-")})),m=(0,o.computed)((()=>{let e=[];if(l&&l.value&&e.push(l.value),c.value)return e.push(c.value.group?"multiselect-group":"multiselect-option"),e.push(c.value.group?c.value.index:c.value[a.value]),e.join("-")})),v=(0,o.computed)((()=>n.value)),f=(0,o.computed)((()=>"single"!==s.value));return(0,o.onMounted)((()=>{if(l&&l.value&&document&&document.querySelector){let e=document.querySelector(`[for="${l.value}"]`);d.value=e?e.innerText:null}})),{ariaOwns:p,ariaPlaceholder:v,ariaMultiselectable:f,ariaActiveDescendant:m,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 t.push(e[i.value]),t.join(" ")},ariaGroupId:e=>{let t=[];return l&&l.value&&t.push(l.value),t.push("multiselect-group"),t.push(e.index),t.join("-")},ariaGroupLabel:e=>{let t=[];return t.push(e[u.value]),t.join(" ")},ariaTagLabel:e=>`${e} ❎`}}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},aria:{required:!1,type:Object,default:()=>({})}},setup:(e,t)=>function(e,t,r,o={}){return r.forEach((r=>{r&&(o={...o,...r(e,t,o)})})),o}(e,t,[p,v,b,m,d,y,h,k,g,w,x,C])};const S=["tabindex","id","dir","aria-owns","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],O=["type","modelValue","value","autocomplete","id","aria-owns","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],_=["onKeyup","aria-label"],D=["onClick"],N=["type","modelValue","value","id","autocomplete","aria-owns","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],L=["innerHTML"],T=["innerHTML"],B=["id"],P=["id","aria-label","aria-selected"],V=["data-pointed","onMouseenter","onClick"],I=["innerHTML"],M=["aria-label"],A=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],j=["innerHTML"],z=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],R=["innerHTML"],F=["innerHTML"],q=["innerHTML"],H=["value"],G=["name","value"],Y=["name","value"];E.render=function(e,t,r,n,l,a){return(0,o.openBlock)(),(0,o.createElementBlock)("div",(0,o.mergeProps)({ref:"multiselect",tabindex:e.tabindex,class:e.classList.container,id:r.searchable?void 0:r.id,dir:r.rtl?"rtl":void 0,onFocusin:t[9]||(t[9]=(...t)=>e.handleFocusIn&&e.handleFocusIn(...t)),onFocusout:t[10]||(t[10]=(...t)=>e.handleFocusOut&&e.handleFocusOut(...t)),onKeydown:t[11]||(t[11]=(...t)=>e.handleKeydown&&e.handleKeydown(...t)),onKeyup:t[12]||(t[12]=(...t)=>e.handleKeyup&&e.handleKeyup(...t)),onMousedown:t[13]||(t[13]=(...t)=>e.handleMousedown&&e.handleMousedown(...t)),"aria-owns":r.searchable?void 0:e.ariaOwns,"aria-placeholder":r.searchable?void 0:e.ariaPlaceholder,"aria-expanded":r.searchable?void 0:e.isOpen,"aria-activedescendant":r.searchable?void 0:e.ariaActiveDescendant,"aria-multiselectable":r.searchable?void 0:e.ariaMultiselectable,role:r.searchable?void 0:"listbox"},r.searchable?{}:r.aria),[(0,o.createCommentVNode)(" Search "),"tags"!==r.mode&&r.searchable&&!r.disabled?((0,o.openBlock)(),(0,o.createElementBlock)("input",(0,o.mergeProps)({key:0,type:r.inputType,modelValue:e.search,value:e.search,class:e.classList.search,autocomplete:r.autocomplete,id:r.searchable?r.id:void 0,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,o.withModifiers)(((...t)=>e.handlePaste&&e.handlePaste(...t)),["stop"])),ref:"input","aria-owns":e.ariaOwns,"aria-placeholder":e.ariaPlaceholder,"aria-expanded":e.isOpen,"aria-activedescendant":e.ariaActiveDescendant,"aria-multiselectable":e.ariaMultiselectable,role:"listbox"},{...r.attrs,...r.aria}),null,16,O)):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Tags (with search) "),"tags"==r.mode?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(e.classList.tags),"data-tags":""},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.iv,((t,n,l)=>(0,o.renderSlot)(e.$slots,"tag",{option:t,handleTagRemove:e.handleTagRemove,disabled:r.disabled},(()=>[((0,o.openBlock)(),(0,o.createElementBlock)("span",{class:(0,o.normalizeClass)(e.classList.tag),tabindex:"-1",onKeyup:(0,o.withKeys)((r=>e.handleTagRemove(t,r)),["enter"]),key:l,"aria-label":e.ariaTagLabel(t[r.label])},[(0,o.createTextVNode)((0,o.toDisplayString)(t[r.label])+" ",1),r.disabled?(0,o.createCommentVNode)("v-if",!0):((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:0,class:(0,o.normalizeClass)(e.classList.tagRemove),onClick:r=>e.handleTagRemove(t,r)},[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(e.classList.tagRemoveIcon)},null,2)],10,D))],42,_))])))),256)),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.tagsSearchWrapper),ref:"tags"},[(0,o.createCommentVNode)(" Used for measuring search width "),(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(e.classList.tagsSearchCopy)},(0,o.toDisplayString)(e.search),3),(0,o.createCommentVNode)(" Actual search input "),r.searchable&&!r.disabled?((0,o.openBlock)(),(0,o.createElementBlock)("input",(0,o.mergeProps)({key:0,type:r.inputType,modelValue:e.search,value:e.search,class:e.classList.tagsSearch,id:r.searchable?r.id:void 0,autocomplete:r.autocomplete,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,o.withModifiers)(((...t)=>e.handlePaste&&e.handlePaste(...t)),["stop"])),ref:"input","aria-owns":e.ariaOwns,"aria-placeholder":e.ariaPlaceholder,"aria-expanded":e.isOpen,"aria-activedescendant":e.ariaActiveDescendant,"aria-multiselectable":e.ariaMultiselectable,role:"listbox"},{...r.attrs,...r.aria}),null,16,N)):(0,o.createCommentVNode)("v-if",!0)],2)],2)):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Single label "),"single"==r.mode&&e.hasSelected&&!e.search&&e.iv?(0,o.renderSlot)(e.$slots,"singlelabel",{key:2,value:e.iv},(()=>[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.singleLabel),"aria-hidden":"true"},[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(e.classList.singleLabelText),innerHTML:e.iv[r.label]},null,10,L)],2)])):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Multiple label "),"multiple"==r.mode&&e.hasSelected&&!e.search?(0,o.renderSlot)(e.$slots,"multiplelabel",{key:3,values:e.iv},(()=>[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.multipleLabel),innerHTML:e.multipleLabelText,"aria-hidden":"true"},null,10,T)])):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Placeholder "),!r.placeholder||e.hasSelected||e.search?(0,o.createCommentVNode)("v-if",!0):(0,o.renderSlot)(e.$slots,"placeholder",{key:4},(()=>[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.placeholder),"aria-hidden":"true"},(0,o.toDisplayString)(r.placeholder),3)])),(0,o.createCommentVNode)(" Spinner "),r.loading||e.resolving?(0,o.renderSlot)(e.$slots,"spinner",{key:5},(()=>[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(e.classList.spinner),"aria-hidden":"true"},null,2)])):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Clear "),e.hasSelected&&!r.disabled&&r.canClear&&!e.busy?(0,o.renderSlot)(e.$slots,"clear",{key:6,clear:e.clear},(()=>[(0,o.createElementVNode)("span",{tabindex:"0",role:"button","aria-label":"❎",class:(0,o.normalizeClass)(e.classList.clear),onClick:t[6]||(t[6]=(...t)=>e.clear&&e.clear(...t)),onKeyup:t[7]||(t[7]=(0,o.withKeys)(((...t)=>e.clear&&e.clear(...t)),["enter"]))},[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(e.classList.clearIcon)},null,2)],34)])):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Caret "),r.caret&&r.showOptions?(0,o.renderSlot)(e.$slots,"caret",{key:7},(()=>[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(e.classList.caret),onClick:t[8]||(t[8]=(...t)=>e.handleCaretClick&&e.handleCaretClick(...t)),"aria-hidden":"true"},null,2)])):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Options "),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.dropdown),tabindex:"-1"},[(0,o.renderSlot)(e.$slots,"beforelist",{options:e.fo}),(0,o.createElementVNode)("ul",{class:(0,o.normalizeClass)(e.classList.options),id:e.ariaOwns},[r.groups?((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:0},(0,o.renderList)(e.fg,((t,n,l)=>((0,o.openBlock)(),(0,o.createElementBlock)("li",{class:(0,o.normalizeClass)(e.classList.group),key:l,id:e.ariaGroupId(t),"aria-label":e.ariaGroupLabel(t),"aria-selected":e.isSelected(t),role:"option"},[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.groupLabel(t)),"data-pointed":e.isPointed(t),onMouseenter:r=>e.setPointer(t,n),onClick:r=>e.handleGroupClick(t)},[(0,o.renderSlot)(e.$slots,"grouplabel",{group:t,isSelected:e.isSelected,isPointed:e.isPointed},(()=>[(0,o.createElementVNode)("span",{innerHTML:t[r.groupLabel]},null,8,I)]))],42,V),(0,o.createElementVNode)("ul",{class:(0,o.normalizeClass)(e.classList.groupOptions),"aria-label":e.ariaGroupLabel(t),role:"group"},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(t.__VISIBLE__,((n,l,a)=>((0,o.openBlock)(),(0,o.createElementBlock)("li",{class:(0,o.normalizeClass)(e.classList.option(n,t)),"data-pointed":e.isPointed(n),"data-selected":e.isSelected(n)||void 0,key:a,onMouseenter:t=>e.setPointer(n),onClick:t=>e.handleOptionClick(n),id:e.ariaOptionId(n),"aria-selected":e.isSelected(n),"aria-label":e.ariaOptionLabel(n),role:"option"},[(0,o.renderSlot)(e.$slots,"option",{option:n,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},(()=>[(0,o.createElementVNode)("span",{innerHTML:n[r.label]},null,8,j)]))],42,A)))),128))],10,M)],10,P)))),128)):((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:1},(0,o.renderList)(e.fo,((t,n,l)=>((0,o.openBlock)(),(0,o.createElementBlock)("li",{class:(0,o.normalizeClass)(e.classList.option(t)),"data-pointed":e.isPointed(t),"data-selected":e.isSelected(t)||void 0,key:l,onMouseenter:r=>e.setPointer(t),onClick:r=>e.handleOptionClick(t),id:e.ariaOptionId(t),"aria-selected":e.isSelected(t),"aria-label":e.ariaOptionLabel(t),role:"option"},[(0,o.renderSlot)(e.$slots,"option",{option:t,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},(()=>[(0,o.createElementVNode)("span",{innerHTML:t[r.label]},null,8,R)]))],42,z)))),128))],10,B),e.noOptions?(0,o.renderSlot)(e.$slots,"nooptions",{key:0},(()=>[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.noOptions),innerHTML:r.noOptionsText},null,10,F)])):(0,o.createCommentVNode)("v-if",!0),e.noResults?(0,o.renderSlot)(e.$slots,"noresults",{key:1},(()=>[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.noResults),innerHTML:r.noResultsText},null,10,q)])):(0,o.createCommentVNode)("v-if",!0),r.infinite&&e.hasMore?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:2,class:(0,o.normalizeClass)(e.classList.inifinite),ref:"infiniteLoader"},[(0,o.renderSlot)(e.$slots,"infinite",{},(()=>[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(e.classList.inifiniteSpinner)},null,2)]))],2)):(0,o.createCommentVNode)("v-if",!0),(0,o.renderSlot)(e.$slots,"afterlist",{options:e.fo})],2),(0,o.createCommentVNode)(" Hacky input element to show HTML5 required warning "),r.required?((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:8,class:(0,o.normalizeClass)(e.classList.fakeInput),tabindex:"-1",value:e.textValue,required:""},null,10,H)):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Native input support "),r.nativeSupport?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:9},["single"==r.mode?((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:0,type:"hidden",name:r.name,value:void 0!==e.plainValue?e.plainValue:""},null,8,G)):((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:1},(0,o.renderList)(e.plainValue,((e,t)=>((0,o.openBlock)(),(0,o.createElementBlock)("input",{type:"hidden",name:`${r.name}[]`,value:e,key:t},null,8,Y)))),128))],64)):(0,o.createCommentVNode)("v-if",!0),(0,o.createCommentVNode)(" Create height for empty input "),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(e.classList.spacer)},null,2)],16,S)},E.__file="src/Multiselect.vue";const X={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 $=r(379),Z=r.n($),K=r(878),W={insert:"head",singleton:!1};Z()(K.Z,W);K.Z.locals;const U=(0,r(744).Z)(X,[["render",function(e,t,r,c,d,p){var m=(0,o.resolveComponent)("default-button"),v=(0,o.resolveComponent)("Multiselect");return r.layouts?((0,o.openBlock)(),(0,o.createElementBlock)("div",n,[this.limitCounter>0||null===this.limitCounter?((0,o.openBlock)(),(0,o.createElementBlock)("div",l,[1===r.layouts.length?((0,o.openBlock)(),(0,o.createElementBlock)("div",a,[(0,o.createVNode)(m,{dusk:"toggle-layouts-dropdown-or-add-default",type:"button",tabindex:"0",onClick:p.toggleLayoutsDropdownOrAddDefault},{default:(0,o.withCtx)((function(){return[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(r.field.button),1)]})),_:1},8,["onClick"])])):(0,o.createCommentVNode)("",!0),r.layouts.length>1?((0,o.openBlock)(),(0,o.createElementBlock)("div",i,[(0,o.createElementVNode)("div",s,[(0,o.createElementVNode)("div",u,[(0,o.createVNode)(v,(0,o.mergeProps)({modelValue:d.selectedLayout,"onUpdate:modelValue":t[0]||(t[0]=function(e){return d.selectedLayout=e}),options:p.availableLayouts,placeholder:r.field.button,onChange:p.selectLayout},p.attributes,{"track-by":"name","show-options":!0,searchable:!0,ref:"select"}),null,16,["modelValue","options","placeholder","onChange"])])])])):(0,o.createCommentVNode)("",!0)])):(0,o.createCommentVNode)("",!0)])):(0,o.createCommentVNode)("",!0)}]])},226:e=>{"use strict";e.exports=LaravelNova},311:e=>{"use strict";e.exports=Vue}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var l=r[e]={id:e,exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=(t,r,n,l)=>{if(!r){var a=1/0;for(c=0;c=l)&&Object.keys(o.O).every((e=>o.O[e](r[s])))?r.splice(s--,1):(i=!1,l0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[r,n,l]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={175:0,546:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,l,[a,i,s]=r,u=0;if(a.some((t=>0!==e[t]))){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);if(s)var c=s(o)}for(t&&t(r);uo(757)));var n=o.O(void 0,[546],(()=>o(129)));n=o.O(n)})(); \ No newline at end of file diff --git a/resources/js/components/DeleteGroupModal.vue b/resources/js/components/DeleteGroupModal.vue index 52aef991..e16bcb3a 100644 --- a/resources/js/components/DeleteGroupModal.vue +++ b/resources/js/components/DeleteGroupModal.vue @@ -1,61 +1,61 @@ diff --git a/resources/js/components/DetailField.vue b/resources/js/components/DetailField.vue index d47d6ab2..0e7f0d3c 100644 --- a/resources/js/components/DetailField.vue +++ b/resources/js/components/DetailField.vue @@ -1,11 +1,13 @@