diff --git a/composer.json b/composer.json index 167198c..29a1adb 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,6 @@ ], "require": { "acrosswp/acrosswp-buddypress-or-buddyboss-dependency": "dev-main", - "yahnis-elsts/plugin-update-checker": "dev-master", "acrosswp/acrosswp-plugin-update-checker-github": "dev-main", "wpify/custom-fields": "dev-master" }, diff --git a/composer.lock b/composer.lock index 2ebeaa0..04436e2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2e8d692f823f94abbd427f289950cee4", + "content-hash": "e8a9430791ea16cc404b3ee079d96ff7", "packages": [ { "name": "acrosswp/acrosswp-buddypress-or-buddyboss-dependency", @@ -101,14 +101,17 @@ "source": { "type": "git", "url": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github.git", - "reference": "9599e9ed6cbca3684b120f4174fa4780a6d57566" + "reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/9599e9ed6cbca3684b120f4174fa4780a6d57566", - "reference": "9599e9ed6cbca3684b120f4174fa4780a6d57566", + "url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/43933bdd6a4e46ce41d3b9427db4586f2d4ab39f", + "reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f", "shasum": "" }, + "require": { + "yahnis-elsts/plugin-update-checker": "dev-master" + }, "default-branch": true, "type": "library", "autoload": { @@ -136,7 +139,7 @@ "issues": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github/issues", "source": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github/tree/main" }, - "time": "2023-11-11T23:01:45+00:00" + "time": "2023-11-30T07:35:22+00:00" }, { "name": "wpify/custom-fields", @@ -144,12 +147,12 @@ "source": { "type": "git", "url": "git@gitlab.com:wpify/custom-fields.git", - "reference": "72ed78678be40ce193d517d079035bc61d41e7be" + "reference": "cd55e4f45aead746e6cfab63000ed1b5d4328409" }, "dist": { "type": "zip", - "url": "https://gitlab.com/api/v4/projects/wpify%2Fcustom-fields/repository/archive.zip?sha=72ed78678be40ce193d517d079035bc61d41e7be", - "reference": "72ed78678be40ce193d517d079035bc61d41e7be", + "url": "https://gitlab.com/api/v4/projects/wpify%2Fcustom-fields/repository/archive.zip?sha=cd55e4f45aead746e6cfab63000ed1b5d4328409", + "reference": "cd55e4f45aead746e6cfab63000ed1b5d4328409", "shasum": "" }, "require": { @@ -174,7 +177,7 @@ "GPL-2.0-or-later" ], "description": "WPify Custom Fields", - "time": "2023-11-13T14:55:35+00:00" + "time": "2023-11-29T14:20:47+00:00" }, { "name": "yahnis-elsts/plugin-update-checker", @@ -233,7 +236,6 @@ "minimum-stability": "dev", "stability-flags": { "acrosswp/acrosswp-buddypress-or-buddyboss-dependency": 20, - "yahnis-elsts/plugin-update-checker": 20, "acrosswp/acrosswp-plugin-update-checker-github": 20, "wpify/custom-fields": 20 }, diff --git a/vendor/acrosswp/acrosswp-plugin-update-checker-github/composer.json b/vendor/acrosswp/acrosswp-plugin-update-checker-github/composer.json index d1e756d..bc8c6fa 100644 --- a/vendor/acrosswp/acrosswp-plugin-update-checker-github/composer.json +++ b/vendor/acrosswp/acrosswp-plugin-update-checker-github/composer.json @@ -11,6 +11,9 @@ "autoload": { "files": ["updater.php"] }, + "require": { + "yahnis-elsts/plugin-update-checker": "dev-master" + }, "support": { "issues": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github/issues" }, diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 7ff8ffb..db8eb84 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -7,8 +7,8 @@ return array( 'ba3e6311190fef6b803d614907261c88' => $vendorDir . '/acrosswp/acrosswp-dependency/acrosswp-dependency.php', + '45a16669595eb3c0a9e2994e57fc3188' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p3.php', 'dc38373a0e8e9b61437f4120cca10acf' => $vendorDir . '/acrosswp/acrosswp-buddypress-or-buddyboss-dependency/dependency.php', 'b808676c575d8cc3a144a9eb5971e0d9' => $vendorDir . '/acrosswp/acrosswp-plugin-update-checker-github/updater.php', 'f6b87e4acab98b2fead22b4d637bae15' => $vendorDir . '/wpify/custom-fields/functions.php', - '45a16669595eb3c0a9e2994e57fc3188' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p3.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index c99255c..53067e1 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -8,10 +8,10 @@ class ComposerStaticInitc2f6021fd27f99fa8258c76527f1da4c { public static $files = array ( 'ba3e6311190fef6b803d614907261c88' => __DIR__ . '/..' . '/acrosswp/acrosswp-dependency/acrosswp-dependency.php', + '45a16669595eb3c0a9e2994e57fc3188' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p3.php', 'dc38373a0e8e9b61437f4120cca10acf' => __DIR__ . '/..' . '/acrosswp/acrosswp-buddypress-or-buddyboss-dependency/dependency.php', 'b808676c575d8cc3a144a9eb5971e0d9' => __DIR__ . '/..' . '/acrosswp/acrosswp-plugin-update-checker-github/updater.php', 'f6b87e4acab98b2fead22b4d637bae15' => __DIR__ . '/..' . '/wpify/custom-fields/functions.php', - '45a16669595eb3c0a9e2994e57fc3188' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p3.php', ); public static $prefixLengthsPsr4 = array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bbb89d4..2e7a6ae 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -102,15 +102,18 @@ "source": { "type": "git", "url": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github.git", - "reference": "9599e9ed6cbca3684b120f4174fa4780a6d57566" + "reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/9599e9ed6cbca3684b120f4174fa4780a6d57566", - "reference": "9599e9ed6cbca3684b120f4174fa4780a6d57566", + "url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/43933bdd6a4e46ce41d3b9427db4586f2d4ab39f", + "reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f", "shasum": "" }, - "time": "2023-11-11T23:01:45+00:00", + "require": { + "yahnis-elsts/plugin-update-checker": "dev-master" + }, + "time": "2023-11-30T07:35:22+00:00", "default-branch": true, "type": "library", "installation-source": "dist", @@ -148,12 +151,12 @@ "source": { "type": "git", "url": "git@gitlab.com:wpify/custom-fields.git", - "reference": "72ed78678be40ce193d517d079035bc61d41e7be" + "reference": "cd55e4f45aead746e6cfab63000ed1b5d4328409" }, "dist": { "type": "zip", - "url": "https://gitlab.com/api/v4/projects/wpify%2Fcustom-fields/repository/archive.zip?sha=72ed78678be40ce193d517d079035bc61d41e7be", - "reference": "72ed78678be40ce193d517d079035bc61d41e7be", + "url": "https://gitlab.com/api/v4/projects/wpify%2Fcustom-fields/repository/archive.zip?sha=cd55e4f45aead746e6cfab63000ed1b5d4328409", + "reference": "cd55e4f45aead746e6cfab63000ed1b5d4328409", "shasum": "" }, "require": { @@ -163,7 +166,7 @@ "require-dev": { "symfony/var-dumper": "^v5.4" }, - "time": "2023-11-13T14:55:35+00:00", + "time": "2023-11-29T14:20:47+00:00", "default-branch": true, "type": "library", "installation-source": "dist", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index fc1d6cb..4164a78 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'acrosswp/view-analytics', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'af31c533eaa44e4857c53031eff00ec8e5dfc5fe', + 'reference' => '40d79d55d8d7f2dc57ca32585c529abafd8f9adf', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -35,7 +35,7 @@ 'acrosswp/acrosswp-plugin-update-checker-github' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '9599e9ed6cbca3684b120f4174fa4780a6d57566', + 'reference' => '43933bdd6a4e46ce41d3b9427db4586f2d4ab39f', 'type' => 'library', 'install_path' => __DIR__ . '/../acrosswp/acrosswp-plugin-update-checker-github', 'aliases' => array( @@ -46,7 +46,7 @@ 'acrosswp/view-analytics' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'af31c533eaa44e4857c53031eff00ec8e5dfc5fe', + 'reference' => '40d79d55d8d7f2dc57ca32585c529abafd8f9adf', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -55,7 +55,7 @@ 'wpify/custom-fields' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '72ed78678be40ce193d517d079035bc61d41e7be', + 'reference' => 'cd55e4f45aead746e6cfab63000ed1b5d4328409', 'type' => 'library', 'install_path' => __DIR__ . '/../wpify/custom-fields', 'aliases' => array( diff --git a/vendor/wpify/custom-fields/build/wpify-custom-blocks.asset.php b/vendor/wpify/custom-fields/build/wpify-custom-blocks.asset.php index ee995db..bc2719d 100644 --- a/vendor/wpify/custom-fields/build/wpify-custom-blocks.asset.php +++ b/vendor/wpify/custom-fields/build/wpify-custom-blocks.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => 'baf0858230627966f45f'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => '8d1dfc25616b7cf99598'); diff --git a/vendor/wpify/custom-fields/build/wpify-custom-blocks.js b/vendor/wpify/custom-fields/build/wpify-custom-blocks.js index 7208799..656b256 100644 --- a/vendor/wpify/custom-fields/build/wpify-custom-blocks.js +++ b/vendor/wpify/custom-fields/build/wpify-custom-blocks.js @@ -1 +1 @@ -!function(){var e={597:function(e,t,n){"use strict";var r,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:n,width:a,height:l},u)},d),i.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},3891:function(e,t,n){"use strict";var r,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:n,width:a,height:l},u)},d),i.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,o=0;r>>6-2*o);return n}},e.exports=n},8679:function(e,t,n){"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),v=0;vthis.countryCodeMaxLen&&(this.countryCodeMaxLen=n.length),this.countryCodes.hasOwnProperty(n)||(this.countryCodes[n]=[]);for(var o=0;o-1}))}else if(this.options.excludeCountries.length){var n=this.options.excludeCountries.map((function(e){return e.toLowerCase()}));this.countries=t.filter((function(e){return-1===n.indexOf(e.iso2)}))}else this.countries=t}},{key:"_translateCountriesByLocale",value:function(){for(var e=0;et.name?1:0}},{key:"_processCountryCodes",value:function(){this.countryCodeMaxLen=0,this.dialCodes={},this.countryCodes={};for(var e=0;e"),this.options.showFlags&&(r+="
")),r+="".concat(i.name,""),r+="+".concat(i.dialCode,""),r+=""}this.countryList.insertAdjacentHTML("beforeend",r)}},{key:"_setInitialState",value:function(){var e=this.telInput.getAttribute("value"),t=this.telInput.value,n=!e||"+"!==e.charAt(0)||t&&"+"===t.charAt(0)?t:e,r=this._getDialCode(n),o=this._isRegionlessNanp(n),i=this.options,a=i.initialCountry,s=i.autoInsertDialCode;r&&!o?this._updateFlagFromNumber(n):"auto"!==a&&(a?this._setFlag(a.toLowerCase()):r&&o?this._setFlag("us"):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,n||this._setFlag(this.defaultCountry)),!n&&s&&(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),n&&this._updateValFromNumber(n)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoInsertDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var e=this;this._handleHiddenInputSubmit=function(){e.hiddenInput.value=e.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var e=this.telInput;e&&"LABEL"!==e.tagName;)e=e.parentNode;return e}},{key:"_initDropdownListeners",value:function(){var e=this;this._handleLabelClick=function(t){e.countryList.classList.contains("iti__hide")?e.telInput.focus():t.preventDefault()};var t=this._getClosestLabel();t&&t.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!e.countryList.classList.contains("iti__hide")||e.telInput.disabled||e.telInput.readOnly||e._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(t){e.countryList.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(t.key)&&(t.preventDefault(),t.stopPropagation(),e._showDropdown()),"Tab"===t.key&&e._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var e=this;this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",(function(){window.intlTelInputGlobals.loadUtils(e.options.utilsScript)})):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((function(e){window.intlTelInputGlobals.autoCountry=e.toLowerCase(),setTimeout((function(){return p("handleAutoCountry")}))}),(function(){return p("rejectAutoCountryPromise")})))}},{key:"_initKeyListeners",value:function(){var e=this;this._handleKeyupEvent=function(){e._updateFlagFromNumber(e.telInput.value)&&e._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(e._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(e){var t=this.telInput.getAttribute("maxlength");return t&&e.length>t?e.substr(0,t):e}},{key:"_initBlurListeners",value:function(){var e=this;this._handleSubmitOrBlurEvent=function(){e._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var e=this._getNumeric(this.telInput.value);e&&this.selectedCountryData.dialCode!==e||(this.telInput.value="")}}},{key:"_getNumeric",value:function(e){return e.replace(/\D/g,"")}},{key:"_trigger",value:function(e){var t=document.createEvent("Event");t.initEvent(e,!0,!0),this.telInput.dispatchEvent(t)}},{key:"_showDropdown",value:function(){this.countryList.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(e,t,n){n&&!e.classList.contains(t)?e.classList.add(t):!n&&e.classList.contains(t)&&e.classList.remove(t)}},{key:"_setDropdownPosition",value:function(){var e=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.isMobile){var t=this.telInput.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,r=t.top+n,o=this.countryList.offsetHeight,i=r+this.telInput.offsetHeight+on;if(this._toggleClass(this.countryList,"iti__country-list--dropup",!i&&a),this.options.dropdownContainer){var s=!i&&a?0:this.telInput.offsetHeight;this.dropdown.style.top="".concat(r+s,"px"),this.dropdown.style.left="".concat(t.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return e._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll)}}}},{key:"_getClosestListItem",value:function(e){for(var t=e;t&&t!==this.countryList&&!t.classList.contains("iti__country");)t=t.parentNode;return t===this.countryList?null:t}},{key:"_bindDropdownListeners",value:function(){var e=this;this._handleMouseoverCountryList=function(t){var n=e._getClosestListItem(t.target);n&&e._highlightListItem(n,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(t){var n=e._getClosestListItem(t.target);n&&e._selectListItem(n)},this.countryList.addEventListener("click",this._handleClickCountryList);var t=!0;this._handleClickOffToClose=function(){t||e._closeDropdown(),t=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);var n="",r=null;this._handleKeydownOnDropdown=function(t){t.preventDefault(),"ArrowUp"===t.key||"Up"===t.key||"ArrowDown"===t.key||"Down"===t.key?e._handleUpDownKey(t.key):"Enter"===t.key?e._handleEnterKey():"Escape"===t.key?e._closeDropdown():/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(t.key)&&(r&&clearTimeout(r),n+=t.key.toLowerCase(),e._searchForCountry(n),r=setTimeout((function(){n=""}),1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown)}},{key:"_handleUpDownKey",value:function(e){var t="ArrowUp"===e||"Up"===e?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;t&&(t.classList.contains("iti__divider")&&(t="ArrowUp"===e||"Up"===e?t.previousElementSibling:t.nextElementSibling),this._highlightListItem(t,!0))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(e){for(var t=0;ta){t&&(u+=d);var p=o-s;n.scrollTop=u-p}}},{key:"_updateDialCode",value:function(e){var t,n=this.telInput.value,r="+".concat(e);if("+"===n.charAt(0)){var o=this._getDialCode(n);t=o?n.replace(o,r):r,this.telInput.value=t}else this.options.autoInsertDialCode&&(t=n?r+n:r,this.telInput.value=t)}},{key:"_getDialCode",value:function(e,t){var n="";if("+"===e.charAt(0))for(var r="",o=0;o1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++ru))return!1;var p=l.get(e),f=l.get(t);if(p&&f)return p==t&&f==e;var h=-1,g=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},5514:function(e,t,n){var r=n(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},327:function(e,t,n){var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},361:function(e,t,n){var r=n(5990);e.exports=function(e){return r(e,5)}},5703:function(e){e.exports=function(e){return function(){return e}}},3279:function(e,t,n){var r=n(3218),o=n(7771),i=n(4841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,d,p,f,h=0,g=!1,v=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=l,r=c;return l=c=void 0,h=t,d=e.apply(r,n)}function y(e){var n=e-f;return void 0===f||n>=t||n<0||v&&e-h>=u}function w(){var e=o();if(y(e))return x(e);p=setTimeout(w,function(e){var n=t-(e-f);return v?s(n,u-(e-h)):n}(e))}function x(e){return p=void 0,b&&l?m(e):(l=c=void 0,d)}function O(){var e=o(),n=y(e);if(l=arguments,c=this,f=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(w,t),g?m(e):d}(f);if(v)return clearTimeout(p),p=setTimeout(w,t),m(f)}return void 0===p&&(p=setTimeout(w,t)),d}return t=i(t)||0,r(n)&&(g=!!n.leading,u=(v="maxWait"in n)?a(i(n.maxWait)||0,t):u,b="trailing"in n?!!n.trailing:b),O.cancel=function(){void 0!==p&&clearTimeout(p),h=0,l=f=c=p=void 0},O.flush=function(){return void 0===p?d:x(o())},O}},6073:function(e,t,n){e.exports=n(4486)},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},4486:function(e,t,n){var r=n(7412),o=n(9881),i=n(4290),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},2525:function(e,t,n){var r=n(7816),o=n(4290);e.exports=function(e,t){return e&&r(e,o(t))}},7361:function(e,t,n){var r=n(7786);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},9095:function(e,t,n){var r=n(13),o=n(222);e.exports=function(e,t){return null!=e&&o(e,t,r)}},6557:function(e){e.exports=function(e){return e}},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(7518),i=n(1167),a=i&&i.isMap,s=a?o(a):r;e.exports=s},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),i=n(7005),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},2928:function(e,t,n){var r=n(9221),o=n(7518),i=n(1167),a=i&&i.isSet,s=a?o(a):r;e.exports=s},7037:function(e,t,n){var r=n(4239),o=n(1469),i=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(7518),i=n(1167),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(8612);e.exports=function(e){return i(e)?r(e,!0):o(e)}},5161:function(e,t,n){var r=n(9932),o=n(7206),i=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},3857:function(e,t,n){var r=n(2980),o=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=o},7771:function(e,t,n){var r=n(5639);e.exports=function(){return r.Date.now()}},9601:function(e,t,n){var r=n(371),o=n(9152),i=n(5403),a=n(327);e.exports=function(e){return i(e)?r(a(e)):o(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},3493:function(e,t,n){var r=n(3279),o=n(3218);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},4841:function(e,t,n){var r=n(7561),o=n(3218),i=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},3678:function(e,t,n){var r=n(8363),o=n(1704);e.exports=function(e){return r(e,o(e))}},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},2568:function(e,t,n){var r,o,i,a,s;r=n(1012),o=n(487).utf8,i=n(8738),a=n(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,d=-1732584194,p=271733878,f=0;f>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[l>>>5]|=128<>>9<<4)]=l;var h=s._ff,g=s._gg,v=s._hh,b=s._ii;for(f=0;f>>0,u=u+y>>>0,d=d+w>>>0,p=p+x>>>0}return r.endian([c,u,d,p])})._ff=function(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+(o>>>0)+a;return(s<>>32-i)+t},s._gg=function(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+(o>>>0)+a;return(s<>>32-i)+t},s._hh=function(e,t,n,r,o,i,a){var s=e+(t^n^r)+(o>>>0)+a;return(s<>>32-i)+t},s._ii=function(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+(o>>>0)+a;return(s<>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}},2703:function(e,t,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9921:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case g:case l:return e;default:return t}}case o:return t}}}function O(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return O(e)||x(e)===u},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===v},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===m||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=x},9864:function(e,t,n){"use strict";e.exports=n(9921)},4754:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,o=(r=n(2525))&&r.__esModule?r:{default:r},i=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,i.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=l},9941:function(e,t,n){"use strict";t.tz=void 0;var r=c(n(4147)),o=c(n(8556)),i=c(n(4754)),a=c(n(1765)),s=c(n(6002)),l=c(n(7742));function c(e){return e&&e.__esModule?e:{default:e}}a.default,t.tz=a.default,s.default,l.default;t.ZP=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},8556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=a(n(2525)),o=a(n(361)),i=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,r.default)(o,(function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])})),t})),n};t.default=s},3250:function(e,t,n){"use strict";var r=n(9196),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),a((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},1688:function(e,t,n){"use strict";e.exports=n(3250)},4583:function(e){self,e.exports=(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nu,load:()=>d,default:()=>p});var u=function e(){var t,o=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"id",null),c(this,"controls",{}),c(this,"layers",{}),c(this,"markers",{}),c(this,"markersDefinition",{}),c(this,"clusterers",{}),c(this,"images",{}),c(this,"mapTypes",{DEF_BASE:"DEF_BASE",DEF_TURIST:"DEF_TURIST",DEF_OPHOTO:"DEF_OPHOTO",DEF_HISTORIC:"DEF_HISTORIC",DEF_OPHOTO0203:"DEF_OPHOTO0203",DEF_OPHOTO0406:"DEF_OPHOTO0406",DEF_SMART_BASE:"DEF_SMART_BASE",DEF_SMART_OPHOTO:"DEF_SMART_OPHOTO",DEF_SMART_TURIST:"DEF_SMART_TURIST",DEF_TURIST_WINTER:"DEF_TURIST_WINTER",DEF_SMART_WINTER:"DEF_SMART_WINTER",DEF_GEOGRAPHY:"DEF_GEOGRAPHY",DEF_OPHOTO1012:"DEF_OPHOTO1012",DEF_OPHOTO1415:"DEF_OPHOTO1415",DEF_OPHOTO1618:"DEF_OPHOTO1618",DEF_BASE_NEW:"DEF_BASE_NEW",DEF_TURIST_NEW:"DEF_TURIST_NEW"}),c(this,"update",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.zoom&&o.setZoom(e.zoom),e.center&&o.isCoords(e.center)&&o.setCenter(e.center),e.default_controls&&o.addDefaultControls(),e.sync_control?o.addControlSync():o.removeControl("sync"),e.markers&&Array.isArray(e.markers)?o.addMarkers(e.markers):o.removeMarkers(),e.marker&&o.isCoords(e.marker)&&o.addMarker(e.marker),e.auto_center_zoom&&o.autoCenterZoom(),e.clusterers&&(Array.isArray(e.clusterers)?e.clusterers.forEach(o.addClusterer):"string"==typeof e.clusterers?o.addClusterer(e.clusterers):o.addClusterers()),e.poi?o.addPoi():o.removePoi(),e.map_type_switch?Array.isArray(e.map_type_switch)?o.addMapTypeSwitch(e.map_type_switch):o.addMapTypeSwitch():o.removeMapTypeSwitch(),e.image_overlay?Array.isArray(e.image_overlay)?e.image_overlay.forEach(o.addImageOverlay):o.addImageOverlay(e.image_overlay):o.removeImageOverlay(),e.gpx?Array.isArray(e.gpx)?e.gpx.forEach(o.addGpx):o.addGpx(e.gpx):o.removeGpx()})),c(this,"loadScript",(function(){return window.wpifyMapyCzScript&&window.wpifyMapyCzScript instanceof Promise||(window.wpifyMapyCzScript=new Promise((function(e,t){if(document.querySelector('script[src="'+o.loaderUrl+'"]'))e();else{var n=document.createElement("script"),r=document.querySelector("script");n.addEventListener("load",e),n.addEventListener("error",(function(e){return t(e.error)})),n.src=o.loaderUrl,r.parentNode.insertBefore(n,r)}}))),window.wpifyMapyCzScript})),c(this,"loadSmap",(function(){return window.wpifyMapyCzScriptLoader&&window.wpifyMapyCzScriptLoader instanceof Promise||(window.wpifyMapyCzScriptLoader=new Promise((function(e){Loader.async=!0,Loader.lang=o.lang,Loader.load(o.id,{api:o.api,poi:o.poi,pano:o.pano,suggest:o.suggest},e)}))),window.wpifyMapyCzScriptLoader})),c(this,"createMap",(function(){return new Promise((function(e){"full"===o.api?(o.map=new SMap(o.element,o.getCoords(o.center),o.zoom),o.map.addDefaultLayer(o.getMapType()).enable()):"simple"===o.api&&(o.map=new SMap(o.element,o.getCoords(o.center),o.zoom,o.getMapType())),o.map.getSignals().addListener(window,"marker-click",o.onMarkerClick),e(o)}))})),c(this,"getMap",(function(){return o.map})),c(this,"getCoords",(function(e){var t=e.latitude,n=e.longitude;return SMap.Coords.fromWGS84(n,t)})),c(this,"getMapType",(function(){return SMap[o.mapType]?SMap[o.mapType]:SMap.DEF_BASE})),c(this,"generateId",(function(){for(var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).length,t=void 0===e?32:e,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var n=t.layer||n;e[n]||(e[n]=[]),e[n].push(t)})),Object.keys(e).forEach((function(t){o.layers[t]?o.layers[t].disable():(o.layers[t]=new SMap.Layer.Marker,o.map.addLayer(o.layers[t])),e[t].forEach((function(e){var n=e.latitude,r=e.longitude,i=e.id,a=void 0===i?o.generateId():i,s=e.title,l=e.size,c=void 0===l?null:l,u=e.pin,d=e.anchor,p=e.card,f=e.pointer;o.markersDefinition[a]=e;var h=o.getCoords({latitude:n,longitude:r}),g={};if(s&&(g.title=s),c&&(g.size=c),u&&(g.url=u),d&&(g.anchor=d),o.removeMarker(a,t),o.markers[a]=new SMap.Marker(h,a,g),p&&Object(p)===p){var v=p.header,b=p.body,m=p.footer,y=p.container,w=new SMap.Card;v&&(w.getHeader().innerHTML=v),b&&(w.getBody().innerHTML=b),m&&(w.getFooter().innerHTML=m),y&&(w.getContainer().innerHTML=y),o.markers[a].decorate(SMap.Marker.Feature.Card,w)}if(o.layers[t].addMarker(o.markers[a]),f){var x="marker-pointer-"+a;o.controls[x]&&o.removeControl(x),o.controls[x]=new SMap.Control.Pointer,o.controls[x].addListener("pointer-click",(function(){return o.setCenter({latitude:n,longitude:r})}),o.controls[x]),o.controls[x].setCoords(h),o.map.addControl(o.controls[x])}})),o.layers[t].enable()}))})),c(this,"removeMarker",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"markers";o.markers[e]&&(o.layers[t]&&o.layers[t].removeMarker(o.markers[e]),delete o.markers[e])})),c(this,"removeMarkers",(function(){Object.keys(o.layers).forEach((function(e){o.layers[e]&&o.layers[e]instanceof SMap.Layer.Marker&&o.layers[e].removeAll()}))})),c(this,"autoCenterZoom",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e&&o.layers[e]?o.layers[e].getMarkers():Object.values(o.markers),n=o.map.computeCenterZoom(t.map((function(e){return e.getCoords()}))),i=r(n,2),a=i[0],s=i[1];o.map.setCenterZoom(a,s)})),c(this,"setCenter",(function(e){o.map.setCenter(o.getCoords(e))})),c(this,"addClusterer",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"markers";if(o.layers[e]){var t=new SMap.Marker.Clusterer(o.map);o.layers[e].setClusterer(t),o.clusterers[e]=t}})),c(this,"addClusterers",(function(){Object.keys(o.layers).forEach((function(e){o.layers[e]&&o.layers[e]instanceof SMap.Layer.Marker&&o.addClusterer(e)}))})),c(this,"addPoi",(function(){if(!o.layers.poi){o.layers.poi=new SMap.Layer.Marker(void 0,{poiTooltip:!0}),o.map.addLayer(o.layers.poi).enable();var e=o.map.createDefaultDataProvider();e.setOwner(o.map),e.addLayer(o.layers.poi),e.setMapSet([o.mapTypes.DEF_TURIST,o.mapTypes.DEF_TURIST_WINTER,o.mapTypes.DEF_TURIST_NEW,o.mapTypes.DEF_SMART_TURIST].includes(o.mapType)?SMap.MAPSET_TURIST:SMap.MAPSET_BASE),e.enable()}})),c(this,"removePoi",(function(){o.layers.poi&&(o.map.removeLayer(o.layers.poi),delete o.layers.poi)})),c(this,"addMapTypeSwitch",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{width:65,items:4,page:4},n=Array.isArray(e)?e.filter((function(e){return Boolean(SMap[e])})):Object.keys(o.mapTypes).filter((function(e){return Boolean(SMap[e])}));n.forEach((function(e){o.map.addDefaultLayer(SMap[e])}));var r=new SMap.Control.Layer(t);n.forEach((function(e){r.addDefaultLayer(SMap[e])})),o.controls["layer-switch"]&&o.removeControl("layer-switch"),o.controls["layer-switch"]=r,o.map.addControl(r)})),c(this,"removeMapTypeSwitch",(function(){o.controls["layer-switch"]&&o.removeControl("layer-switch")})),c(this,"addImageOverlay",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?o.generateId():t,r=e.image,i=e.top_left,a=e.topLeft,s=void 0===a?i:a,l=e.bottom_right,c=e.bottomRight,u=void 0===c?l:c,d=e.opacity,p=void 0===d?1:d;if(o.layers.image||(o.layers.image=new SMap.Layer.Image,o.map.addLayer(o.layers.image),o.layers.image.enable()),r&&s&&u)return o.images[n]&&o.layers.image.removeImage(o.images[n]),o.images[n]=o.layers.image.addImage(r,o.getCoords(s),o.getCoords(u),p),o.images[n]})),c(this,"removeImageOverlay",(function(){o.layers.image&&Object.keys(o.images).forEach((function(e){o.layers.image.removeImage(o.images[e]),delete o.images[e]}))})),c(this,"addGpx",(function(e){var t=e.id,n=void 0===t?o.generateId():t,r=e.data,i=e.source,a=e.fit,s=e.colors,l=e.maxPoints,c=e.url,u=new Promise((function(e,t){if(r){var n=JAK.XML.createDocument(r);e(n)}else i&&fetch(i).then((function(e){if(e.ok)return e.text();throw e.error()})).then((function(t){e(JAK.XML.createDocument(t))})).catch(t)}));u.then((function(e){var t="gpx-"+n,r={};return s&&(r.colors=s),l&&(r.maxPoints=l),c&&(r.url=c),o.layers[t]=new SMap.Layer.GPX(e,null,r),o.map.addLayer(o.layers[t]),o.layers[t].enable(),a&&o.layers[t].fit(),Promise.resolve(t)}))})),c(this,"removeGpx",(function(){Object.keys(o.layers).forEach((function(e){o.layers[e]instanceof SMap.Layer.GPX&&(o.removeLayer(o.layers[e]),delete o.layers[e])}))})),c(this,"isLayerVisible",(function(e){if(o.layers[e])return o.layers[e].isActive()})),c(this,"hideLayer",(function(e){o.layers[e]&&o.layers[e].disable()})),c(this,"showLayer",(function(e){o.layers[e]&&o.layers[e].enable()})),c(this,"hideAllLayers",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"markers";Object.keys(o.layers).forEach((function(t){"markers"===e&&o.layers[t]instanceof SMap.Layer.Marker&&o.layers[t].disable()}))})),c(this,"showAllLayers",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"markers";Object.keys(o.layers).forEach((function(t){"markers"===e&&o.layers[t]instanceof SMap.Layer.Marker&&o.layers[t].enable()}))})),c(this,"findByAddress",(function(e,t){return new Promise((function(r,i){var a=function(e){var t=[],a=e.getResults();a.length>0&&a[0].results.length>0?(a.forEach((function(e){t.push.apply(t,n(e.results))})),r(t.map((function(e){var t=o.transformCoords(e.coords);return delete e.coords,s(s({},e),t)})))):i()};t&&2===t.length&&o.isCoords(t[0])&&o.isCoords(t[1])?new SMap.Geocoder(e,a,{bbox:[o.getCoords(t[0]),o.getCoords(t[1])]}):new SMap.Geocoder(e,a)}))})),c(this,"findByCoords",(function(e){return new Promise((function(t,n){o.isCoords(e)?new SMap.Geocoder.Reverse(o.getCoords(e),(function(e){var n=e.getResults();n.coords=o.transformCoords(n.coords),n.items=n.items.map((function(e){return e.coords=o.transformCoords(e.coords),e})),t(n)})):n("No coords provided")}))})),c(this,"addSuggest",(function(e,t){var n=e.input,r=e.lang,i=void 0===r?"cs,en":r,a=e.bounds,s=e.enableCategories;if(!n)return!1;o.suggest=new SMap.Suggest(n,{provider:new SMap.SuggestProvider({updateParams:function(e){var t=o.map.getCenter().toWGS84();e.lon=t[0].toFixed(5),e.lat=t[1].toFixed(5),e.zoom=o.map.getZoom(),a&&(e.bounds=a),s&&(e.enableCategories=s),e.lang=i}})}),o.suggest.addListener("suggest",t)})),this.loaderUrl="https://api.mapy.cz/loader.js",this.lang=i.lang||"en",this.zoom=i.zoom||13,this.mapType=i.mapType||this.mapTypes.DEF_BASE,this.api=["full","simple"].includes(i.api)?i.api:"full",this.poi=!i.poi||Boolean(i.poi),this.pano=!i.pano||Boolean(i.pano),this.suggest=!i.suggest||Boolean(i.pano),i.center&&i.center.latitude&&i.center.longitude?this.center=i.center:this.center={latitude:0,longitude:0},i.element?t=i.element:i.id&&document.getElementById(i.id)&&(t=document.getElementById(i.id)),!document.getElementById("wpify-mapy-cz-css-reset")){var a=document.createElement("style");a.id="wpify-mapy-cz-css-reset",a.appendChild(document.createTextNode([".smap{min-height:170px}",".smap img{max-width:unset!important;display:unset!important;}",".smap,.smap *,.smap *::before,.smap *::after{word-break:normal!important;box-sizing:unset!important;}",".smap svg{display:unset!important;height:unset!important;max-width:unset!important;}"].join(" "))),document.head.appendChild(a)}t&&(this.element=t,this.id=i.id,this.resolver=new Promise((function(e,t){o.loadScript().then(o.loadSmap).then(o.createMap).then((function(){o.update(i),e(o)})).catch(t)})))},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};new u(e).resolver.then(t)};const p=u;return t})()},9196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&!e;)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}(),function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(n)?n:String(n)}function r(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}var o=n(9196),i=n.n(o),a=window.wp.blocks;function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);na?1:Math.round(100*u/a)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var p;if(r!==(p=c<0?0:c>i?1:Math.round(100*c/i)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},ee(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Q(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,$.ZP)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:Y({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return i().createElement("div",{style:n.alpha},i().createElement("div",{style:n.checkboard},i().createElement(J,{renderers:this.props.renderers})),i().createElement("div",{style:n.gradient}),i().createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("div",{style:n.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:n.slider}))))}}]),t}(o.PureComponent||o.Component),ne=te,re=function(){function e(e,t){for(var n=0;n-1)){var o=n.getArrowOffset(),i=38===e.keyCode?r+o:r-o;n.setUpdatedValue(i,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+ie++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),re(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,$.ZP)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i().createElement("div",{style:t.wrap},i().createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i().createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(o.PureComponent||o.Component),se=ae,le=function(){function e(e,t){for(var n=0;ni?0:360*(-100*c/i+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d;if(d=l<0?0:l>o?359:100*l/o*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},ce(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),le(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=(0,$.ZP)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return i().createElement("div",{style:r.hue},i().createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),i().createElement("div",{style:r.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:r.slider}))))}}]),t}(o.PureComponent||o.Component),de=ue,pe=n(5697),fe=n.n(pe),he=n(3857),ge=n.n(he),ve=function(e){var t=e.zDepth,n=e.radius,r=e.background,o=e.children,a=e.styles,s=void 0===a?{}:a,l=(0,$.ZP)(ge()({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":1===t});return i().createElement("div",{style:l.wrap},i().createElement("div",{style:l.bg}),i().createElement("div",{style:l.content},o))};ve.propTypes={background:fe().string,zDepth:fe().oneOf([0,1,2,3,4,5]),radius:fe().number,styles:fe().object},ve.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var be=ve,me=n(3493),ye=n.n(me),we=function(){function e(e,t){for(var n=0;no&&(l=o),c<0?c=0:c>i&&(c=i);var u=l/o,d=1-c/i;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=ye()((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),we(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,o=t.black,a=t.pointer,s=t.circle,l=(0,$.ZP)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:o,pointer:a,circle:s}},{custom:!!this.props.style});return i().createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),i().createElement("div",{style:l.white,className:"saturation-white"},i().createElement("div",{style:l.black,className:"saturation-black"}),i().createElement("div",{style:l.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:l.circle}))))}}]),t}(o.PureComponent||o.Component),Oe=xe,Ee=n(3279),Ce=n.n(Ee),Se=n(6073),_e=n.n(Se);function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}var je=/^\s+/,Pe=/\s+$/;function De(e,t){if(t=t||{},(e=e||"")instanceof De)return e;if(!(this instanceof De))return new De(e,t);var n=function(e){var t,n,r,o={r:0,g:0,b:0},i=1,a=null,s=null,l=null,c=!1,u=!1;return"string"==typeof e&&(e=function(e){e=e.replace(je,"").replace(Pe,"").toLowerCase();var t,n=!1;if(Ke[e])e=Ke[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=at.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=at.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=at.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=at.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=at.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=at.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=at.hex8.exec(e))?{r:Ye(t[1]),g:Ye(t[2]),b:Ye(t[3]),a:nt(t[4]),format:n?"name":"hex8"}:(t=at.hex6.exec(e))?{r:Ye(t[1]),g:Ye(t[2]),b:Ye(t[3]),format:n?"name":"hex"}:(t=at.hex4.exec(e))?{r:Ye(t[1]+""+t[1]),g:Ye(t[2]+""+t[2]),b:Ye(t[3]+""+t[3]),a:nt(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=at.hex3.exec(e))&&{r:Ye(t[1]+""+t[1]),g:Ye(t[2]+""+t[2]),b:Ye(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==ke(e)&&(st(e.r)&&st(e.g)&&st(e.b)?(t=e.r,n=e.g,r=e.b,o={r:255*qe(t,255),g:255*qe(n,255),b:255*qe(r,255)},c=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):st(e.h)&&st(e.s)&&st(e.v)?(a=et(e.s),s=et(e.v),o=function(e,t,n){e=6*qe(e,360),t=qe(t,100),n=qe(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6;return{r:255*[n,a,i,i,s,n][l],g:255*[s,n,n,a,i,i][l],b:255*[i,i,s,n,n,a][l]}}(e.h,a,s),c=!0,u="hsv"):st(e.h)&&st(e.s)&&st(e.l)&&(a=et(e.s),l=et(e.l),o=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=qe(e,360),t=qe(t,100),n=qe(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),o=a(l,s,e),i=a(l,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,a,l),c=!0,u="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=Xe(i),{ok:c,format:e.format||u,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:i}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Me(e,t,n){e=qe(e,255),t=qe(t,255),n=qe(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var l=i-a;switch(o=s>.5?l/(2-i-a):l/(i+a),i){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(De(r));return i}function $e(e,t){t=t||6;for(var n=De(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(De({h:r,s:o,v:i})),i=(i+s)%1;return a}De.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=Xe(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ie(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ie(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Me(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Me(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Te(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[Qe(Math.round(e).toString(16)),Qe(Math.round(t).toString(16)),Qe(Math.round(n).toString(16)),Qe(tt(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*qe(this._r,255))+"%",g:Math.round(100*qe(this._g,255))+"%",b:Math.round(100*qe(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*qe(this._r,255))+"%, "+Math.round(100*qe(this._g,255))+"%, "+Math.round(100*qe(this._b,255))+"%)":"rgba("+Math.round(100*qe(this._r,255))+"%, "+Math.round(100*qe(this._g,255))+"%, "+Math.round(100*qe(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Ze[Te(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Re(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=De(e);n="#"+Re(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return De(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Fe,arguments)},brighten:function(){return this._applyModification(Be,arguments)},darken:function(){return this._applyModification(He,arguments)},desaturate:function(){return this._applyModification(Le,arguments)},saturate:function(){return this._applyModification(Ae,arguments)},greyscale:function(){return this._applyModification(Ne,arguments)},spin:function(){return this._applyModification(Ve,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Ge,arguments)},complement:function(){return this._applyCombination(ze,arguments)},monochromatic:function(){return this._applyCombination($e,arguments)},splitcomplement:function(){return this._applyCombination(We,arguments)},triad:function(){return this._applyCombination(Ue,[3])},tetrad:function(){return this._applyCombination(Ue,[4])}},De.fromRatio=function(e,t){if("object"==ke(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:et(e[r]));e=n}return De(e,t)},De.equals=function(e,t){return!(!e||!t)&&De(e).toRgbString()==De(t).toRgbString()},De.random=function(){return De.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},De.mix=function(e,t,n){n=0===n?0:n||50;var r=De(e).toRgb(),o=De(t).toRgb(),i=n/100;return De({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},De.readability=function(e,t){var n=De(e),r=De(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},De.isReadable=function(e,t,n){var r,o,i,a,s,l=De.readability(e,t);switch(o=!1,(i=n,"AA"!==(a=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},De.mostReadable=function(e,t,n){var r,o,i,a,s=null,l=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var c=0;cl&&(l=r,s=De(t[c]));return De.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,De.mostReadable(e,["#fff","#000"],n))};var Ke=De.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ze=De.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Ke);function Xe(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function qe(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Je(e){return Math.min(1,Math.max(0,e))}function Ye(e){return parseInt(e,16)}function Qe(e){return 1==e.length?"0"+e:""+e}function et(e){return e<=1&&(e=100*e+"%"),e}function tt(e){return Math.round(255*parseFloat(e)).toString(16)}function nt(e){return Ye(e)/255}var rt,ot,it,at=(ot="[\\s|\\(]+("+(rt="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+rt+")[,|\\s]+("+rt+")\\s*\\)?",it="[\\s|\\(]+("+rt+")[,|\\s]+("+rt+")[,|\\s]+("+rt+")[,|\\s]+("+rt+")\\s*\\)?",{CSS_UNIT:new RegExp(rt),rgb:new RegExp("rgb"+ot),rgba:new RegExp("rgba"+it),hsl:new RegExp("hsl"+ot),hsla:new RegExp("hsla"+it),hsv:new RegExp("hsv"+ot),hsva:new RegExp("hsva"+it),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function st(e){return!!at.CSS_UNIT.exec(e)}var lt=function(e){var t=0,n=0;return _e()(["r","g","b","a","h","s","l","v"],(function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)})),t===n&&e},ct=function(e,t){var n=e.hex?De(e.hex):De(e),r=n.toHsl(),o=n.toHsv(),i=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===a&&0===i.a?"transparent":"#"+a,rgb:i,hsv:o,oldHue:e.h||t||r.h,source:e.source}},ut=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&De(e).isValid()},dt=function(e){if(!e)return"#fff";var t=ct(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},pt=function(e,t){return De(t+" ("+e.replace("°","")+")")._ok},ft=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var o=arguments.length,i=Array(o),a=0;a1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(hr()(e.s)?n.props.hsl.s:e.s),l:Number(hr()(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),vr(t,[{key:"render",value:function(){var e=this,t=(0,$.ZP)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(se,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(se,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i().createElement("div",{style:t.wrap,className:"flexbox-fix"},n,i().createElement("div",{style:t.toggle},i().createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},i().createElement(gr.Z,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(i().Component);br.defaultProps={view:"hex"};var mr=br,yr=function(){var e=(0,$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i().createElement("div",{style:e.picker})},wr=function(){var e=(0,$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i().createElement("div",{style:e.picker})},xr=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,o=e.rgb,a=e.hsl,s=e.hsv,l=e.hex,c=e.renderers,u=e.styles,d=void 0===u?{}:u,p=e.className,f=void 0===p?"":p,h=e.defaultView,g=(0,$.ZP)(ge()({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:r});return i().createElement("div",{style:g.picker,className:"chrome-picker "+f},i().createElement("div",{style:g.saturation},i().createElement(Oe,{style:g.Saturation,hsl:a,hsv:s,pointer:wr,onChange:n})),i().createElement("div",{style:g.body},i().createElement("div",{style:g.controls,className:"flexbox-fix"},i().createElement("div",{style:g.color},i().createElement("div",{style:g.swatch},i().createElement("div",{style:g.active}),i().createElement(J,{renderers:c}))),i().createElement("div",{style:g.toggles},i().createElement("div",{style:g.hue},i().createElement(de,{style:g.Hue,hsl:a,pointer:yr,onChange:n})),i().createElement("div",{style:g.alpha},i().createElement(ne,{style:g.Alpha,rgb:o,hsl:a,pointer:yr,renderers:c,onChange:n})))),i().createElement(mr,{rgb:o,hsl:a,hex:l,view:h,onChange:n,disableAlpha:r})))};xr.propTypes={width:fe().oneOfType([fe().string,fe().number]),disableAlpha:fe().bool,styles:fe().object,defaultView:fe().oneOf(["hex","rgb","hsl"])},xr.defaultProps={width:225,disableAlpha:!1,styles:{}},gt(xr);var Or=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,a=e.active,s=(0,$.ZP)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:dt(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return i().createElement(wt,{style:s.color,color:t,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},i().createElement("div",{style:s.dot}))},Er=function(e){var t=e.hex,n=e.rgb,r=e.onChange,o=(0,$.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return i().createElement("div",{style:o.fields,className:"flexbox-fix"},i().createElement("div",{style:o.active}),i().createElement(se,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:a}),i().createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:a}),i().createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:a}),i().createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:a}))},Cr=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,o=e.hex,a=e.rgb,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,d=(0,$.ZP)(ge()({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),p=function(e,n){e.hex?ut(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return i().createElement(be,{style:d.Compact,styles:l},i().createElement("div",{style:d.compact,className:"compact-picker "+u},i().createElement("div",null,Ct()(r,(function(e){return i().createElement(Or,{key:e,color:e,active:e.toLowerCase()===o,onClick:p,onSwatchHover:n})})),i().createElement("div",{style:d.clear})),i().createElement(Er,{hex:o,rgb:a,onChange:p})))};Cr.propTypes={colors:fe().arrayOf(fe().string),styles:fe().object},Cr.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},gt(Cr);var Sr=(0,$.tz)((function(e){var t=e.hover,n=e.color,r=e.onClick,o=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=(0,$.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:t});return i().createElement("div",{style:s.swatch},i().createElement(wt,{color:n,onClick:r,onHover:o,focusStyle:a}))})),_r=function(e){var t=e.width,n=e.colors,r=e.onChange,o=e.onSwatchHover,a=e.triangle,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,d=(0,$.ZP)(ge()({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===a,"top-left-triangle":"top-left"===a,"top-right-triangle":"top-right"===a,"bottom-left-triangle":"bottom-left"===a,"bottom-right-triangle":"bottom-right"===a}),p=function(e,t){return r({hex:e,source:"hex"},t)};return i().createElement("div",{style:d.card,className:"github-picker "+u},i().createElement("div",{style:d.triangleShadow}),i().createElement("div",{style:d.triangle}),Ct()(n,(function(e){return i().createElement(Sr,{color:e,key:e,onClick:p,onSwatchHover:o})})))};_r.propTypes={width:fe().oneOfType([fe().string,fe().number]),colors:fe().arrayOf(fe().string),triangle:fe().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:fe().object},_r.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},gt(_r);var kr=Object.assign||function(e){for(var t=1;t.5});return i().createElement("div",{style:n.picker})},Mr=function(){var e=(0,$.ZP)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i().createElement("div",{style:e.pointer},i().createElement("div",{style:e.left},i().createElement("div",{style:e.leftInside})),i().createElement("div",{style:e.right},i().createElement("div",{style:e.rightInside})))},Ir=function(e){var t=e.onClick,n=e.label,r=e.children,o=e.active,a=(0,$.ZP)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return i().createElement("div",{style:a.button,onClick:t},n||r)},Tr=function(e){var t=e.rgb,n=e.currentColor,r=(0,$.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i().createElement("div",null,i().createElement("div",{style:r.label},"new"),i().createElement("div",{style:r.swatches},i().createElement("div",{style:r.new}),i().createElement("div",{style:r.current})),i().createElement("div",{style:r.label},"current"))},Rr=function(){function e(e,t){for(var n=0;n100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},o))};return i().createElement("div",{style:s.fields,className:"flexbox-fix"},i().createElement("div",{style:s.double},i().createElement(se,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:l})),i().createElement("div",{style:s.single},i().createElement(se,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:s.single},i().createElement(se,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:s.single},i().createElement(se,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:s.alpha},i().createElement(se,{style:{input:s.input,label:s.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},Nr=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var io=["className"];function ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var so=function(e){var t=e.className,n=oo(e,io);return(0,o.createElement)("button",function(e){for(var t=1;t{t.current=e})),(0,o.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{n.current!==e&&(n.current=e)}),t),n}function ui(e,t){const n=(0,o.useRef)();return(0,o.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function di(e){const t=li(e),n=(0,o.useRef)(null),r=(0,o.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function pi(e){const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current}let fi={};function hi(e,t){return(0,o.useMemo)((()=>{if(t)return t;const n=null==fi[e]?0:fi[e]+1;return fi[e]=n,e+"-"+n}),[e,t])}function gi(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const vi=gi(1),bi=gi(-1);function mi(e){if(!e)return!1;const{KeyboardEvent:t}=ni(e.target);return t&&e instanceof t}function yi(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ni(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const wi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[wi.Translate.toString(e),wi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),xi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Oi(e){return e.matches(xi)?e:e.querySelector(xi)}const Ei={display:"none"};function Ci(e){let{id:t,value:n}=e;return i().createElement("div",{id:t,style:Ei},n)}function Si(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return i().createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const _i=(0,o.createContext)(null),ki={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},ji={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Pi(e){let{announcements:t=ji,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=ki}=e;const{announce:s,announcement:l}=function(){const[e,t]=(0,o.useState)("");return{announce:(0,o.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),c=hi("DndLiveRegion"),[u,d]=(0,o.useState)(!1);if((0,o.useEffect)((()=>{d(!0)}),[]),function(e){const t=(0,o.useContext)(_i);(0,o.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}((0,o.useMemo)((()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&s(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;s(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;s(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;s(t.onDragCancel({active:n,over:r}))}})),[s,t])),!u)return null;const p=i().createElement(i().Fragment,null,i().createElement(Ci,{id:r,value:a.draggable}),i().createElement(Si,{id:c,announcement:l}));return n?(0,Yo.createPortal)(p,n):p}var Di;function Mi(){}function Ii(e,t){return(0,o.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Di||(Di={}));const Ti=Object.freeze({x:0,y:0});function Ri(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Li(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Ai(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ni(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Fi(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function Bi(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Hi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Bi(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ri(Bi(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Li)};function Vi(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=Vi(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Ai)};function Ui(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ti}function Wi(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const Gi=Wi(1);const $i={ignoreTransform:!1};function Ki(e,t){void 0===t&&(t=$i);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=ni(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:s,right:l}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:l}}function Zi(e){return Ki(e,{ignoreTransform:!0})}function Xi(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(ri(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!oi(o)||ii(o))return n;if(n.includes(o))return n;const i=ni(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=ni(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=ni(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function qi(e){const[t]=Xi(e,1);return null!=t?t:null}function Ji(e){return Qo&&e?ei(e)?e:ti(e)?ri(e)||e===ai(e).scrollingElement?window:oi(e)?e:null:null:null}function Yi(e){return ei(e)?e.scrollX:e.scrollLeft}function Qi(e){return ei(e)?e.scrollY:e.scrollTop}function ea(e){return{x:Yi(e),y:Qi(e)}}var ta;function na(e){return!(!Qo||!e)&&e===document.scrollingElement}function ra(e){const t={x:0,y:0},n=na(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ta||(ta={}));const oa={x:.2,y:.2};function ia(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=oa);const{isTop:c,isBottom:u,isLeft:d,isRight:p}=ra(e),f={x:0,y:0},h={x:0,y:0},g=t.height*o.y,v=t.width*o.x;return!c&&i<=t.top+g?(f.y=ta.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!u&&l>=t.bottom-g&&(f.y=ta.Forward,h.y=r*Math.abs((t.bottom-g-l)/g)),!p&&s>=t.right-v?(f.x=ta.Forward,h.x=r*Math.abs((t.right-v-s)/v)):!d&&a<=t.left+v&&(f.x=ta.Backward,h.x=r*Math.abs((t.left+v-a)/v)),{direction:f,speed:h}}function aa(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function sa(e){return e.reduce(((e,t)=>vi(e,ea(t))),Ti)}const la=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Yi(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Qi(t)),0)}]];class ca{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Xi(t),r=sa(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of la)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ua{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function da(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var pa,fa;function ha(e){e.preventDefault()}function ga(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(pa||(pa={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(fa||(fa={}));const va={start:[fa.Space,fa.Enter],cancel:[fa.Esc],end:[fa.Space,fa.Enter]},ba=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case fa.Right:return{...n,x:n.x+25};case fa.Left:return{...n,x:n.x-25};case fa.Down:return{...n,y:n.y+25};case fa.Up:return{...n,y:n.y-25}}};class ma{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ua(ai(t)),this.windowListeners=new ua(ni(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pa.Resize,this.handleCancel),this.windowListeners.add(pa.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(pa.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Ki),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);qi(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Ti)}handleKeyDown(e){if(mi(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=va,coordinateGetter:i=ba,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Ti;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=bi(u,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:p}=ra(n),f=aa(n),h={x:Math.min(o===fa.Right?f.right-f.width/2:f.right,Math.max(o===fa.Right?f.left:f.left+f.width/2,u.x)),y:Math.min(o===fa.Down?f.bottom-f.height/2:f.bottom,Math.max(o===fa.Down?f.top:f.top+f.height/2,u.y))},g=o===fa.Right&&!s||o===fa.Left&&!l,v=o===fa.Down&&!c||o===fa.Up&&!i;if(g&&h.x!==u.x){const e=n.scrollLeft+t.x,i=o===fa.Right&&e<=d.x||o===fa.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===fa.Right?n.scrollLeft-d.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(v&&h.y!==u.y){const e=n.scrollTop+t.y,i=o===fa.Down&&e<=d.y||o===fa.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===fa.Down?n.scrollTop-d.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,vi(bi(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ya(e){return Boolean(e&&"distance"in e)}function wa(e){return Boolean(e&&"delay"in e)}ma.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=va,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class xa{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=ni(e);return e instanceof t?e:ai(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=ai(i),this.documentListeners=new ua(this.document),this.listeners=new ua(n),this.windowListeners=new ua(ni(i)),this.initialCoordinates=null!=(r=yi(o))?r:Ti,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(pa.Resize,this.handleCancel),this.windowListeners.add(pa.DragStart,ha),this.windowListeners.add(pa.VisibilityChange,this.handleCancel),this.windowListeners.add(pa.ContextMenu,ha),this.documentListeners.add(pa.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wa(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(ya(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(pa.Click,ga,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pa.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=yi(e))?t:Ti,l=bi(r,s);if(!n&&a){if(ya(a)){if(null!=a.tolerance&&da(l,a.tolerance))return this.handleCancel();if(da(l,a.distance))return this.handleStart()}return wa(a)&&da(l,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===fa.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Oa={move:{name:"pointermove"},end:{name:"pointerup"}};class Ea extends xa{constructor(e){const{event:t}=e,n=ai(t.target);super(e,Oa,n)}}Ea.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const Ca={move:{name:"mousemove"},end:{name:"mouseup"}};var Sa;!function(e){e[e.RightClick=2]="RightClick"}(Sa||(Sa={})),class extends xa{constructor(e){super(e,Ca,ai(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Sa.RightClick&&(null==r||r({event:n}),!0)}}];const _a={move:{name:"touchmove"},end:{name:"touchend"}};var ka,ja;(class extends xa{constructor(e){super(e,_a)}static setup(){return window.addEventListener(_a.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(_a.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ka||(ka={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ja||(ja={}));const Pa={x:{[ta.Backward]:!1,[ta.Forward]:!1},y:{[ta.Backward]:!1,[ta.Forward]:!1}};var Da,Ma;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Da||(Da={})),function(e){e.Optimized="optimized"}(Ma||(Ma={}));const Ia=new Map;function Ta(e,t){return ui((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ra(e){let{callback:t,disabled:n}=e;const r=li(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function La(e){return new ca(Ki(e),e)}function Aa(e,t,n){void 0===t&&(t=La);const[r,i]=(0,o.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),a=function(e){let{callback:t,disabled:n}=e;const r=li(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=Ra({callback:i});return si((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),r}const Na=[];function Fa(e,t){void 0===t&&(t=[]);const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{n.current=null}),t),(0,o.useEffect)((()=>{const t=e!==Ti;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?bi(e,n.current):Ti}function Ba(e){return(0,o.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ha=[];const Va=[{sensor:Ea,options:{}},{sensor:ma,options:{}}],za={current:{}},Ua={draggable:{measure:Zi},droppable:{measure:Zi,strategy:Da.WhileDragging,frequency:Ma.Optimized},dragOverlay:{measure:Ki}};class Wa extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ga={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Wa,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Mi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ua,measureDroppableContainers:Mi,windowRect:null,measuringScheduled:!1},$a={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Mi,draggableNodes:new Map,over:null,measureDroppableContainers:Mi},Ka=(0,o.createContext)($a),Za=(0,o.createContext)(Ga);function Xa(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Wa}}}function qa(e,t){switch(t.type){case Di.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Di.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Di.DragEnd:case Di.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Di.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Wa(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Di.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Wa(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Di.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Wa(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ja(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=(0,o.useContext)(Ka),a=pi(r),s=pi(null==n?void 0:n.id);return(0,o.useEffect)((()=>{if(!t&&!r&&a&&null!=s){if(!mi(a))return;if(document.activeElement===a.target)return;const e=i.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Oi(e);if(t){t.focus();break}}}))}}),[r,t,i,s,a]),null}const Ya=(0,o.createContext)({...Ti,scaleX:1,scaleY:1});var Qa;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Qa||(Qa={}));const es=(0,o.memo)((function(e){var t,n,r,a;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:d=Va,collisionDetection:p=zi,measuring:f,modifiers:h,...g}=e;const v=(0,o.useReducer)(qa,void 0,Xa),[b,m]=v,[y,w]=function(){const[e]=(0,o.useState)((()=>new Set)),t=(0,o.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]),n=(0,o.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]);return[n,t]}(),[x,O]=(0,o.useState)(Qa.Uninitialized),E=x===Qa.Initialized,{draggable:{active:C,nodes:S,translate:_},droppable:{containers:k}}=b,j=C?S.get(C):null,P=(0,o.useRef)({initial:null,translated:null}),D=(0,o.useMemo)((()=>{var e;return null!=C?{id:C,data:null!=(e=null==j?void 0:j.data)?e:za,rect:P}:null}),[C,j]),M=(0,o.useRef)(null),[I,T]=(0,o.useState)(null),[R,L]=(0,o.useState)(null),A=ci(g,Object.values(g)),N=hi("DndDescribedBy",s),F=(0,o.useMemo)((()=>k.getEnabled()),[k]),B=(H=f,(0,o.useMemo)((()=>({draggable:{...Ua.draggable,...null==H?void 0:H.draggable},droppable:{...Ua.droppable,...null==H?void 0:H.droppable},dragOverlay:{...Ua.dragOverlay,...null==H?void 0:H.dragOverlay}})),[null==H?void 0:H.draggable,null==H?void 0:H.droppable,null==H?void 0:H.dragOverlay]));var H;const{droppableRects:V,measureDroppableContainers:z,measuringScheduled:U}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=(0,o.useState)(null),{frequency:l,measure:c,strategy:u}=i,d=(0,o.useRef)(e),p=function(){switch(u){case Da.Always:return!1;case Da.BeforeDragging:return n;default:return!n}}(),f=ci(p),h=(0,o.useCallback)((function(e){void 0===e&&(e=[]),f.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[f]),g=(0,o.useRef)(null),v=ui((t=>{if(p&&!n)return Ia;if(!t||t===Ia||d.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new ca(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,a,n,p,c]);return(0,o.useEffect)((()=>{d.current=e}),[e]),(0,o.useEffect)((()=>{p||h()}),[n,p]),(0,o.useEffect)((()=>{a&&a.length>0&&s(null)}),[JSON.stringify(a)]),(0,o.useEffect)((()=>{p||"number"!=typeof l||null!==g.current||(g.current=setTimeout((()=>{h(),g.current=null}),l))}),[l,p,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:null!=a}}(F,{dragging:E,dependencies:[_.x,_.y],config:B.droppable}),W=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return ui((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(S,C),G=(0,o.useMemo)((()=>R?yi(R):null),[R]),$=function(){const e=!1===(null==I?void 0:I.autoScrollEnabled),t="object"==typeof c?!1===c.enabled:!1===c,n=E&&!e&&!t;return"object"==typeof c?{...c,enabled:n}:{enabled:n}}(),K=function(e,t){return Ta(e,t)}(W,B.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=(0,o.useRef)(!1),{x:s,y:l}="boolean"==typeof i?{x:i,y:i}:i;si((()=>{if(!s&&!l||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=Ui(n(e),r);if(s||(o.x=0),l||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=qi(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,s,l,r,n])}({activeNode:C?S.get(C):null,config:$.layoutShiftCompensation,initialRect:K,measure:B.draggable.measure});const Z=Aa(W,B.draggable.measure,K),X=Aa(W?W.parentElement:null),q=(0,o.useRef)({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),J=k.getNodeFor(null==(t=q.current.over)?void 0:t.id),Y=function(e){let{measure:t}=e;const[n,r]=(0,o.useState)(null),i=Ra({callback:(0,o.useCallback)((e=>{for(const{target:n}of e)if(oi(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),a=(0,o.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return oi(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[s,l]=di(a);return(0,o.useMemo)((()=>({nodeRef:s,rect:n,setRef:l})),[n,s,l])}({measure:B.dragOverlay.measure}),Q=null!=(n=Y.nodeRef.current)?n:W,ee=E?null!=(r=Y.rect)?r:Z:null,te=Boolean(Y.nodeRef.current&&Y.rect),ne=Ui(re=te?null:Z,Ta(re));var re;const oe=Ba(Q?ni(Q):null),ie=function(e){const t=(0,o.useRef)(e),n=ui((n=>e?n&&n!==Na&&e&&t.current&&e.parentNode===t.current.parentNode?n:Xi(e):Na),[e]);return(0,o.useEffect)((()=>{t.current=e}),[e]),n}(E?null!=J?J:W:null),ae=function(e,t){void 0===t&&(t=Ki);const[n]=e,r=Ba(n?ni(n):null),[i,a]=(0,o.useReducer)((function(){return e.length?e.map((e=>na(e)?r:new ca(t(e),e))):Ha}),Ha),s=Ra({callback:a});return e.length>0&&i===Ha&&a(),si((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),a())}),[e]),i}(ie),se=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(h,{transform:{x:_.x-ne.x,y:_.y-ne.y,scaleX:1,scaleY:1},activatorEvent:R,active:D,activeNodeRect:Z,containerNodeRect:X,draggingNodeRect:ee,over:q.current.over,overlayNodeRect:Y.rect,scrollableAncestors:ie,scrollableAncestorRects:ae,windowRect:oe}),le=G?vi(G,_):null,ce=function(e){const[t,n]=(0,o.useState)(null),r=(0,o.useRef)(e),i=(0,o.useCallback)((e=>{const t=Ji(e.target);t&&n((e=>e?(e.set(t,ea(t)),new Map(e)):null))}),[]);return(0,o.useEffect)((()=>{const t=r.current;if(e!==t){o(t);const a=e.map((e=>{const t=Ji(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,ea(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach((e=>{const t=Ji(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,o.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>vi(e,t)),Ti):sa(e):Ti),[e,t])}(ie),ue=Fa(ce),de=Fa(ce,[Z]),pe=vi(se,ue),fe=ee?Gi(ee,se):null,he=D&&fe?p({active:D,collisionRect:fe,droppableRects:V,droppableContainers:F,pointerCoordinates:le}):null,ge=Fi(he,"id"),[ve,be]=(0,o.useState)(null),me=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(te?se:vi(se,de),null!=(a=null==ve?void 0:ve.rect)?a:null,Z),ye=(0,o.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==M.current)return;const o=S.get(M.current);if(!o)return;const i=e.nativeEvent,a=new n({active:M.current,activeNode:o,event:i,options:r,context:q,onStart(e){const t=M.current;if(null==t)return;const n=S.get(t);if(!n)return;const{onDragStart:r}=A.current,o={active:{id:t,data:n.data,rect:P}};(0,Yo.unstable_batchedUpdates)((()=>{null==r||r(o),O(Qa.Initializing),m({type:Di.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o})}))},onMove(e){m({type:Di.DragMove,coordinates:e})},onEnd:s(Di.DragEnd),onCancel:s(Di.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=q.current;let a=null;if(t&&o){const{cancelDrop:s}=A.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Di.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Di.DragCancel)}M.current=null,(0,Yo.unstable_batchedUpdates)((()=>{m({type:e}),O(Qa.Uninitialized),be(null),T(null),L(null);const t=e===Di.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=A.current[t];null==e||e(a),y({type:t,event:a})}}))}}(0,Yo.unstable_batchedUpdates)((()=>{T(a),L(e.nativeEvent)}))}),[S]),we=(0,o.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=S.get(r);if(null!==M.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},M.current=r,ye(n,t))}),[S,ye]),xe=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(d,we);!function(e){(0,o.useEffect)((()=>{if(!Qo)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(d),si((()=>{Z&&x===Qa.Initializing&&O(Qa.Initialized)}),[Z,x]),(0,o.useEffect)((()=>{const{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:o}=q.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:pe.x,y:pe.y},over:o};(0,Yo.unstable_batchedUpdates)((()=>{null==e||e(i),y({type:"onDragMove",event:i})}))}),[pe.x,pe.y]),(0,o.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=q.current;if(!e||null==M.current||!t||!o)return;const{onDragOver:i}=A.current,a=r.get(ge),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,Yo.unstable_batchedUpdates)((()=>{be(s),null==i||i(l),y({type:"onDragOver",event:l})}))}),[ge]),si((()=>{q.current={activatorEvent:R,active:D,activeNode:W,collisionRect:fe,collisions:he,droppableRects:V,draggableNodes:S,draggingNode:Q,draggingNodeRect:ee,droppableContainers:k,over:ve,scrollableAncestors:ie,scrollAdjustedTranslate:pe},P.current={initial:ee,translated:fe}}),[D,W,he,fe,S,Q,ee,V,k,ve,ie,pe]),function(e){let{acceleration:t,activator:n=ka.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=ja.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:p,threshold:f}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=pi(t);return ui((e=>{if(n||!r||!e)return Pa;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[ta.Backward]:e.x[ta.Backward]||-1===o,[ta.Forward]:e.x[ta.Forward]||1===o},y:{[ta.Backward]:e.y[ta.Backward]||-1===i,[ta.Forward]:e.y[ta.Forward]||1===i}}}),[n,t,r])}({delta:p,disabled:!a}),[g,v]=function(){const e=(0,o.useRef)(null);return[(0,o.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,o.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),b=(0,o.useRef)({x:0,y:0}),m=(0,o.useRef)({x:0,y:0}),y=(0,o.useMemo)((()=>{switch(n){case ka.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case ka.DraggableRect:return i}}),[n,i,c]),w=(0,o.useRef)(null),x=(0,o.useCallback)((()=>{const e=w.current;if(!e)return;const t=b.current.x*m.current.x,n=b.current.y*m.current.y;e.scrollBy(t,n)}),[]),O=(0,o.useMemo)((()=>l===ja.TreeOrder?[...u].reverse():u),[l,u]);(0,o.useEffect)((()=>{if(a&&u.length&&y){for(const e of O){if(!1===(null==r?void 0:r(e)))continue;const n=u.indexOf(e),o=d[n];if(!o)continue;const{direction:i,speed:a}=ia(e,o,y,t,f);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return v(),w.current=e,g(x,s),b.current=a,void(m.current=i)}b.current={x:0,y:0},m.current={x:0,y:0},v()}else v()}),[t,x,r,v,a,s,JSON.stringify(y),JSON.stringify(h),g,u,O,d,JSON.stringify(f)])}({...$,delta:_,draggingRect:fe,pointerCoordinates:le,scrollableAncestors:ie,scrollableAncestorRects:ae});const Oe=(0,o.useMemo)((()=>({active:D,activeNode:W,activeNodeRect:Z,activatorEvent:R,collisions:he,containerNodeRect:X,dragOverlay:Y,draggableNodes:S,droppableContainers:k,droppableRects:V,over:ve,measureDroppableContainers:z,scrollableAncestors:ie,scrollableAncestorRects:ae,measuringConfiguration:B,measuringScheduled:U,windowRect:oe})),[D,W,Z,R,he,X,Y,S,k,V,ve,z,ie,ae,B,U,oe]),Ee=(0,o.useMemo)((()=>({activatorEvent:R,activators:xe,active:D,activeNodeRect:Z,ariaDescribedById:{draggable:N},dispatch:m,draggableNodes:S,over:ve,measureDroppableContainers:z})),[R,xe,D,Z,m,N,S,ve,z]);return i().createElement(_i.Provider,{value:w},i().createElement(Ka.Provider,{value:Ee},i().createElement(Za.Provider,{value:Oe},i().createElement(Ya.Provider,{value:me},u)),i().createElement(Ja,{disabled:!1===(null==l?void 0:l.restoreFocus)})),i().createElement(Pi,{...l,hiddenTextDescribedById:N}))})),ts=(0,o.createContext)(null),ns="button",rs="Droppable";const os={timeout:25};function is(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function as(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function ss(e){return null!==e&&e>=0}const ls=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=is(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},cs="Sortable",us=i().createContext({activeIndex:-1,containerId:cs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ls,disabled:{draggable:!1,droppable:!1}});function ds(e){let{children:t,id:n,items:r,strategy:a=ls,disabled:s=!1}=e;const{active:l,dragOverlay:c,droppableRects:u,over:d,measureDroppableContainers:p}=(0,o.useContext)(Za),f=hi(cs,n),h=Boolean(null!==c.rect),g=(0,o.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),v=null!=l,b=l?g.indexOf(l.id):-1,m=d?g.indexOf(d.id):-1,y=(0,o.useRef)(g),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{w&&v&&p(g)}),[w,g,v,p]),(0,o.useEffect)((()=>{y.current=g}),[g]);const E=(0,o.useMemo)((()=>({activeIndex:b,containerId:f,disabled:O,disableTransforms:x,items:g,overIndex:m,useDragOverlay:h,sortedRects:as(g,u),strategy:a})),[b,f,O.draggable,O.droppable,x,g,m,u,h,a]);return i().createElement(us.Provider,{value:E},t)}const ps=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return is(n,r,o).indexOf(t)},fs=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r||s!==i&&o===a||!n&&(a===o||t!==l))},hs={duration:200,easing:"ease"},gs="transform",vs=wi.Transition.toString({property:gs,duration:0,easing:"linear"}),bs={roleDescription:"sortable"};function ms(e){let{animateLayoutChanges:t=fs,attributes:n,disabled:r,data:i,getNewIndex:a=ps,id:s,strategy:l,resizeObserverConfig:c,transition:u=hs}=e;const{items:d,containerId:p,activeIndex:f,disabled:h,disableTransforms:g,sortedRects:v,overIndex:b,useDragOverlay:m,strategy:y}=(0,o.useContext)(us),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,h),x=d.indexOf(s),O=(0,o.useMemo)((()=>({sortable:{containerId:p,index:x,items:d},...i})),[p,i,x,d]),E=(0,o.useMemo)((()=>d.slice(d.indexOf(s))),[d,s]),{rect:C,node:S,isOver:_,setNodeRef:k}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=hi("Droppable"),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=(0,o.useContext)(Ka),d=(0,o.useRef)({disabled:n}),p=(0,o.useRef)(!1),f=(0,o.useRef)(null),h=(0,o.useRef)(null),{disabled:g,updateMeasurementsFor:v,timeout:b}={...os,...i},m=ci(null!=v?v:r),y=Ra({callback:(0,o.useCallback)((()=>{p.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null}),b)):p.current=!0}),[b]),disabled:g||!s}),w=(0,o.useCallback)(((e,t)=>{y&&(t&&(y.unobserve(t),p.current=!1),e&&y.observe(e))}),[y]),[x,O]=di(w),E=ci(t);return(0,o.useEffect)((()=>{y&&x.current&&(y.disconnect(),p.current=!1,y.observe(x.current))}),[x,y]),si((()=>(l({type:Di.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:f,data:E}}),()=>l({type:Di.UnregisterDroppable,key:a,id:r}))),[r]),(0,o.useEffect)((()=>{n!==d.current.disabled&&(l({type:Di.SetDroppableDisabled,id:r,key:a,disabled:n}),d.current.disabled=n)}),[r,a,n,l]),{active:s,rect:f,isOver:(null==c?void 0:c.id)===r,node:x,over:c,setNodeRef:O}}({id:s,data:O,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...c}}),{active:j,activatorEvent:P,activeNodeRect:D,attributes:M,setNodeRef:I,listeners:T,isDragging:R,over:L,setActivatorNodeRef:A,transform:N}=function(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=hi(rs),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:p,over:f}=(0,o.useContext)(Ka),{role:h=ns,roleDescription:g="draggable",tabIndex:v=0}=null!=i?i:{},b=(null==c?void 0:c.id)===t,m=(0,o.useContext)(b?Ya:ts),[y,w]=di(),[x,O]=di(),E=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),C=ci(n);return si((()=>(p.set(t,{id:t,key:a,node:y,activatorNode:x,data:C}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)})),[p,t]),{active:c,activatorEvent:l,activeNodeRect:u,attributes:(0,o.useMemo)((()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||h!==ns)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable})),[r,h,v,b,g,d.draggable]),isDragging:b,listeners:r?void 0:E,node:y,over:f,setNodeRef:w,setActivatorNodeRef:O,transform:m}}({id:s,data:O,attributes:{...bs,...n},disabled:w.draggable}),F=function(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach((t=>t(e)))}),t)}(k,I),B=Boolean(j),H=B&&!g&&ss(f)&&ss(b),V=!m&&R,z=V&&H?N:null,U=H?null!=z?z:(null!=l?l:y)({rects:v,activeNodeRect:D,activeIndex:f,overIndex:b,index:x}):null,W=ss(f)&&ss(b)?a({id:s,items:d,activeIndex:f,overIndex:b}):x,G=null==j?void 0:j.id,$=(0,o.useRef)({activeId:G,items:d,newIndex:W,containerId:p}),K=d!==$.current.items,Z=t({active:j,containerId:p,isDragging:R,isSorting:B,id:s,index:x,items:d,newIndex:$.current.newIndex,previousItems:$.current.items,previousContainerId:$.current.containerId,transition:u,wasDragging:null!=$.current.activeId}),X=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=(0,o.useState)(null),l=(0,o.useRef)(n);return si((()=>{if(!t&&n!==l.current&&r.current){const e=i.current;if(e){const t=Ki(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}n!==l.current&&(l.current=n)}),[t,n,r,i]),(0,o.useEffect)((()=>{a&&s(null)}),[a]),a}({disabled:!Z,index:x,node:S,rect:C});return(0,o.useEffect)((()=>{B&&$.current.newIndex!==W&&($.current.newIndex=W),p!==$.current.containerId&&($.current.containerId=p),d!==$.current.items&&($.current.items=d)}),[B,W,p,d]),(0,o.useEffect)((()=>{if(G===$.current.activeId)return;if(G&&!$.current.activeId)return void($.current.activeId=G);const e=setTimeout((()=>{$.current.activeId=G}),50);return()=>clearTimeout(e)}),[G]),{active:j,activeIndex:f,attributes:M,data:O,rect:C,index:x,newIndex:W,items:d,isOver:_,isSorting:B,isDragging:R,listeners:T,node:S,overIndex:b,over:L,setNodeRef:F,setActivatorNodeRef:A,setDroppableNodeRef:k,setDraggableNodeRef:I,transform:null!=X?X:U,transition:X||K&&$.current.newIndex===x?vs:V&&!mi(P)||!u?void 0:B||Z?wi.Transition.toString({...u,property:gs}):void 0}}function ys(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ws=[fa.Down,fa.Right,fa.Up,fa.Left],xs=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:a,scrollableAncestors:s}}=t;if(ws.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];i.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=o.get(n.id);if(i)switch(e.code){case fa.Down:r.topi.top&&t.push(n);break;case fa.Left:r.left>i.left&&t.push(n);break;case fa.Right:r.left{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ni(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ni(r),a=o.reduce(((e,t,r)=>e+Ri(n[r],t)),0),s=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:s}})}}return i.sort(Li)})({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let d=Fi(u,"id");if(d===(null==a?void 0:a.id)&&u.length>1&&(d=u[1].id),null!=d){const e=i.get(n.id),t=i.get(d),a=t?o.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&a&&e&&t){const n=Xi(u).some(((e,t)=>s[t]!==e)),o=Os(e,t),i=(c=t,!(!ys(l=e)||!ys(c))&&!!Os(l,c)&&l.data.current.sortable.index[...t].filter((e=>null!=e))),[...t])}(Ii(Ea),Ii(ma,{coordinateGetter:xs}));return i?Array.isArray(t)?(0,o.createElement)(j,null,(0,o.createElement)(es,{sensors:a,collisionDetection:Hi,onDragEnd:function(e){var r=e.active,o=e.over;if(r.id!==o.id){var i=t.indexOf(r.id),a=t.indexOf(o.id);n(is(t,i,a))}}},(0,o.createElement)(ds,{items:t},(0,o.createElement)("div",{className:"wcf-sortable-items"},t.map((function(e,t){return(0,o.createElement)(js,{key:e,id:e,index:t},r(e,t))})))))):null:(0,o.createElement)(j,null,t.map((function(e,t){return(0,o.createElement)("div",{key:e,id:e,index:t},r(e,t))})))},Ds=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Gf(Array.isArray(e)?e:[]).map((function(e){return delete e.__key,e}))};function Ms(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Is=i().forwardRef((function(e,t){var n=e.id,i=e.htmlId,a=void 0===i?function(e){return e}:i,s=e.label,l=e.group_level,c=void 0===l?0:l,u=e.custom_attributes,d=void 0===u?{}:u,p=e.onChange,f=e.className,h=e.appContext,g=Jf(e),v=g.value,b=g.currentValue,m=g.setCurrentValue;return(0,o.useEffect)((function(){p&&JSON.stringify(v)!==JSON.stringify(b)&&p(b)}),[p,v,b]),(0,o.createElement)("label",{htmlFor:a(n),className:y()(f)},0===c&&(0,o.createElement)("input",{type:"hidden",name:h.hooks.name(n),value:b?1:0}),(0,o.createElement)("input",function(e){for(var t=1;t0?Gs(tl,--Qs):0,Js--,10===el&&(Js=1,qs--),el}function il(){return el=Qs2||cl(el)>3?"":" "}function hl(e,t){for(;--t&&il()&&!(el<48||el>102||el>57&&el<65||el>70&&el<97););return ll(e,sl()+(t<6&&32==al()&&32==il()))}function gl(e){for(;il();)switch(el){case e:return Qs;case 34:case 39:34!==e&&39!==e&&gl(el);break;case 40:41===e&&gl(e);break;case 92:il()}return Qs}function vl(e,t){for(;il()&&e+el!==57&&(e+el!==84||47!==al()););return"/*"+ll(t,Qs-1)+"*"+Hs(47===e?e:il())}function bl(e){for(;!cl(al());)il();return ll(e,Qs)}var ml="-ms-",yl="-moz-",wl="-webkit-",xl="comm",Ol="rule",El="decl",Cl="@keyframes";function Sl(e,t){for(var n="",r=Zs(e),o=0;o0&&Ks(E)-d&&Xs(f>32?Ml(E+";",r,n,d-1):Ml(Us(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(Xs(O=Pl(E,t,n,c,u,o,s,y,w=[],x=[],d),i),123===m)if(0===u)jl(E,t,O,O,w,i,d,s,x);else switch(99===p&&110===Gs(E,3)?100:p){case 100:case 108:case 109:case 115:jl(e,O,O,r&&Xs(Pl(e,O,O,0,0,o,s,y,o,w=[],d),x),o,x,d,s,r?w:x);break;default:jl(E,O,O,O,[""],x,0,s,x)}}c=u=f=0,g=b=1,y=E="",d=a;break;case 58:d=1+Ks(E),f=h;default:if(g<1)if(123==m)--g;else if(125==m&&0==g++&&125==ol())continue;switch(E+=Hs(m),m*g){case 38:b=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(Ks(E)-1)*b,b=1;break;case 64:45===al()&&(E+=pl(il())),p=al(),u=d=Ks(y=E+=bl(sl())),m++;break;case 45:45===h&&2==Ks(E)&&(g=0)}}return i}function Pl(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=Zs(p),h=0,g=0,v=0;h0?p[b]+" "+m:Us(m,/&\f/g,p[b])))&&(l[v++]=y);return nl(e,t,n,0===o?Ol:s,l,c,u)}function Dl(e,t,n){return nl(e,t,n,xl,Hs(el),$s(e,2,-2),0)}function Ml(e,t,n,r){return nl(e,t,n,El,$s(e,0,r),$s(e,r+1,-1),r)}var Il=function(e,t,n){for(var r=0,o=0;r=o,o=al(),38===r&&12===o&&(t[n]=1),!cl(o);)il();return ll(e,Qs)},Tl=new WeakMap,Rl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Tl.get(n))&&!r){Tl.set(e,!0);for(var o=[],i=function(e,t){return dl(function(e,t){var n=-1,r=44;do{switch(cl(r)){case 0:38===r&&12===al()&&(t[n]=1),e[n]+=Il(Qs-1,t,n);break;case 2:e[n]+=pl(r);break;case 4:if(44===r){e[++n]=58===al()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Hs(r)}}while(r=il());return e}(ul(e),t))}(t,o),a=n.props,s=0,l=0;s6)switch(Gs(e,t+1)){case 109:if(45!==Gs(e,t+4))break;case 102:return Us(e,/(.+:)(.+)-([^]+)/,"$1"+wl+"$2-$3$1"+yl+(108==Gs(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ws(e,"stretch")?Al(Us(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Gs(e,t+1))break;case 6444:switch(Gs(e,Ks(e)-3-(~Ws(e,"!important")&&10))){case 107:return Us(e,":",":"+wl)+e;case 101:return Us(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+wl+(45===Gs(e,14)?"inline-":"")+"box$3$1"+wl+"$2$3$1"+ml+"$2box$3")+e}break;case 5936:switch(Gs(e,t+11)){case 114:return wl+e+ml+Us(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return wl+e+ml+Us(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return wl+e+ml+Us(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return wl+e+ml+e+e}return e}var Nl=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case El:e.return=Al(e.value,e.length);break;case Cl:return Sl([rl(e,{value:Us(e.value,"@","@"+wl)})],r);case Ol:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Sl([rl(e,{props:[Us(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Sl([rl(e,{props:[Us(t,/:(plac\w+)/,":"+wl+"input-$1")]}),rl(e,{props:[Us(t,/:(plac\w+)/,":-moz-$1")]}),rl(e,{props:[Us(t,/:(plac\w+)/,ml+"input-$1")]})],r)}return""}))}}],Fl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||Nl,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Xl}},Yl=!!o.useInsertionEffect&&o.useInsertionEffect,Ql=Yl||function(e){return e()},ec=(Yl||o.useLayoutEffect,{}.hasOwnProperty),tc=o.createContext("undefined"!=typeof HTMLElement?Fl({key:"css"}):null);tc.Provider;var nc=function(e){return(0,o.forwardRef)((function(t,n){var r=(0,o.useContext)(tc);return e(t,r,n)}))},rc=o.createContext({}),oc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ic=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Bl(t,n,r),Ql((function(){return function(e,t,n){Bl(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},ac=nc((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[oc],a=[r],s="";"string"==typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=Jl(a,void 0,o.useContext(rc));s+=t.key+"-"+l.name;var c={};for(var u in e)ec.call(e,u)&&"css"!==u&&u!==oc&&(c[u]=e[u]);return c.ref=n,c.className=s,o.createElement(o.Fragment,null,o.createElement(ic,{cache:t,serialized:l,isStringTag:"string"==typeof i}),o.createElement(i,c))})),sc=ac,lc=(n(8679),function(e,t){var n=arguments;if(null==t||!ec.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=sc,i[1]=function(e,t){var n={};for(var r in t)ec.call(t,r)&&(n[r]=t[r]);return n[oc]=e,n}(e,t);for(var a=2;a({x:e,y:e});function gc(e){return mc(e)?(e.nodeName||"").toLowerCase():"#document"}function vc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function bc(e){var t;return null==(t=(mc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function mc(e){return e instanceof Node||e instanceof vc(e).Node}function yc(e){return e instanceof Element||e instanceof vc(e).Element}function wc(e){return e instanceof HTMLElement||e instanceof vc(e).HTMLElement}function xc(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof vc(e).ShadowRoot)}function Oc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ec(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ec(e){return vc(e).getComputedStyle(e)}function Cc(e){const t=function(e){if("html"===gc(e))return e;const t=e.assignedSlot||e.parentNode||xc(e)&&e.host||bc(e);return xc(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(gc(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:wc(t)&&Oc(t)?t:Cc(t)}function Sc(e,t){var n;void 0===t&&(t=[]);const r=Cc(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=vc(r);return o?t.concat(i,i.visualViewport||[],Oc(r)?r:[]):t.concat(r,Sc(r))}function _c(e){return yc(e)?e:e.contextElement}function kc(e){const t=_c(e);if(!wc(t))return hc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=Ec(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wc(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=pc(n)!==i||pc(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?pc(n.width):n.width)/r,s=(i?pc(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const jc=hc(0);function Pc(e){const t=vc(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:jc}function Dc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=_c(e);let a=hc(1);t&&(r?yc(r)&&(a=kc(r)):a=kc(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==vc(e))&&t}(i,n,r)?Pc(i):hc(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=vc(i),t=r&&yc(r)?vc(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=kc(n),t=n.getBoundingClientRect(),r=Ec(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=vc(n).frameElement}}return p={width:u,height:d,x:l,y:c},{...p,top:p.y,left:p.x,right:p.x+p.width,bottom:p.y+p.height};var p}var Mc=o.useLayoutEffect,Ic=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Tc=function(){};function Rc(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Lc(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function Hc(e){return Bc(e)?window.pageYOffset:e.scrollTop}function Vc(e,t){Bc(e)?window.scrollTo(0,t):e.scrollTop=t}function zc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Tc,o=Hc(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;Vc(e,l),an.bottom?Vc(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=h)return{placement:"bottom",maxHeight:t};if(C>=h&&!a)return i&&zc(l,S,k),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&O>=r)return i&&zc(l,S,k),{placement:"bottom",maxHeight:a?O-y:C-y};if("auto"===o||a){var j=t,P=a?x:E;return P>=r&&(j=Math.min(P-y-s,t)),{placement:"top",maxHeight:j}}if("bottom"===o)return i&&Vc(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(E>=h&&!a)return i&&zc(l,_,k),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&x>=r){var D=t;return(!a&&E>=r||a&&x>=r)&&(D=a?x-w:E-w),i&&zc(l,_,k),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:m});h(o.maxHeight),b(o.placement),null==c||c(o.placement)}}),[r,i,a,s,n,c,m]),t({ref:d,placerProps:As(As({},e),{},{placement:v||nu(i),maxHeight:f})})},iu=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return As({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},au=iu,su=iu,lu=["size"],cu=["innerProps","isRtl","size"],uu={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},du=function(e){var t=e.size,n=oo(e,lu);return lc("svg",Ns({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:uu},n))},pu=function(e){return lc(du,Ns({size:20},e),lc("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},fu=function(e){return lc(du,Ns({size:20},e),lc("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hu=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return As({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},gu=hu,vu=hu,bu=function(){var e=cc.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Qc||(eu=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],tu||(tu=eu.slice(0)),Qc=Object.freeze(Object.defineProperties(eu,{raw:{value:Object.freeze(tu)}})))),mu=function(e){var t=e.delay,n=e.offset;return lc("span",{css:cc({animation:"".concat(bu," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},yu=["data"],wu=["innerRef","isDisabled","isHidden","inputClassName"],xu={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Ou={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":As({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},xu)},Eu=function(e){return As({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},xu)},Cu=function(e){var t=e.children,n=e.innerProps;return lc("div",n,t)},Su={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||lc(pu,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return lc("div",Ns({ref:o},Fc(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||lc(fu,null))},DownChevron:fu,CrossIcon:pu,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return lc("div",Ns({},Fc(e,"group",{group:!0}),s),lc(i,Ns({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),lc("div",null,t))},GroupHeading:function(e){var t=Nc(e);t.data;var n=oo(t,yu);return lc("div",Ns({},Fc(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return lc("span",Ns({},t,Fc(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Nc(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=oo(r,wu);return lc("div",Ns({},Fc(e,"input",{"input-container":!0}),{"data-value":n||""}),lc("input",Ns({className:t({input:!0},s),ref:o,style:Eu(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=oo(e,cu);return lc("div",Ns({},Fc(As(As({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),lc(mu,{delay:0,offset:n}),lc(mu,{delay:160,offset:!0}),lc(mu,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return lc("div",Ns({},Fc(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return lc("div",Ns({},Fc(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,a=e.menuPlacement,s=e.menuPosition,l=(0,o.useRef)(null),c=(0,o.useRef)(null),d=u((0,o.useState)(nu(a)),2),p=d[0],f=d[1],h=(0,o.useMemo)((function(){return{setPortalPlacement:f}}),[]),g=u((0,o.useState)(null),2),v=g[0],b=g[1],m=(0,o.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===s?0:window.pageYOffset,n=e[p]+t;n===(null==v?void 0:v.offset)&&e.left===(null==v?void 0:v.rect.left)&&e.width===(null==v?void 0:v.rect.width)||b({offset:n,rect:e})}}),[r,s,p,null==v?void 0:v.offset,null==v?void 0:v.rect.left,null==v?void 0:v.rect.width]);Mc((function(){m()}),[m]);var y=(0,o.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=_c(e),u=o||i?[...c?Sc(c):[],...Sc(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=bc(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-fc(u)+"px "+-fc(o.clientWidth-(c+d))+"px "+-fc(o.clientHeight-(u+p))+"px "+-fc(c)+"px",threshold:dc(0,uc(1,l))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let g=l?Dc(e):null;return l&&function t(){const r=Dc(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n(),g=r,p=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(r,l.current,m,{elementResize:"ResizeObserver"in window}))}),[r,m]);Mc((function(){y()}),[y]);var w=(0,o.useCallback)((function(e){l.current=e,y()}),[y]);if(!t&&"fixed"!==s||!v)return null;var x=lc("div",Ns({ref:w},Fc(As(As({},e),{},{offset:v.offset,position:s,rect:v.rect}),"menuPortal",{"menu-portal":!0}),i),n);return lc(ru.Provider,{value:h},t?(0,Yo.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=oo(e,Yc);return lc("div",Ns({},Fc(As(As({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=oo(e,Jc);return lc("div",Ns({},Fc(As(As({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return lc(l,{data:r,innerProps:As(As({},Fc(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},lc(c,{data:r,innerProps:As({},Fc(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),lc(u,{data:r,innerProps:As(As({},Fc(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:Cu,MultiValueLabel:Cu,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({role:"button"},n),t||lc(pu,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return lc("div",Ns({},Fc(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return lc("div",Ns({},Fc(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return lc("div",Ns({},Fc(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return lc("div",Ns({},Fc(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},_u=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var ku=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ju(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Iu=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,p=l.getOptionLabel,f=l.inputValue,h=l.isMulti,g=l.isOptionDisabled,v=l.isSearchable,b=l.menuIsOpen,m=l.options,y=l.screenReaderStatus,w=l.tabSelectsValue,x=l.isLoading,O=l["aria-label"],E=l["aria-live"],C=(0,o.useMemo)((function(){return As(As({},Mu),d||{})}),[d]),S=(0,o.useMemo)((function(){var e,n="";if(t&&C.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?p(c):"",d=o||a||void 0,f=d?d.map(p):[],h=As({isDisabled:c&&g(c,s),label:u,labels:f},t);n=C.onChange(h)}return n}),[t,C,g,s,p]),_=(0,o.useMemo)((function(){var e="",t=n||r,o=!!(n&&s&&s.includes(n));if(t&&C.onFocus){var a={focused:t,label:p(t),isDisabled:g(t,s),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:s,isAppleDevice:u};e=C.onFocus(a)}return e}),[n,r,p,g,C,i,s,u]),k=(0,o.useMemo)((function(){var e="";if(b&&m.length&&!x&&C.onFilter){var t=y({count:i.length});e=C.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,b,C,m,y,x]),j="initial-input-focus"===(null==t?void 0:t.action),P=(0,o.useMemo)((function(){var e="";if(C.guidance){var t=r?"value":b?"menu":"input";e=C.guidance({"aria-label":O,context:t,isDisabled:n&&g(n,s),isMulti:h,isSearchable:v,tabSelectsValue:w,isInitialFocus:j})}return e}),[O,n,r,h,g,v,b,C,s,w,j]),D=lc(o.Fragment,null,lc("span",{id:"aria-selection"},S),lc("span",{id:"aria-focused"},_),lc("span",{id:"aria-results"},k),lc("span",{id:"aria-guidance"},P));return lc(o.Fragment,null,lc(Du,{id:c},j&&D),lc(Du,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!j&&D))},Tu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Ru=new RegExp("["+Tu.map((function(e){return e.letters})).join("")+"]","g"),Lu={},Au=0;Au1?t-1:0),r=1;r0,g=d-p-c,v=!1;g>t&&s.current&&(r&&r(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>g?(n&&!s.current&&n(e),f.scrollTop=d,v=!0,s.current=!0):!h&&-t>c&&(i&&!l.current&&i(e),f.scrollTop=0,v=!0,l.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,i,a]),p=(0,o.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,o.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),h=(0,o.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),g=(0,o.useCallback)((function(e){if(e){var t=!!Zc&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}}),[h,f,p]),v=(0,o.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))}),[h,f,p]);return(0,o.useEffect)((function(){if(t){var e=u.current;return g(e),function(){v(e)}}}),[t,g,v]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),a=(0,o.useRef)(null),s=(0,o.useCallback)((function(e){if(Ju){var t=document.body,n=t&&t.style;if(r&&Gu.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Yu<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys($u).forEach((function(e){var t=$u[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&qu()&&(t.addEventListener("touchmove",Ku,Qu),e&&(e.addEventListener("touchstart",Xu,Qu),e.addEventListener("touchmove",Zu,Qu))),Yu+=1}}),[r]),l=(0,o.useCallback)((function(e){if(Ju){var t=document.body,n=t&&t.style;Yu=Math.max(Yu-1,0),r&&Yu<1&&Gu.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&qu()&&(t.removeEventListener("touchmove",Ku,Qu),e&&(e.removeEventListener("touchstart",Xu,Qu),e.removeEventListener("touchmove",Zu,Qu)))}}),[r]);return(0,o.useEffect)((function(){if(t){var e=a.current;return s(e),function(){l(e)}}}),[t,s,l]),function(e){a.current=e}}({isEnabled:n});return lc(o.Fragment,null,n&&lc("div",{onClick:ed,css:td}),t((function(e){i(e),a(e)})))}var rd={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},od=function(e){var t=e.name,n=e.onFocus;return lc("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:rd,value:"",onChange:function(){}})};function id(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function ad(){return id(/^Mac/i)}var sd={clearIndicator:vu,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return As({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:gu,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return As({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return As({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return As(As({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Ou),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return As({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:su,menu:function(e,t){var n,o=e.placement,i=e.theme,a=i.borderRadius,s=i.spacing,l=i.colors;return As((r(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),r(n,"position","absolute"),r(n,"width","100%"),r(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return As({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return As({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return As({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return As({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:au,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return As({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return As({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return As({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return As({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},ld={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},cd={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Wc(),captureMenuScroll:!Wc(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=As({ignoreCase:!0,ignoreAccents:!0,stringify:zu,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?Vu(t):t,c=a?Vu(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=Hu(l),c=Bu(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ud(e,t,n,r){return{type:"option",data:t,isDisabled:md(e,t,n),isSelected:yd(e,t,n),label:vd(e,t),value:bd(e,t),index:r}}function dd(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return ud(e,n,t,r)})).filter((function(t){return hd(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=ud(e,n,t,r);return hd(e,i)?i:void 0})).filter(Xc)}function pd(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,c(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function fd(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,c(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function hd(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!xd(e)||!i)&&wd(e,{label:a,value:s,data:o},r)}var gd=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},vd=function(e,t){return e.getOptionLabel(t)},bd=function(e,t){return e.getOptionValue(t)};function md(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function yd(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=bd(e,t);return n.some((function(t){return bd(e,t)===r}))}function wd(e,t,n){return!e.filterOption||e.filterOption(t,n)}var xd=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Od=1,Ed=function(e){C(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=k(t);if(n){var o=k(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _(this,e)});function i(e){var t;if(w(this,i),(t=r.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=ad()||id(/^iPhone/i)||id(/^iPad/i)||ad()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var u=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});o?t.setValue([].concat(c(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter((function(e){return t.getOptionValue(e)!==o})),a=qc(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(qc(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=qc(e,o,o[0]||null);t.onChange(i,{action:"pop-value",removedValue:r})},t.getFocusedOptionId=function(e){return gd(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return fd(dd(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return xd(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,f=t.state,h=f.focusedOption,g=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)t.removeValue(g);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!h||p&&t.isOptionSelected(h,v))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!c){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++Od),t.state.selectValue=Ac(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),o=t.buildFocusableOptions(),a=o.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=o[a],t.state.focusedOptionId=gd(n,o[a])}return t}return O(i,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Uc(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Uc(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(ld):As(As({},ld),this.props.theme):ld}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return md(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return yd(this.props,e,t)}},{key:"filterOption",value:function(e,t){return wd(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,h=this.commonProps,g=r||this.getElementId("input"),v=As(As(As({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(u,Ns({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},v)):o.createElement(Wu,Ns({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Tc,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,f=u.isMulti,h=u.inputValue,g=u.placeholder,v=this.state,b=v.selectValue,m=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return h?null:o.createElement(l,Ns({},c,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),g);if(f)return b.map((function(t,s){var l=t===m,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,Ns({},c,{components:{Container:r,Label:i,Remove:a},isFocused:l,isDisabled:p,key:u,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=b[0];return o.createElement(s,Ns({},c,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,Ns({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return e&&i?o.createElement(e,Ns({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return o.createElement(n,Ns({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,Ns({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,g=f.inputValue,v=f.isLoading,b=f.loadingMessage,m=f.minMenuHeight,y=f.maxMenuHeight,w=f.menuIsOpen,x=f.menuPlacement,O=f.menuPosition,E=f.menuPortalTarget,C=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,_=f.noOptionsMessage,k=f.onMenuScrollToTop,j=f.onMenuScrollToBottom;if(!w)return null;var P,D=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,s=t.isSelected,l=t.label,c=t.value,f=p===i,h=a?void 0:function(){return e.onOptionHover(i)},g=a?void 0:function(){return e.selectOption(i)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:g,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:s};return o.createElement(u,Ns({},d,{innerProps:b,data:i,isDisabled:a,isSelected:s,key:v,label:l,type:r,value:c,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return o.createElement(n,Ns({},d,{key:l,data:i,options:a,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return D(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return D(t,"".concat(t.index))}));else if(v){var M=b({inputValue:g});if(null===M)return null;P=o.createElement(l,d,M)}else{var I=_({inputValue:g});if(null===I)return null;P=o.createElement(c,d,I)}var T={minMenuHeight:m,maxMenuHeight:y,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:S},R=o.createElement(ou,Ns({},d,T),(function(t){var n=t.ref,r=t.placerProps,s=r.placement,l=r.maxHeight;return o.createElement(i,Ns({},d,T,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:s}),o.createElement(nd,{captureEnabled:h,onTopArrive:k,onBottomArrive:j,lockEnabled:C},(function(t){return o.createElement(a,Ns({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:l,focusedOption:p}),P)})))}));return E||"fixed"===O?o.createElement(s,Ns({},d,{appendTo:E,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!r)return o.createElement(od,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(i){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:a,type:"hidden",value:""});return o.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return o.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return o.createElement(Iu,Ns({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return o.createElement(r,Ns({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),o.createElement(t,Ns({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),o.createElement(i,Ns({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,Ns({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=Ac(u),g={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var v=d?function(e,t){return pd(dd(e,t))}(e,h):[],b=d?fd(dd(e,h),"".concat(l,"-option")):[],m=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,v);g={selectValue:h,focusedOption:y,focusedOptionId:gd(b,y),focusableOptionsWithIds:b,focusedValue:m,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,O=a&&s;return a&&!O&&(x={value:qc(f,h,h[0]||null),options:h,action:"initial-input-focus"},O=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),As(As(As({},g),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:O})}}]),i}(o.Component);Ed.defaultProps=cd;var Cd=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,a=e.defaultValue,s=void 0===a?null:a,l=e.inputValue,c=e.menuIsOpen,d=e.onChange,p=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,g=e.value,v=oo(e,_u),b=u((0,o.useState)(void 0!==l?l:n),2),m=b[0],y=b[1],w=u((0,o.useState)(void 0!==c?c:i),2),x=w[0],O=w[1],E=u((0,o.useState)(void 0!==g?g:s),2),C=E[0],S=E[1],_=(0,o.useCallback)((function(e,t){"function"==typeof d&&d(e,t),S(e)}),[d]),k=(0,o.useCallback)((function(e,t){var n;"function"==typeof p&&(n=p(e,t)),y(void 0!==n?n:e)}),[p]),j=(0,o.useCallback)((function(){"function"==typeof h&&h(),O(!0)}),[h]),P=(0,o.useCallback)((function(){"function"==typeof f&&f(),O(!1)}),[f]),D=void 0!==l?l:m,M=void 0!==c?c:x,I=void 0!==g?g:C;return As(As({},v),{},{inputValue:D,menuIsOpen:M,onChange:_,onInputChange:k,onMenuClose:P,onMenuOpen:j,value:I})}(e);return o.createElement(Ed,Ns({ref:t},n))})),Sd=Cd;function _d(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(Dd)}}]),e}();function Dd(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function Md(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var Id={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},Td=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function Rd(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Ld(e,t){e.style["".concat(Td,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function Ad(e,t){e.style["".concat(Td,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function Nd(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function Fd(e,t,n){return Math.max(e,Math.min(n,t))}function Bd(e){return"px"===e.substr(-2)?parseFloat(e):0}function Hd(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function Vd(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function zd(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function Ud(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:Ud(e.parentNode,t,r)}}function Wd(e){var t=e.lockOffset,n=e.width,r=e.height,o=t,i=t,a="px";if("string"==typeof t){var s=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);jd()(null!==s,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),o=parseFloat(t),i=parseFloat(t),a=s[1]}return jd()(isFinite(o)&&isFinite(i),"lockOffset value should be a finite. Given %s",t),"%"===a&&(o=o*n/100,i=i*r/100),{x:o,y:i}}function Gd(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:Gd(e.parentNode):null}var $d={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function Kd(e){return null!=e.sortableHandle}var Zd=function(){function e(t,n){w(this,e),this.container=t,this.onScrollCallback=n}return O(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,o=e.maxTranslate,i=e.width,a=e.height,s={x:0,y:0},l={x:1,y:1},c=this.container,u=c.scrollTop,d=c.scrollLeft,p=c.scrollHeight,f=c.scrollWidth,h=0===u,g=p-u-c.clientHeight==0,v=0===d,b=f-d-c.clientWidth==0;n.y>=o.y-a/2&&!g?(s.y=1,l.y=10*Math.abs((o.y-a/2-n.y)/a)):n.x>=o.x-i/2&&!b?(s.x=1,l.x=10*Math.abs((o.x-i/2-n.x)/i)):n.y<=r.y+a/2&&!h?(s.y=-1,l.y=10*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+i/2&&!v&&(s.x=-1,l.x=10*Math.abs((n.x-i/2-r.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===s.x&&0===s.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*s.x,top:l.y*s.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}(),Xd={axis:fe().oneOf(["x","y","xy"]),contentWindow:fe().any,disableAutoscroll:fe().bool,distance:fe().number,getContainer:fe().func,getHelperDimensions:fe().func,helperClass:fe().string,helperContainer:fe().oneOfType([fe().func,"undefined"==typeof HTMLElement?fe().any:fe().instanceOf(HTMLElement)]),hideSortableGhost:fe().bool,keyboardSortingTransitionDuration:fe().number,lockAxis:fe().string,lockOffset:fe().oneOfType([fe().number,fe().string,fe().arrayOf(fe().oneOfType([fe().number,fe().string]))]),lockToContainerEdges:fe().bool,onSortEnd:fe().func,onSortMove:fe().func,onSortOver:fe().func,onSortStart:fe().func,pressDelay:fe().number,pressThreshold:fe().number,keyCodes:fe().shape({lift:fe().arrayOf(fe().number),drop:fe().arrayOf(fe().number),cancel:fe().arrayOf(fe().number),up:fe().arrayOf(fe().number),down:fe().arrayOf(fe().number)}),shouldCancelStart:fe().func,transitionDuration:fe().number,updateBeforeSortStart:fe().func,useDragHandle:fe().bool,useWindowAsScrollContainer:fe().bool},qd={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},Jd={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:qd,shouldCancelStart:function(e){return-1!==[$d.Input,$d.Textarea,$d.Select,$d.Option,$d.Button].indexOf(e.target.tagName)||!!Nd(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},Yd=Object.keys(Xd),Qd=(0,o.createContext)({manager:{}}),ep={index:fe().number.isRequired,collection:fe().oneOfType([fe().number,fe().string]),disabled:fe().bool},tp=Object.keys(ep);function np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;w(this,n);for(var i=arguments.length,a=new Array(i),s=0;s0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return jd()(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=i.withRef?this.wrappedInstance:null;return(0,o.createElement)(e,Ns({ref:t},Md(this.props,tp)))}}]),n}(o.Component),r(t,"displayName",Hd("sortableElement",e)),r(t,"contextType",Qd),r(t,"propTypes",ep),r(t,"defaultProps",{collection:0}),n}((function(e){var t=rp(rp({},e.innerProps),{},{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}});return(0,o.createElement)(Su.MultiValue,rp(rp({},e),{},{innerProps:t}))})),ip=function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;w(this,n);for(var i=arguments.length,a=new Array(i),s=0;s1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;w(this,n),r(S(S(t=_(this,k(n).call(this,e)))),"state",{}),r(S(S(t)),"handleStart",(function(e){var n=t.props,r=n.distance,o=n.shouldCancelStart;if(2!==e.button&&!o(e)){t.touched=!0,t.position=zd(e);var i=Nd(e.target,(function(e){return null!=e.sortableInfo}));if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var a=t.props.useDragHandle,s=i.sortableInfo,l=s.index,c=s.collection;if(s.disabled)return;if(a&&!Nd(e.target,Kd))return;t.manager.active={collection:c,index:l},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==$d.Anchor||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),r(S(S(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),r(S(S(t)),"handleMove",(function(e){var n=t.props,r=n.distance,o=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=zd(e),a={x:t.position.x-i.x,y:t.position.y-i.y},s=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||o&&!(s>=o)?r&&s>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),r(S(S(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),r(S(S(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),r(S(S(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n,r,o=f.sortableInfo.index,u=(n=f,{bottom:Bd((r=window.getComputedStyle(n)).marginBottom),left:Bd(r.marginLeft),right:Bd(r.marginRight),top:Bd(r.marginTop)}),v=function(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:Bd(t.gridColumnGap),y:Bd(t.gridRowGap)}:{x:0,y:0}}(t.container),b=t.scrollContainer.getBoundingClientRect(),m=a({index:o,node:f,collection:h});if(t.node=f,t.margin=u,t.gridGap=v,t.width=m.width,t.height=m.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=f.getBoundingClientRect(),t.containerBoundingRect=b,t.index=o,t.newIndex=o,t.axis={x:i.indexOf("x")>=0,y:i.indexOf("y")>=0},t.offsetEdge=Ud(f,t.container),t.initialOffset=zd(g?_d({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(function(e){var t="input, textarea, select, canvas, [contenteditable]",n=e.querySelectorAll(t),r=e.cloneNode(!0);return c(r.querySelectorAll(t)).forEach((function(e,t){"file"!==e.type&&(e.value=n[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===$d.Canvas&&n[t].width>0&&n[t].height>0&&e.getContext("2d").drawImage(n[t],0,0)})),r}(f)),Rd(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-u.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-u.top,"px"),width:"".concat(t.width,"px")}),g&&t.helper.focus(),l&&(t.sortableGhost=f,Rd(f,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},g){var y=p?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,w=y.top,x=y.left,O=y.width,E=w+y.height,C=x+O;t.axis.x&&(t.minTranslate.x=x-t.boundingClientRect.left,t.maxTranslate.x=C-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=w-t.boundingClientRect.top,t.maxTranslate.y=E-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(p?0:b.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(p?t.contentWindow.innerWidth:b.left+b.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(p?0:b.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(p?t.contentWindow.innerHeight:b.top+b.height)-t.boundingClientRect.top-t.height/2);s&&s.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,g?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(Id.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),Id.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:o}),d&&d({node:f,index:o,collection:h,isKeySorting:g,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),g&&t.keyMove(0)},o=t.props,i=o.axis,a=o.getHelperDimensions,s=o.helperClass,l=o.hideSortableGhost,u=o.updateBeforeSortStart,d=o.onSortStart,p=o.useWindowAsScrollContainer,f=n.node,h=n.collection,g=t.manager.isKeySorting,v=function(){if("function"==typeof u){t._awaitingUpdateBeforeSortStart=!0;var n=function(t,n){try{var r=(o=f.sortableInfo.index,Promise.resolve(u({collection:h,index:o,node:f,isKeySorting:g},e)).then((function(){})))}catch(e){return n(!0,e)}var o;return r&&r.then?r.then(n.bind(null,!1),n.bind(null,!0)):n(!1,value)}(0,(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return v&&v.then?v.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),r(S(S(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),r(S(S(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,o=n.onSortEnd,i=t.manager,a=i.active.collection,s=i.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(s?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(Id.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),Id.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&Rd(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=l.length;cr)){t.prevIndex=i,t.newIndex=o;var a=function(e,t,n){return et?e-1:e>n&&ev?v/2:this.height/2,width:this.width>g?g/2:this.width/2},m=c&&h>this.index&&h<=u,y=c&&h=u,w={x:0,y:0},x=a[d].edgeOffset;x||(x=Ud(f,this.container),a[d].edgeOffset=x,c&&(a[d].boundingClientRect=Vd(f,o)));var O=d0&&a[d-1];O&&!O.edgeOffset&&(O.edgeOffset=Ud(O.node,this.container),c&&(O.boundingClientRect=Vd(O.node,o))),h!==this.index?(t&&Ad(f,t),this.axis.x?this.axis.y?y||hthis.containerBoundingRect.width-b.width&&O&&(w.x=O.edgeOffset.left-x.left,w.y=O.edgeOffset.top-x.top),null===this.newIndex&&(this.newIndex=h)):(m||h>this.index&&(s+i.left+b.width>=x.left&&l+i.top+b.height>=x.top||l+i.top+b.height>=x.top+v))&&(w.x=-(this.width+this.marginOffset.x),x.left+w.xthis.index&&s+i.left+b.width>=x.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=h):(y||hthis.index&&l+i.top+b.height>=x.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=h):(y||h0&&S((function(e){return[].concat(c(e),c(t))}))}),[M]),(0,o.useEffect)((function(){j(rp({options:p,search:x,value:d,listId:b},v))}),[p,x,d,e,b,v]);var T=(0,o.useMemo)((function(){return(Array.isArray(d)?d:[d]).map(String).map((function(e){return C.find((function(t){return String(t.value)===e}))})).filter(Boolean)}),[d,C]);(0,o.useEffect)((function(){"function"==typeof f&&f(T)}),[f,T]);var R=function(e){var t;n((t=e,Array.isArray(t)?t.map((function(e){return e.value})):(null==t?void 0:t.value)||""))},L=function(e){return O(e),e},A=function(e,t){if("string"!=typeof p){var n=Xf(t).split(" "),r=Xf(e.label).split(" ");return n.map((function(t){return r.filter((function(n){return n.indexOf(t)>-1||String(t)===String(e.value)})).length>0})).every(Boolean)}return!0};return a?(0,o.createElement)(ap,{id:t,isMulti:!0,isLoading:D,isClearable:!r,isSearchable:!0,cacheOptions:!0,options:M,value:g&&T,onChange:R,onInputChange:L,filterOption:A,className:y()("wcf-select",s),classNamePrefix:"wcf-select",menuPortalTarget:I.current,useDragHandle:!0,axis:"xy",onSortEnd:function(e){var t,r,o,i,a=e.oldIndex,s=e.newIndex,l=(r=a,o=s,(i=(t=d).slice()).splice(o<0?t.length+o:o,0,i.splice(r,1)[0]),i);n(l)},distance:4,getHelperDimensions:function(e){return e.node.getBoundingClientRect()},components:{Option:sp,SingleValue:lp,MultiValue:op,MultiValueLabel:ip},closeMenuOnSelect:!1}):(0,o.createElement)(Sd,{id:t,isMulti:!1,isLoading:D,isClearable:!r,isSearchable:!0,cacheOptions:!0,options:M,value:g&&T,onChange:R,onInputChange:L,filterOption:A,className:y()("wcf-select",s),classNamePrefix:"wcf-select",menuPortalTarget:I.current})},up=function(e){var t=e.id,n=e.onChange,r=e.description,i=e.group_level,a=void 0===i?0:i,s=e.required,l=e.isMulti,c=void 0!==l&&l,u=e.className,d=e.appContext,p=e.options,f=e.list_id,h=e.async,g=e.async_params,v=Jf(e),b=v.value,m=v.currentValue,y=v.setCurrentValue;(0,o.useEffect)((function(){n&&JSON.stringify(b)!==JSON.stringify(m)&&n(m)}),[n,b,m]);var w=(0,o.useRef)();return(0,o.createElement)(j,null,0===a&&(0,o.createElement)("input",{type:"hidden",name:d.hooks.name(t),ref:w,value:c?JSON.stringify(Array.isArray(m)?m.filter(Boolean):[]):m}),(0,o.createElement)(cp,{id:d.hooks.id(t),onChange:y,required:s,isMulti:c,className:u,api:d.api,value:m,defaultOptions:p,listId:f,async:h,asyncParams:g}),r&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:r}})))};up.getHumanTitle=function(e,t){if(Array.isArray(e.options)){var n=e.options.find((function(e){return String(e.value)===String(t)}));if(n)return n.label}return t};var dp=up;function pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fp(e){for(var t=1;t1?(0,o.createElement)(Ps,{items:E.map((function(e){return String(e)})),setItems:function(e){return C(e.map((function(e){return parseInt(e)})))},allowSort:!0,renderItem:function(e){return(0,o.createElement)(yp,{selectedOptions:k,value:e,handleDelete:D})}}):(0,o.createElement)(o.Fragment,null,E.map((function(e){return(0,o.createElement)(yp,{selectedOptions:k,value:e,handleDelete:D,key:e})})))))};xp.getHumanTitle=function(e,t){if(Array.isArray(e.options)){var n=e.options.find((function(e){return String(e.value)===String(t)}));if(n)return n.label}return t};var Op=xp;function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cp(e){for(var t=1;tc.width?l/c.height:a/c.width;return c.width=c.width*u,c.height=c.height*u,c}({attributes:c,maxWidth:50,maxHeight:50});return(0,o.createElement)("div",{className:y()(t,"wcf-attachment"),key:e.id},(0,o.createElement)("div",{className:"wcf-attachment__image"},f?(0,o.createElement)("img",{src:f.url,width:f.width,height:f.height,alt:c.title}):(0,o.createElement)("img",{src:c.icon,width:48,height:64,alt:c.title})),(0,o.createElement)("div",{className:"wcf-attachment__description"},(0,o.createElement)("strong",null,(0,o.createElement)("a",{href:d,target:"_blank"},c.title)),(0,o.createElement)("br",null),"[",(0,o.createElement)("a",{href:c.url,target:"_blank"},c.filename),", ",c.filesizeHumanReadable,"]"),n&&(0,o.createElement)(uo,{onClick:l}))},_p=function(e){var t=e.id,n=e.className,r=e.group_level,i=void 0===r?0:r,a=e.isMulti,s=void 0!==a&&a,l=e.attachment_type,u=e.onChange,d=e.description,p=e.appContext,f=Jf(e),h=f.value,g=f.currentValue,v=f.setCurrentValue,b=s?g.filter(Boolean):g.find(Boolean),m=(0,o.useRef)(),w=window.wp,x=(0,o.useCallback)((function(){m.current.open()}),[]),O=(0,o.useCallback)((function(){var e=m.current.state().get("selection"),t=[];e.each((function(e){t.push(e.id)})),v((function(e){var n=s?[].concat(c(e),t):t;return c(new Set(n))}))}),[v,s]),E=(0,o.useCallback)((function(){}),[]);(0,o.useEffect)((function(){m.current=w.media({title:s?(0,Go.__)("Select attachments","wpify-custom-fields"):(0,Go.__)("Select attachment","wpify-custom-fields"),multiple:s,library:{type:l}}),m.current.on("close",O),m.current.on("open",E)}),[E,O]),(0,o.useEffect)((function(){u&&JSON.stringify(h)!==JSON.stringify(b)&&u(b)}),[h,b,u]);var C=function(e){v((function(t){return t.filter((function(t){return t!==e}))}))};return(0,o.createElement)("div",{className:y()(n)},0===i&&(0,o.createElement)("input",{type:"hidden",name:p.hooks.name(t),value:JSON.stringify(b)}),s?(0,o.createElement)("div",{className:"wcf-media-list"},(0,o.createElement)(Ps,{allowSort:!0,items:g.map(String),setItems:function(e){return v(e.map((function(e){return parseInt(e,10)})))},renderItem:function(e){return(0,o.createElement)(j,{key:e},(0,o.createElement)(Sp,{onDelete:C,length:g.length,id:parseInt(e,10)}))}})):g.find(Boolean)?(0,o.createElement)(j,null,(0,o.createElement)(Sp,{id:g.find(Boolean),onDelete:C})):null,(0,o.createElement)("div",{className:"wcf-media-buttons"},(0,o.createElement)(so,{onClick:x},s?(0,Go.__)("Add attachments","wpify-custom-fields"):(0,Go.__)("Select attachment","wpify-custom-fields"))),d&&(0,o.createElement)(j,null,(0,o.createElement)("p",{dangerouslySetInnerHTML:{__html:d}})))};function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jp(e){for(var t=1;t]+>/gm,"").replace(/\s+/gm," ")};var Rp=Tp;function Lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ap(e){for(var t=1;t0){var e=D.find(Boolean);C.url!==(null==e?void 0:e.permalink)&&S(Ap(Ap({},C),{},{url:null==e?void 0:e.permalink}))}}),[D,C,S]);var A=s?n+"-description":null,N=function(e){return function(t){var n={label:"",url:"",target:null,post:null};Object(C)===C&&(n=Ap({},C)),"target"===e?n[e]=t.target.checked?"_blank":null:"post"===e?(n[e]=t,n.url=null):"url"===e?(n[e]=t.target.value,n.post=null):n[e]=t.target.value,S(n)}};return(0,o.createElement)("div",{ref:t},(0,o.createElement)("div",{className:y()("wcf-link",h,{"wcf-link--open":T},{"wcf-link--not-empty":Boolean(C.label)&&Boolean(C.url)}),ref:_},(0,o.createElement)("input",Ap({type:"hidden",name:0===f?w.hooks.name(n):null,value:JSON.stringify(C),ref:t},d)),T?(0,o.createElement)("div",{className:"wcf-link__form"},(0,o.createElement)("label",{className:"wcf-link__form-item wcf-link__form-item--text"},(0,o.createElement)("span",null,(0,Go.__)("Label","wpify-custom-fields")),(0,o.createElement)("input",{type:"text",value:C.label,onChange:N("label"),className:y()("components-text-control__input")})),g&&(0,o.createElement)("label",{className:"wcf-link__form-item wcf-link__form-item--text"},(0,o.createElement)("span",null,v),(0,o.createElement)(cp,{id:n,onChange:N("post"),required:!0,api:w.api,value:C.post,otherArgs:k,defaultOptions:x,setOptions:M})),(0,o.createElement)("label",{className:"wcf-link__form-item wcf-link__form-item--text"},(0,o.createElement)("span",null,(0,Go.__)("URL","wpify-custom-fields")),(0,o.createElement)("input",{type:"url",value:C.url,onChange:N("url"),className:y()("components-text-control__input")})),(0,o.createElement)("label",{className:"wcf-link__form-item"},(0,o.createElement)("input",{type:"checkbox",value:C.target,checked:"_blank"===C.target,onChange:N("target"),className:y()("components-text-control__input")}),(0,o.createElement)("span",null,(0,Go.__)("Open in new window","wpify-custom-fields")))):(0,o.createElement)("div",{className:y()("wcf-link__view",{"wcf-link__view--empty":!Boolean(C.label)&&!Boolean(C.url)}),onClick:L},C.label&&(0,o.createElement)("span",{className:"wcf-link__label"},C.label,"_blank"===C.target&&(0,o.createElement)(ro.Icon,{icon:"external"})),C.url&&(0,o.createElement)("span",{className:"wcf-link__url"},C.url),!Boolean(C.label)&&!Boolean(C.url)&&(0,o.createElement)("div",{className:"button wcf-link__add"},(0,Go.__)("Add link","wpify-custom-fields"),(0,o.createElement)(ro.Icon,{icon:"insert"})),(C.label||C.url)&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(uo,{onClick:function(){S({label:"",url:""}),L()}}))),(0,o.createElement)("button",{type:"button",id:i(n),className:"wcf-link__toggle-button button",onClick:L},(0,Go.__)("Update","wpify-custom-fields"))),l&&" "+l,s&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",id:A,dangerouslySetInnerHTML:{__html:s}})))}));Np.getHumanTitle=function(e,t){return(null==t?void 0:t.label)+" ("+(null==t?void 0:t.url)+")"};var Fp=Np,Bp=window.wp.blockEditor,Hp=i().forwardRef((function(e,t){var n=e.id,r=e.htmlId,a=void 0===r?function(e){return e}:r,s=e.description,l=e.group_level,c=void 0===l?0:l,u=e.className,d=e.allowed_blocks,p=e.template,f=e.template_lock,h=e.orientation;return c>0?null:(0,o.createElement)(i().Fragment,null,(0,o.createElement)("div",{className:u,id:a(n),ref:t},(0,o.createElement)(Bp.InnerBlocks,{allowedBlocks:d,template:p,orientation:h,templateLock:f})),s&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}})))})),Vp=n(4583);function zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Up(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0)||e})),(0,d.addFilter)("wcf_field_without_label","wpify-custom-fields",(function(e,t){return!!["html","title"].includes(t)||e})),(0,d.addFilter)("wcf_field_without_section","wpify-custom-fields",(function(e,t){return!!["html","title"].includes(t)||e})),(0,d.addFilter)("wcf_generator_uuid","wpify-custom-fields",(function(e){return e||b()}));var Wp={text:function(e){var t=e.className;return(0,o.createElement)(j,null,(0,o.createElement)(M,T(T({},e),{},{type:"text",className:y()("regular-text",t)})))},url:function(e){var t=e.className;return(0,o.createElement)(j,null,(0,o.createElement)(M,L(L({},e),{},{type:"url",className:y()("regular-text code",t)})))},email:function(e){var t=e.className;return(0,o.createElement)(j,null,(0,o.createElement)(M,N(N({},e),{},{type:"email",className:y()("regular-text ltr",t)})))},number:function(e){var t=e.className,n=e.custom_attributes.max;return(0,o.createElement)(j,null,(0,o.createElement)(M,B(B({},e),{},{type:"number",className:y()(t,{"small-text":n<9999||!n})})))},title:function(e){var t=e.className,n=e.title,a=e.description,s=e.custom_attributes;return(0,o.createElement)(i().Fragment,null,(0,o.createElement)(j,null,(0,o.createElement)("h2",function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=Wo(Wo({},d),e);JSON.stringify(t)!==JSON.stringify(d)&&p(t)}),[d]);return(0,o.useEffect)((function(){r&&JSON.stringify(u)!==JSON.stringify(d)&&r(d)}),[u,d,r]),(0,o.createElement)(i().Fragment,null,(0,o.createElement)(j,null,(0,o.createElement)(h,{group_level:n+1,className:null==e?void 0:e.class},0===n&&(0,o.createElement)(g,{item:{title:"hidden",type:"hidden"},withoutLabel:!0,style:{display:"none"}},(0,o.createElement)("input",{type:"hidden",id:l.hooks.id(a),name:l.hooks.name(a),value:JSON.stringify(d)})),s.map((function(e){return(0,o.createElement)(zo,{key:e.id,item:e,group_level:n,appContext:l,onChange:v,value:u&&u[e.id]})})))))},multi_group:function(e){var t=e.group_level,n=void 0===t?0:t,r=e.onChange,i=e.id,a=e.description,s=e.items,l=void 0===s?[]:s,d=e.className,p=e.appContext,f=e.buttons,h=void 0===f?{}:f,g=e.disable_buttons,v=void 0===g?[]:g,m=e.min,w=void 0===m?0:m,x=e.max,O=void 0===x?0:x,E=e.group_title,C=Jf(e),S=C.value,_=C.currentValue,k=C.setCurrentValue,P=u((0,o.useState)(v),2),D=P[0],M=P[1],I=u((0,o.useState)(null),2),T=I[0],R=I[1],L=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=c(_);null===t?n.splice(e,1):n[e]=t,k(n)}},A=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=c(_),r=Gf(t);r.__key=b();for(var o=0;o0&&delete r[a.id]}n.splice(e,0,r),k(n)}},N=function(){var e=c(_),t=b();e.push({__key:t}),k(e),R(t)};(0,o.useEffect)((function(){r&&JSON.stringify(Ds(S))!==JSON.stringify(Ds(_))&&r(Ds(_))}),[r,S,_]),(0,o.useEffect)((function(){if(_.length0)for(var e=_.length;e<=w;e++)N();(w>0&&O>=w||0===w&&O>0)&&(_.length=O&&!D.find((function(e){return"add"===e||"duplicate"===e}))&&M([].concat(c(D),["add","duplicate"])))}),[_,w,O]);var F=_.map((function(e){return e.__key}));return(0,o.createElement)("div",{className:y()("wcf-multi-group",d,null==e?void 0:e.class)},0===n&&(0,o.createElement)("input",{type:"hidden",id:p.hooks.id(i),name:p.hooks.name(i),value:JSON.stringify(Ds(_))}),a&&(0,o.createElement)("p",null,a),(0,o.createElement)(j,null,(0,o.createElement)(Ps,{className:"wcf-multi-group__items",items:F,setItems:function(e){JSON.stringify(_.map((function(e){return e.__key})))!==JSON.stringify(e)&&k(e.map((function(e){return _.find((function(t){return t.__key===e}))})).filter(Boolean))},allowSort:!D.includes("move"),renderItem:function(e,t){return(0,o.createElement)(j,{key:e},(0,o.createElement)(Jo,{buttons:h,group_level:n+1,onChange:L(t),onDuplicate:A(t),items:l,value:_.find((function(t){return t.__key===e})),htmlId:function(e){return i+"_"+t+"_"+e},index:t,length:_.length,collapsed:e!==T,toggleCollapsed:function(){return R(e===T?null:e)},appContext:p,disabled_buttons:D,group_title:E}))}})),(0,o.createElement)("div",{className:y()("wcf-multi-group__buttons")},!D.includes("add")&&(0,o.createElement)(so,{className:y()("button-secondary"),onClick:N},h.add||(0,Go.__)("Add","wpify-custom-fields"))))},checkbox:Ts,toggle:function(e){var t=e.id,n=e.htmlId,a=void 0===n?function(e){return e}:n,s=e.label,l=e.group_level,c=void 0===l?0:l,u=e.custom_attributes,d=void 0===u?{}:u,p=e.onChange,f=e.className,h=e.description,g=e.disabled,v=void 0!==g&&g,b=e.appContext,m=Jf(e),w=(m.value,m.currentValue),x=m.setCurrentValue,O=(0,o.useCallback)((function(e){v||x(e)}),[v,x]);(0,o.useEffect)((function(){p&&p(w)}),[p,w]);var E=(0,o.createElement)(j,null,(0,o.createElement)(ro.ToggleControl,function(e){for(var t=1;t-1&&n.splice(r,1),O(n)}};return(0,o.createElement)(i().Fragment,null,0===l&&(0,o.createElement)("input",{type:"hidden",name:b.hooks.name(t),value:JSON.stringify(x)}),h&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:h},style:{marginBottom:"4px"}})),Array.isArray(v)&&v.map((function(e){return(0,o.createElement)(j,{key:t+"_"+e.value},(0,o.createElement)(ro.ToggleControl,function(e){for(var t=1;t0&&_>0&&(0,o.createElement)("div",{style:{marginBottom:"1rem"}},(0,o.createElement)("small",null,(0,Go.sprintf)((0,Go.__)("latitude: %s, longitude: %s","wpify-mapy-cz"),C,_))),(0,o.createElement)("div",{className:"mapycz",style:{height:"400px",marginBottom:"1rem"},ref:v}),O&&(0,o.createElement)("p",null,O))}},Gp=window.wp.apiFetch,$p=n.n(Gp),Kp=n(1688);const Zp=()=>{},Xp=Zp(),qp=Object,Jp=e=>e===Xp,Yp=e=>"function"==typeof e,Qp=(e,t)=>({...e,...t}),ef=new WeakMap;let tf=0;const nf=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(qp(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=ef.get(e),o)return o;if(o=++tf+"~",ef.set(e,o),n==Array){for(o="@",i=0;i{const n=rf.get(e);return[()=>!Jp(t)&&e.get(t)||of,r=>{if(!Jp(t)){const o=e.get(t);t in af||(af[t]=o),n[5](t,Qp(o,r),o||of)}},n[6],()=>!Jp(t)&&t in af?af[t]:!Jp(t)&&e.get(t)||of]};let df=!0;const[pf,ff]=lf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Zp,Zp],hf={isOnline:()=>df,isVisible:()=>{const e=cf&&document.visibilityState;return Jp(e)||"hidden"!==e}},gf={initFocus:e=>(cf&&document.addEventListener("visibilitychange",e),pf("focus",e),()=>{cf&&document.removeEventListener("visibilitychange",e),ff("focus",e)}),initReconnect:e=>{const t=()=>{df=!0,e()},n=()=>{df=!1};return pf("online",t),pf("offline",n),()=>{ff("online",t),ff("offline",n)}}},vf=!o.useId,bf=!lf||"Deno"in window,mf=bf?o.useEffect:o.useLayoutEffect,yf="undefined"!=typeof navigator&&navigator.connection,wf=!bf&&yf&&(["slow-2g","2g"].includes(yf.effectiveType)||yf.saveData),xf=e=>{if(Yp(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?nf(e):"",t]};let Of=0;const Ef=()=>++Of;async function Cf(...e){const[t,n,r,o]=e,i=Qp({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let l=i.optimisticData;const c=!1!==i.revalidate,u=i.throwOnError;if(Yp(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(d))}return d(n);async function d(n){const[o]=xf(n);if(!o)return;const[i,d]=uf(t,o),[p,f,h,g]=rf.get(t),v=()=>{const e=p[o];return c&&(delete h[o],delete g[o],e&&e[0])?e[0](2).then((()=>i().data)):i().data};if(e.length<3)return v();let b,m=r;const y=Ef();f[o]=[y,0];const w=!Jp(l),x=i(),O=x.data,E=x._c,C=Jp(E)?O:E;if(w&&(l=Yp(l)?l(C,O):l,d({data:l,_c:C})),Yp(m))try{m=m(C)}catch(e){b=e}if(m&&Yp(m.then)){if(m=await m.catch((e=>{b=e})),y!==f[o][0]){if(b)throw b;return m}b&&w&&(e=>"function"==typeof s?s(e):!1!==s)(b)&&(a=!0,d({data:C,_c:Xp}))}if(a&&!b)if(Yp(a)){const e=a(m,C);d({data:e,error:Xp,_c:Xp})}else d({data:m,error:Xp,_c:Xp});if(f[o][1]=Ef(),Promise.resolve(v()).then((()=>{d({_c:Xp})})),!b)return m;if(u)throw b}}const Sf=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},_f=(e,t)=>{if(!rf.has(e)){const n=Qp(gf,t),r={},o=Cf.bind(Xp,e);let i=Zp;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const o=a[t];if(o)for(const e of o)e(n,r)},c=()=>{if(!rf.has(e)&&(rf.set(e,[r,{},{},{},o,l,s]),!bf)){const t=n.initFocus(setTimeout.bind(Xp,Sf.bind(Xp,r,0))),o=n.initReconnect(setTimeout.bind(Xp,Sf.bind(Xp,r,1)));i=()=>{t&&t(),o&&o(),rf.delete(e)}}};return c(),[e,o,c,i]}return[e,rf.get(e)[4]]},[kf,jf]=_f(new Map),Pf=Qp({onLoadingSlow:Zp,onSuccess:Zp,onError:Zp,onErrorRetry:(e,__,t,n,r)=>{const o=t.errorRetryCount,i=r.retryCount,a=~~((Math.random()+.5)*(1<<(i<8?i:8)))*t.errorRetryInterval;!Jp(o)&&i>o||setTimeout(n,a,r)},onDiscarded:Zp,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:wf?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:wf?5e3:3e3,compare:(e,t)=>nf(e)==nf(t),isPaused:()=>!1,cache:kf,mutate:jf,fallback:{}},hf),Df=(e,t)=>{const n=Qp(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:a}=t;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Qp(o,a))}return n},Mf=(0,o.createContext)({}),If=lf&&window.__SWR_DEVTOOLS_USE__,Tf=If?window.__SWR_DEVTOOLS_USE__:[],Rf=e=>Yp(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Lf=Tf.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=xf(t),[,,,o]=rf.get(kf);if(r.startsWith("$inf$"))return n(...e);const i=o[r];return Jp(i)?n(...e):(delete o[r],i)}),r)));If&&(window.__SWR_DEVTOOLS_REACT__=o);const Af=o.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),Nf={dedupe:!0},Ff=(qp.defineProperty((e=>{const{value:t}=e,n=(0,o.useContext)(Mf),r=Yp(t),i=(0,o.useMemo)((()=>r?t(n):t),[r,n,t]),a=(0,o.useMemo)((()=>r?i:Df(n,i)),[r,n,i]),s=i&&i.provider,l=(0,o.useRef)(Xp);s&&!l.current&&(l.current=_f(s(a.cache||kf),i));const c=l.current;return c&&(a.cache=c[0],a.mutate=c[1]),mf((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,o.createElement)(Mf.Provider,Qp(e,{value:a}))}),"defaultValue",{value:Pf}),Bf=(e,t,n)=>{const{cache:r,compare:i,suspense:a,fallbackData:s,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:p,keepPreviousData:f}=n,[h,g,v,b]=rf.get(r),[m,y]=xf(e),w=(0,o.useRef)(!1),x=(0,o.useRef)(!1),O=(0,o.useRef)(m),E=(0,o.useRef)(t),C=(0,o.useRef)(n),S=()=>C.current,_=()=>S().isVisible()&&S().isOnline(),[k,j,P,D]=uf(r,m),M=(0,o.useRef)({}).current,I=Jp(s)?n.fallback[m]:s,T=(e,t)=>{for(const n in M){const r=n;if("data"===r){if(!i(e[r],t[r])){if(!Jp(e[r]))return!1;if(!i(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},R=(0,o.useMemo)((()=>{const e=!!m&&!!t&&(Jp(l)?!S().isPaused()&&!a&&(!!Jp(c)||c):l),n=t=>{const n=Qp(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=k(),o=D(),i=n(r),s=r===o?i:n(o);let u=i;return[()=>{const e=n(k());return T(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>s]}),[r,m]),L=(0,Kp.useSyncExternalStore)((0,o.useCallback)((e=>P(m,((t,n)=>{T(n,t)||e()}))),[r,m]),R[0],R[1]),A=!w.current,N=h[m]&&h[m].length>0,F=L.data,B=Jp(F)?I:F,H=L.error,V=(0,o.useRef)(B),z=f?Jp(F)?V.current:F:B,U=!(N&&!Jp(H))&&(A&&!Jp(l)?l:!S().isPaused()&&(a?!Jp(B)&&c:Jp(B)||c)),W=!!(m&&t&&A&&U),G=Jp(L.isValidating)?W:L.isValidating,$=Jp(L.isLoading)?W:L.isLoading,K=(0,o.useCallback)((async e=>{const t=E.current;if(!m||!t||x.current||S().isPaused())return!1;let r,o,a=!0;const s=e||{},l=!v[m]||!s.dedupe,c=()=>vf?!x.current&&m===O.current&&w.current:m===O.current,u={isValidating:!1,isLoading:!1},d=()=>{j(u)},p=()=>{const e=v[m];e&&e[1]===o&&delete v[m]},f={isValidating:!0};Jp(k().data)&&(f.isLoading=!0);try{if(l&&(j(f),n.loadingTimeout&&Jp(k().data)&&setTimeout((()=>{a&&c()&&S().onLoadingSlow(m,n)}),n.loadingTimeout),v[m]=[t(y),Ef()]),[r,o]=v[m],r=await r,l&&setTimeout(p,n.dedupingInterval),!v[m]||v[m][1]!==o)return l&&c()&&S().onDiscarded(m),!1;u.error=Xp;const e=g[m];if(!Jp(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),l&&c()&&S().onDiscarded(m),!1;const s=k().data;u.data=i(s,r)?s:r,l&&c()&&S().onSuccess(r,m,n)}catch(e){p();const t=S(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,m,t),(!0===n||Yp(n)&&n(e))&&_()&&t.onErrorRetry(e,m,t,(e=>{const t=h[m];t&&t[0]&&t[0](3,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0}),[m,r]),Z=(0,o.useCallback)(((...e)=>Cf(r,O.current,...e)),[]);if(mf((()=>{E.current=t,C.current=n,Jp(F)||(V.current=F)})),mf((()=>{if(!m)return;const e=K.bind(Xp,Nf);let t=0;const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(m,h,((n,r={})=>{if(0==n){const n=Date.now();S().revalidateOnFocus&&n>t&&_()&&(t=n+S().focusThrottleInterval,e())}else if(1==n)S().revalidateOnReconnect&&_()&&e();else{if(2==n)return K();if(3==n)return K(r)}}));return x.current=!1,O.current=m,w.current=!0,j({_k:y}),U&&(Jp(B)||bf?e():(r=e,lf&&typeof window.requestAnimationFrame!=sf?window.requestAnimationFrame(r):setTimeout(r,1))),()=>{x.current=!0,n()};var r}),[m]),mf((()=>{let e;function t(){const t=Yp(u)?u(k().data):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){k().error||!d&&!S().isVisible()||!p&&!S().isOnline()?t():K(Nf).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[u,d,p,m]),(0,o.useDebugValue)(z),a&&Jp(B)&&m){if(!vf&&bf)throw new Error("Fallback data is required when using suspense in SSR.");E.current=t,C.current=n,x.current=!1;const e=b[m];if(!Jp(e)){const t=Z(e);Af(t)}if(!Jp(H))throw H;{const e=K(Nf);Jp(z)||(e.status="fulfilled",e.value=!0),Af(e)}}return{mutate:Z,get data(){return M.data=!0,z},get error(){return M.error=!0,H},get isValidating(){return M.isValidating=!0,G},get isLoading(){return M.isLoading=!0,$}}},function(...e){const t=Qp(Pf,(0,o.useContext)(Mf)),[n,r,i]=Rf(e),a=Df(t,i);let s=Bf;const{use:l}=a,c=(l||[]).concat(Lf);for(let e=c.length;e--;)s=c[e](s);return s(n,r||a.fetcher||null,a)});var Bf;const Hf=((e,t)=>(...n)=>{const[r,o,i]=Rf(n),a=(i.use||[]).concat(t);return e(r,o,{...i,use:a})})(Ff,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r))));function Vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zf(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===e.indexOf("#")&&(e=e.slice(1)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),6!==e.length)return"#000000";var n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16);return t?.299*n+.587*r+.114*o>186?"#000000":"#FFFFFF":(n=(255-n).toString(16),r=(255-r).toString(16),o=(255-o).toString(16),"#"+n.padStart(2,"0")+r.padStart(2,"0")+o.padStart(2,"0"))},Kf=function(e){return $p()(zf({},e))},Zf=function(e,t){var n,r,i,a,s,l,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},p=u((0,o.useState)(t.search||""),2),f=p[0],h=p[1];if(n=function(){h(t.search)},r=500,i=[t.search],a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(0,o.useRef)(e),r=(0,o.useRef)();(0,o.useEffect)((function(){n.current=e}),[e]);var i=(0,o.useCallback)((function(){r.current=setTimeout((function(){n.current()}),t)}),[t]),a=(0,o.useCallback)((function(){r.current&&clearTimeout(r.current)}),[]);return(0,o.useEffect)((function(){return i(),a}),[t,i,a]),{reset:(0,o.useCallback)((function(){a(),i()}),[a,i]),clear:a}}(n,r),s=a.reset,l=a.clear,(0,o.useEffect)(s,[].concat(c(i),[s])),(0,o.useEffect)(l,[]),Array.isArray(t.options))return{data:t.options,isLoading:!1,isError:!1};if("string"==typeof t.options){var g="";Object(d)===d&&Object.keys(d).length>0&&(g="?"+String(new URLSearchParams(d)));var v=Hf({path:"".concat(e.path,"/options").concat(g),data:zf(zf({},t),{},{value:(Array.isArray(t.value)?t.value:[t.value]).filter(Boolean),search:f}),method:"POST"},Kf),b=v.data,m=v.error;return{data:b,isLoading:!m&&!b,isError:m,loadOptions:function(e,t){return t(null==b?void 0:b.map((function(e){return zf(zf({},e),{},{label:qf(e.label)})})))}}}return{api:e,args:t,data:[],isLoading:!1,isError:!0,loadOptions:function(e,t){return t([])}}},Xf=function(e){return String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim().toLowerCase()},qf=function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent},Jf=function(e){var t=(0,o.useMemo)((function(){return e.generator?(0,d.applyFilters)("wcf_generator_"+e.generator,e.value,e):e.value}),[e]),n=t;void 0===n&&void 0!==e.default&&(n=e.default);var r={label:"",url:"",target:null};void 0===n&&(n=["multi_group","multi_select","multi_attachment","multi_post","multi_toggle"].includes(e.type)?[]:["group"].includes(e.type)?{}:["attachment","post"].includes(e.type)?0:"link"===e.type?r:""),"link"===e.type?"string"==typeof n?n=zf(zf({},r),{},{url:n}):Object(n)!==n?n=r:Object.keys(r).forEach((function(e){n[e]=n[e]||r[e]})):["post","multi_post","attachment","multi_attachment"].includes(e.type)?(Array.isArray(n)||(n=[n]),n=n.filter(Boolean).map((function(e){return parseInt(e,10)}))):"multi_group"===e.type?n=(n=Array.isArray(n)?Gf(n):[]).map((function(e){return e.__key=b(),e})):"multi_toggle"!==e.type||Array.isArray(n)||(n=[]);var i=u((0,o.useState)(n),2);return{value:t,currentValue:i[0],setCurrentValue:i[1]}},Yf=window.wp.serverSideRender,Qf=n.n(Yf),eh=window.wp.element,th=(0,eh.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,eh.cloneElement)(e,{width:t,height:t,...n,ref:r})})),nh=window.wp.primitives,rh=(0,o.createElement)(nh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(nh.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})),oh=(0,o.createElement)(nh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(nh.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));function ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ah(e){for(var t=1;t0,c=t.items.filter((function(e){return"inspector"===e.position})).length>0,d=(0,Bp.useBlockProps)();return(0,o.createElement)("div",fh({},d),(0,o.createElement)(Fo.Provider,{value:{RootWrapper:Ao,RowWrapper:No}},l&&(0,o.createElement)(Bp.BlockControls,null,(0,o.createElement)(ro.ToolbarGroup,null,(0,o.createElement)(ro.ToolbarButton,{isActive:a===hh,onClick:function(){return s(hh)}},(0,o.createElement)("div",{className:"wcf-block-toolbar-button"},(0,o.createElement)(th,{icon:rh}),(0,Go.__)("View","wpify-custom-fields"))),(0,o.createElement)(ro.ToolbarButton,{isActive:a===gh,onClick:function(){return s(gh)}},(0,o.createElement)("div",{className:"wcf-block-toolbar-button"},(0,o.createElement)(th,{icon:oh}),(0,Go.__)("Edit","wpify-custom-fields"))))),a===hh&&(0,o.createElement)(Qf(),{className:"wcf-server-side-rendered",block:t.name,attributes:fh({},n),httpMethod:"POST"}),a===gh&&(0,o.createElement)(sh,fh({},e)),c&&(0,o.createElement)(dh,fh({},e))))};function bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mh(e){for(var t=1;t]*>/gm.test(t.icon)&&(t.icon=(0,o.createElement)("span",{dangerouslySetInnerHTML:{__html:t.icon}})),t.hooks={name:function(e){return e},id:function(e){return e}},(0,a.registerBlockType)(t.name,mh(mh({},t),{},{apiVersion:3,edit:function(e){return(0,o.createElement)(vh,mh({appContext:t},e))},save:function(){return(0,o.createElement)(Bp.InnerBlocks.Content,null)}}))}))}()}(); \ No newline at end of file +!function(){var e={597:function(e,t,n){"use strict";var r,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:n,width:a,height:l},u)},d),i.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},3891:function(e,t,n){"use strict";var r,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return i.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:n,width:a,height:l},u)},d),i.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,o=0;r>>6-2*o);return n}},e.exports=n},8679:function(e,t,n){"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),v=0;vthis.countryCodeMaxLen&&(this.countryCodeMaxLen=n.length),this.countryCodes.hasOwnProperty(n)||(this.countryCodes[n]=[]);for(var o=0;o-1}))}else if(this.options.excludeCountries.length){var n=this.options.excludeCountries.map((function(e){return e.toLowerCase()}));this.countries=t.filter((function(e){return-1===n.indexOf(e.iso2)}))}else this.countries=t}},{key:"_translateCountriesByLocale",value:function(){for(var e=0;et.name?1:0}},{key:"_processCountryCodes",value:function(){this.countryCodeMaxLen=0,this.dialCodes={},this.countryCodes={};for(var e=0;e"),this.options.showFlags&&(r+="
")),r+="".concat(i.name,""),r+="+".concat(i.dialCode,""),r+=""}this.countryList.insertAdjacentHTML("beforeend",r)}},{key:"_setInitialState",value:function(){var e=this.telInput.getAttribute("value"),t=this.telInput.value,n=!e||"+"!==e.charAt(0)||t&&"+"===t.charAt(0)?t:e,r=this._getDialCode(n),o=this._isRegionlessNanp(n),i=this.options,a=i.initialCountry,s=i.autoInsertDialCode;r&&!o?this._updateFlagFromNumber(n):"auto"!==a&&(a?this._setFlag(a.toLowerCase()):r&&o?this._setFlag("us"):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,n||this._setFlag(this.defaultCountry)),!n&&s&&(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),n&&this._updateValFromNumber(n)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoInsertDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var e=this;this._handleHiddenInputSubmit=function(){e.hiddenInput.value=e.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var e=this.telInput;e&&"LABEL"!==e.tagName;)e=e.parentNode;return e}},{key:"_initDropdownListeners",value:function(){var e=this;this._handleLabelClick=function(t){e.countryList.classList.contains("iti__hide")?e.telInput.focus():t.preventDefault()};var t=this._getClosestLabel();t&&t.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!e.countryList.classList.contains("iti__hide")||e.telInput.disabled||e.telInput.readOnly||e._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(t){e.countryList.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(t.key)&&(t.preventDefault(),t.stopPropagation(),e._showDropdown()),"Tab"===t.key&&e._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var e=this;this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",(function(){window.intlTelInputGlobals.loadUtils(e.options.utilsScript)})):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((function(e){window.intlTelInputGlobals.autoCountry=e.toLowerCase(),setTimeout((function(){return p("handleAutoCountry")}))}),(function(){return p("rejectAutoCountryPromise")})))}},{key:"_initKeyListeners",value:function(){var e=this;this._handleKeyupEvent=function(){e._updateFlagFromNumber(e.telInput.value)&&e._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(e._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(e){var t=this.telInput.getAttribute("maxlength");return t&&e.length>t?e.substr(0,t):e}},{key:"_initBlurListeners",value:function(){var e=this;this._handleSubmitOrBlurEvent=function(){e._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var e=this._getNumeric(this.telInput.value);e&&this.selectedCountryData.dialCode!==e||(this.telInput.value="")}}},{key:"_getNumeric",value:function(e){return e.replace(/\D/g,"")}},{key:"_trigger",value:function(e){var t=document.createEvent("Event");t.initEvent(e,!0,!0),this.telInput.dispatchEvent(t)}},{key:"_showDropdown",value:function(){this.countryList.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(e,t,n){n&&!e.classList.contains(t)?e.classList.add(t):!n&&e.classList.contains(t)&&e.classList.remove(t)}},{key:"_setDropdownPosition",value:function(){var e=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.isMobile){var t=this.telInput.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,r=t.top+n,o=this.countryList.offsetHeight,i=r+this.telInput.offsetHeight+on;if(this._toggleClass(this.countryList,"iti__country-list--dropup",!i&&a),this.options.dropdownContainer){var s=!i&&a?0:this.telInput.offsetHeight;this.dropdown.style.top="".concat(r+s,"px"),this.dropdown.style.left="".concat(t.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return e._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll)}}}},{key:"_getClosestListItem",value:function(e){for(var t=e;t&&t!==this.countryList&&!t.classList.contains("iti__country");)t=t.parentNode;return t===this.countryList?null:t}},{key:"_bindDropdownListeners",value:function(){var e=this;this._handleMouseoverCountryList=function(t){var n=e._getClosestListItem(t.target);n&&e._highlightListItem(n,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(t){var n=e._getClosestListItem(t.target);n&&e._selectListItem(n)},this.countryList.addEventListener("click",this._handleClickCountryList);var t=!0;this._handleClickOffToClose=function(){t||e._closeDropdown(),t=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);var n="",r=null;this._handleKeydownOnDropdown=function(t){t.preventDefault(),"ArrowUp"===t.key||"Up"===t.key||"ArrowDown"===t.key||"Down"===t.key?e._handleUpDownKey(t.key):"Enter"===t.key?e._handleEnterKey():"Escape"===t.key?e._closeDropdown():/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(t.key)&&(r&&clearTimeout(r),n+=t.key.toLowerCase(),e._searchForCountry(n),r=setTimeout((function(){n=""}),1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown)}},{key:"_handleUpDownKey",value:function(e){var t="ArrowUp"===e||"Up"===e?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;t&&(t.classList.contains("iti__divider")&&(t="ArrowUp"===e||"Up"===e?t.previousElementSibling:t.nextElementSibling),this._highlightListItem(t,!0))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(e){for(var t=0;ta){t&&(u+=d);var p=o-s;n.scrollTop=u-p}}},{key:"_updateDialCode",value:function(e){var t,n=this.telInput.value,r="+".concat(e);if("+"===n.charAt(0)){var o=this._getDialCode(n);t=o?n.replace(o,r):r,this.telInput.value=t}else this.options.autoInsertDialCode&&(t=n?r+n:r,this.telInput.value=t)}},{key:"_getDialCode",value:function(e,t){var n="";if("+"===e.charAt(0))for(var r="",o=0;o1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++ru))return!1;var p=l.get(e),f=l.get(t);if(p&&f)return p==t&&f==e;var h=-1,g=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},5514:function(e,t,n){var r=n(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},327:function(e,t,n){var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},361:function(e,t,n){var r=n(5990);e.exports=function(e){return r(e,5)}},5703:function(e){e.exports=function(e){return function(){return e}}},3279:function(e,t,n){var r=n(3218),o=n(7771),i=n(4841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,d,p,f,h=0,g=!1,v=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=l,r=c;return l=c=void 0,h=t,d=e.apply(r,n)}function y(e){var n=e-f;return void 0===f||n>=t||n<0||v&&e-h>=u}function w(){var e=o();if(y(e))return x(e);p=setTimeout(w,function(e){var n=t-(e-f);return v?s(n,u-(e-h)):n}(e))}function x(e){return p=void 0,b&&l?m(e):(l=c=void 0,d)}function O(){var e=o(),n=y(e);if(l=arguments,c=this,f=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(w,t),g?m(e):d}(f);if(v)return clearTimeout(p),p=setTimeout(w,t),m(f)}return void 0===p&&(p=setTimeout(w,t)),d}return t=i(t)||0,r(n)&&(g=!!n.leading,u=(v="maxWait"in n)?a(i(n.maxWait)||0,t):u,b="trailing"in n?!!n.trailing:b),O.cancel=function(){void 0!==p&&clearTimeout(p),h=0,l=f=c=p=void 0},O.flush=function(){return void 0===p?d:x(o())},O}},6073:function(e,t,n){e.exports=n(4486)},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},4486:function(e,t,n){var r=n(7412),o=n(9881),i=n(4290),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},2525:function(e,t,n){var r=n(7816),o=n(4290);e.exports=function(e,t){return e&&r(e,o(t))}},7361:function(e,t,n){var r=n(7786);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},9095:function(e,t,n){var r=n(13),o=n(222);e.exports=function(e,t){return null!=e&&o(e,t,r)}},6557:function(e){e.exports=function(e){return e}},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(7518),i=n(1167),a=i&&i.isMap,s=a?o(a):r;e.exports=s},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),i=n(7005),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},2928:function(e,t,n){var r=n(9221),o=n(7518),i=n(1167),a=i&&i.isSet,s=a?o(a):r;e.exports=s},7037:function(e,t,n){var r=n(4239),o=n(1469),i=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(7518),i=n(1167),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(8612);e.exports=function(e){return i(e)?r(e,!0):o(e)}},5161:function(e,t,n){var r=n(9932),o=n(7206),i=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},3857:function(e,t,n){var r=n(2980),o=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=o},7771:function(e,t,n){var r=n(5639);e.exports=function(){return r.Date.now()}},9601:function(e,t,n){var r=n(371),o=n(9152),i=n(5403),a=n(327);e.exports=function(e){return i(e)?r(a(e)):o(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},3493:function(e,t,n){var r=n(3279),o=n(3218);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},4841:function(e,t,n){var r=n(7561),o=n(3218),i=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},3678:function(e,t,n){var r=n(8363),o=n(1704);e.exports=function(e){return r(e,o(e))}},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},2568:function(e,t,n){var r,o,i,a,s;r=n(1012),o=n(487).utf8,i=n(8738),a=n(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,d=-1732584194,p=271733878,f=0;f>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[l>>>5]|=128<>>9<<4)]=l;var h=s._ff,g=s._gg,v=s._hh,b=s._ii;for(f=0;f>>0,u=u+y>>>0,d=d+w>>>0,p=p+x>>>0}return r.endian([c,u,d,p])})._ff=function(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+(o>>>0)+a;return(s<>>32-i)+t},s._gg=function(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+(o>>>0)+a;return(s<>>32-i)+t},s._hh=function(e,t,n,r,o,i,a){var s=e+(t^n^r)+(o>>>0)+a;return(s<>>32-i)+t},s._ii=function(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+(o>>>0)+a;return(s<>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}},2703:function(e,t,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9921:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case g:case l:return e;default:return t}}case o:return t}}}function O(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return O(e)||x(e)===u},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===v},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===m||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=x},9864:function(e,t,n){"use strict";e.exports=n(9921)},4754:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,o=(r=n(2525))&&r.__esModule?r:{default:r},i=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,i.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=l},9941:function(e,t,n){"use strict";t.tz=void 0;var r=c(n(4147)),o=c(n(8556)),i=c(n(4754)),a=c(n(1765)),s=c(n(6002)),l=c(n(7742));function c(e){return e&&e.__esModule?e:{default:e}}a.default,t.tz=a.default,s.default,l.default;t.ZP=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},8556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=a(n(2525)),o=a(n(361)),i=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,r.default)(o,(function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])})),t})),n};t.default=s},3250:function(e,t,n){"use strict";var r=n(9196),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),a((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},1688:function(e,t,n){"use strict";e.exports=n(3250)},4583:function(e){self,e.exports=(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nu,load:()=>d,default:()=>p});var u=function e(){var t,o=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"id",null),c(this,"controls",{}),c(this,"layers",{}),c(this,"markers",{}),c(this,"markersDefinition",{}),c(this,"clusterers",{}),c(this,"images",{}),c(this,"mapTypes",{DEF_BASE:"DEF_BASE",DEF_TURIST:"DEF_TURIST",DEF_OPHOTO:"DEF_OPHOTO",DEF_HISTORIC:"DEF_HISTORIC",DEF_OPHOTO0203:"DEF_OPHOTO0203",DEF_OPHOTO0406:"DEF_OPHOTO0406",DEF_SMART_BASE:"DEF_SMART_BASE",DEF_SMART_OPHOTO:"DEF_SMART_OPHOTO",DEF_SMART_TURIST:"DEF_SMART_TURIST",DEF_TURIST_WINTER:"DEF_TURIST_WINTER",DEF_SMART_WINTER:"DEF_SMART_WINTER",DEF_GEOGRAPHY:"DEF_GEOGRAPHY",DEF_OPHOTO1012:"DEF_OPHOTO1012",DEF_OPHOTO1415:"DEF_OPHOTO1415",DEF_OPHOTO1618:"DEF_OPHOTO1618",DEF_BASE_NEW:"DEF_BASE_NEW",DEF_TURIST_NEW:"DEF_TURIST_NEW"}),c(this,"update",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.zoom&&o.setZoom(e.zoom),e.center&&o.isCoords(e.center)&&o.setCenter(e.center),e.default_controls&&o.addDefaultControls(),e.sync_control?o.addControlSync():o.removeControl("sync"),e.markers&&Array.isArray(e.markers)?o.addMarkers(e.markers):o.removeMarkers(),e.marker&&o.isCoords(e.marker)&&o.addMarker(e.marker),e.auto_center_zoom&&o.autoCenterZoom(),e.clusterers&&(Array.isArray(e.clusterers)?e.clusterers.forEach(o.addClusterer):"string"==typeof e.clusterers?o.addClusterer(e.clusterers):o.addClusterers()),e.poi?o.addPoi():o.removePoi(),e.map_type_switch?Array.isArray(e.map_type_switch)?o.addMapTypeSwitch(e.map_type_switch):o.addMapTypeSwitch():o.removeMapTypeSwitch(),e.image_overlay?Array.isArray(e.image_overlay)?e.image_overlay.forEach(o.addImageOverlay):o.addImageOverlay(e.image_overlay):o.removeImageOverlay(),e.gpx?Array.isArray(e.gpx)?e.gpx.forEach(o.addGpx):o.addGpx(e.gpx):o.removeGpx()})),c(this,"loadScript",(function(){return window.wpifyMapyCzScript&&window.wpifyMapyCzScript instanceof Promise||(window.wpifyMapyCzScript=new Promise((function(e,t){if(document.querySelector('script[src="'+o.loaderUrl+'"]'))e();else{var n=document.createElement("script"),r=document.querySelector("script");n.addEventListener("load",e),n.addEventListener("error",(function(e){return t(e.error)})),n.src=o.loaderUrl,r.parentNode.insertBefore(n,r)}}))),window.wpifyMapyCzScript})),c(this,"loadSmap",(function(){return window.wpifyMapyCzScriptLoader&&window.wpifyMapyCzScriptLoader instanceof Promise||(window.wpifyMapyCzScriptLoader=new Promise((function(e){Loader.async=!0,Loader.lang=o.lang,Loader.load(o.id,{api:o.api,poi:o.poi,pano:o.pano,suggest:o.suggest},e)}))),window.wpifyMapyCzScriptLoader})),c(this,"createMap",(function(){return new Promise((function(e){"full"===o.api?(o.map=new SMap(o.element,o.getCoords(o.center),o.zoom),o.map.addDefaultLayer(o.getMapType()).enable()):"simple"===o.api&&(o.map=new SMap(o.element,o.getCoords(o.center),o.zoom,o.getMapType())),o.map.getSignals().addListener(window,"marker-click",o.onMarkerClick),e(o)}))})),c(this,"getMap",(function(){return o.map})),c(this,"getCoords",(function(e){var t=e.latitude,n=e.longitude;return SMap.Coords.fromWGS84(n,t)})),c(this,"getMapType",(function(){return SMap[o.mapType]?SMap[o.mapType]:SMap.DEF_BASE})),c(this,"generateId",(function(){for(var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).length,t=void 0===e?32:e,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var n=t.layer||n;e[n]||(e[n]=[]),e[n].push(t)})),Object.keys(e).forEach((function(t){o.layers[t]?o.layers[t].disable():(o.layers[t]=new SMap.Layer.Marker,o.map.addLayer(o.layers[t])),e[t].forEach((function(e){var n=e.latitude,r=e.longitude,i=e.id,a=void 0===i?o.generateId():i,s=e.title,l=e.size,c=void 0===l?null:l,u=e.pin,d=e.anchor,p=e.card,f=e.pointer;o.markersDefinition[a]=e;var h=o.getCoords({latitude:n,longitude:r}),g={};if(s&&(g.title=s),c&&(g.size=c),u&&(g.url=u),d&&(g.anchor=d),o.removeMarker(a,t),o.markers[a]=new SMap.Marker(h,a,g),p&&Object(p)===p){var v=p.header,b=p.body,m=p.footer,y=p.container,w=new SMap.Card;v&&(w.getHeader().innerHTML=v),b&&(w.getBody().innerHTML=b),m&&(w.getFooter().innerHTML=m),y&&(w.getContainer().innerHTML=y),o.markers[a].decorate(SMap.Marker.Feature.Card,w)}if(o.layers[t].addMarker(o.markers[a]),f){var x="marker-pointer-"+a;o.controls[x]&&o.removeControl(x),o.controls[x]=new SMap.Control.Pointer,o.controls[x].addListener("pointer-click",(function(){return o.setCenter({latitude:n,longitude:r})}),o.controls[x]),o.controls[x].setCoords(h),o.map.addControl(o.controls[x])}})),o.layers[t].enable()}))})),c(this,"removeMarker",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"markers";o.markers[e]&&(o.layers[t]&&o.layers[t].removeMarker(o.markers[e]),delete o.markers[e])})),c(this,"removeMarkers",(function(){Object.keys(o.layers).forEach((function(e){o.layers[e]&&o.layers[e]instanceof SMap.Layer.Marker&&o.layers[e].removeAll()}))})),c(this,"autoCenterZoom",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e&&o.layers[e]?o.layers[e].getMarkers():Object.values(o.markers),n=o.map.computeCenterZoom(t.map((function(e){return e.getCoords()}))),i=r(n,2),a=i[0],s=i[1];o.map.setCenterZoom(a,s)})),c(this,"setCenter",(function(e){o.map.setCenter(o.getCoords(e))})),c(this,"addClusterer",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"markers";if(o.layers[e]){var t=new SMap.Marker.Clusterer(o.map);o.layers[e].setClusterer(t),o.clusterers[e]=t}})),c(this,"addClusterers",(function(){Object.keys(o.layers).forEach((function(e){o.layers[e]&&o.layers[e]instanceof SMap.Layer.Marker&&o.addClusterer(e)}))})),c(this,"addPoi",(function(){if(!o.layers.poi){o.layers.poi=new SMap.Layer.Marker(void 0,{poiTooltip:!0}),o.map.addLayer(o.layers.poi).enable();var e=o.map.createDefaultDataProvider();e.setOwner(o.map),e.addLayer(o.layers.poi),e.setMapSet([o.mapTypes.DEF_TURIST,o.mapTypes.DEF_TURIST_WINTER,o.mapTypes.DEF_TURIST_NEW,o.mapTypes.DEF_SMART_TURIST].includes(o.mapType)?SMap.MAPSET_TURIST:SMap.MAPSET_BASE),e.enable()}})),c(this,"removePoi",(function(){o.layers.poi&&(o.map.removeLayer(o.layers.poi),delete o.layers.poi)})),c(this,"addMapTypeSwitch",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{width:65,items:4,page:4},n=Array.isArray(e)?e.filter((function(e){return Boolean(SMap[e])})):Object.keys(o.mapTypes).filter((function(e){return Boolean(SMap[e])}));n.forEach((function(e){o.map.addDefaultLayer(SMap[e])}));var r=new SMap.Control.Layer(t);n.forEach((function(e){r.addDefaultLayer(SMap[e])})),o.controls["layer-switch"]&&o.removeControl("layer-switch"),o.controls["layer-switch"]=r,o.map.addControl(r)})),c(this,"removeMapTypeSwitch",(function(){o.controls["layer-switch"]&&o.removeControl("layer-switch")})),c(this,"addImageOverlay",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?o.generateId():t,r=e.image,i=e.top_left,a=e.topLeft,s=void 0===a?i:a,l=e.bottom_right,c=e.bottomRight,u=void 0===c?l:c,d=e.opacity,p=void 0===d?1:d;if(o.layers.image||(o.layers.image=new SMap.Layer.Image,o.map.addLayer(o.layers.image),o.layers.image.enable()),r&&s&&u)return o.images[n]&&o.layers.image.removeImage(o.images[n]),o.images[n]=o.layers.image.addImage(r,o.getCoords(s),o.getCoords(u),p),o.images[n]})),c(this,"removeImageOverlay",(function(){o.layers.image&&Object.keys(o.images).forEach((function(e){o.layers.image.removeImage(o.images[e]),delete o.images[e]}))})),c(this,"addGpx",(function(e){var t=e.id,n=void 0===t?o.generateId():t,r=e.data,i=e.source,a=e.fit,s=e.colors,l=e.maxPoints,c=e.url,u=new Promise((function(e,t){if(r){var n=JAK.XML.createDocument(r);e(n)}else i&&fetch(i).then((function(e){if(e.ok)return e.text();throw e.error()})).then((function(t){e(JAK.XML.createDocument(t))})).catch(t)}));u.then((function(e){var t="gpx-"+n,r={};return s&&(r.colors=s),l&&(r.maxPoints=l),c&&(r.url=c),o.layers[t]=new SMap.Layer.GPX(e,null,r),o.map.addLayer(o.layers[t]),o.layers[t].enable(),a&&o.layers[t].fit(),Promise.resolve(t)}))})),c(this,"removeGpx",(function(){Object.keys(o.layers).forEach((function(e){o.layers[e]instanceof SMap.Layer.GPX&&(o.removeLayer(o.layers[e]),delete o.layers[e])}))})),c(this,"isLayerVisible",(function(e){if(o.layers[e])return o.layers[e].isActive()})),c(this,"hideLayer",(function(e){o.layers[e]&&o.layers[e].disable()})),c(this,"showLayer",(function(e){o.layers[e]&&o.layers[e].enable()})),c(this,"hideAllLayers",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"markers";Object.keys(o.layers).forEach((function(t){"markers"===e&&o.layers[t]instanceof SMap.Layer.Marker&&o.layers[t].disable()}))})),c(this,"showAllLayers",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"markers";Object.keys(o.layers).forEach((function(t){"markers"===e&&o.layers[t]instanceof SMap.Layer.Marker&&o.layers[t].enable()}))})),c(this,"findByAddress",(function(e,t){return new Promise((function(r,i){var a=function(e){var t=[],a=e.getResults();a.length>0&&a[0].results.length>0?(a.forEach((function(e){t.push.apply(t,n(e.results))})),r(t.map((function(e){var t=o.transformCoords(e.coords);return delete e.coords,s(s({},e),t)})))):i()};t&&2===t.length&&o.isCoords(t[0])&&o.isCoords(t[1])?new SMap.Geocoder(e,a,{bbox:[o.getCoords(t[0]),o.getCoords(t[1])]}):new SMap.Geocoder(e,a)}))})),c(this,"findByCoords",(function(e){return new Promise((function(t,n){o.isCoords(e)?new SMap.Geocoder.Reverse(o.getCoords(e),(function(e){var n=e.getResults();n.coords=o.transformCoords(n.coords),n.items=n.items.map((function(e){return e.coords=o.transformCoords(e.coords),e})),t(n)})):n("No coords provided")}))})),c(this,"addSuggest",(function(e,t){var n=e.input,r=e.lang,i=void 0===r?"cs,en":r,a=e.bounds,s=e.enableCategories;if(!n)return!1;o.suggest=new SMap.Suggest(n,{provider:new SMap.SuggestProvider({updateParams:function(e){var t=o.map.getCenter().toWGS84();e.lon=t[0].toFixed(5),e.lat=t[1].toFixed(5),e.zoom=o.map.getZoom(),a&&(e.bounds=a),s&&(e.enableCategories=s),e.lang=i}})}),o.suggest.addListener("suggest",t)})),this.loaderUrl="https://api.mapy.cz/loader.js",this.lang=i.lang||"en",this.zoom=i.zoom||13,this.mapType=i.mapType||this.mapTypes.DEF_BASE,this.api=["full","simple"].includes(i.api)?i.api:"full",this.poi=!i.poi||Boolean(i.poi),this.pano=!i.pano||Boolean(i.pano),this.suggest=!i.suggest||Boolean(i.pano),i.center&&i.center.latitude&&i.center.longitude?this.center=i.center:this.center={latitude:0,longitude:0},i.element?t=i.element:i.id&&document.getElementById(i.id)&&(t=document.getElementById(i.id)),!document.getElementById("wpify-mapy-cz-css-reset")){var a=document.createElement("style");a.id="wpify-mapy-cz-css-reset",a.appendChild(document.createTextNode([".smap{min-height:170px}",".smap img{max-width:unset!important;display:unset!important;}",".smap,.smap *,.smap *::before,.smap *::after{word-break:normal!important;box-sizing:unset!important;}",".smap svg{display:unset!important;height:unset!important;max-width:unset!important;}"].join(" "))),document.head.appendChild(a)}t&&(this.element=t,this.id=i.id,this.resolver=new Promise((function(e,t){o.loadScript().then(o.loadSmap).then(o.createMap).then((function(){o.update(i),e(o)})).catch(t)})))},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};new u(e).resolver.then(t)};const p=u;return t})()},9196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(n)?n:String(n)}function r(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}var o=n(9196),i=n.n(o),a=window.wp.blocks;function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);na?1:Math.round(100*u/a)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var p;if(r!==(p=c<0?0:c>i?1:Math.round(100*c/i)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},ee(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Q(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,$.ZP)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:Y({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return i().createElement("div",{style:n.alpha},i().createElement("div",{style:n.checkboard},i().createElement(J,{renderers:this.props.renderers})),i().createElement("div",{style:n.gradient}),i().createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("div",{style:n.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:n.slider}))))}}]),t}(o.PureComponent||o.Component),ne=te,re=function(){function e(e,t){for(var n=0;n-1)){var o=n.getArrowOffset(),i=38===e.keyCode?r+o:r-o;n.setUpdatedValue(i,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+ie++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),re(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,$.ZP)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i().createElement("div",{style:t.wrap},i().createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i().createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(o.PureComponent||o.Component),se=ae,le=function(){function e(e,t){for(var n=0;ni?0:360*(-100*c/i+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d;if(d=l<0?0:l>o?359:100*l/o*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},ce(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),le(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=(0,$.ZP)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return i().createElement("div",{style:r.hue},i().createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),i().createElement("div",{style:r.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:r.slider}))))}}]),t}(o.PureComponent||o.Component),de=ue,pe=n(5697),fe=n.n(pe),he=n(3857),ge=n.n(he),ve=function(e){var t=e.zDepth,n=e.radius,r=e.background,o=e.children,a=e.styles,s=void 0===a?{}:a,l=(0,$.ZP)(ge()({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":1===t});return i().createElement("div",{style:l.wrap},i().createElement("div",{style:l.bg}),i().createElement("div",{style:l.content},o))};ve.propTypes={background:fe().string,zDepth:fe().oneOf([0,1,2,3,4,5]),radius:fe().number,styles:fe().object},ve.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var be=ve,me=n(3493),ye=n.n(me),we=function(){function e(e,t){for(var n=0;no&&(l=o),c<0?c=0:c>i&&(c=i);var u=l/o,d=1-c/i;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=ye()((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),we(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,o=t.black,a=t.pointer,s=t.circle,l=(0,$.ZP)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:o,pointer:a,circle:s}},{custom:!!this.props.style});return i().createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),i().createElement("div",{style:l.white,className:"saturation-white"},i().createElement("div",{style:l.black,className:"saturation-black"}),i().createElement("div",{style:l.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:l.circle}))))}}]),t}(o.PureComponent||o.Component),Oe=xe,Ee=n(3279),Ce=n.n(Ee),Se=n(6073),_e=n.n(Se);function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}var je=/^\s+/,Pe=/\s+$/;function De(e,t){if(t=t||{},(e=e||"")instanceof De)return e;if(!(this instanceof De))return new De(e,t);var n=function(e){var t,n,r,o={r:0,g:0,b:0},i=1,a=null,s=null,l=null,c=!1,u=!1;return"string"==typeof e&&(e=function(e){e=e.replace(je,"").replace(Pe,"").toLowerCase();var t,n=!1;if(Ke[e])e=Ke[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=at.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=at.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=at.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=at.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=at.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=at.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=at.hex8.exec(e))?{r:Ye(t[1]),g:Ye(t[2]),b:Ye(t[3]),a:nt(t[4]),format:n?"name":"hex8"}:(t=at.hex6.exec(e))?{r:Ye(t[1]),g:Ye(t[2]),b:Ye(t[3]),format:n?"name":"hex"}:(t=at.hex4.exec(e))?{r:Ye(t[1]+""+t[1]),g:Ye(t[2]+""+t[2]),b:Ye(t[3]+""+t[3]),a:nt(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=at.hex3.exec(e))&&{r:Ye(t[1]+""+t[1]),g:Ye(t[2]+""+t[2]),b:Ye(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==ke(e)&&(st(e.r)&&st(e.g)&&st(e.b)?(t=e.r,n=e.g,r=e.b,o={r:255*qe(t,255),g:255*qe(n,255),b:255*qe(r,255)},c=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):st(e.h)&&st(e.s)&&st(e.v)?(a=et(e.s),s=et(e.v),o=function(e,t,n){e=6*qe(e,360),t=qe(t,100),n=qe(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6;return{r:255*[n,a,i,i,s,n][l],g:255*[s,n,n,a,i,i][l],b:255*[i,i,s,n,n,a][l]}}(e.h,a,s),c=!0,u="hsv"):st(e.h)&&st(e.s)&&st(e.l)&&(a=et(e.s),l=et(e.l),o=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=qe(e,360),t=qe(t,100),n=qe(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),o=a(l,s,e),i=a(l,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,a,l),c=!0,u="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=Xe(i),{ok:c,format:e.format||u,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:i}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Me(e,t,n){e=qe(e,255),t=qe(t,255),n=qe(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var l=i-a;switch(o=s>.5?l/(2-i-a):l/(i+a),i){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(De(r));return i}function $e(e,t){t=t||6;for(var n=De(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(De({h:r,s:o,v:i})),i=(i+s)%1;return a}De.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=Xe(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ie(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ie(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Me(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Me(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Te(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[Qe(Math.round(e).toString(16)),Qe(Math.round(t).toString(16)),Qe(Math.round(n).toString(16)),Qe(tt(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*qe(this._r,255))+"%",g:Math.round(100*qe(this._g,255))+"%",b:Math.round(100*qe(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*qe(this._r,255))+"%, "+Math.round(100*qe(this._g,255))+"%, "+Math.round(100*qe(this._b,255))+"%)":"rgba("+Math.round(100*qe(this._r,255))+"%, "+Math.round(100*qe(this._g,255))+"%, "+Math.round(100*qe(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Ze[Te(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Re(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=De(e);n="#"+Re(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return De(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Fe,arguments)},brighten:function(){return this._applyModification(Be,arguments)},darken:function(){return this._applyModification(He,arguments)},desaturate:function(){return this._applyModification(Le,arguments)},saturate:function(){return this._applyModification(Ae,arguments)},greyscale:function(){return this._applyModification(Ne,arguments)},spin:function(){return this._applyModification(Ve,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Ge,arguments)},complement:function(){return this._applyCombination(ze,arguments)},monochromatic:function(){return this._applyCombination($e,arguments)},splitcomplement:function(){return this._applyCombination(We,arguments)},triad:function(){return this._applyCombination(Ue,[3])},tetrad:function(){return this._applyCombination(Ue,[4])}},De.fromRatio=function(e,t){if("object"==ke(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:et(e[r]));e=n}return De(e,t)},De.equals=function(e,t){return!(!e||!t)&&De(e).toRgbString()==De(t).toRgbString()},De.random=function(){return De.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},De.mix=function(e,t,n){n=0===n?0:n||50;var r=De(e).toRgb(),o=De(t).toRgb(),i=n/100;return De({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},De.readability=function(e,t){var n=De(e),r=De(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},De.isReadable=function(e,t,n){var r,o,i,a,s,l=De.readability(e,t);switch(o=!1,(i=n,"AA"!==(a=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},De.mostReadable=function(e,t,n){var r,o,i,a,s=null,l=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var c=0;cl&&(l=r,s=De(t[c]));return De.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,De.mostReadable(e,["#fff","#000"],n))};var Ke=De.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ze=De.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Ke);function Xe(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function qe(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Je(e){return Math.min(1,Math.max(0,e))}function Ye(e){return parseInt(e,16)}function Qe(e){return 1==e.length?"0"+e:""+e}function et(e){return e<=1&&(e=100*e+"%"),e}function tt(e){return Math.round(255*parseFloat(e)).toString(16)}function nt(e){return Ye(e)/255}var rt,ot,it,at=(ot="[\\s|\\(]+("+(rt="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+rt+")[,|\\s]+("+rt+")\\s*\\)?",it="[\\s|\\(]+("+rt+")[,|\\s]+("+rt+")[,|\\s]+("+rt+")[,|\\s]+("+rt+")\\s*\\)?",{CSS_UNIT:new RegExp(rt),rgb:new RegExp("rgb"+ot),rgba:new RegExp("rgba"+it),hsl:new RegExp("hsl"+ot),hsla:new RegExp("hsla"+it),hsv:new RegExp("hsv"+ot),hsva:new RegExp("hsva"+it),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function st(e){return!!at.CSS_UNIT.exec(e)}var lt=function(e){var t=0,n=0;return _e()(["r","g","b","a","h","s","l","v"],(function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)})),t===n&&e},ct=function(e,t){var n=e.hex?De(e.hex):De(e),r=n.toHsl(),o=n.toHsv(),i=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===a&&0===i.a?"transparent":"#"+a,rgb:i,hsv:o,oldHue:e.h||t||r.h,source:e.source}},ut=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&De(e).isValid()},dt=function(e){if(!e)return"#fff";var t=ct(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},pt=function(e,t){return De(t+" ("+e.replace("°","")+")")._ok},ft=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var o=arguments.length,i=Array(o),a=0;a1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(hr()(e.s)?n.props.hsl.s:e.s),l:Number(hr()(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),vr(t,[{key:"render",value:function(){var e=this,t=(0,$.ZP)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(se,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(se,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(se,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i().createElement("div",{style:t.wrap,className:"flexbox-fix"},n,i().createElement("div",{style:t.toggle},i().createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},i().createElement(gr.Z,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(i().Component);br.defaultProps={view:"hex"};var mr=br,yr=function(){var e=(0,$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i().createElement("div",{style:e.picker})},wr=function(){var e=(0,$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i().createElement("div",{style:e.picker})},xr=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,o=e.rgb,a=e.hsl,s=e.hsv,l=e.hex,c=e.renderers,u=e.styles,d=void 0===u?{}:u,p=e.className,f=void 0===p?"":p,h=e.defaultView,g=(0,$.ZP)(ge()({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:r});return i().createElement("div",{style:g.picker,className:"chrome-picker "+f},i().createElement("div",{style:g.saturation},i().createElement(Oe,{style:g.Saturation,hsl:a,hsv:s,pointer:wr,onChange:n})),i().createElement("div",{style:g.body},i().createElement("div",{style:g.controls,className:"flexbox-fix"},i().createElement("div",{style:g.color},i().createElement("div",{style:g.swatch},i().createElement("div",{style:g.active}),i().createElement(J,{renderers:c}))),i().createElement("div",{style:g.toggles},i().createElement("div",{style:g.hue},i().createElement(de,{style:g.Hue,hsl:a,pointer:yr,onChange:n})),i().createElement("div",{style:g.alpha},i().createElement(ne,{style:g.Alpha,rgb:o,hsl:a,pointer:yr,renderers:c,onChange:n})))),i().createElement(mr,{rgb:o,hsl:a,hex:l,view:h,onChange:n,disableAlpha:r})))};xr.propTypes={width:fe().oneOfType([fe().string,fe().number]),disableAlpha:fe().bool,styles:fe().object,defaultView:fe().oneOf(["hex","rgb","hsl"])},xr.defaultProps={width:225,disableAlpha:!1,styles:{}},gt(xr);var Or=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,a=e.active,s=(0,$.ZP)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:dt(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return i().createElement(wt,{style:s.color,color:t,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},i().createElement("div",{style:s.dot}))},Er=function(e){var t=e.hex,n=e.rgb,r=e.onChange,o=(0,$.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return i().createElement("div",{style:o.fields,className:"flexbox-fix"},i().createElement("div",{style:o.active}),i().createElement(se,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:a}),i().createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:a}),i().createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:a}),i().createElement(se,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:a}))},Cr=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,o=e.hex,a=e.rgb,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,d=(0,$.ZP)(ge()({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),p=function(e,n){e.hex?ut(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return i().createElement(be,{style:d.Compact,styles:l},i().createElement("div",{style:d.compact,className:"compact-picker "+u},i().createElement("div",null,Ct()(r,(function(e){return i().createElement(Or,{key:e,color:e,active:e.toLowerCase()===o,onClick:p,onSwatchHover:n})})),i().createElement("div",{style:d.clear})),i().createElement(Er,{hex:o,rgb:a,onChange:p})))};Cr.propTypes={colors:fe().arrayOf(fe().string),styles:fe().object},Cr.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},gt(Cr);var Sr=(0,$.tz)((function(e){var t=e.hover,n=e.color,r=e.onClick,o=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=(0,$.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:t});return i().createElement("div",{style:s.swatch},i().createElement(wt,{color:n,onClick:r,onHover:o,focusStyle:a}))})),_r=function(e){var t=e.width,n=e.colors,r=e.onChange,o=e.onSwatchHover,a=e.triangle,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,d=(0,$.ZP)(ge()({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===a,"top-left-triangle":"top-left"===a,"top-right-triangle":"top-right"===a,"bottom-left-triangle":"bottom-left"===a,"bottom-right-triangle":"bottom-right"===a}),p=function(e,t){return r({hex:e,source:"hex"},t)};return i().createElement("div",{style:d.card,className:"github-picker "+u},i().createElement("div",{style:d.triangleShadow}),i().createElement("div",{style:d.triangle}),Ct()(n,(function(e){return i().createElement(Sr,{color:e,key:e,onClick:p,onSwatchHover:o})})))};_r.propTypes={width:fe().oneOfType([fe().string,fe().number]),colors:fe().arrayOf(fe().string),triangle:fe().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:fe().object},_r.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},gt(_r);var kr=Object.assign||function(e){for(var t=1;t.5});return i().createElement("div",{style:n.picker})},Mr=function(){var e=(0,$.ZP)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i().createElement("div",{style:e.pointer},i().createElement("div",{style:e.left},i().createElement("div",{style:e.leftInside})),i().createElement("div",{style:e.right},i().createElement("div",{style:e.rightInside})))},Ir=function(e){var t=e.onClick,n=e.label,r=e.children,o=e.active,a=(0,$.ZP)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return i().createElement("div",{style:a.button,onClick:t},n||r)},Tr=function(e){var t=e.rgb,n=e.currentColor,r=(0,$.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i().createElement("div",null,i().createElement("div",{style:r.label},"new"),i().createElement("div",{style:r.swatches},i().createElement("div",{style:r.new}),i().createElement("div",{style:r.current})),i().createElement("div",{style:r.label},"current"))},Rr=function(){function e(e,t){for(var n=0;n100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},o))};return i().createElement("div",{style:s.fields,className:"flexbox-fix"},i().createElement("div",{style:s.double},i().createElement(se,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:l})),i().createElement("div",{style:s.single},i().createElement(se,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:s.single},i().createElement(se,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:s.single},i().createElement(se,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:s.alpha},i().createElement(se,{style:{input:s.input,label:s.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},Nr=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var io=["className"];function ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var so=function(e){var t=e.className,n=oo(e,io);return(0,o.createElement)("button",function(e){for(var t=1;t{t.current=e})),(0,o.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{n.current!==e&&(n.current=e)}),t),n}function ui(e,t){const n=(0,o.useRef)();return(0,o.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function di(e){const t=li(e),n=(0,o.useRef)(null),r=(0,o.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function pi(e){const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current}let fi={};function hi(e,t){return(0,o.useMemo)((()=>{if(t)return t;const n=null==fi[e]?0:fi[e]+1;return fi[e]=n,e+"-"+n}),[e,t])}function gi(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const vi=gi(1),bi=gi(-1);function mi(e){if(!e)return!1;const{KeyboardEvent:t}=ni(e.target);return t&&e instanceof t}function yi(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ni(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const wi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[wi.Translate.toString(e),wi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),xi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Oi(e){return e.matches(xi)?e:e.querySelector(xi)}const Ei={display:"none"};function Ci(e){let{id:t,value:n}=e;return i().createElement("div",{id:t,style:Ei},n)}function Si(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return i().createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const _i=(0,o.createContext)(null),ki={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},ji={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Pi(e){let{announcements:t=ji,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=ki}=e;const{announce:s,announcement:l}=function(){const[e,t]=(0,o.useState)("");return{announce:(0,o.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),c=hi("DndLiveRegion"),[u,d]=(0,o.useState)(!1);if((0,o.useEffect)((()=>{d(!0)}),[]),function(e){const t=(0,o.useContext)(_i);(0,o.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}((0,o.useMemo)((()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&s(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;s(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;s(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;s(t.onDragCancel({active:n,over:r}))}})),[s,t])),!u)return null;const p=i().createElement(i().Fragment,null,i().createElement(Ci,{id:r,value:a.draggable}),i().createElement(Si,{id:c,announcement:l}));return n?(0,Yo.createPortal)(p,n):p}var Di;function Mi(){}function Ii(e,t){return(0,o.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Di||(Di={}));const Ti=Object.freeze({x:0,y:0});function Ri(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Li(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Ai(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ni(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Fi(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function Bi(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Hi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Bi(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ri(Bi(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Li)};function Vi(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=Vi(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Ai)};function Ui(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ti}function Wi(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const Gi=Wi(1);const $i={ignoreTransform:!1};function Ki(e,t){void 0===t&&(t=$i);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=ni(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:s,right:l}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:l}}function Zi(e){return Ki(e,{ignoreTransform:!0})}function Xi(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(ri(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!oi(o)||ii(o))return n;if(n.includes(o))return n;const i=ni(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=ni(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=ni(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function qi(e){const[t]=Xi(e,1);return null!=t?t:null}function Ji(e){return Qo&&e?ei(e)?e:ti(e)?ri(e)||e===ai(e).scrollingElement?window:oi(e)?e:null:null:null}function Yi(e){return ei(e)?e.scrollX:e.scrollLeft}function Qi(e){return ei(e)?e.scrollY:e.scrollTop}function ea(e){return{x:Yi(e),y:Qi(e)}}var ta;function na(e){return!(!Qo||!e)&&e===document.scrollingElement}function ra(e){const t={x:0,y:0},n=na(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ta||(ta={}));const oa={x:.2,y:.2};function ia(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=oa);const{isTop:c,isBottom:u,isLeft:d,isRight:p}=ra(e),f={x:0,y:0},h={x:0,y:0},g=t.height*o.y,v=t.width*o.x;return!c&&i<=t.top+g?(f.y=ta.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!u&&l>=t.bottom-g&&(f.y=ta.Forward,h.y=r*Math.abs((t.bottom-g-l)/g)),!p&&s>=t.right-v?(f.x=ta.Forward,h.x=r*Math.abs((t.right-v-s)/v)):!d&&a<=t.left+v&&(f.x=ta.Backward,h.x=r*Math.abs((t.left+v-a)/v)),{direction:f,speed:h}}function aa(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function sa(e){return e.reduce(((e,t)=>vi(e,ea(t))),Ti)}const la=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Yi(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Qi(t)),0)}]];class ca{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Xi(t),r=sa(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of la)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ua{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function da(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var pa,fa;function ha(e){e.preventDefault()}function ga(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(pa||(pa={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(fa||(fa={}));const va={start:[fa.Space,fa.Enter],cancel:[fa.Esc],end:[fa.Space,fa.Enter]},ba=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case fa.Right:return{...n,x:n.x+25};case fa.Left:return{...n,x:n.x-25};case fa.Down:return{...n,y:n.y+25};case fa.Up:return{...n,y:n.y-25}}};class ma{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ua(ai(t)),this.windowListeners=new ua(ni(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pa.Resize,this.handleCancel),this.windowListeners.add(pa.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(pa.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Ki),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);qi(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Ti)}handleKeyDown(e){if(mi(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=va,coordinateGetter:i=ba,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Ti;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=bi(u,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:p}=ra(n),f=aa(n),h={x:Math.min(o===fa.Right?f.right-f.width/2:f.right,Math.max(o===fa.Right?f.left:f.left+f.width/2,u.x)),y:Math.min(o===fa.Down?f.bottom-f.height/2:f.bottom,Math.max(o===fa.Down?f.top:f.top+f.height/2,u.y))},g=o===fa.Right&&!s||o===fa.Left&&!l,v=o===fa.Down&&!c||o===fa.Up&&!i;if(g&&h.x!==u.x){const e=n.scrollLeft+t.x,i=o===fa.Right&&e<=d.x||o===fa.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===fa.Right?n.scrollLeft-d.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(v&&h.y!==u.y){const e=n.scrollTop+t.y,i=o===fa.Down&&e<=d.y||o===fa.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===fa.Down?n.scrollTop-d.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,vi(bi(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ya(e){return Boolean(e&&"distance"in e)}function wa(e){return Boolean(e&&"delay"in e)}ma.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=va,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class xa{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=ni(e);return e instanceof t?e:ai(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=ai(i),this.documentListeners=new ua(this.document),this.listeners=new ua(n),this.windowListeners=new ua(ni(i)),this.initialCoordinates=null!=(r=yi(o))?r:Ti,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(pa.Resize,this.handleCancel),this.windowListeners.add(pa.DragStart,ha),this.windowListeners.add(pa.VisibilityChange,this.handleCancel),this.windowListeners.add(pa.ContextMenu,ha),this.documentListeners.add(pa.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wa(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(ya(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(pa.Click,ga,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pa.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=yi(e))?t:Ti,l=bi(r,s);if(!n&&a){if(ya(a)){if(null!=a.tolerance&&da(l,a.tolerance))return this.handleCancel();if(da(l,a.distance))return this.handleStart()}return wa(a)&&da(l,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===fa.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Oa={move:{name:"pointermove"},end:{name:"pointerup"}};class Ea extends xa{constructor(e){const{event:t}=e,n=ai(t.target);super(e,Oa,n)}}Ea.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const Ca={move:{name:"mousemove"},end:{name:"mouseup"}};var Sa;!function(e){e[e.RightClick=2]="RightClick"}(Sa||(Sa={})),class extends xa{constructor(e){super(e,Ca,ai(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Sa.RightClick&&(null==r||r({event:n}),!0)}}];const _a={move:{name:"touchmove"},end:{name:"touchend"}};var ka,ja;(class extends xa{constructor(e){super(e,_a)}static setup(){return window.addEventListener(_a.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(_a.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ka||(ka={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ja||(ja={}));const Pa={x:{[ta.Backward]:!1,[ta.Forward]:!1},y:{[ta.Backward]:!1,[ta.Forward]:!1}};var Da,Ma;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Da||(Da={})),function(e){e.Optimized="optimized"}(Ma||(Ma={}));const Ia=new Map;function Ta(e,t){return ui((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ra(e){let{callback:t,disabled:n}=e;const r=li(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function La(e){return new ca(Ki(e),e)}function Aa(e,t,n){void 0===t&&(t=La);const[r,i]=(0,o.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),a=function(e){let{callback:t,disabled:n}=e;const r=li(t),i=(0,o.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=Ra({callback:i});return si((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),r}const Na=[];function Fa(e,t){void 0===t&&(t=[]);const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{n.current=null}),t),(0,o.useEffect)((()=>{const t=e!==Ti;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?bi(e,n.current):Ti}function Ba(e){return(0,o.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ha=[];const Va=[{sensor:Ea,options:{}},{sensor:ma,options:{}}],za={current:{}},Ua={draggable:{measure:Zi},droppable:{measure:Zi,strategy:Da.WhileDragging,frequency:Ma.Optimized},dragOverlay:{measure:Ki}};class Wa extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ga={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Wa,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Mi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ua,measureDroppableContainers:Mi,windowRect:null,measuringScheduled:!1},$a={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Mi,draggableNodes:new Map,over:null,measureDroppableContainers:Mi},Ka=(0,o.createContext)($a),Za=(0,o.createContext)(Ga);function Xa(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Wa}}}function qa(e,t){switch(t.type){case Di.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Di.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Di.DragEnd:case Di.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Di.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Wa(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Di.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Wa(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Di.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Wa(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ja(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=(0,o.useContext)(Ka),a=pi(r),s=pi(null==n?void 0:n.id);return(0,o.useEffect)((()=>{if(!t&&!r&&a&&null!=s){if(!mi(a))return;if(document.activeElement===a.target)return;const e=i.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Oi(e);if(t){t.focus();break}}}))}}),[r,t,i,s,a]),null}const Ya=(0,o.createContext)({...Ti,scaleX:1,scaleY:1});var Qa;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Qa||(Qa={}));const es=(0,o.memo)((function(e){var t,n,r,a;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:d=Va,collisionDetection:p=zi,measuring:f,modifiers:h,...g}=e;const v=(0,o.useReducer)(qa,void 0,Xa),[b,m]=v,[y,w]=function(){const[e]=(0,o.useState)((()=>new Set)),t=(0,o.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]),n=(0,o.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]);return[n,t]}(),[x,O]=(0,o.useState)(Qa.Uninitialized),E=x===Qa.Initialized,{draggable:{active:C,nodes:S,translate:_},droppable:{containers:k}}=b,j=C?S.get(C):null,P=(0,o.useRef)({initial:null,translated:null}),D=(0,o.useMemo)((()=>{var e;return null!=C?{id:C,data:null!=(e=null==j?void 0:j.data)?e:za,rect:P}:null}),[C,j]),M=(0,o.useRef)(null),[I,T]=(0,o.useState)(null),[R,L]=(0,o.useState)(null),A=ci(g,Object.values(g)),N=hi("DndDescribedBy",s),F=(0,o.useMemo)((()=>k.getEnabled()),[k]),B=(H=f,(0,o.useMemo)((()=>({draggable:{...Ua.draggable,...null==H?void 0:H.draggable},droppable:{...Ua.droppable,...null==H?void 0:H.droppable},dragOverlay:{...Ua.dragOverlay,...null==H?void 0:H.dragOverlay}})),[null==H?void 0:H.draggable,null==H?void 0:H.droppable,null==H?void 0:H.dragOverlay]));var H;const{droppableRects:V,measureDroppableContainers:z,measuringScheduled:U}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=(0,o.useState)(null),{frequency:l,measure:c,strategy:u}=i,d=(0,o.useRef)(e),p=function(){switch(u){case Da.Always:return!1;case Da.BeforeDragging:return n;default:return!n}}(),f=ci(p),h=(0,o.useCallback)((function(e){void 0===e&&(e=[]),f.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[f]),g=(0,o.useRef)(null),v=ui((t=>{if(p&&!n)return Ia;if(!t||t===Ia||d.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new ca(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,a,n,p,c]);return(0,o.useEffect)((()=>{d.current=e}),[e]),(0,o.useEffect)((()=>{p||h()}),[n,p]),(0,o.useEffect)((()=>{a&&a.length>0&&s(null)}),[JSON.stringify(a)]),(0,o.useEffect)((()=>{p||"number"!=typeof l||null!==g.current||(g.current=setTimeout((()=>{h(),g.current=null}),l))}),[l,p,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:null!=a}}(F,{dragging:E,dependencies:[_.x,_.y],config:B.droppable}),W=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return ui((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(S,C),G=(0,o.useMemo)((()=>R?yi(R):null),[R]),$=function(){const e=!1===(null==I?void 0:I.autoScrollEnabled),t="object"==typeof c?!1===c.enabled:!1===c,n=E&&!e&&!t;return"object"==typeof c?{...c,enabled:n}:{enabled:n}}(),K=function(e,t){return Ta(e,t)}(W,B.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=(0,o.useRef)(!1),{x:s,y:l}="boolean"==typeof i?{x:i,y:i}:i;si((()=>{if(!s&&!l||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=Ui(n(e),r);if(s||(o.x=0),l||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=qi(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,s,l,r,n])}({activeNode:C?S.get(C):null,config:$.layoutShiftCompensation,initialRect:K,measure:B.draggable.measure});const Z=Aa(W,B.draggable.measure,K),X=Aa(W?W.parentElement:null),q=(0,o.useRef)({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),J=k.getNodeFor(null==(t=q.current.over)?void 0:t.id),Y=function(e){let{measure:t}=e;const[n,r]=(0,o.useState)(null),i=Ra({callback:(0,o.useCallback)((e=>{for(const{target:n}of e)if(oi(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),a=(0,o.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return oi(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[s,l]=di(a);return(0,o.useMemo)((()=>({nodeRef:s,rect:n,setRef:l})),[n,s,l])}({measure:B.dragOverlay.measure}),Q=null!=(n=Y.nodeRef.current)?n:W,ee=E?null!=(r=Y.rect)?r:Z:null,te=Boolean(Y.nodeRef.current&&Y.rect),ne=Ui(re=te?null:Z,Ta(re));var re;const oe=Ba(Q?ni(Q):null),ie=function(e){const t=(0,o.useRef)(e),n=ui((n=>e?n&&n!==Na&&e&&t.current&&e.parentNode===t.current.parentNode?n:Xi(e):Na),[e]);return(0,o.useEffect)((()=>{t.current=e}),[e]),n}(E?null!=J?J:W:null),ae=function(e,t){void 0===t&&(t=Ki);const[n]=e,r=Ba(n?ni(n):null),[i,a]=(0,o.useReducer)((function(){return e.length?e.map((e=>na(e)?r:new ca(t(e),e))):Ha}),Ha),s=Ra({callback:a});return e.length>0&&i===Ha&&a(),si((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),a())}),[e]),i}(ie),se=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(h,{transform:{x:_.x-ne.x,y:_.y-ne.y,scaleX:1,scaleY:1},activatorEvent:R,active:D,activeNodeRect:Z,containerNodeRect:X,draggingNodeRect:ee,over:q.current.over,overlayNodeRect:Y.rect,scrollableAncestors:ie,scrollableAncestorRects:ae,windowRect:oe}),le=G?vi(G,_):null,ce=function(e){const[t,n]=(0,o.useState)(null),r=(0,o.useRef)(e),i=(0,o.useCallback)((e=>{const t=Ji(e.target);t&&n((e=>e?(e.set(t,ea(t)),new Map(e)):null))}),[]);return(0,o.useEffect)((()=>{const t=r.current;if(e!==t){o(t);const a=e.map((e=>{const t=Ji(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,ea(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach((e=>{const t=Ji(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,o.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>vi(e,t)),Ti):sa(e):Ti),[e,t])}(ie),ue=Fa(ce),de=Fa(ce,[Z]),pe=vi(se,ue),fe=ee?Gi(ee,se):null,he=D&&fe?p({active:D,collisionRect:fe,droppableRects:V,droppableContainers:F,pointerCoordinates:le}):null,ge=Fi(he,"id"),[ve,be]=(0,o.useState)(null),me=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(te?se:vi(se,de),null!=(a=null==ve?void 0:ve.rect)?a:null,Z),ye=(0,o.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==M.current)return;const o=S.get(M.current);if(!o)return;const i=e.nativeEvent,a=new n({active:M.current,activeNode:o,event:i,options:r,context:q,onStart(e){const t=M.current;if(null==t)return;const n=S.get(t);if(!n)return;const{onDragStart:r}=A.current,o={active:{id:t,data:n.data,rect:P}};(0,Yo.unstable_batchedUpdates)((()=>{null==r||r(o),O(Qa.Initializing),m({type:Di.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o})}))},onMove(e){m({type:Di.DragMove,coordinates:e})},onEnd:s(Di.DragEnd),onCancel:s(Di.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=q.current;let a=null;if(t&&o){const{cancelDrop:s}=A.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Di.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Di.DragCancel)}M.current=null,(0,Yo.unstable_batchedUpdates)((()=>{m({type:e}),O(Qa.Uninitialized),be(null),T(null),L(null);const t=e===Di.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=A.current[t];null==e||e(a),y({type:t,event:a})}}))}}(0,Yo.unstable_batchedUpdates)((()=>{T(a),L(e.nativeEvent)}))}),[S]),we=(0,o.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=S.get(r);if(null!==M.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},M.current=r,ye(n,t))}),[S,ye]),xe=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(d,we);!function(e){(0,o.useEffect)((()=>{if(!Qo)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(d),si((()=>{Z&&x===Qa.Initializing&&O(Qa.Initialized)}),[Z,x]),(0,o.useEffect)((()=>{const{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:o}=q.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:pe.x,y:pe.y},over:o};(0,Yo.unstable_batchedUpdates)((()=>{null==e||e(i),y({type:"onDragMove",event:i})}))}),[pe.x,pe.y]),(0,o.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=q.current;if(!e||null==M.current||!t||!o)return;const{onDragOver:i}=A.current,a=r.get(ge),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,Yo.unstable_batchedUpdates)((()=>{be(s),null==i||i(l),y({type:"onDragOver",event:l})}))}),[ge]),si((()=>{q.current={activatorEvent:R,active:D,activeNode:W,collisionRect:fe,collisions:he,droppableRects:V,draggableNodes:S,draggingNode:Q,draggingNodeRect:ee,droppableContainers:k,over:ve,scrollableAncestors:ie,scrollAdjustedTranslate:pe},P.current={initial:ee,translated:fe}}),[D,W,he,fe,S,Q,ee,V,k,ve,ie,pe]),function(e){let{acceleration:t,activator:n=ka.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=ja.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:p,threshold:f}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=pi(t);return ui((e=>{if(n||!r||!e)return Pa;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[ta.Backward]:e.x[ta.Backward]||-1===o,[ta.Forward]:e.x[ta.Forward]||1===o},y:{[ta.Backward]:e.y[ta.Backward]||-1===i,[ta.Forward]:e.y[ta.Forward]||1===i}}}),[n,t,r])}({delta:p,disabled:!a}),[g,v]=function(){const e=(0,o.useRef)(null);return[(0,o.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,o.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),b=(0,o.useRef)({x:0,y:0}),m=(0,o.useRef)({x:0,y:0}),y=(0,o.useMemo)((()=>{switch(n){case ka.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case ka.DraggableRect:return i}}),[n,i,c]),w=(0,o.useRef)(null),x=(0,o.useCallback)((()=>{const e=w.current;if(!e)return;const t=b.current.x*m.current.x,n=b.current.y*m.current.y;e.scrollBy(t,n)}),[]),O=(0,o.useMemo)((()=>l===ja.TreeOrder?[...u].reverse():u),[l,u]);(0,o.useEffect)((()=>{if(a&&u.length&&y){for(const e of O){if(!1===(null==r?void 0:r(e)))continue;const n=u.indexOf(e),o=d[n];if(!o)continue;const{direction:i,speed:a}=ia(e,o,y,t,f);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return v(),w.current=e,g(x,s),b.current=a,void(m.current=i)}b.current={x:0,y:0},m.current={x:0,y:0},v()}else v()}),[t,x,r,v,a,s,JSON.stringify(y),JSON.stringify(h),g,u,O,d,JSON.stringify(f)])}({...$,delta:_,draggingRect:fe,pointerCoordinates:le,scrollableAncestors:ie,scrollableAncestorRects:ae});const Oe=(0,o.useMemo)((()=>({active:D,activeNode:W,activeNodeRect:Z,activatorEvent:R,collisions:he,containerNodeRect:X,dragOverlay:Y,draggableNodes:S,droppableContainers:k,droppableRects:V,over:ve,measureDroppableContainers:z,scrollableAncestors:ie,scrollableAncestorRects:ae,measuringConfiguration:B,measuringScheduled:U,windowRect:oe})),[D,W,Z,R,he,X,Y,S,k,V,ve,z,ie,ae,B,U,oe]),Ee=(0,o.useMemo)((()=>({activatorEvent:R,activators:xe,active:D,activeNodeRect:Z,ariaDescribedById:{draggable:N},dispatch:m,draggableNodes:S,over:ve,measureDroppableContainers:z})),[R,xe,D,Z,m,N,S,ve,z]);return i().createElement(_i.Provider,{value:w},i().createElement(Ka.Provider,{value:Ee},i().createElement(Za.Provider,{value:Oe},i().createElement(Ya.Provider,{value:me},u)),i().createElement(Ja,{disabled:!1===(null==l?void 0:l.restoreFocus)})),i().createElement(Pi,{...l,hiddenTextDescribedById:N}))})),ts=(0,o.createContext)(null),ns="button",rs="Droppable";const os={timeout:25};function is(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function as(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function ss(e){return null!==e&&e>=0}const ls=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=is(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},cs="Sortable",us=i().createContext({activeIndex:-1,containerId:cs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ls,disabled:{draggable:!1,droppable:!1}});function ds(e){let{children:t,id:n,items:r,strategy:a=ls,disabled:s=!1}=e;const{active:l,dragOverlay:c,droppableRects:u,over:d,measureDroppableContainers:p}=(0,o.useContext)(Za),f=hi(cs,n),h=Boolean(null!==c.rect),g=(0,o.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),v=null!=l,b=l?g.indexOf(l.id):-1,m=d?g.indexOf(d.id):-1,y=(0,o.useRef)(g),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{w&&v&&p(g)}),[w,g,v,p]),(0,o.useEffect)((()=>{y.current=g}),[g]);const E=(0,o.useMemo)((()=>({activeIndex:b,containerId:f,disabled:O,disableTransforms:x,items:g,overIndex:m,useDragOverlay:h,sortedRects:as(g,u),strategy:a})),[b,f,O.draggable,O.droppable,x,g,m,u,h,a]);return i().createElement(us.Provider,{value:E},t)}const ps=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return is(n,r,o).indexOf(t)},fs=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r||s!==i&&o===a||!n&&(a===o||t!==l))},hs={duration:200,easing:"ease"},gs="transform",vs=wi.Transition.toString({property:gs,duration:0,easing:"linear"}),bs={roleDescription:"sortable"};function ms(e){let{animateLayoutChanges:t=fs,attributes:n,disabled:r,data:i,getNewIndex:a=ps,id:s,strategy:l,resizeObserverConfig:c,transition:u=hs}=e;const{items:d,containerId:p,activeIndex:f,disabled:h,disableTransforms:g,sortedRects:v,overIndex:b,useDragOverlay:m,strategy:y}=(0,o.useContext)(us),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,h),x=d.indexOf(s),O=(0,o.useMemo)((()=>({sortable:{containerId:p,index:x,items:d},...i})),[p,i,x,d]),E=(0,o.useMemo)((()=>d.slice(d.indexOf(s))),[d,s]),{rect:C,node:S,isOver:_,setNodeRef:k}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=hi("Droppable"),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=(0,o.useContext)(Ka),d=(0,o.useRef)({disabled:n}),p=(0,o.useRef)(!1),f=(0,o.useRef)(null),h=(0,o.useRef)(null),{disabled:g,updateMeasurementsFor:v,timeout:b}={...os,...i},m=ci(null!=v?v:r),y=Ra({callback:(0,o.useCallback)((()=>{p.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null}),b)):p.current=!0}),[b]),disabled:g||!s}),w=(0,o.useCallback)(((e,t)=>{y&&(t&&(y.unobserve(t),p.current=!1),e&&y.observe(e))}),[y]),[x,O]=di(w),E=ci(t);return(0,o.useEffect)((()=>{y&&x.current&&(y.disconnect(),p.current=!1,y.observe(x.current))}),[x,y]),si((()=>(l({type:Di.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:f,data:E}}),()=>l({type:Di.UnregisterDroppable,key:a,id:r}))),[r]),(0,o.useEffect)((()=>{n!==d.current.disabled&&(l({type:Di.SetDroppableDisabled,id:r,key:a,disabled:n}),d.current.disabled=n)}),[r,a,n,l]),{active:s,rect:f,isOver:(null==c?void 0:c.id)===r,node:x,over:c,setNodeRef:O}}({id:s,data:O,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...c}}),{active:j,activatorEvent:P,activeNodeRect:D,attributes:M,setNodeRef:I,listeners:T,isDragging:R,over:L,setActivatorNodeRef:A,transform:N}=function(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=hi(rs),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:p,over:f}=(0,o.useContext)(Ka),{role:h=ns,roleDescription:g="draggable",tabIndex:v=0}=null!=i?i:{},b=(null==c?void 0:c.id)===t,m=(0,o.useContext)(b?Ya:ts),[y,w]=di(),[x,O]=di(),E=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),C=ci(n);return si((()=>(p.set(t,{id:t,key:a,node:y,activatorNode:x,data:C}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)})),[p,t]),{active:c,activatorEvent:l,activeNodeRect:u,attributes:(0,o.useMemo)((()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||h!==ns)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable})),[r,h,v,b,g,d.draggable]),isDragging:b,listeners:r?void 0:E,node:y,over:f,setNodeRef:w,setActivatorNodeRef:O,transform:m}}({id:s,data:O,attributes:{...bs,...n},disabled:w.draggable}),F=function(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach((t=>t(e)))}),t)}(k,I),B=Boolean(j),H=B&&!g&&ss(f)&&ss(b),V=!m&&R,z=V&&H?N:null,U=H?null!=z?z:(null!=l?l:y)({rects:v,activeNodeRect:D,activeIndex:f,overIndex:b,index:x}):null,W=ss(f)&&ss(b)?a({id:s,items:d,activeIndex:f,overIndex:b}):x,G=null==j?void 0:j.id,$=(0,o.useRef)({activeId:G,items:d,newIndex:W,containerId:p}),K=d!==$.current.items,Z=t({active:j,containerId:p,isDragging:R,isSorting:B,id:s,index:x,items:d,newIndex:$.current.newIndex,previousItems:$.current.items,previousContainerId:$.current.containerId,transition:u,wasDragging:null!=$.current.activeId}),X=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=(0,o.useState)(null),l=(0,o.useRef)(n);return si((()=>{if(!t&&n!==l.current&&r.current){const e=i.current;if(e){const t=Ki(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}n!==l.current&&(l.current=n)}),[t,n,r,i]),(0,o.useEffect)((()=>{a&&s(null)}),[a]),a}({disabled:!Z,index:x,node:S,rect:C});return(0,o.useEffect)((()=>{B&&$.current.newIndex!==W&&($.current.newIndex=W),p!==$.current.containerId&&($.current.containerId=p),d!==$.current.items&&($.current.items=d)}),[B,W,p,d]),(0,o.useEffect)((()=>{if(G===$.current.activeId)return;if(G&&!$.current.activeId)return void($.current.activeId=G);const e=setTimeout((()=>{$.current.activeId=G}),50);return()=>clearTimeout(e)}),[G]),{active:j,activeIndex:f,attributes:M,data:O,rect:C,index:x,newIndex:W,items:d,isOver:_,isSorting:B,isDragging:R,listeners:T,node:S,overIndex:b,over:L,setNodeRef:F,setActivatorNodeRef:A,setDroppableNodeRef:k,setDraggableNodeRef:I,transform:null!=X?X:U,transition:X||K&&$.current.newIndex===x?vs:V&&!mi(P)||!u?void 0:B||Z?wi.Transition.toString({...u,property:gs}):void 0}}function ys(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ws=[fa.Down,fa.Right,fa.Up,fa.Left],xs=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:a,scrollableAncestors:s}}=t;if(ws.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];i.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=o.get(n.id);if(i)switch(e.code){case fa.Down:r.topi.top&&t.push(n);break;case fa.Left:r.left>i.left&&t.push(n);break;case fa.Right:r.left{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ni(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ni(r),a=o.reduce(((e,t,r)=>e+Ri(n[r],t)),0),s=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:s}})}}return i.sort(Li)})({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let d=Fi(u,"id");if(d===(null==a?void 0:a.id)&&u.length>1&&(d=u[1].id),null!=d){const e=i.get(n.id),t=i.get(d),a=t?o.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&a&&e&&t){const n=Xi(u).some(((e,t)=>s[t]!==e)),o=Os(e,t),i=(c=t,!(!ys(l=e)||!ys(c))&&!!Os(l,c)&&l.data.current.sortable.index[...t].filter((e=>null!=e))),[...t])}(Ii(Ea),Ii(ma,{coordinateGetter:xs}));return i?Array.isArray(t)?(0,o.createElement)(j,null,(0,o.createElement)(es,{sensors:a,collisionDetection:Hi,onDragEnd:function(e){var r=e.active,o=e.over;if(r.id!==o.id){var i=t.indexOf(r.id),a=t.indexOf(o.id);n(is(t,i,a))}}},(0,o.createElement)(ds,{items:t},(0,o.createElement)("div",{className:"wcf-sortable-items"},t.map((function(e,t){return(0,o.createElement)(js,{key:e,id:e,index:t},r(e,t))})))))):null:(0,o.createElement)(j,null,t.map((function(e,t){return(0,o.createElement)("div",{key:e,id:e,index:t},r(e,t))})))},Ds=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Gf(Array.isArray(e)?e:[]).map((function(e){return delete e.__key,e}))};function Ms(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Is=i().forwardRef((function(e,t){var n=e.id,i=e.htmlId,a=void 0===i?function(e){return e}:i,s=e.label,l=e.group_level,c=void 0===l?0:l,u=e.custom_attributes,d=void 0===u?{}:u,p=e.onChange,f=e.className,h=e.appContext,g=Jf(e),v=g.value,b=g.currentValue,m=g.setCurrentValue;return(0,o.useEffect)((function(){p&&JSON.stringify(v)!==JSON.stringify(b)&&p(b)}),[p,v,b]),(0,o.createElement)("label",{htmlFor:a(n),className:y()(f)},0===c&&(0,o.createElement)("input",{type:"hidden",name:h.hooks.name(n),value:b?1:0}),(0,o.createElement)("input",function(e){for(var t=1;t0?Gs(tl,--Qs):0,Js--,10===el&&(Js=1,qs--),el}function il(){return el=Qs2||cl(el)>3?"":" "}function hl(e,t){for(;--t&&il()&&!(el<48||el>102||el>57&&el<65||el>70&&el<97););return ll(e,sl()+(t<6&&32==al()&&32==il()))}function gl(e){for(;il();)switch(el){case e:return Qs;case 34:case 39:34!==e&&39!==e&&gl(el);break;case 40:41===e&&gl(e);break;case 92:il()}return Qs}function vl(e,t){for(;il()&&e+el!==57&&(e+el!==84||47!==al()););return"/*"+ll(t,Qs-1)+"*"+Hs(47===e?e:il())}function bl(e){for(;!cl(al());)il();return ll(e,Qs)}var ml="-ms-",yl="-moz-",wl="-webkit-",xl="comm",Ol="rule",El="decl",Cl="@keyframes";function Sl(e,t){for(var n="",r=Zs(e),o=0;o0&&Ks(E)-d&&Xs(f>32?Ml(E+";",r,n,d-1):Ml(Us(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(Xs(O=Pl(E,t,n,c,u,o,s,y,w=[],x=[],d),i),123===m)if(0===u)jl(E,t,O,O,w,i,d,s,x);else switch(99===p&&110===Gs(E,3)?100:p){case 100:case 108:case 109:case 115:jl(e,O,O,r&&Xs(Pl(e,O,O,0,0,o,s,y,o,w=[],d),x),o,x,d,s,r?w:x);break;default:jl(E,O,O,O,[""],x,0,s,x)}}c=u=f=0,g=b=1,y=E="",d=a;break;case 58:d=1+Ks(E),f=h;default:if(g<1)if(123==m)--g;else if(125==m&&0==g++&&125==ol())continue;switch(E+=Hs(m),m*g){case 38:b=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(Ks(E)-1)*b,b=1;break;case 64:45===al()&&(E+=pl(il())),p=al(),u=d=Ks(y=E+=bl(sl())),m++;break;case 45:45===h&&2==Ks(E)&&(g=0)}}return i}function Pl(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=Zs(p),h=0,g=0,v=0;h0?p[b]+" "+m:Us(m,/&\f/g,p[b])))&&(l[v++]=y);return nl(e,t,n,0===o?Ol:s,l,c,u)}function Dl(e,t,n){return nl(e,t,n,xl,Hs(el),$s(e,2,-2),0)}function Ml(e,t,n,r){return nl(e,t,n,El,$s(e,0,r),$s(e,r+1,-1),r)}var Il=function(e,t,n){for(var r=0,o=0;r=o,o=al(),38===r&&12===o&&(t[n]=1),!cl(o);)il();return ll(e,Qs)},Tl=new WeakMap,Rl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Tl.get(n))&&!r){Tl.set(e,!0);for(var o=[],i=function(e,t){return dl(function(e,t){var n=-1,r=44;do{switch(cl(r)){case 0:38===r&&12===al()&&(t[n]=1),e[n]+=Il(Qs-1,t,n);break;case 2:e[n]+=pl(r);break;case 4:if(44===r){e[++n]=58===al()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Hs(r)}}while(r=il());return e}(ul(e),t))}(t,o),a=n.props,s=0,l=0;s6)switch(Gs(e,t+1)){case 109:if(45!==Gs(e,t+4))break;case 102:return Us(e,/(.+:)(.+)-([^]+)/,"$1"+wl+"$2-$3$1"+yl+(108==Gs(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ws(e,"stretch")?Al(Us(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Gs(e,t+1))break;case 6444:switch(Gs(e,Ks(e)-3-(~Ws(e,"!important")&&10))){case 107:return Us(e,":",":"+wl)+e;case 101:return Us(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+wl+(45===Gs(e,14)?"inline-":"")+"box$3$1"+wl+"$2$3$1"+ml+"$2box$3")+e}break;case 5936:switch(Gs(e,t+11)){case 114:return wl+e+ml+Us(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return wl+e+ml+Us(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return wl+e+ml+Us(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return wl+e+ml+e+e}return e}var Nl=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case El:e.return=Al(e.value,e.length);break;case Cl:return Sl([rl(e,{value:Us(e.value,"@","@"+wl)})],r);case Ol:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Sl([rl(e,{props:[Us(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Sl([rl(e,{props:[Us(t,/:(plac\w+)/,":"+wl+"input-$1")]}),rl(e,{props:[Us(t,/:(plac\w+)/,":-moz-$1")]}),rl(e,{props:[Us(t,/:(plac\w+)/,ml+"input-$1")]})],r)}return""}))}}],Fl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||Nl,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Xl}},Yl=!!o.useInsertionEffect&&o.useInsertionEffect,Ql=Yl||function(e){return e()},ec=(Yl||o.useLayoutEffect,{}.hasOwnProperty),tc=o.createContext("undefined"!=typeof HTMLElement?Fl({key:"css"}):null);tc.Provider;var nc=function(e){return(0,o.forwardRef)((function(t,n){var r=(0,o.useContext)(tc);return e(t,r,n)}))},rc=o.createContext({}),oc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ic=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Bl(t,n,r),Ql((function(){return function(e,t,n){Bl(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},ac=nc((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[oc],a=[r],s="";"string"==typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=Jl(a,void 0,o.useContext(rc));s+=t.key+"-"+l.name;var c={};for(var u in e)ec.call(e,u)&&"css"!==u&&u!==oc&&(c[u]=e[u]);return c.ref=n,c.className=s,o.createElement(o.Fragment,null,o.createElement(ic,{cache:t,serialized:l,isStringTag:"string"==typeof i}),o.createElement(i,c))})),sc=ac,lc=(n(8679),function(e,t){var n=arguments;if(null==t||!ec.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=sc,i[1]=function(e,t){var n={};for(var r in t)ec.call(t,r)&&(n[r]=t[r]);return n[oc]=e,n}(e,t);for(var a=2;a({x:e,y:e});function gc(e){return mc(e)?(e.nodeName||"").toLowerCase():"#document"}function vc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function bc(e){var t;return null==(t=(mc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function mc(e){return e instanceof Node||e instanceof vc(e).Node}function yc(e){return e instanceof Element||e instanceof vc(e).Element}function wc(e){return e instanceof HTMLElement||e instanceof vc(e).HTMLElement}function xc(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof vc(e).ShadowRoot)}function Oc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ec(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ec(e){return vc(e).getComputedStyle(e)}function Cc(e){const t=function(e){if("html"===gc(e))return e;const t=e.assignedSlot||e.parentNode||xc(e)&&e.host||bc(e);return xc(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(gc(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:wc(t)&&Oc(t)?t:Cc(t)}function Sc(e,t){var n;void 0===t&&(t=[]);const r=Cc(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=vc(r);return o?t.concat(i,i.visualViewport||[],Oc(r)?r:[]):t.concat(r,Sc(r))}function _c(e){return yc(e)?e:e.contextElement}function kc(e){const t=_c(e);if(!wc(t))return hc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=Ec(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wc(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=pc(n)!==i||pc(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?pc(n.width):n.width)/r,s=(i?pc(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const jc=hc(0);function Pc(e){const t=vc(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:jc}function Dc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=_c(e);let a=hc(1);t&&(r?yc(r)&&(a=kc(r)):a=kc(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==vc(e))&&t}(i,n,r)?Pc(i):hc(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=vc(i),t=r&&yc(r)?vc(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=kc(n),t=n.getBoundingClientRect(),r=Ec(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=vc(n).frameElement}}return p={width:u,height:d,x:l,y:c},{...p,top:p.y,left:p.x,right:p.x+p.width,bottom:p.y+p.height};var p}var Mc=o.useLayoutEffect,Ic=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Tc=function(){};function Rc(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Lc(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function Hc(e){return Bc(e)?window.pageYOffset:e.scrollTop}function Vc(e,t){Bc(e)?window.scrollTo(0,t):e.scrollTop=t}function zc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Tc,o=Hc(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;Vc(e,l),an.bottom?Vc(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=h)return{placement:"bottom",maxHeight:t};if(C>=h&&!a)return i&&zc(l,S,k),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&O>=r)return i&&zc(l,S,k),{placement:"bottom",maxHeight:a?O-y:C-y};if("auto"===o||a){var j=t,P=a?x:E;return P>=r&&(j=Math.min(P-y-s,t)),{placement:"top",maxHeight:j}}if("bottom"===o)return i&&Vc(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(E>=h&&!a)return i&&zc(l,_,k),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&x>=r){var D=t;return(!a&&E>=r||a&&x>=r)&&(D=a?x-w:E-w),i&&zc(l,_,k),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:m});h(o.maxHeight),b(o.placement),null==c||c(o.placement)}}),[r,i,a,s,n,c,m]),t({ref:d,placerProps:As(As({},e),{},{placement:v||nu(i),maxHeight:f})})},iu=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return As({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},au=iu,su=iu,lu=["size"],cu=["innerProps","isRtl","size"],uu={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},du=function(e){var t=e.size,n=oo(e,lu);return lc("svg",Ns({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:uu},n))},pu=function(e){return lc(du,Ns({size:20},e),lc("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},fu=function(e){return lc(du,Ns({size:20},e),lc("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hu=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return As({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},gu=hu,vu=hu,bu=function(){var e=cc.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Qc||(eu=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],tu||(tu=eu.slice(0)),Qc=Object.freeze(Object.defineProperties(eu,{raw:{value:Object.freeze(tu)}})))),mu=function(e){var t=e.delay,n=e.offset;return lc("span",{css:cc({animation:"".concat(bu," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},yu=["data"],wu=["innerRef","isDisabled","isHidden","inputClassName"],xu={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Ou={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":As({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},xu)},Eu=function(e){return As({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},xu)},Cu=function(e){var t=e.children,n=e.innerProps;return lc("div",n,t)},Su={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||lc(pu,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return lc("div",Ns({ref:o},Fc(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||lc(fu,null))},DownChevron:fu,CrossIcon:pu,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return lc("div",Ns({},Fc(e,"group",{group:!0}),s),lc(i,Ns({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),lc("div",null,t))},GroupHeading:function(e){var t=Nc(e);t.data;var n=oo(t,yu);return lc("div",Ns({},Fc(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return lc("span",Ns({},t,Fc(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Nc(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=oo(r,wu);return lc("div",Ns({},Fc(e,"input",{"input-container":!0}),{"data-value":n||""}),lc("input",Ns({className:t({input:!0},s),ref:o,style:Eu(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=oo(e,cu);return lc("div",Ns({},Fc(As(As({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),lc(mu,{delay:0,offset:n}),lc(mu,{delay:160,offset:!0}),lc(mu,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return lc("div",Ns({},Fc(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return lc("div",Ns({},Fc(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,a=e.menuPlacement,s=e.menuPosition,l=(0,o.useRef)(null),c=(0,o.useRef)(null),d=u((0,o.useState)(nu(a)),2),p=d[0],f=d[1],h=(0,o.useMemo)((function(){return{setPortalPlacement:f}}),[]),g=u((0,o.useState)(null),2),v=g[0],b=g[1],m=(0,o.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===s?0:window.pageYOffset,n=e[p]+t;n===(null==v?void 0:v.offset)&&e.left===(null==v?void 0:v.rect.left)&&e.width===(null==v?void 0:v.rect.width)||b({offset:n,rect:e})}}),[r,s,p,null==v?void 0:v.offset,null==v?void 0:v.rect.left,null==v?void 0:v.rect.width]);Mc((function(){m()}),[m]);var y=(0,o.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=_c(e),u=o||i?[...c?Sc(c):[],...Sc(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=bc(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-fc(u)+"px "+-fc(o.clientWidth-(c+d))+"px "+-fc(o.clientHeight-(u+p))+"px "+-fc(c)+"px",threshold:dc(0,uc(1,l))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let g=l?Dc(e):null;return l&&function t(){const r=Dc(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n(),g=r,p=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(r,l.current,m,{elementResize:"ResizeObserver"in window}))}),[r,m]);Mc((function(){y()}),[y]);var w=(0,o.useCallback)((function(e){l.current=e,y()}),[y]);if(!t&&"fixed"!==s||!v)return null;var x=lc("div",Ns({ref:w},Fc(As(As({},e),{},{offset:v.offset,position:s,rect:v.rect}),"menuPortal",{"menu-portal":!0}),i),n);return lc(ru.Provider,{value:h},t?(0,Yo.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=oo(e,Yc);return lc("div",Ns({},Fc(As(As({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=oo(e,Jc);return lc("div",Ns({},Fc(As(As({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return lc(l,{data:r,innerProps:As(As({},Fc(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},lc(c,{data:r,innerProps:As({},Fc(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),lc(u,{data:r,innerProps:As(As({},Fc(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:Cu,MultiValueLabel:Cu,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({role:"button"},n),t||lc(pu,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return lc("div",Ns({},Fc(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return lc("div",Ns({},Fc(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return lc("div",Ns({},Fc(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return lc("div",Ns({},Fc(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return lc("div",Ns({},Fc(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},_u=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var ku=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ju(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Iu=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,p=l.getOptionLabel,f=l.inputValue,h=l.isMulti,g=l.isOptionDisabled,v=l.isSearchable,b=l.menuIsOpen,m=l.options,y=l.screenReaderStatus,w=l.tabSelectsValue,x=l.isLoading,O=l["aria-label"],E=l["aria-live"],C=(0,o.useMemo)((function(){return As(As({},Mu),d||{})}),[d]),S=(0,o.useMemo)((function(){var e,n="";if(t&&C.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?p(c):"",d=o||a||void 0,f=d?d.map(p):[],h=As({isDisabled:c&&g(c,s),label:u,labels:f},t);n=C.onChange(h)}return n}),[t,C,g,s,p]),_=(0,o.useMemo)((function(){var e="",t=n||r,o=!!(n&&s&&s.includes(n));if(t&&C.onFocus){var a={focused:t,label:p(t),isDisabled:g(t,s),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:s,isAppleDevice:u};e=C.onFocus(a)}return e}),[n,r,p,g,C,i,s,u]),k=(0,o.useMemo)((function(){var e="";if(b&&m.length&&!x&&C.onFilter){var t=y({count:i.length});e=C.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,b,C,m,y,x]),j="initial-input-focus"===(null==t?void 0:t.action),P=(0,o.useMemo)((function(){var e="";if(C.guidance){var t=r?"value":b?"menu":"input";e=C.guidance({"aria-label":O,context:t,isDisabled:n&&g(n,s),isMulti:h,isSearchable:v,tabSelectsValue:w,isInitialFocus:j})}return e}),[O,n,r,h,g,v,b,C,s,w,j]),D=lc(o.Fragment,null,lc("span",{id:"aria-selection"},S),lc("span",{id:"aria-focused"},_),lc("span",{id:"aria-results"},k),lc("span",{id:"aria-guidance"},P));return lc(o.Fragment,null,lc(Du,{id:c},j&&D),lc(Du,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!j&&D))},Tu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Ru=new RegExp("["+Tu.map((function(e){return e.letters})).join("")+"]","g"),Lu={},Au=0;Au1?t-1:0),r=1;r0,g=d-p-c,v=!1;g>t&&s.current&&(r&&r(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>g?(n&&!s.current&&n(e),f.scrollTop=d,v=!0,s.current=!0):!h&&-t>c&&(i&&!l.current&&i(e),f.scrollTop=0,v=!0,l.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,i,a]),p=(0,o.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,o.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),h=(0,o.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),g=(0,o.useCallback)((function(e){if(e){var t=!!Zc&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}}),[h,f,p]),v=(0,o.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))}),[h,f,p]);return(0,o.useEffect)((function(){if(t){var e=u.current;return g(e),function(){v(e)}}}),[t,g,v]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),a=(0,o.useRef)(null),s=(0,o.useCallback)((function(e){if(Ju){var t=document.body,n=t&&t.style;if(r&&Gu.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Yu<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys($u).forEach((function(e){var t=$u[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&qu()&&(t.addEventListener("touchmove",Ku,Qu),e&&(e.addEventListener("touchstart",Xu,Qu),e.addEventListener("touchmove",Zu,Qu))),Yu+=1}}),[r]),l=(0,o.useCallback)((function(e){if(Ju){var t=document.body,n=t&&t.style;Yu=Math.max(Yu-1,0),r&&Yu<1&&Gu.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&qu()&&(t.removeEventListener("touchmove",Ku,Qu),e&&(e.removeEventListener("touchstart",Xu,Qu),e.removeEventListener("touchmove",Zu,Qu)))}}),[r]);return(0,o.useEffect)((function(){if(t){var e=a.current;return s(e),function(){l(e)}}}),[t,s,l]),function(e){a.current=e}}({isEnabled:n});return lc(o.Fragment,null,n&&lc("div",{onClick:ed,css:td}),t((function(e){i(e),a(e)})))}var rd={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},od=function(e){var t=e.name,n=e.onFocus;return lc("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:rd,value:"",onChange:function(){}})};function id(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function ad(){return id(/^Mac/i)}var sd={clearIndicator:vu,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return As({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:gu,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return As({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return As({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return As(As({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Ou),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return As({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:su,menu:function(e,t){var n,o=e.placement,i=e.theme,a=i.borderRadius,s=i.spacing,l=i.colors;return As((r(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),r(n,"position","absolute"),r(n,"width","100%"),r(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return As({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return As({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return As({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return As({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:au,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return As({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return As({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return As({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return As({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},ld={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},cd={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Wc(),captureMenuScroll:!Wc(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=As({ignoreCase:!0,ignoreAccents:!0,stringify:zu,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?Vu(t):t,c=a?Vu(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=Hu(l),c=Bu(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ud(e,t,n,r){return{type:"option",data:t,isDisabled:md(e,t,n),isSelected:yd(e,t,n),label:vd(e,t),value:bd(e,t),index:r}}function dd(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return ud(e,n,t,r)})).filter((function(t){return hd(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=ud(e,n,t,r);return hd(e,i)?i:void 0})).filter(Xc)}function pd(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,c(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function fd(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,c(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function hd(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!xd(e)||!i)&&wd(e,{label:a,value:s,data:o},r)}var gd=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},vd=function(e,t){return e.getOptionLabel(t)},bd=function(e,t){return e.getOptionValue(t)};function md(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function yd(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=bd(e,t);return n.some((function(t){return bd(e,t)===r}))}function wd(e,t,n){return!e.filterOption||e.filterOption(t,n)}var xd=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Od=1,Ed=function(e){C(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=k(t);if(n){var o=k(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _(this,e)});function i(e){var t;if(w(this,i),(t=r.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=ad()||id(/^iPhone/i)||id(/^iPad/i)||ad()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var u=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});o?t.setValue([].concat(c(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter((function(e){return t.getOptionValue(e)!==o})),a=qc(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(qc(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=qc(e,o,o[0]||null);t.onChange(i,{action:"pop-value",removedValue:r})},t.getFocusedOptionId=function(e){return gd(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return fd(dd(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return xd(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,f=t.state,h=f.focusedOption,g=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)t.removeValue(g);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!h||p&&t.isOptionSelected(h,v))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!c){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++Od),t.state.selectValue=Ac(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),o=t.buildFocusableOptions(),a=o.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=o[a],t.state.focusedOptionId=gd(n,o[a])}return t}return O(i,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Uc(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Uc(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(ld):As(As({},ld),this.props.theme):ld}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return md(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return yd(this.props,e,t)}},{key:"filterOption",value:function(e,t){return wd(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,h=this.commonProps,g=r||this.getElementId("input"),v=As(As(As({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(u,Ns({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},v)):o.createElement(Wu,Ns({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Tc,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,f=u.isMulti,h=u.inputValue,g=u.placeholder,v=this.state,b=v.selectValue,m=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return h?null:o.createElement(l,Ns({},c,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),g);if(f)return b.map((function(t,s){var l=t===m,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,Ns({},c,{components:{Container:r,Label:i,Remove:a},isFocused:l,isDisabled:p,key:u,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=b[0];return o.createElement(s,Ns({},c,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,Ns({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return e&&i?o.createElement(e,Ns({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return o.createElement(n,Ns({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,Ns({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,g=f.inputValue,v=f.isLoading,b=f.loadingMessage,m=f.minMenuHeight,y=f.maxMenuHeight,w=f.menuIsOpen,x=f.menuPlacement,O=f.menuPosition,E=f.menuPortalTarget,C=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,_=f.noOptionsMessage,k=f.onMenuScrollToTop,j=f.onMenuScrollToBottom;if(!w)return null;var P,D=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,s=t.isSelected,l=t.label,c=t.value,f=p===i,h=a?void 0:function(){return e.onOptionHover(i)},g=a?void 0:function(){return e.selectOption(i)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:g,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:s};return o.createElement(u,Ns({},d,{innerProps:b,data:i,isDisabled:a,isSelected:s,key:v,label:l,type:r,value:c,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return o.createElement(n,Ns({},d,{key:l,data:i,options:a,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return D(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return D(t,"".concat(t.index))}));else if(v){var M=b({inputValue:g});if(null===M)return null;P=o.createElement(l,d,M)}else{var I=_({inputValue:g});if(null===I)return null;P=o.createElement(c,d,I)}var T={minMenuHeight:m,maxMenuHeight:y,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:S},R=o.createElement(ou,Ns({},d,T),(function(t){var n=t.ref,r=t.placerProps,s=r.placement,l=r.maxHeight;return o.createElement(i,Ns({},d,T,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:s}),o.createElement(nd,{captureEnabled:h,onTopArrive:k,onBottomArrive:j,lockEnabled:C},(function(t){return o.createElement(a,Ns({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:l,focusedOption:p}),P)})))}));return E||"fixed"===O?o.createElement(s,Ns({},d,{appendTo:E,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!r)return o.createElement(od,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(i){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:a,type:"hidden",value:""});return o.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return o.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return o.createElement(Iu,Ns({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return o.createElement(r,Ns({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),o.createElement(t,Ns({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),o.createElement(i,Ns({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,Ns({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=Ac(u),g={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var v=d?function(e,t){return pd(dd(e,t))}(e,h):[],b=d?fd(dd(e,h),"".concat(l,"-option")):[],m=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,v);g={selectValue:h,focusedOption:y,focusedOptionId:gd(b,y),focusableOptionsWithIds:b,focusedValue:m,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,O=a&&s;return a&&!O&&(x={value:qc(f,h,h[0]||null),options:h,action:"initial-input-focus"},O=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),As(As(As({},g),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:O})}}]),i}(o.Component);Ed.defaultProps=cd;var Cd=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,a=e.defaultValue,s=void 0===a?null:a,l=e.inputValue,c=e.menuIsOpen,d=e.onChange,p=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,g=e.value,v=oo(e,_u),b=u((0,o.useState)(void 0!==l?l:n),2),m=b[0],y=b[1],w=u((0,o.useState)(void 0!==c?c:i),2),x=w[0],O=w[1],E=u((0,o.useState)(void 0!==g?g:s),2),C=E[0],S=E[1],_=(0,o.useCallback)((function(e,t){"function"==typeof d&&d(e,t),S(e)}),[d]),k=(0,o.useCallback)((function(e,t){var n;"function"==typeof p&&(n=p(e,t)),y(void 0!==n?n:e)}),[p]),j=(0,o.useCallback)((function(){"function"==typeof h&&h(),O(!0)}),[h]),P=(0,o.useCallback)((function(){"function"==typeof f&&f(),O(!1)}),[f]),D=void 0!==l?l:m,M=void 0!==c?c:x,I=void 0!==g?g:C;return As(As({},v),{},{inputValue:D,menuIsOpen:M,onChange:_,onInputChange:k,onMenuClose:P,onMenuOpen:j,value:I})}(e);return o.createElement(Ed,Ns({ref:t},n))})),Sd=Cd;function _d(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(Dd)}}]),e}();function Dd(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function Md(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var Id={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},Td=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function Rd(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Ld(e,t){e.style["".concat(Td,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function Ad(e,t){e.style["".concat(Td,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function Nd(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function Fd(e,t,n){return Math.max(e,Math.min(n,t))}function Bd(e){return"px"===e.substr(-2)?parseFloat(e):0}function Hd(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function Vd(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function zd(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function Ud(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:Ud(e.parentNode,t,r)}}function Wd(e){var t=e.lockOffset,n=e.width,r=e.height,o=t,i=t,a="px";if("string"==typeof t){var s=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);jd()(null!==s,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),o=parseFloat(t),i=parseFloat(t),a=s[1]}return jd()(isFinite(o)&&isFinite(i),"lockOffset value should be a finite. Given %s",t),"%"===a&&(o=o*n/100,i=i*r/100),{x:o,y:i}}function Gd(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:Gd(e.parentNode):null}var $d={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function Kd(e){return null!=e.sortableHandle}var Zd=function(){function e(t,n){w(this,e),this.container=t,this.onScrollCallback=n}return O(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,o=e.maxTranslate,i=e.width,a=e.height,s={x:0,y:0},l={x:1,y:1},c=this.container,u=c.scrollTop,d=c.scrollLeft,p=c.scrollHeight,f=c.scrollWidth,h=0===u,g=p-u-c.clientHeight==0,v=0===d,b=f-d-c.clientWidth==0;n.y>=o.y-a/2&&!g?(s.y=1,l.y=10*Math.abs((o.y-a/2-n.y)/a)):n.x>=o.x-i/2&&!b?(s.x=1,l.x=10*Math.abs((o.x-i/2-n.x)/i)):n.y<=r.y+a/2&&!h?(s.y=-1,l.y=10*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+i/2&&!v&&(s.x=-1,l.x=10*Math.abs((n.x-i/2-r.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===s.x&&0===s.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*s.x,top:l.y*s.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}(),Xd={axis:fe().oneOf(["x","y","xy"]),contentWindow:fe().any,disableAutoscroll:fe().bool,distance:fe().number,getContainer:fe().func,getHelperDimensions:fe().func,helperClass:fe().string,helperContainer:fe().oneOfType([fe().func,"undefined"==typeof HTMLElement?fe().any:fe().instanceOf(HTMLElement)]),hideSortableGhost:fe().bool,keyboardSortingTransitionDuration:fe().number,lockAxis:fe().string,lockOffset:fe().oneOfType([fe().number,fe().string,fe().arrayOf(fe().oneOfType([fe().number,fe().string]))]),lockToContainerEdges:fe().bool,onSortEnd:fe().func,onSortMove:fe().func,onSortOver:fe().func,onSortStart:fe().func,pressDelay:fe().number,pressThreshold:fe().number,keyCodes:fe().shape({lift:fe().arrayOf(fe().number),drop:fe().arrayOf(fe().number),cancel:fe().arrayOf(fe().number),up:fe().arrayOf(fe().number),down:fe().arrayOf(fe().number)}),shouldCancelStart:fe().func,transitionDuration:fe().number,updateBeforeSortStart:fe().func,useDragHandle:fe().bool,useWindowAsScrollContainer:fe().bool},qd={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},Jd={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:qd,shouldCancelStart:function(e){return-1!==[$d.Input,$d.Textarea,$d.Select,$d.Option,$d.Button].indexOf(e.target.tagName)||!!Nd(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},Yd=Object.keys(Xd),Qd=(0,o.createContext)({manager:{}}),ep={index:fe().number.isRequired,collection:fe().oneOfType([fe().number,fe().string]),disabled:fe().bool},tp=Object.keys(ep);function np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;w(this,n);for(var i=arguments.length,a=new Array(i),s=0;s0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return jd()(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=i.withRef?this.wrappedInstance:null;return(0,o.createElement)(e,Ns({ref:t},Md(this.props,tp)))}}]),n}(o.Component),r(t,"displayName",Hd("sortableElement",e)),r(t,"contextType",Qd),r(t,"propTypes",ep),r(t,"defaultProps",{collection:0}),n}((function(e){var t=rp(rp({},e.innerProps),{},{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}});return(0,o.createElement)(Su.MultiValue,rp(rp({},e),{},{innerProps:t}))})),ip=function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;w(this,n);for(var i=arguments.length,a=new Array(i),s=0;s1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;w(this,n),r(S(S(t=_(this,k(n).call(this,e)))),"state",{}),r(S(S(t)),"handleStart",(function(e){var n=t.props,r=n.distance,o=n.shouldCancelStart;if(2!==e.button&&!o(e)){t.touched=!0,t.position=zd(e);var i=Nd(e.target,(function(e){return null!=e.sortableInfo}));if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var a=t.props.useDragHandle,s=i.sortableInfo,l=s.index,c=s.collection;if(s.disabled)return;if(a&&!Nd(e.target,Kd))return;t.manager.active={collection:c,index:l},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==$d.Anchor||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),r(S(S(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),r(S(S(t)),"handleMove",(function(e){var n=t.props,r=n.distance,o=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=zd(e),a={x:t.position.x-i.x,y:t.position.y-i.y},s=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||o&&!(s>=o)?r&&s>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),r(S(S(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),r(S(S(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),r(S(S(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n,r,o=f.sortableInfo.index,u=(n=f,{bottom:Bd((r=window.getComputedStyle(n)).marginBottom),left:Bd(r.marginLeft),right:Bd(r.marginRight),top:Bd(r.marginTop)}),v=function(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:Bd(t.gridColumnGap),y:Bd(t.gridRowGap)}:{x:0,y:0}}(t.container),b=t.scrollContainer.getBoundingClientRect(),m=a({index:o,node:f,collection:h});if(t.node=f,t.margin=u,t.gridGap=v,t.width=m.width,t.height=m.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=f.getBoundingClientRect(),t.containerBoundingRect=b,t.index=o,t.newIndex=o,t.axis={x:i.indexOf("x")>=0,y:i.indexOf("y")>=0},t.offsetEdge=Ud(f,t.container),t.initialOffset=zd(g?_d({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(function(e){var t="input, textarea, select, canvas, [contenteditable]",n=e.querySelectorAll(t),r=e.cloneNode(!0);return c(r.querySelectorAll(t)).forEach((function(e,t){"file"!==e.type&&(e.value=n[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===$d.Canvas&&n[t].width>0&&n[t].height>0&&e.getContext("2d").drawImage(n[t],0,0)})),r}(f)),Rd(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-u.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-u.top,"px"),width:"".concat(t.width,"px")}),g&&t.helper.focus(),l&&(t.sortableGhost=f,Rd(f,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},g){var y=p?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,w=y.top,x=y.left,O=y.width,E=w+y.height,C=x+O;t.axis.x&&(t.minTranslate.x=x-t.boundingClientRect.left,t.maxTranslate.x=C-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=w-t.boundingClientRect.top,t.maxTranslate.y=E-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(p?0:b.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(p?t.contentWindow.innerWidth:b.left+b.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(p?0:b.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(p?t.contentWindow.innerHeight:b.top+b.height)-t.boundingClientRect.top-t.height/2);s&&s.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,g?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(Id.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),Id.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:o}),d&&d({node:f,index:o,collection:h,isKeySorting:g,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),g&&t.keyMove(0)},o=t.props,i=o.axis,a=o.getHelperDimensions,s=o.helperClass,l=o.hideSortableGhost,u=o.updateBeforeSortStart,d=o.onSortStart,p=o.useWindowAsScrollContainer,f=n.node,h=n.collection,g=t.manager.isKeySorting,v=function(){if("function"==typeof u){t._awaitingUpdateBeforeSortStart=!0;var n=function(t,n){try{var r=(o=f.sortableInfo.index,Promise.resolve(u({collection:h,index:o,node:f,isKeySorting:g},e)).then((function(){})))}catch(e){return n(!0,e)}var o;return r&&r.then?r.then(n.bind(null,!1),n.bind(null,!0)):n(!1,value)}(0,(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return v&&v.then?v.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),r(S(S(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),r(S(S(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,o=n.onSortEnd,i=t.manager,a=i.active.collection,s=i.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(s?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(Id.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),Id.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&Rd(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=l.length;cr)){t.prevIndex=i,t.newIndex=o;var a=function(e,t,n){return et?e-1:e>n&&ev?v/2:this.height/2,width:this.width>g?g/2:this.width/2},m=c&&h>this.index&&h<=u,y=c&&h=u,w={x:0,y:0},x=a[d].edgeOffset;x||(x=Ud(f,this.container),a[d].edgeOffset=x,c&&(a[d].boundingClientRect=Vd(f,o)));var O=d0&&a[d-1];O&&!O.edgeOffset&&(O.edgeOffset=Ud(O.node,this.container),c&&(O.boundingClientRect=Vd(O.node,o))),h!==this.index?(t&&Ad(f,t),this.axis.x?this.axis.y?y||hthis.containerBoundingRect.width-b.width&&O&&(w.x=O.edgeOffset.left-x.left,w.y=O.edgeOffset.top-x.top),null===this.newIndex&&(this.newIndex=h)):(m||h>this.index&&(s+i.left+b.width>=x.left&&l+i.top+b.height>=x.top||l+i.top+b.height>=x.top+v))&&(w.x=-(this.width+this.marginOffset.x),x.left+w.xthis.index&&s+i.left+b.width>=x.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=h):(y||hthis.index&&l+i.top+b.height>=x.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=h):(y||h0&&S((function(e){return[].concat(c(e),c(t))}))}),[M]),(0,o.useEffect)((function(){j(rp({options:p,search:x,value:d,listId:b},v))}),[p,x,d,e,b,v]);var T=(0,o.useMemo)((function(){return(Array.isArray(d)?d:[d]).map(String).map((function(e){return C.find((function(t){return String(t.value)===e}))})).filter(Boolean)}),[d,C]);(0,o.useEffect)((function(){"function"==typeof f&&f(T)}),[f,T]);var R=function(e){var t;n((t=e,Array.isArray(t)?t.map((function(e){return e.value})):(null==t?void 0:t.value)||""))},L=function(e){return O(e),e},A=function(e,t){if("string"!=typeof p){var n=Xf(t).split(" "),r=Xf(e.label).split(" ");return n.map((function(t){return r.filter((function(n){return n.indexOf(t)>-1||String(t)===String(e.value)})).length>0})).every(Boolean)}return!0};return a?(0,o.createElement)(ap,{id:t,isMulti:!0,isLoading:D,isClearable:!r,isSearchable:!0,cacheOptions:!0,options:M,value:g&&T,onChange:R,onInputChange:L,filterOption:A,className:y()("wcf-select",s),classNamePrefix:"wcf-select",menuPortalTarget:I.current,useDragHandle:!0,axis:"xy",onSortEnd:function(e){var t,r,o,i,a=e.oldIndex,s=e.newIndex,l=(r=a,o=s,(i=(t=d).slice()).splice(o<0?t.length+o:o,0,i.splice(r,1)[0]),i);n(l)},distance:4,getHelperDimensions:function(e){return e.node.getBoundingClientRect()},components:{Option:sp,SingleValue:lp,MultiValue:op,MultiValueLabel:ip},closeMenuOnSelect:!1}):(0,o.createElement)(Sd,{id:t,isMulti:!1,isLoading:D,isClearable:!r,isSearchable:!0,cacheOptions:!0,options:M,value:g&&T,onChange:R,onInputChange:L,filterOption:A,className:y()("wcf-select",s),classNamePrefix:"wcf-select",menuPortalTarget:I.current})},up=function(e){var t=e.id,n=e.onChange,r=e.description,i=e.group_level,a=void 0===i?0:i,s=e.required,l=e.isMulti,c=void 0!==l&&l,u=e.className,d=e.appContext,p=e.options,f=e.list_id,h=e.async,g=e.async_params,v=Jf(e),b=v.value,m=v.currentValue,y=v.setCurrentValue;(0,o.useEffect)((function(){n&&JSON.stringify(b)!==JSON.stringify(m)&&n(m)}),[n,b,m]);var w=(0,o.useRef)();return(0,o.createElement)(j,null,0===a&&(0,o.createElement)("input",{type:"hidden",name:d.hooks.name(t),ref:w,value:c?JSON.stringify(Array.isArray(m)?m.filter(Boolean):[]):m}),(0,o.createElement)(cp,{id:d.hooks.id(t),onChange:y,required:s,isMulti:c,className:u,api:d.api,value:m,defaultOptions:p,listId:f,async:h,asyncParams:g}),r&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:r}})))};up.getHumanTitle=function(e,t){if(Array.isArray(e.options)){var n=e.options.find((function(e){return String(e.value)===String(t)}));if(n)return n.label}return t};var dp=up;function pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fp(e){for(var t=1;t1?(0,o.createElement)(Ps,{items:E.map((function(e){return String(e)})),setItems:function(e){return C(e.map((function(e){return parseInt(e)})))},allowSort:!0,renderItem:function(e){return(0,o.createElement)(yp,{selectedOptions:k,value:e,handleDelete:D})}}):(0,o.createElement)(o.Fragment,null,E.map((function(e){return(0,o.createElement)(yp,{selectedOptions:k,value:e,handleDelete:D,key:e})})))))};xp.getHumanTitle=function(e,t){if(Array.isArray(e.options)){var n=e.options.find((function(e){return String(e.value)===String(t)}));if(n)return n.label}return t};var Op=xp;function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cp(e){for(var t=1;tc.width?l/c.height:a/c.width;return c.width=c.width*u,c.height=c.height*u,c}({attributes:c,maxWidth:50,maxHeight:50});return(0,o.createElement)("div",{className:y()(t,"wcf-attachment"),key:e.id},(0,o.createElement)("div",{className:"wcf-attachment__image"},f?(0,o.createElement)("img",{src:f.url,width:f.width,height:f.height,alt:c.title}):(0,o.createElement)("img",{src:c.icon,width:48,height:64,alt:c.title})),(0,o.createElement)("div",{className:"wcf-attachment__description"},(0,o.createElement)("strong",null,(0,o.createElement)("a",{href:d,target:"_blank"},c.title)),(0,o.createElement)("br",null),"[",(0,o.createElement)("a",{href:c.url,target:"_blank"},c.filename),", ",c.filesizeHumanReadable,"]"),n&&(0,o.createElement)(uo,{onClick:l}))},_p=function(e){var t=e.id,n=e.className,r=e.group_level,i=void 0===r?0:r,a=e.isMulti,s=void 0!==a&&a,l=e.attachment_type,u=e.onChange,d=e.description,p=e.appContext,f=Jf(e),h=f.value,g=f.currentValue,v=f.setCurrentValue,b=s?g.filter(Boolean):g.find(Boolean),m=(0,o.useRef)(),w=window.wp,x=(0,o.useCallback)((function(){m.current.open()}),[]),O=(0,o.useCallback)((function(){var e=m.current.state().get("selection"),t=[];e.each((function(e){t.push(e.id)})),v((function(e){var n=s?[].concat(c(e),t):t;return c(new Set(n))}))}),[v,s]),E=(0,o.useCallback)((function(){}),[]);(0,o.useEffect)((function(){m.current=w.media({title:s?(0,Go.__)("Select attachments","wpify-custom-fields"):(0,Go.__)("Select attachment","wpify-custom-fields"),multiple:s,library:{type:l}}),m.current.on("close",O),m.current.on("open",E)}),[E,O]),(0,o.useEffect)((function(){u&&JSON.stringify(h)!==JSON.stringify(b)&&u(b)}),[h,b,u]);var C=function(e){v((function(t){return t.filter((function(t){return t!==e}))}))};return(0,o.createElement)("div",{className:y()(n)},0===i&&(0,o.createElement)("input",{type:"hidden",name:p.hooks.name(t),value:JSON.stringify(b)}),s?(0,o.createElement)("div",{className:"wcf-media-list"},(0,o.createElement)(Ps,{allowSort:!0,items:g.map(String),setItems:function(e){return v(e.map((function(e){return parseInt(e,10)})))},renderItem:function(e){return(0,o.createElement)(j,{key:e},(0,o.createElement)(Sp,{onDelete:C,length:g.length,id:parseInt(e,10)}))}})):g.find(Boolean)?(0,o.createElement)(j,null,(0,o.createElement)(Sp,{id:g.find(Boolean),onDelete:C})):null,(0,o.createElement)("div",{className:"wcf-media-buttons"},(0,o.createElement)(so,{onClick:x},s?(0,Go.__)("Add attachments","wpify-custom-fields"):(0,Go.__)("Select attachment","wpify-custom-fields"))),d&&(0,o.createElement)(j,null,(0,o.createElement)("p",{dangerouslySetInnerHTML:{__html:d}})))};function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jp(e){for(var t=1;t]+>/gm,"").replace(/\s+/gm," ")};var Rp=Tp;function Lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ap(e){for(var t=1;t0){var e=D.find(Boolean);C.url!==(null==e?void 0:e.permalink)&&S(Ap(Ap({},C),{},{url:null==e?void 0:e.permalink}))}}),[D,C,S]);var A=s?n+"-description":null,N=function(e){return function(t){var n={label:"",url:"",target:null,post:null};Object(C)===C&&(n=Ap({},C)),"target"===e?n[e]=t.target.checked?"_blank":null:"post"===e?(n[e]=t,n.url=null):"url"===e?(n[e]=t.target.value,n.post=null):n[e]=t.target.value,S(n)}};return(0,o.createElement)("div",{ref:t},(0,o.createElement)("div",{className:y()("wcf-link",h,{"wcf-link--open":T},{"wcf-link--not-empty":Boolean(C.label)&&Boolean(C.url)}),ref:_},(0,o.createElement)("input",Ap({type:"hidden",name:0===f?w.hooks.name(n):null,value:JSON.stringify(C),ref:t},d)),T?(0,o.createElement)("div",{className:"wcf-link__form"},(0,o.createElement)("label",{className:"wcf-link__form-item wcf-link__form-item--text"},(0,o.createElement)("span",null,(0,Go.__)("Label","wpify-custom-fields")),(0,o.createElement)("input",{type:"text",value:C.label,onChange:N("label"),className:y()("components-text-control__input")})),g&&(0,o.createElement)("label",{className:"wcf-link__form-item wcf-link__form-item--text"},(0,o.createElement)("span",null,v),(0,o.createElement)(cp,{id:n,onChange:N("post"),required:!0,api:w.api,value:C.post,otherArgs:k,defaultOptions:x,setOptions:M})),(0,o.createElement)("label",{className:"wcf-link__form-item wcf-link__form-item--text"},(0,o.createElement)("span",null,(0,Go.__)("URL","wpify-custom-fields")),(0,o.createElement)("input",{type:"url",value:C.url,onChange:N("url"),className:y()("components-text-control__input")})),(0,o.createElement)("label",{className:"wcf-link__form-item"},(0,o.createElement)("input",{type:"checkbox",value:C.target,checked:"_blank"===C.target,onChange:N("target"),className:y()("components-text-control__input")}),(0,o.createElement)("span",null,(0,Go.__)("Open in new window","wpify-custom-fields")))):(0,o.createElement)("div",{className:y()("wcf-link__view",{"wcf-link__view--empty":!Boolean(C.label)&&!Boolean(C.url)}),onClick:L},C.label&&(0,o.createElement)("span",{className:"wcf-link__label"},C.label,"_blank"===C.target&&(0,o.createElement)(ro.Icon,{icon:"external"})),C.url&&(0,o.createElement)("span",{className:"wcf-link__url"},C.url),!Boolean(C.label)&&!Boolean(C.url)&&(0,o.createElement)("div",{className:"button wcf-link__add"},(0,Go.__)("Add link","wpify-custom-fields"),(0,o.createElement)(ro.Icon,{icon:"insert"})),(C.label||C.url)&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(uo,{onClick:function(){S({label:"",url:""}),L()}}))),(0,o.createElement)("button",{type:"button",id:i(n),className:"wcf-link__toggle-button button",onClick:L},(0,Go.__)("Update","wpify-custom-fields"))),l&&" "+l,s&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",id:A,dangerouslySetInnerHTML:{__html:s}})))}));Np.getHumanTitle=function(e,t){return(null==t?void 0:t.label)+" ("+(null==t?void 0:t.url)+")"};var Fp=Np,Bp=window.wp.blockEditor,Hp=i().forwardRef((function(e,t){var n=e.id,r=e.htmlId,a=void 0===r?function(e){return e}:r,s=e.description,l=e.group_level,c=void 0===l?0:l,u=e.className,d=e.allowed_blocks,p=e.template,f=e.template_lock,h=e.orientation;return c>0?null:(0,o.createElement)(i().Fragment,null,(0,o.createElement)("div",{className:u,id:a(n),ref:t},(0,o.createElement)(Bp.InnerBlocks,{allowedBlocks:d,template:p,orientation:h,templateLock:f})),s&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:s}})))})),Vp=n(4583);function zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Up(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0)||e})),(0,d.addFilter)("wcf_field_without_label","wpify-custom-fields",(function(e,t){return!!["html","title"].includes(t)||e})),(0,d.addFilter)("wcf_field_without_section","wpify-custom-fields",(function(e,t){return!!["html","title"].includes(t)||e})),(0,d.addFilter)("wcf_generator_uuid","wpify-custom-fields",(function(e){return e||b()}));var Wp={text:function(e){var t=e.className;return(0,o.createElement)(j,null,(0,o.createElement)(M,T(T({},e),{},{type:"text",className:y()("regular-text",t)})))},url:function(e){var t=e.className;return(0,o.createElement)(j,null,(0,o.createElement)(M,L(L({},e),{},{type:"url",className:y()("regular-text code",t)})))},email:function(e){var t=e.className;return(0,o.createElement)(j,null,(0,o.createElement)(M,N(N({},e),{},{type:"email",className:y()("regular-text ltr",t)})))},number:function(e){var t=e.className,n=e.custom_attributes.max;return(0,o.createElement)(j,null,(0,o.createElement)(M,B(B({},e),{},{type:"number",className:y()(t,{"small-text":n<9999||!n})})))},title:function(e){var t=e.className,n=e.title,a=e.description,s=e.custom_attributes;return(0,o.createElement)(i().Fragment,null,(0,o.createElement)(j,null,(0,o.createElement)("h2",function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=Wo(Wo({},d),e);JSON.stringify(t)!==JSON.stringify(d)&&p(t)}),[d]);return(0,o.useEffect)((function(){r&&JSON.stringify(u)!==JSON.stringify(d)&&r(d)}),[u,d,r]),(0,o.createElement)(i().Fragment,null,(0,o.createElement)(j,null,(0,o.createElement)(h,{group_level:n+1,className:null==e?void 0:e.class},0===n&&(0,o.createElement)(g,{item:{title:"hidden",type:"hidden"},withoutLabel:!0,style:{display:"none"}},(0,o.createElement)("input",{type:"hidden",id:l.hooks.id(a),name:l.hooks.name(a),value:JSON.stringify(d)})),s.map((function(e){return(0,o.createElement)(zo,{key:e.id,item:e,group_level:n,appContext:l,onChange:v,value:u&&u[e.id]})})))))},multi_group:function(e){var t=e.group_level,n=void 0===t?0:t,r=e.onChange,i=e.id,a=e.description,s=e.items,l=void 0===s?[]:s,d=e.className,p=e.appContext,f=e.buttons,h=void 0===f?{}:f,g=e.disable_buttons,v=void 0===g?[]:g,m=e.min,w=void 0===m?0:m,x=e.max,O=void 0===x?0:x,E=e.group_title,C=Jf(e),S=C.value,_=C.currentValue,k=C.setCurrentValue,P=u((0,o.useState)(v),2),D=P[0],M=P[1],I=u((0,o.useState)(null),2),T=I[0],R=I[1],L=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=c(_);null===t?n.splice(e,1):n[e]=t,k(n)}},A=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=c(_),r=Gf(t);r.__key=b();for(var o=0;o0&&delete r[a.id]}n.splice(e,0,r),k(n)}},N=function(){var e=c(_),t=b();e.push({__key:t}),k(e),R(t)};(0,o.useEffect)((function(){r&&JSON.stringify(Ds(S))!==JSON.stringify(Ds(_))&&r(Ds(_))}),[r,S,_]),(0,o.useEffect)((function(){if(_.length0)for(var e=_.length;e<=w;e++)N();(w>0&&O>=w||0===w&&O>0)&&(_.length=O&&!D.find((function(e){return"add"===e||"duplicate"===e}))&&M([].concat(c(D),["add","duplicate"])))}),[_,w,O]);var F=_.map((function(e){return e.__key}));return(0,o.createElement)("div",{className:y()("wcf-multi-group",d,null==e?void 0:e.class)},0===n&&(0,o.createElement)("input",{type:"hidden",id:p.hooks.id(i),name:p.hooks.name(i),value:JSON.stringify(Ds(_))}),a&&(0,o.createElement)("p",null,a),(0,o.createElement)(j,null,(0,o.createElement)(Ps,{className:"wcf-multi-group__items",items:F,setItems:function(e){JSON.stringify(_.map((function(e){return e.__key})))!==JSON.stringify(e)&&k(e.map((function(e){return _.find((function(t){return t.__key===e}))})).filter(Boolean))},allowSort:!D.includes("move"),renderItem:function(e,t){return(0,o.createElement)(j,{key:e},(0,o.createElement)(Jo,{buttons:h,group_level:n+1,onChange:L(t),onDuplicate:A(t),items:l,value:_.find((function(t){return t.__key===e})),htmlId:function(e){return i+"_"+t+"_"+e},index:t,length:_.length,collapsed:e!==T,toggleCollapsed:function(){return R(e===T?null:e)},appContext:p,disabled_buttons:D,group_title:E}))}})),(0,o.createElement)("div",{className:y()("wcf-multi-group__buttons")},!D.includes("add")&&(0,o.createElement)(so,{className:y()("button-secondary"),onClick:N},h.add||(0,Go.__)("Add","wpify-custom-fields"))))},checkbox:Ts,toggle:function(e){var t=e.id,n=e.htmlId,a=void 0===n?function(e){return e}:n,s=e.label,l=e.group_level,c=void 0===l?0:l,u=e.custom_attributes,d=void 0===u?{}:u,p=e.onChange,f=e.className,h=e.description,g=e.disabled,v=void 0!==g&&g,b=e.appContext,m=Jf(e),w=(m.value,m.currentValue),x=m.setCurrentValue,O=(0,o.useCallback)((function(e){v||x(e)}),[v,x]);(0,o.useEffect)((function(){p&&p(w)}),[p,w]);var E=(0,o.createElement)(j,null,(0,o.createElement)(ro.ToggleControl,function(e){for(var t=1;t-1&&n.splice(r,1),O(n)}};return(0,o.createElement)(i().Fragment,null,0===l&&(0,o.createElement)("input",{type:"hidden",name:b.hooks.name(t),value:JSON.stringify(x)}),h&&(0,o.createElement)(j,null,(0,o.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:h},style:{marginBottom:"4px"}})),Array.isArray(v)&&v.map((function(e){return(0,o.createElement)(j,{key:t+"_"+e.value},(0,o.createElement)(ro.ToggleControl,function(e){for(var t=1;t0&&_>0&&(0,o.createElement)("div",{style:{marginBottom:"1rem"}},(0,o.createElement)("small",null,(0,Go.sprintf)((0,Go.__)("latitude: %s, longitude: %s","wpify-mapy-cz"),C,_))),(0,o.createElement)("div",{className:"mapycz",style:{height:"400px",marginBottom:"1rem"},ref:v}),O&&(0,o.createElement)("p",null,O))}},Gp=window.wp.apiFetch,$p=n.n(Gp),Kp=n(1688);const Zp=()=>{},Xp=Zp(),qp=Object,Jp=e=>e===Xp,Yp=e=>"function"==typeof e,Qp=(e,t)=>({...e,...t}),ef=new WeakMap;let tf=0;const nf=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(qp(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=ef.get(e),o)return o;if(o=++tf+"~",ef.set(e,o),n==Array){for(o="@",i=0;i{const n=rf.get(e);return[()=>!Jp(t)&&e.get(t)||of,r=>{if(!Jp(t)){const o=e.get(t);t in af||(af[t]=o),n[5](t,Qp(o,r),o||of)}},n[6],()=>!Jp(t)&&t in af?af[t]:!Jp(t)&&e.get(t)||of]};let df=!0;const[pf,ff]=lf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Zp,Zp],hf={isOnline:()=>df,isVisible:()=>{const e=cf&&document.visibilityState;return Jp(e)||"hidden"!==e}},gf={initFocus:e=>(cf&&document.addEventListener("visibilitychange",e),pf("focus",e),()=>{cf&&document.removeEventListener("visibilitychange",e),ff("focus",e)}),initReconnect:e=>{const t=()=>{df=!0,e()},n=()=>{df=!1};return pf("online",t),pf("offline",n),()=>{ff("online",t),ff("offline",n)}}},vf=!o.useId,bf=!lf||"Deno"in window,mf=bf?o.useEffect:o.useLayoutEffect,yf="undefined"!=typeof navigator&&navigator.connection,wf=!bf&&yf&&(["slow-2g","2g"].includes(yf.effectiveType)||yf.saveData),xf=e=>{if(Yp(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?nf(e):"",t]};let Of=0;const Ef=()=>++Of;async function Cf(...e){const[t,n,r,o]=e,i=Qp({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let l=i.optimisticData;const c=!1!==i.revalidate,u=i.throwOnError;if(Yp(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(d))}return d(n);async function d(n){const[o]=xf(n);if(!o)return;const[i,d]=uf(t,o),[p,f,h,g]=rf.get(t),v=()=>{const e=p[o];return c&&(delete h[o],delete g[o],e&&e[0])?e[0](2).then((()=>i().data)):i().data};if(e.length<3)return v();let b,m=r;const y=Ef();f[o]=[y,0];const w=!Jp(l),x=i(),O=x.data,E=x._c,C=Jp(E)?O:E;if(w&&(l=Yp(l)?l(C,O):l,d({data:l,_c:C})),Yp(m))try{m=m(C)}catch(e){b=e}if(m&&Yp(m.then)){if(m=await m.catch((e=>{b=e})),y!==f[o][0]){if(b)throw b;return m}b&&w&&(e=>"function"==typeof s?s(e):!1!==s)(b)&&(a=!0,d({data:C,_c:Xp}))}if(a&&!b)if(Yp(a)){const e=a(m,C);d({data:e,error:Xp,_c:Xp})}else d({data:m,error:Xp,_c:Xp});if(f[o][1]=Ef(),Promise.resolve(v()).then((()=>{d({_c:Xp})})),!b)return m;if(u)throw b}}const Sf=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},_f=(e,t)=>{if(!rf.has(e)){const n=Qp(gf,t),r={},o=Cf.bind(Xp,e);let i=Zp;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const o=a[t];if(o)for(const e of o)e(n,r)},c=()=>{if(!rf.has(e)&&(rf.set(e,[r,{},{},{},o,l,s]),!bf)){const t=n.initFocus(setTimeout.bind(Xp,Sf.bind(Xp,r,0))),o=n.initReconnect(setTimeout.bind(Xp,Sf.bind(Xp,r,1)));i=()=>{t&&t(),o&&o(),rf.delete(e)}}};return c(),[e,o,c,i]}return[e,rf.get(e)[4]]},[kf,jf]=_f(new Map),Pf=Qp({onLoadingSlow:Zp,onSuccess:Zp,onError:Zp,onErrorRetry:(e,__,t,n,r)=>{const o=t.errorRetryCount,i=r.retryCount,a=~~((Math.random()+.5)*(1<<(i<8?i:8)))*t.errorRetryInterval;!Jp(o)&&i>o||setTimeout(n,a,r)},onDiscarded:Zp,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:wf?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:wf?5e3:3e3,compare:(e,t)=>nf(e)==nf(t),isPaused:()=>!1,cache:kf,mutate:jf,fallback:{}},hf),Df=(e,t)=>{const n=Qp(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:a}=t;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Qp(o,a))}return n},Mf=(0,o.createContext)({}),If=lf&&window.__SWR_DEVTOOLS_USE__,Tf=If?window.__SWR_DEVTOOLS_USE__:[],Rf=e=>Yp(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Lf=Tf.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=xf(t),[,,,o]=rf.get(kf);if(r.startsWith("$inf$"))return n(...e);const i=o[r];return Jp(i)?n(...e):(delete o[r],i)}),r)));If&&(window.__SWR_DEVTOOLS_REACT__=o);const Af=o.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),Nf={dedupe:!0},Ff=(qp.defineProperty((e=>{const{value:t}=e,n=(0,o.useContext)(Mf),r=Yp(t),i=(0,o.useMemo)((()=>r?t(n):t),[r,n,t]),a=(0,o.useMemo)((()=>r?i:Df(n,i)),[r,n,i]),s=i&&i.provider,l=(0,o.useRef)(Xp);s&&!l.current&&(l.current=_f(s(a.cache||kf),i));const c=l.current;return c&&(a.cache=c[0],a.mutate=c[1]),mf((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,o.createElement)(Mf.Provider,Qp(e,{value:a}))}),"defaultValue",{value:Pf}),Bf=(e,t,n)=>{const{cache:r,compare:i,suspense:a,fallbackData:s,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:p,keepPreviousData:f}=n,[h,g,v,b]=rf.get(r),[m,y]=xf(e),w=(0,o.useRef)(!1),x=(0,o.useRef)(!1),O=(0,o.useRef)(m),E=(0,o.useRef)(t),C=(0,o.useRef)(n),S=()=>C.current,_=()=>S().isVisible()&&S().isOnline(),[k,j,P,D]=uf(r,m),M=(0,o.useRef)({}).current,I=Jp(s)?n.fallback[m]:s,T=(e,t)=>{for(const n in M){const r=n;if("data"===r){if(!i(e[r],t[r])){if(!Jp(e[r]))return!1;if(!i(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},R=(0,o.useMemo)((()=>{const e=!!m&&!!t&&(Jp(l)?!S().isPaused()&&!a&&(!!Jp(c)||c):l),n=t=>{const n=Qp(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=k(),o=D(),i=n(r),s=r===o?i:n(o);let u=i;return[()=>{const e=n(k());return T(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>s]}),[r,m]),L=(0,Kp.useSyncExternalStore)((0,o.useCallback)((e=>P(m,((t,n)=>{T(n,t)||e()}))),[r,m]),R[0],R[1]),A=!w.current,N=h[m]&&h[m].length>0,F=L.data,B=Jp(F)?I:F,H=L.error,V=(0,o.useRef)(B),z=f?Jp(F)?V.current:F:B,U=!(N&&!Jp(H))&&(A&&!Jp(l)?l:!S().isPaused()&&(a?!Jp(B)&&c:Jp(B)||c)),W=!!(m&&t&&A&&U),G=Jp(L.isValidating)?W:L.isValidating,$=Jp(L.isLoading)?W:L.isLoading,K=(0,o.useCallback)((async e=>{const t=E.current;if(!m||!t||x.current||S().isPaused())return!1;let r,o,a=!0;const s=e||{},l=!v[m]||!s.dedupe,c=()=>vf?!x.current&&m===O.current&&w.current:m===O.current,u={isValidating:!1,isLoading:!1},d=()=>{j(u)},p=()=>{const e=v[m];e&&e[1]===o&&delete v[m]},f={isValidating:!0};Jp(k().data)&&(f.isLoading=!0);try{if(l&&(j(f),n.loadingTimeout&&Jp(k().data)&&setTimeout((()=>{a&&c()&&S().onLoadingSlow(m,n)}),n.loadingTimeout),v[m]=[t(y),Ef()]),[r,o]=v[m],r=await r,l&&setTimeout(p,n.dedupingInterval),!v[m]||v[m][1]!==o)return l&&c()&&S().onDiscarded(m),!1;u.error=Xp;const e=g[m];if(!Jp(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),l&&c()&&S().onDiscarded(m),!1;const s=k().data;u.data=i(s,r)?s:r,l&&c()&&S().onSuccess(r,m,n)}catch(e){p();const t=S(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,m,t),(!0===n||Yp(n)&&n(e))&&_()&&t.onErrorRetry(e,m,t,(e=>{const t=h[m];t&&t[0]&&t[0](3,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0}),[m,r]),Z=(0,o.useCallback)(((...e)=>Cf(r,O.current,...e)),[]);if(mf((()=>{E.current=t,C.current=n,Jp(F)||(V.current=F)})),mf((()=>{if(!m)return;const e=K.bind(Xp,Nf);let t=0;const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(m,h,((n,r={})=>{if(0==n){const n=Date.now();S().revalidateOnFocus&&n>t&&_()&&(t=n+S().focusThrottleInterval,e())}else if(1==n)S().revalidateOnReconnect&&_()&&e();else{if(2==n)return K();if(3==n)return K(r)}}));return x.current=!1,O.current=m,w.current=!0,j({_k:y}),U&&(Jp(B)||bf?e():(r=e,lf&&typeof window.requestAnimationFrame!=sf?window.requestAnimationFrame(r):setTimeout(r,1))),()=>{x.current=!0,n()};var r}),[m]),mf((()=>{let e;function t(){const t=Yp(u)?u(k().data):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){k().error||!d&&!S().isVisible()||!p&&!S().isOnline()?t():K(Nf).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[u,d,p,m]),(0,o.useDebugValue)(z),a&&Jp(B)&&m){if(!vf&&bf)throw new Error("Fallback data is required when using suspense in SSR.");E.current=t,C.current=n,x.current=!1;const e=b[m];if(!Jp(e)){const t=Z(e);Af(t)}if(!Jp(H))throw H;{const e=K(Nf);Jp(z)||(e.status="fulfilled",e.value=!0),Af(e)}}return{mutate:Z,get data(){return M.data=!0,z},get error(){return M.error=!0,H},get isValidating(){return M.isValidating=!0,G},get isLoading(){return M.isLoading=!0,$}}},function(...e){const t=Qp(Pf,(0,o.useContext)(Mf)),[n,r,i]=Rf(e),a=Df(t,i);let s=Bf;const{use:l}=a,c=(l||[]).concat(Lf);for(let e=c.length;e--;)s=c[e](s);return s(n,r||a.fetcher||null,a)});var Bf;const Hf=((e,t)=>(...n)=>{const[r,o,i]=Rf(n),a=(i.use||[]).concat(t);return e(r,o,{...i,use:a})})(Ff,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r))));function Vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zf(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===e.indexOf("#")&&(e=e.slice(1)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),6!==e.length)return"#000000";var n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16);return t?.299*n+.587*r+.114*o>186?"#000000":"#FFFFFF":(n=(255-n).toString(16),r=(255-r).toString(16),o=(255-o).toString(16),"#"+n.padStart(2,"0")+r.padStart(2,"0")+o.padStart(2,"0"))},Kf=function(e){return $p()(zf({},e))},Zf=function(e,t){var n,r,i,a,s,l,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},p=u((0,o.useState)(t.search||""),2),f=p[0],h=p[1];if(n=function(){h(t.search)},r=500,i=[t.search],a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(0,o.useRef)(e),r=(0,o.useRef)();(0,o.useEffect)((function(){n.current=e}),[e]);var i=(0,o.useCallback)((function(){r.current=setTimeout((function(){n.current()}),t)}),[t]),a=(0,o.useCallback)((function(){r.current&&clearTimeout(r.current)}),[]);return(0,o.useEffect)((function(){return i(),a}),[t,i,a]),{reset:(0,o.useCallback)((function(){a(),i()}),[a,i]),clear:a}}(n,r),s=a.reset,l=a.clear,(0,o.useEffect)(s,[].concat(c(i),[s])),(0,o.useEffect)(l,[]),Array.isArray(t.options))return{data:t.options,isLoading:!1,isError:!1};if("string"==typeof t.options){var g="";Object(d)===d&&Object.keys(d).length>0&&(g="?"+String(new URLSearchParams(d)));var v=Hf({path:"".concat(e.path,"/options").concat(g),data:zf(zf({},t),{},{value:(Array.isArray(t.value)?t.value:[t.value]).filter(Boolean),search:f}),method:"POST"},Kf),b=v.data,m=v.error;return{data:b,isLoading:!m&&!b,isError:m,loadOptions:function(e,t){return t(null==b?void 0:b.map((function(e){return zf(zf({},e),{},{label:qf(e.label)})})))}}}return{api:e,args:t,data:[],isLoading:!1,isError:!0,loadOptions:function(e,t){return t([])}}},Xf=function(e){return String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim().toLowerCase()},qf=function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent},Jf=function(e){var t=(0,o.useMemo)((function(){return e.generator?(0,d.applyFilters)("wcf_generator_"+e.generator,e.value,e):e.value}),[e]),n=t;void 0===n&&void 0!==e.default&&(n=e.default);var r={label:"",url:"",target:null};void 0===n&&(n=["multi_group","multi_select","multi_attachment","multi_post","multi_toggle"].includes(e.type)?[]:["group"].includes(e.type)?{}:["attachment","post"].includes(e.type)?0:"link"===e.type?r:""),"link"===e.type?"string"==typeof n?n=zf(zf({},r),{},{url:n}):Object(n)!==n?n=r:Object.keys(r).forEach((function(e){n[e]=n[e]||r[e]})):["post","multi_post","attachment","multi_attachment"].includes(e.type)?(Array.isArray(n)||(n=[n]),n=n.filter(Boolean).map((function(e){return parseInt(e,10)}))):"multi_group"===e.type?n=(n=Array.isArray(n)?Gf(n):[]).map((function(e){return e.__key=b(),e})):"multi_toggle"!==e.type||Array.isArray(n)||(n=[]);var i=u((0,o.useState)(n),2);return{value:t,currentValue:i[0],setCurrentValue:i[1]}},Yf=window.wp.serverSideRender,Qf=n.n(Yf),eh=window.wp.element,th=(0,eh.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,eh.cloneElement)(e,{width:t,height:t,...n,ref:r})})),nh=window.wp.primitives,rh=(0,o.createElement)(nh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(nh.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})),oh=(0,o.createElement)(nh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(nh.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));function ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ah(e){for(var t=1;t0,c=t.items.filter((function(e){return"inspector"===e.position})).length>0,d=(0,Bp.useBlockProps)();return(0,o.createElement)("div",fh({},d),(0,o.createElement)(Fo.Provider,{value:{RootWrapper:Ao,RowWrapper:No}},l&&(0,o.createElement)(Bp.BlockControls,null,(0,o.createElement)(ro.ToolbarGroup,null,(0,o.createElement)(ro.ToolbarButton,{isActive:a===hh,onClick:function(){return s(hh)}},(0,o.createElement)("div",{className:"wcf-block-toolbar-button"},(0,o.createElement)(th,{icon:rh}),(0,Go.__)("View","wpify-custom-fields"))),(0,o.createElement)(ro.ToolbarButton,{isActive:a===gh,onClick:function(){return s(gh)}},(0,o.createElement)("div",{className:"wcf-block-toolbar-button"},(0,o.createElement)(th,{icon:oh}),(0,Go.__)("Edit","wpify-custom-fields"))))),a===hh&&(0,o.createElement)(Qf(),{className:"wcf-server-side-rendered",block:t.name,attributes:fh({},n),httpMethod:"POST"}),a===gh&&(0,o.createElement)(sh,fh({},e)),c&&(0,o.createElement)(dh,fh({},e))))};function bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mh(e){for(var t=1;t]*>/gm.test(t.icon)&&(t.icon=(0,o.createElement)("span",{dangerouslySetInnerHTML:{__html:t.icon}})),t.hooks={name:function(e){return e},id:function(e){return e}},(0,a.registerBlockType)(t.name,mh(mh({},t),{},{apiVersion:3,edit:function(e){return(0,o.createElement)(vh,mh({appContext:t},e))},save:function(){return(0,o.createElement)(Bp.InnerBlocks.Content,null)}}))}))}()}(); \ No newline at end of file diff --git a/vendor/wpify/custom-fields/src/Implementations/GutenbergBlock.php b/vendor/wpify/custom-fields/src/Implementations/GutenbergBlock.php index edecc51..a1bcda0 100644 --- a/vendor/wpify/custom-fields/src/Implementations/GutenbergBlock.php +++ b/vendor/wpify/custom-fields/src/Implementations/GutenbergBlock.php @@ -33,7 +33,7 @@ final class GutenbergBlock extends AbstractImplementation { /** * GutenbergBlock constructor. * - * @param array $args + * @param array $args * @param CustomFields $wcf */ public function __construct( array $args, CustomFields $wcf ) { @@ -90,7 +90,7 @@ public function __construct( array $args, CustomFields $wcf ) { } add_action( 'init', array( $this, 'register_block' ), $defaults['init_priority'] ); - add_action( 'current_screen', array( $this, 'add_editor_script' ) ); + add_action( 'enqueue_block_assets', array( $this, 'enqueue_block_assets' ) ); } /** @@ -108,25 +108,33 @@ public function register_block() { register_block_type( $this->name, $args ); } - /** - * @return void - */ - public function add_editor_script( $current_screen ) { - $display_callback = $this->display; - - if ( ! boolval( $display_callback() ) ) { - return; - } + public function enqueue_block_assets() { + if ( is_admin() ) { + wp_enqueue_editor(); + wp_enqueue_code_editor( array( 'type' => 'text/html' ) ); - $args = $this->get_args(); + $script = $this->wcf->get_assets()->enqueue_script( + 'wpify-custom-blocks.js', + array( 'wp-tinymce', 'code-editor' ), + true, + array( + 'wcf_code_editor_settings' => $this->wcf->get_assets()->get_code_editor_settings(), + 'wcf_build_url' => $this->get_build_url(), + 'wcf_date' => array( + 'date_format' => get_option( 'date_format' ), + 'time_format' => get_option( 'time_format' ) + ), + ) + ); - if ( $current_screen->is_block_editor() || in_array( $current_screen->id, array( 'widgets', 'customize' ) ) ) { $js_args = $this->get_args( array( 'render_callback' ) ); $js_args['items'] = $this->fill_selects( $js_args['items'] ); - $script = 'window.wcf_blocks=(window.wcf_blocks||{});window.wcf_blocks[\'' . $this->name . '\']=' . wp_json_encode( $js_args, JSON_UNESCAPED_UNICODE ) . ';'; - $script .= 'window.wcf_build_url=' . wp_json_encode( $this->get_build_url() ) . ';'; + $inline_script = 'window.wcf_blocks=(window.wcf_blocks||{});window.wcf_blocks[\'' . $this->name . '\']=' . wp_json_encode( $js_args, JSON_UNESCAPED_UNICODE ) . ';'; + $inline_script .= 'window.wcf_build_url=' . wp_json_encode( $this->get_build_url() ) . ';'; - wp_add_inline_script( $args['editor_script'], $script, 'before' ); + wp_add_inline_script( $script, $inline_script, 'before' ); + + $this->wcf->get_assets()->enqueue_style( 'wpify-custom-blocks.css' ); } } @@ -181,45 +189,6 @@ public function get_args( $exclude = array() ) { return $args; } - /** - * @return string|null - */ - public function get_editor_script() { - if ( empty( $this->editor_script ) ) { - if ( is_admin() ) { - wp_enqueue_editor(); - wp_enqueue_code_editor( array( 'type' => 'text/html' ) ); - } - - return $this->wcf->get_assets()->register_script( - 'wpify-custom-blocks.js', - array( 'wp-tinymce', 'code-editor' ), - true, - array( - 'wcf_code_editor_settings' => $this->wcf->get_assets()->get_code_editor_settings(), - 'wcf_build_url' => $this->get_build_url(), - 'wcf_date' => array( - 'date_format' => get_option( 'date_format' ), - 'time_format' => get_option( 'time_format' ) - ), - ) - ); - } - - return null; - } - - /** - * @return string|null - */ - public function get_editor_style() { - if ( empty( $this->editor_style ) ) { - return $this->wcf->get_assets()->register_style( 'wpify-custom-blocks.css' ); - } - - return null; - } - /** * @return array */ @@ -261,6 +230,7 @@ public function get_field( $name, $item ) { /** * @param string $name * @param string $value + * @param $item * * @return mixed */ diff --git a/vendor/yahnis-elsts/plugin-update-checker/vendor/ParsedownModern.php b/vendor/yahnis-elsts/plugin-update-checker/vendor/ParsedownModern.php index 38ac9eb..5d96071 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/vendor/ParsedownModern.php +++ b/vendor/yahnis-elsts/plugin-update-checker/vendor/ParsedownModern.php @@ -448,7 +448,7 @@ protected function blockFencedCodeContinue($Line, $Block) return $Block; } - $Block['element']['text']['text'] .= "\n".$Line['body']; + $Block['element']['text']['text'] .= "\n".$Line['body'];; return $Block; }