| @@ -891,12 +891,9 @@ | ||
| 891 | 891 | let lp_rest_url; |
| 892 | 892 | if ('undefined' !== typeof lpDataAdmin) { |
| 893 | 893 | lp_rest_url = lpDataAdmin.lp_rest_url; |
| 894 | 894 | lplistAPI.admin = { |
| 895 | - apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices', | |
| 896 | - apiAddons: lp_rest_url + 'lp/v1/addon/all', | |
| 897 | - apiAddonAction: lp_rest_url + 'lp/v1/addon/action-n', | |
| 898 | - apiAddonsPurchase: lp_rest_url + 'lp/v1/addon/info-addons-purchase', | |
| 895 | + // apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices', | |
| 899 | 896 | apiSearchCourses: lp_rest_url + 'lp/v1/admin/tools/search-course', |
| 900 | 897 | apiSearchUsers: lp_rest_url + 'lp/v1/admin/tools/search-user', |
| 901 | 898 | apiAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/assign-user-course', |
| 902 | 899 | apiUnAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/unassign-user-course' |
| @@ -2043,9 +2040,9 @@ | ||
| 2043 | 2040 | \**********************************************************/ |
| 2044 | 2041 | (module) { |
| 2045 | 2042 | |
| 2046 | 2043 | /*! |
| 2047 | -* sweetalert2 v11.26.25 | |
| 2044 | +* sweetalert2 v11.26.17 | |
| 2048 | 2045 | * Released under the MIT License. |
| 2049 | 2046 | */ |
| 2050 | 2047 | (function (global, factory) { |
| 2051 | 2048 | true ? module.exports = factory() : |
| @@ -2214,13 +2211,8 @@ | ||
| 2214 | 2211 | */ |
| 2215 | 2212 | const isPromise = arg => arg && Promise.resolve(arg) === arg; |
| 2216 | 2213 | |
| 2217 | 2214 | /** |
| 2218 | - * @returns {boolean} | |
| 2219 | - */ | |
| 2220 | - const isFirefox = () => navigator.userAgent.includes('Firefox'); | |
| 2221 | - | |
| 2222 | - /** | |
| 2223 | 2215 | * Gets the popup container which contains the backdrop and the popup itself. |
| 2224 | 2216 | * |
| 2225 | 2217 | * @returns {HTMLElement | null} |
| 2226 | 2218 | */ |
| @@ -2442,9 +2434,15 @@ | ||
| 2442 | 2434 | const hasClass = (elem, className) => { |
| 2443 | 2435 | if (!className) { |
| 2444 | 2436 | return false; |
| 2445 | 2437 | } |
| 2446 | - return className.split(/\s+/).every(cls => elem.classList.contains(cls)); | |
| 2438 | + const classList = className.split(/\s+/); | |
| 2439 | + for (let i = 0; i < classList.length; i++) { | |
| 2440 | + if (!elem.classList.contains(classList[i])) { | |
| 2441 | + return false; | |
| 2442 | + } | |
| 2443 | + } | |
| 2444 | + return true; | |
| 2447 | 2445 | }; |
| 2448 | 2446 | |
| 2449 | 2447 | /** |
| 2450 | 2448 | * @param {HTMLElement} elem |
| @@ -2527,18 +2525,27 @@ | ||
| 2527 | 2525 | const toggleClass = (target, classList, condition) => { |
| 2528 | 2526 | if (!target || !classList) { |
| 2529 | 2527 | return; |
| 2530 | 2528 | } |
| 2531 | - const classes = typeof classList === 'string' ? classList.split(/\s+/).filter(Boolean) : classList; | |
| 2532 | - const targets = Array.isArray(target) ? target : [target]; | |
| 2533 | - targets.forEach(elem => { | |
| 2534 | - classes.forEach(className => { | |
| 2529 | + if (typeof classList === 'string') { | |
| 2530 | + classList = classList.split(/\s+/).filter(Boolean); | |
| 2531 | + } | |
| 2532 | + classList.forEach(className => { | |
| 2533 | + if (Array.isArray(target)) { | |
| 2534 | + target.forEach(elem => { | |
| 2535 | + if (condition) { | |
| 2536 | + elem.classList.add(className); | |
| 2537 | + } else { | |
| 2538 | + elem.classList.remove(className); | |
| 2539 | + } | |
| 2540 | + }); | |
| 2541 | + } else { | |
| 2535 | 2542 | if (condition) { |
| 2536 | - elem.classList.add(className); | |
| 2543 | + target.classList.add(className); | |
| 2537 | 2544 | } else { |
| 2538 | - elem.classList.remove(className); | |
| 2545 | + target.classList.remove(className); | |
| 2539 | 2546 | } |
| 2540 | - }); | |
| 2547 | + } | |
| 2541 | 2548 | }); |
| 2542 | 2549 | }; |
| 2543 | 2550 | |
| 2544 | 2551 | /** |
| @@ -2563,10 +2570,17 @@ | ||
| 2563 | 2570 | * @param {HTMLElement} elem |
| 2564 | 2571 | * @param {string} className |
| 2565 | 2572 | * @returns {HTMLElement | undefined} |
| 2566 | 2573 | */ |
| 2567 | - const getDirectChildByClass = (elem, className) => (/** @type {HTMLElement | undefined} */ | |
| 2568 | - Array.from(elem.children).find(child => child instanceof HTMLElement && hasClass(child, className))); | |
| 2574 | + const getDirectChildByClass = (elem, className) => { | |
| 2575 | + const children = Array.from(elem.children); | |
| 2576 | + for (let i = 0; i < children.length; i++) { | |
| 2577 | + const child = children[i]; | |
| 2578 | + if (child instanceof HTMLElement && hasClass(child, className)) { | |
| 2579 | + return child; | |
| 2580 | + } | |
| 2581 | + } | |
| 2582 | + }; | |
| 2569 | 2583 | |
| 2570 | 2584 | /** |
| 2571 | 2585 | * @param {HTMLElement} elem |
| 2572 | 2586 | * @param {string} property |
| @@ -2575,9 +2589,9 @@ | ||
| 2575 | 2589 | const applyNumericalStyle = (elem, property, value) => { |
| 2576 | 2590 | if (value === `${parseInt(`${value}`)}`) { |
| 2577 | 2591 | value = parseInt(value); |
| 2578 | 2592 | } |
| 2579 | - if (value || value === 0) { | |
| 2593 | + if (value || parseInt(`${value}`) === 0) { | |
| 2580 | 2594 | elem.style.setProperty(property, typeof value === 'number' ? `${value}px` : (/** @type {string} */value)); |
| 2581 | 2595 | } else { |
| 2582 | 2596 | elem.style.removeProperty(property); |
| 2583 | 2597 | } |
| @@ -3024,17 +3038,23 @@ | ||
| 3024 | 3038 | return; |
| 3025 | 3039 | } |
| 3026 | 3040 | addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); |
| 3027 | 3041 | |
| 3028 | - // Apply custom background colors and outline colors to action buttons | |
| 3029 | - /** @type {[HTMLElement, string, string | undefined][]} */ | |
| 3030 | - const buttons = [[confirmButton, 'confirm', params.confirmButtonColor], [denyButton, 'deny', params.denyButtonColor], [cancelButton, 'cancel', params.cancelButtonColor]]; | |
| 3031 | - buttons.forEach(([button, type, color]) => { | |
| 3032 | - if (color) { | |
| 3033 | - button.style.setProperty(`--swal2-${type}-button-background-color`, color); | |
| 3034 | - } | |
| 3035 | - applyOutlineColor(button); | |
| 3036 | - }); | |
| 3042 | + // Apply custom background colors to action buttons | |
| 3043 | + if (params.confirmButtonColor) { | |
| 3044 | + confirmButton.style.setProperty('--swal2-confirm-button-background-color', params.confirmButtonColor); | |
| 3045 | + } | |
| 3046 | + if (params.denyButtonColor) { | |
| 3047 | + denyButton.style.setProperty('--swal2-deny-button-background-color', params.denyButtonColor); | |
| 3048 | + } | |
| 3049 | + if (params.cancelButtonColor) { | |
| 3050 | + cancelButton.style.setProperty('--swal2-cancel-button-background-color', params.cancelButtonColor); | |
| 3051 | + } | |
| 3052 | + | |
| 3053 | + // Apply the outline color to action buttons | |
| 3054 | + applyOutlineColor(confirmButton); | |
| 3055 | + applyOutlineColor(denyButton); | |
| 3056 | + applyOutlineColor(cancelButton); | |
| 3037 | 3057 | } |
| 3038 | 3058 | |
| 3039 | 3059 | /** |
| 3040 | 3060 | * @param {HTMLElement} button |
| @@ -3149,10 +3169,9 @@ | ||
| 3149 | 3169 | */ |
| 3150 | 3170 | |
| 3151 | 3171 | var privateProps = { |
| 3152 | 3172 | innerParams: new WeakMap(), |
| 3153 | - domCache: new WeakMap(), | |
| 3154 | - focusedElement: new WeakMap() | |
| 3173 | + domCache: new WeakMap() | |
| 3155 | 3174 | }; |
| 3156 | 3175 | |
| 3157 | 3176 | /// <reference path="../../../../sweetalert2.d.ts"/> |
| 3158 | 3177 | |
| @@ -3224,13 +3243,12 @@ | ||
| 3224 | 3243 | /** |
| 3225 | 3244 | * @param {HTMLInputElement} input |
| 3226 | 3245 | */ |
| 3227 | 3246 | const removeAttributes = input => { |
| 3228 | - for (const { | |
| 3229 | - name | |
| 3230 | - } of Array.from(input.attributes)) { | |
| 3231 | - if (!['id', 'type', 'value', 'style'].includes(name)) { | |
| 3232 | - input.removeAttribute(name); | |
| 3247 | + for (let i = 0; i < input.attributes.length; i++) { | |
| 3248 | + const attrName = input.attributes[i].name; | |
| 3249 | + if (!['id', 'type', 'value', 'style'].includes(attrName)) { | |
| 3250 | + input.removeAttribute(attrName); | |
| 3233 | 3251 | } |
| 3234 | 3252 | } |
| 3235 | 3253 | }; |
| 3236 | 3254 | |
| @@ -3328,14 +3346,12 @@ | ||
| 3328 | 3346 | * @returns {Input} |
| 3329 | 3347 | */ |
| 3330 | 3348 | renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */ |
| 3331 | 3349 | (input, params) => { |
| 3332 | - // oxfmt-ignore | |
| 3333 | 3350 | const inputElement = /** @type {HTMLInputElement} */input; |
| 3334 | 3351 | checkAndSetInputValue(inputElement, params.inputValue); |
| 3335 | 3352 | setInputLabel(inputElement, inputElement, params); |
| 3336 | 3353 | setInputPlaceholder(inputElement, params); |
| 3337 | - // oxfmt-ignore | |
| 3338 | 3354 | inputElement.type = /** @type {string} */params.input; |
| 3339 | 3355 | return inputElement; |
| 3340 | 3356 | }; |
| 3341 | 3357 | |
| @@ -3599,11 +3615,11 @@ | ||
| 3599 | 3615 | } |
| 3600 | 3616 | const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); |
| 3601 | 3617 | /** @type {NodeListOf<HTMLElement>} */ |
| 3602 | 3618 | const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); |
| 3603 | - successIconParts.forEach(part => { | |
| 3604 | - part.style.backgroundColor = popupBackgroundColor; | |
| 3605 | - }); | |
| 3619 | + for (let i = 0; i < successIconParts.length; i++) { | |
| 3620 | + successIconParts[i].style.backgroundColor = popupBackgroundColor; | |
| 3621 | + } | |
| 3606 | 3622 | }; |
| 3607 | 3623 | |
| 3608 | 3624 | /** |
| 3609 | 3625 | * |
| @@ -3783,12 +3799,20 @@ | ||
| 3783 | 3799 | * @param {MouseEvent | TouchEvent} event |
| 3784 | 3800 | * @returns {{ clientX: number, clientY: number }} |
| 3785 | 3801 | */ |
| 3786 | 3802 | const getClientXY = event => { |
| 3787 | - const source = event.type.startsWith('touch') ? /** @type {TouchEvent} */event.touches[0] : (/** @type {MouseEvent} */event); | |
| 3803 | + let clientX = 0, | |
| 3804 | + clientY = 0; | |
| 3805 | + if (event.type.startsWith('mouse')) { | |
| 3806 | + clientX = /** @type {MouseEvent} */event.clientX; | |
| 3807 | + clientY = /** @type {MouseEvent} */event.clientY; | |
| 3808 | + } else if (event.type.startsWith('touch')) { | |
| 3809 | + clientX = /** @type {TouchEvent} */event.touches[0].clientX; | |
| 3810 | + clientY = /** @type {TouchEvent} */event.touches[0].clientY; | |
| 3811 | + } | |
| 3788 | 3812 | return { |
| 3789 | - clientX: source.clientX, | |
| 3790 | - clientY: source.clientY | |
| 3813 | + clientX, | |
| 3814 | + clientY | |
| 3791 | 3815 | }; |
| 3792 | 3816 | }; |
| 3793 | 3817 | |
| 3794 | 3818 | /** |
| @@ -4016,10 +4040,9 @@ | ||
| 4016 | 4040 | * @param {GlobalState} globalState |
| 4017 | 4041 | */ |
| 4018 | 4042 | const removeKeydownHandler = globalState => { |
| 4019 | 4043 | if (globalState.keydownTarget && globalState.keydownHandlerAdded && globalState.keydownHandler) { |
| 4020 | - const handler = /** @type {EventListenerOrEventListenerObject} */ | |
| 4021 | - /** @type {unknown} */globalState.keydownHandler; | |
| 4044 | + const handler = /** @type {EventListenerOrEventListenerObject} */ /** @type {unknown} */globalState.keydownHandler; | |
| 4022 | 4045 | globalState.keydownTarget.removeEventListener('keydown', handler, { |
| 4023 | 4046 | capture: globalState.keydownListenerCapture |
| 4024 | 4047 | }); |
| 4025 | 4048 | globalState.keydownHandlerAdded = false; |
| @@ -4052,9 +4075,8 @@ | ||
| 4052 | 4075 | |
| 4053 | 4076 | /** |
| 4054 | 4077 | * @param {number} index |
| 4055 | 4078 | * @param {number} increment |
| 4056 | - * @returns {boolean} shouldPreventDefault | |
| 4057 | 4079 | */ |
| 4058 | 4080 | const setFocus = (index, increment) => { |
| 4059 | 4081 | var _dom$getPopup; |
| 4060 | 4082 | const focusableElements = getFocusableElements(); |
| @@ -4075,19 +4097,12 @@ | ||
| 4075 | 4097 | } else if (index === -1) { |
| 4076 | 4098 | index = focusableElements.length - 1; |
| 4077 | 4099 | } |
| 4078 | 4100 | focusableElements[index].focus(); |
| 4079 | - | |
| 4080 | - // don't prevent default for iframes (Firefox fix) | |
| 4081 | - // https://github.com/sweetalert2/sweetalert2/issues/2931 | |
| 4082 | - if (isFirefox() && focusableElements[index] instanceof HTMLIFrameElement) { | |
| 4083 | - return false; | |
| 4084 | - } | |
| 4085 | - return true; | |
| 4101 | + return; | |
| 4086 | 4102 | } |
| 4087 | 4103 | // no visible focusable elements, focus the popup |
| 4088 | 4104 | (_dom$getPopup = getPopup()) === null || _dom$getPopup === void 0 || _dom$getPopup.focus(); |
| 4089 | - return true; | |
| 4090 | 4105 | }; |
| 4091 | 4106 | const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; |
| 4092 | 4107 | const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; |
| 4093 | 4108 | |
| @@ -4161,27 +4176,27 @@ | ||
| 4161 | 4176 | */ |
| 4162 | 4177 | const handleTab = event => { |
| 4163 | 4178 | const targetElement = event.target; |
| 4164 | 4179 | const focusableElements = getFocusableElements(); |
| 4165 | - const btnIndex = focusableElements.findIndex(el => el === targetElement); | |
| 4180 | + let btnIndex = -1; | |
| 4181 | + for (let i = 0; i < focusableElements.length; i++) { | |
| 4182 | + if (targetElement === focusableElements[i]) { | |
| 4183 | + btnIndex = i; | |
| 4184 | + break; | |
| 4185 | + } | |
| 4186 | + } | |
| 4166 | 4187 | |
| 4167 | - // don't prevent default for iframes (Firefox fix) | |
| 4168 | - // https://github.com/sweetalert2/sweetalert2/issues/2931 | |
| 4169 | - let shouldPreventDefault = true; | |
| 4170 | - | |
| 4171 | 4188 | // Cycle to the next button |
| 4172 | 4189 | if (!event.shiftKey) { |
| 4173 | - shouldPreventDefault = setFocus(btnIndex, 1); | |
| 4190 | + setFocus(btnIndex, 1); | |
| 4174 | 4191 | } |
| 4175 | 4192 | |
| 4176 | 4193 | // Cycle to the prev button |
| 4177 | 4194 | else { |
| 4178 | - shouldPreventDefault = setFocus(btnIndex, -1); | |
| 4195 | + setFocus(btnIndex, -1); | |
| 4179 | 4196 | } |
| 4180 | 4197 | event.stopPropagation(); |
| 4181 | - if (shouldPreventDefault) { | |
| 4182 | - event.preventDefault(); | |
| 4183 | - } | |
| 4198 | + event.preventDefault(); | |
| 4184 | 4199 | }; |
| 4185 | 4200 | |
| 4186 | 4201 | /** |
| 4187 | 4202 | * @param {string} key |
| @@ -4277,11 +4292,8 @@ | ||
| 4277 | 4292 | |
| 4278 | 4293 | // @ts-ignore |
| 4279 | 4294 | const isSafariOrIOS = typeof window !== 'undefined' && Boolean(window.GestureEvent); // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 |
| 4280 | 4295 | |
| 4281 | - // @ts-ignore | |
| 4282 | - const isIOS = isSafariOrIOS && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; | |
| 4283 | - | |
| 4284 | 4296 | /** |
| 4285 | 4297 | * Fix iOS scrolling |
| 4286 | 4298 | * http://stackoverflow.com/q/39626302 |
| 4287 | 4299 | */ |
| @@ -4863,10 +4875,30 @@ | ||
| 4863 | 4875 | * @typedef {string[]} InputOptionFlattened |
| 4864 | 4876 | * @returns {InputOptionFlattened[]} |
| 4865 | 4877 | */ |
| 4866 | 4878 | const formatInputOptions = inputOptions => { |
| 4867 | - const entries = inputOptions instanceof Map ? Array.from(inputOptions) : Object.entries(inputOptions); | |
| 4868 | - return entries.map(([key, value]) => [key, typeof value === 'object' ? formatInputOptions(value) : value]); // case of <optgroup> | |
| 4879 | + /** @type {InputOptionFlattened[]} */ | |
| 4880 | + const result = []; | |
| 4881 | + if (inputOptions instanceof Map) { | |
| 4882 | + inputOptions.forEach((value, key) => { | |
| 4883 | + let valueFormatted = value; | |
| 4884 | + if (typeof valueFormatted === 'object') { | |
| 4885 | + // case of <optgroup> | |
| 4886 | + valueFormatted = formatInputOptions(valueFormatted); | |
| 4887 | + } | |
| 4888 | + result.push([key, valueFormatted]); | |
| 4889 | + }); | |
| 4890 | + } else { | |
| 4891 | + Object.keys(inputOptions).forEach(key => { | |
| 4892 | + let valueFormatted = inputOptions[key]; | |
| 4893 | + if (typeof valueFormatted === 'object') { | |
| 4894 | + // case of <optgroup> | |
| 4895 | + valueFormatted = formatInputOptions(valueFormatted); | |
| 4896 | + } | |
| 4897 | + result.push([key, valueFormatted]); | |
| 4898 | + }); | |
| 4899 | + } | |
| 4900 | + return result; | |
| 4869 | 4901 | }; |
| 4870 | 4902 | |
| 4871 | 4903 | /** |
| 4872 | 4904 | * @param {string} optionValue |
| @@ -4872,9 +4904,11 @@ | ||
| 4872 | 4904 | * @param {string} optionValue |
| 4873 | 4905 | * @param {SweetAlertInputValue} inputValue |
| 4874 | 4906 | * @returns {boolean} |
| 4875 | 4907 | */ |
| 4876 | - const isSelected = (optionValue, inputValue) => Boolean(inputValue) && inputValue != null && inputValue.toString() === optionValue.toString(); | |
| 4908 | + const isSelected = (optionValue, inputValue) => { | |
| 4909 | + return Boolean(inputValue) && inputValue !== null && inputValue !== undefined && inputValue.toString() === optionValue.toString(); | |
| 4910 | + }; | |
| 4877 | 4911 | |
| 4878 | 4912 | /** |
| 4879 | 4913 | * @param {SweetAlert} instance |
| 4880 | 4914 | */ |
| @@ -5055,9 +5089,11 @@ | ||
| 5055 | 5089 | } |
| 5056 | 5090 | removeClass([domCache.popup, domCache.actions], swalClasses.loading); |
| 5057 | 5091 | domCache.popup.removeAttribute('aria-busy'); |
| 5058 | 5092 | domCache.popup.removeAttribute('data-loading'); |
| 5059 | - this.enableButtons(); | |
| 5093 | + domCache.confirmButton.disabled = false; | |
| 5094 | + domCache.denyButton.disabled = false; | |
| 5095 | + domCache.cancelButton.disabled = false; | |
| 5060 | 5096 | } |
| 5061 | 5097 | |
| 5062 | 5098 | /** |
| 5063 | 5099 | * @param {DomCache} domCache |
| @@ -5110,11 +5146,11 @@ | ||
| 5110 | 5146 | } |
| 5111 | 5147 | if (input.type === 'radio') { |
| 5112 | 5148 | /** @type {NodeListOf<HTMLInputElement>} */ |
| 5113 | 5149 | const radios = popup.querySelectorAll(`[name="${swalClasses.radio}"]`); |
| 5114 | - radios.forEach(radio => { | |
| 5115 | - radio.disabled = disabled; | |
| 5116 | - }); | |
| 5150 | + for (let i = 0; i < radios.length; i++) { | |
| 5151 | + radios[i].disabled = disabled; | |
| 5152 | + } | |
| 5117 | 5153 | } else { |
| 5118 | 5154 | input.disabled = disabled; |
| 5119 | 5155 | } |
| 5120 | 5156 | } |
| @@ -5124,13 +5160,8 @@ | ||
| 5124 | 5160 | * @this {SweetAlert} |
| 5125 | 5161 | */ |
| 5126 | 5162 | function enableButtons() { |
| 5127 | 5163 | setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); |
| 5128 | - const focusedElement = privateProps.focusedElement.get(this); | |
| 5129 | - if (focusedElement instanceof HTMLElement && document.activeElement === document.body) { | |
| 5130 | - focusedElement.focus(); | |
| 5131 | - } | |
| 5132 | - privateProps.focusedElement.delete(this); | |
| 5133 | 5164 | } |
| 5134 | 5165 | |
| 5135 | 5166 | /** |
| 5136 | 5167 | * Disable all the buttons |
| @@ -5136,9 +5167,8 @@ | ||
| 5136 | 5167 | * Disable all the buttons |
| 5137 | 5168 | * @this {SweetAlert} |
| 5138 | 5169 | */ |
| 5139 | 5170 | function disableButtons() { |
| 5140 | - privateProps.focusedElement.set(this, document.activeElement); | |
| 5141 | 5171 | setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); |
| 5142 | 5172 | } |
| 5143 | 5173 | |
| 5144 | 5174 | /** |
| @@ -5645,25 +5675,25 @@ | ||
| 5645 | 5675 | }; |
| 5646 | 5676 | }; |
| 5647 | 5677 | |
| 5648 | 5678 | /** |
| 5649 | - * @param {unknown} elem | |
| 5679 | + * @param {any} elem | |
| 5650 | 5680 | * @returns {boolean} |
| 5651 | 5681 | */ |
| 5652 | - const isJqueryElement = elem => typeof elem === 'object' && elem !== null && 'jquery' in elem; | |
| 5682 | + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; | |
| 5653 | 5683 | |
| 5654 | 5684 | /** |
| 5655 | - * @param {unknown} elem | |
| 5685 | + * @param {any} elem | |
| 5656 | 5686 | * @returns {boolean} |
| 5657 | 5687 | */ |
| 5658 | 5688 | const isElement = elem => elem instanceof Element || isJqueryElement(elem); |
| 5659 | 5689 | |
| 5660 | 5690 | /** |
| 5661 | - * @param {ReadonlyArray<unknown>} args | |
| 5691 | + * @param {any[]} args | |
| 5662 | 5692 | * @returns {SweetAlertOptions} |
| 5663 | 5693 | */ |
| 5664 | 5694 | const argsToParams = args => { |
| 5665 | - /** @type {Record<string, unknown>} */ | |
| 5695 | + /** @type {Record<string, any>} */ | |
| 5666 | 5696 | const params = {}; |
| 5667 | 5697 | if (typeof args[0] === 'object' && !isElement(args[0])) { |
| 5668 | 5698 | Object.assign(params, args[0]); |
| 5669 | 5699 | } else { |
| @@ -5675,9 +5705,9 @@ | ||
| 5675 | 5705 | error(`Unexpected type of ${name}! Expected "string" or "Element", got ${typeof arg}`); |
| 5676 | 5706 | } |
| 5677 | 5707 | }); |
| 5678 | 5708 | } |
| 5679 | - return /** @type {SweetAlertOptions} */params; | |
| 5709 | + return params; | |
| 5680 | 5710 | }; |
| 5681 | 5711 | |
| 5682 | 5712 | /** |
| 5683 | 5713 | * Main method to create a new SweetAlert2 popup |
| @@ -6168,15 +6198,19 @@ | ||
| 6168 | 6198 | return; |
| 6169 | 6199 | } |
| 6170 | 6200 | result[`${type}ButtonText`] = button.innerHTML; |
| 6171 | 6201 | result[`show${capitalizeFirstLetter(type)}Button`] = true; |
| 6172 | - const color = button.getAttribute('color'); | |
| 6173 | - if (color !== null) { | |
| 6174 | - result[`${type}ButtonColor`] = color; | |
| 6202 | + if (button.hasAttribute('color')) { | |
| 6203 | + const color = button.getAttribute('color'); | |
| 6204 | + if (color !== null) { | |
| 6205 | + result[`${type}ButtonColor`] = color; | |
| 6206 | + } | |
| 6175 | 6207 | } |
| 6176 | - const ariaLabel = button.getAttribute('aria-label'); | |
| 6177 | - if (ariaLabel !== null) { | |
| 6178 | - result[`${type}ButtonAriaLabel`] = ariaLabel; | |
| 6208 | + if (button.hasAttribute('aria-label')) { | |
| 6209 | + const ariaLabel = button.getAttribute('aria-label'); | |
| 6210 | + if (ariaLabel !== null) { | |
| 6211 | + result[`${type}ButtonAriaLabel`] = ariaLabel; | |
| 6212 | + } | |
| 6179 | 6213 | } |
| 6180 | 6214 | }); |
| 6181 | 6215 | return result; |
| 6182 | 6216 | }; |
| @@ -6190,17 +6224,20 @@ | ||
| 6190 | 6224 | /** @type {HTMLElement | null} */ |
| 6191 | 6225 | const image = templateContent.querySelector('swal-image'); |
| 6192 | 6226 | if (image) { |
| 6193 | 6227 | showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); |
| 6194 | - // getAttribute returns null if attribute is absent; `|| undefined` converts empty string to undefined | |
| 6195 | - const src = image.getAttribute('src'); | |
| 6196 | - if (src !== null) result.imageUrl = src || undefined; | |
| 6197 | - const width = image.getAttribute('width'); | |
| 6198 | - if (width !== null) result.imageWidth = width || undefined; | |
| 6199 | - const height = image.getAttribute('height'); | |
| 6200 | - if (height !== null) result.imageHeight = height || undefined; | |
| 6201 | - const alt = image.getAttribute('alt'); | |
| 6202 | - if (alt !== null) result.imageAlt = alt || undefined; | |
| 6228 | + if (image.hasAttribute('src')) { | |
| 6229 | + result.imageUrl = image.getAttribute('src') || undefined; | |
| 6230 | + } | |
| 6231 | + if (image.hasAttribute('width')) { | |
| 6232 | + result.imageWidth = image.getAttribute('width') || undefined; | |
| 6233 | + } | |
| 6234 | + if (image.hasAttribute('height')) { | |
| 6235 | + result.imageHeight = image.getAttribute('height') || undefined; | |
| 6236 | + } | |
| 6237 | + if (image.hasAttribute('alt')) { | |
| 6238 | + result.imageAlt = image.getAttribute('alt') || undefined; | |
| 6239 | + } | |
| 6203 | 6240 | } |
| 6204 | 6241 | return result; |
| 6205 | 6242 | }; |
| 6206 | 6243 | |
| @@ -6335,17 +6372,12 @@ | ||
| 6335 | 6372 | setTimeout(() => { |
| 6336 | 6373 | setScrollingVisibility(container, popup); |
| 6337 | 6374 | }, SHOW_CLASS_TIMEOUT); |
| 6338 | 6375 | if (isModal()) { |
| 6376 | + // Using ternary instead of ?? operator for Webpack 4 compatibility | |
| 6339 | 6377 | fixScrollContainer(container, params.scrollbarPadding !== undefined ? params.scrollbarPadding : false, initialBodyOverflow); |
| 6340 | 6378 | setAriaHidden(); |
| 6341 | 6379 | } |
| 6342 | - | |
| 6343 | - // https://github.com/sweetalert2/sweetalert2/issues/2923 | |
| 6344 | - if (isIOS && params.backdrop === false && popup.scrollHeight > container.clientHeight) { | |
| 6345 | - // remove pointer-events: none from container, it breaks scrolling tall popups in iOS | |
| 6346 | - container.style.pointerEvents = 'auto'; | |
| 6347 | - } | |
| 6348 | 6380 | if (!isToast() && !globalState.previousActiveElement) { |
| 6349 | 6381 | globalState.previousActiveElement = document.activeElement; |
| 6350 | 6382 | } |
| 6351 | 6383 | if (typeof params.didOpen === 'function') { |
| @@ -6517,10 +6549,9 @@ | ||
| 6517 | 6549 | constructor(...args) { |
| 6518 | 6550 | /** |
| 6519 | 6551 | * @type {Promise<SweetAlertResult>} |
| 6520 | 6552 | */ |
| 6521 | - _classPrivateFieldInitSpec(this, _promise, /** @type {Promise<SweetAlertResult>} */ | |
| 6522 | - Promise.resolve({ | |
| 6553 | + _classPrivateFieldInitSpec(this, _promise, /** @type {Promise<SweetAlertResult>} */Promise.resolve({ | |
| 6523 | 6554 | isConfirmed: false, |
| 6524 | 6555 | isDenied: false, |
| 6525 | 6556 | isDismissed: true |
| 6526 | 6557 | })); |
| @@ -6584,9 +6615,8 @@ | ||
| 6584 | 6615 | // `catch` cannot be the name of a module export, so we define our thenable methods here instead |
| 6585 | 6616 | /** |
| 6586 | 6617 | * @param {any} onFulfilled |
| 6587 | 6618 | */ |
| 6588 | - // oxlint-disable-next-line unicorn/no-thenable | |
| 6589 | 6619 | then(onFulfilled) { |
| 6590 | 6620 | return _classPrivateFieldGet2(_promise, this).then(onFulfilled); |
| 6591 | 6621 | } |
| 6592 | 6622 | |
| @@ -6730,10 +6760,10 @@ | ||
| 6730 | 6760 | return; |
| 6731 | 6761 | } |
| 6732 | 6762 | // TODO: this is dumb, remove `allowEnterKey` param in the next major version |
| 6733 | 6763 | if (!callIfFunction(innerParams.allowEnterKey)) { |
| 6734 | - warnAboutDeprecation('allowEnterKey', 'preConfirm: () => false'); | |
| 6735 | - domCache.popup.focus(); | |
| 6764 | + warnAboutDeprecation('allowEnterKey'); | |
| 6765 | + blurActiveElement(); | |
| 6736 | 6766 | return; |
| 6737 | 6767 | } |
| 6738 | 6768 | if (focusAutofocus(domCache)) { |
| 6739 | 6769 | return; |
| @@ -6778,8 +6808,13 @@ | ||
| 6778 | 6808 | return true; |
| 6779 | 6809 | } |
| 6780 | 6810 | return false; |
| 6781 | 6811 | }; |
| 6812 | + const blurActiveElement = () => { | |
| 6813 | + if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') { | |
| 6814 | + document.activeElement.blur(); | |
| 6815 | + } | |
| 6816 | + }; | |
| 6782 | 6817 | |
| 6783 | 6818 | // Assign instance methods from src/instanceMethods/*.js to prototype |
| 6784 | 6819 | SweetAlert.prototype.disableButtons = disableButtons; |
| 6785 | 6820 | SweetAlert.prototype.enableButtons = enableButtons; |
| @@ -6817,9 +6852,9 @@ | ||
| 6817 | 6852 | return undefined; |
| 6818 | 6853 | }; |
| 6819 | 6854 | }); |
| 6820 | 6855 | SweetAlert.DismissReason = DismissReason; |
| 6821 | - SweetAlert.version = '11.26.25'; | |
| 6856 | + SweetAlert.version = '11.26.17'; | |
| 6822 | 6857 | |
| 6823 | 6858 | const Swal = SweetAlert; |
| 6824 | 6859 | // @ts-ignore |
| 6825 | 6860 | Swal.default = Swal; |
| @@ -6827,9 +6862,9 @@ | ||
| 6827 | 6862 | return Swal; |
| 6828 | 6863 | |
| 6829 | 6864 | })); |
| 6830 | 6865 | if (typeof this !== 'undefined' && this.Sweetalert2){this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} |
| 6831 | -"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,":root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}"); | |
| 6866 | +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,":root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}"); | |
| 6832 | 6867 | |
| 6833 | 6868 | /***/ }, |
| 6834 | 6869 | |
| 6835 | 6870 | /***/ "./node_modules/toastify-js/src/toastify.js" |
| @@ -8603,9 +8638,8 @@ | ||
| 8603 | 8638 | diacritics: true, |
| 8604 | 8639 | create: null, |
| 8605 | 8640 | createOnBlur: false, |
| 8606 | 8641 | createFilter: null, |
| 8607 | - clearAfterSelect: false, | |
| 8608 | 8642 | highlight: true, |
| 8609 | 8643 | openOnFocus: true, |
| 8610 | 8644 | shouldOpen: null, |
| 8611 | 8645 | maxOptions: 50, |
| @@ -8803,12 +8837,11 @@ | ||
| 8803 | 8837 | * Initialize from a <input type="text"> element. |
| 8804 | 8838 | * |
| 8805 | 8839 | */ |
| 8806 | 8840 | var init_textbox = () => { |
| 8807 | - var _a, _b; | |
| 8808 | 8841 | const data_raw = input.getAttribute(attr_data); |
| 8809 | 8842 | if (!data_raw) { |
| 8810 | - var value = (_b = (_a = input === null || input === void 0 ? void 0 : input.value) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : ''; | |
| 8843 | + var value = input.value.trim() || ''; | |
| 8811 | 8844 | if (!settings.allowEmptyOption && !value.length) |
| 8812 | 8845 | return; |
| 8813 | 8846 | const values = value.split(settings.delimiter); |
| 8814 | 8847 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.iterate)(values, (value) => { |
| @@ -8850,9 +8883,9 @@ | ||
| 8850 | 8883 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8851 | 8884 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 8852 | 8885 | /* harmony export */ }); |
| 8853 | 8886 | /** |
| 8854 | -* Tom Select v2.6.2 | |
| 8887 | +* Tom Select v2.4.3 | |
| 8855 | 8888 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 8856 | 8889 | */ |
| 8857 | 8890 | |
| 8858 | 8891 | /** |
| @@ -9028,9 +9061,9 @@ | ||
| 9028 | 9061 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9029 | 9062 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 9030 | 9063 | /* harmony export */ }); |
| 9031 | 9064 | /** |
| 9032 | -* Tom Select v2.6.2 | |
| 9065 | +* Tom Select v2.4.3 | |
| 9033 | 9066 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9034 | 9067 | */ |
| 9035 | 9068 | |
| 9036 | 9069 | /** |
| @@ -9094,9 +9127,9 @@ | ||
| 9094 | 9127 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9095 | 9128 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 9096 | 9129 | /* harmony export */ }); |
| 9097 | 9130 | /** |
| 9098 | -* Tom Select v2.6.2 | |
| 9131 | +* Tom Select v2.4.3 | |
| 9099 | 9132 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9100 | 9133 | */ |
| 9101 | 9134 | |
| 9102 | 9135 | /** |
| @@ -9288,9 +9321,9 @@ | ||
| 9288 | 9321 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9289 | 9322 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 9290 | 9323 | /* harmony export */ }); |
| 9291 | 9324 | /** |
| 9292 | -* Tom Select v2.6.2 | |
| 9325 | +* Tom Select v2.4.3 | |
| 9293 | 9326 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9294 | 9327 | */ |
| 9295 | 9328 | |
| 9296 | 9329 | /** |
| @@ -9339,12 +9372,10 @@ | ||
| 9339 | 9372 | const self = this; |
| 9340 | 9373 | const options = Object.assign({ |
| 9341 | 9374 | className: 'clear-button', |
| 9342 | 9375 | title: 'Clear All', |
| 9343 | - role: 'button', | |
| 9344 | - tabindex: 0, | |
| 9345 | 9376 | html: data => { |
| 9346 | - return `<div class="${data.className}" title="${data.title}" role="${data.role}" tabindex="${data.tabindex}">×</div>`; | |
| 9377 | + return `<div class="${data.className}" title="${data.title}">⨯</div>`; | |
| 9347 | 9378 | } |
| 9348 | 9379 | }, userOptions); |
| 9349 | 9380 | self.on('initialize', () => { |
| 9350 | 9381 | var button = getDom(options.html(options)); |
| @@ -9353,9 +9384,8 @@ | ||
| 9353 | 9384 | self.clear(); |
| 9354 | 9385 | if (self.settings.mode === 'single' && self.settings.allowEmptyOption) { |
| 9355 | 9386 | self.addItem(''); |
| 9356 | 9387 | } |
| 9357 | - self.refreshOptions(false); | |
| 9358 | 9388 | evt.preventDefault(); |
| 9359 | 9389 | evt.stopPropagation(); |
| 9360 | 9390 | }); |
| 9361 | 9391 | self.control.appendChild(button); |
| @@ -9379,9 +9409,9 @@ | ||
| 9379 | 9409 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9380 | 9410 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 9381 | 9411 | /* harmony export */ }); |
| 9382 | 9412 | /** |
| 9383 | -* Tom Select v2.6.2 | |
| 9413 | +* Tom Select v2.4.3 | |
| 9384 | 9414 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9385 | 9415 | */ |
| 9386 | 9416 | |
| 9387 | 9417 | /** |
| @@ -9614,9 +9644,9 @@ | ||
| 9614 | 9644 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9615 | 9645 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 9616 | 9646 | /* harmony export */ }); |
| 9617 | 9647 | /** |
| 9618 | -* Tom Select v2.6.2 | |
| 9648 | +* Tom Select v2.4.3 | |
| 9619 | 9649 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9620 | 9650 | */ |
| 9621 | 9651 | |
| 9622 | 9652 | /** |
| @@ -9731,9 +9761,9 @@ | ||
| 9731 | 9761 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9732 | 9762 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 9733 | 9763 | /* harmony export */ }); |
| 9734 | 9764 | /** |
| 9735 | -* Tom Select v2.6.2 | |
| 9765 | +* Tom Select v2.4.3 | |
| 9736 | 9766 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9737 | 9767 | */ |
| 9738 | 9768 | |
| 9739 | 9769 | const KEY_ESC = 27; |
| @@ -9886,9 +9916,8 @@ | ||
| 9886 | 9916 | const self = this; |
| 9887 | 9917 | self.settings.shouldOpen = true; // make sure the input is shown even if there are no options to display in the dropdown |
| 9888 | 9918 | |
| 9889 | 9919 | self.hook('before', 'setup', () => { |
| 9890 | - var _self$input; | |
| 9891 | 9920 | self.focus_node = self.control; |
| 9892 | 9921 | addClasses(self.control_input, 'dropdown-input'); |
| 9893 | 9922 | const div = getDom('<div class="dropdown-input-wrap">'); |
| 9894 | 9923 | div.append(self.control_input); |
| @@ -9897,17 +9926,8 @@ | ||
| 9897 | 9926 | // set a placeholder in the select control |
| 9898 | 9927 | const placeholder = getDom('<input class="items-placeholder" tabindex="-1" />'); |
| 9899 | 9928 | placeholder.placeholder = self.settings.placeholder || ''; |
| 9900 | 9929 | self.control.append(placeholder); |
| 9901 | - /** | |
| 9902 | - * TomSelect renders a custom control with a focusable <input class="items-placeholder">. | |
| 9903 | - * The source <select>'s aria-label is not automatically propagated to that input, | |
| 9904 | - * which triggers "Missing form label" accessibility warnings. | |
| 9905 | - * This helper copies the label from the <select> onto the generated input. | |
| 9906 | - */ | |
| 9907 | - const label = (_self$input = self.input) == null ? void 0 : _self$input.getAttribute('aria-label'); | |
| 9908 | - if (!label) return; | |
| 9909 | - placeholder.setAttribute('aria-label', label); | |
| 9910 | 9930 | }); |
| 9911 | 9931 | self.on('initialize', () => { |
| 9912 | 9932 | // set tabIndex on control to -1, otherwise [shift+tab] will put focus right back on control_input |
| 9913 | 9933 | self.control_input.addEventListener('keydown', evt => { |
| @@ -9970,9 +9990,9 @@ | ||
| 9970 | 9990 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9971 | 9991 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 9972 | 9992 | /* harmony export */ }); |
| 9973 | 9993 | /** |
| 9974 | -* Tom Select v2.6.2 | |
| 9994 | +* Tom Select v2.4.3 | |
| 9975 | 9995 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9976 | 9996 | */ |
| 9977 | 9997 | |
| 9978 | 9998 | /** |
| @@ -10059,9 +10079,9 @@ | ||
| 10059 | 10079 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 10060 | 10080 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 10061 | 10081 | /* harmony export */ }); |
| 10062 | 10082 | /** |
| 10063 | -* Tom Select v2.6.2 | |
| 10083 | +* Tom Select v2.4.3 | |
| 10064 | 10084 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10065 | 10085 | */ |
| 10066 | 10086 | |
| 10067 | 10087 | /** |
| @@ -10100,9 +10120,9 @@ | ||
| 10100 | 10120 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 10101 | 10121 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 10102 | 10122 | /* harmony export */ }); |
| 10103 | 10123 | /** |
| 10104 | -* Tom Select v2.6.2 | |
| 10124 | +* Tom Select v2.4.3 | |
| 10105 | 10125 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10106 | 10126 | */ |
| 10107 | 10127 | |
| 10108 | 10128 | /** |
| @@ -10147,9 +10167,9 @@ | ||
| 10147 | 10167 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 10148 | 10168 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 10149 | 10169 | /* harmony export */ }); |
| 10150 | 10170 | /** |
| 10151 | -* Tom Select v2.6.2 | |
| 10171 | +* Tom Select v2.4.3 | |
| 10152 | 10172 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10153 | 10173 | */ |
| 10154 | 10174 | |
| 10155 | 10175 | const KEY_LEFT = 37; |
| @@ -10248,9 +10268,9 @@ | ||
| 10248 | 10268 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 10249 | 10269 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 10250 | 10270 | /* harmony export */ }); |
| 10251 | 10271 | /** |
| 10252 | -* Tom Select v2.6.2 | |
| 10272 | +* Tom Select v2.4.3 | |
| 10253 | 10273 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10254 | 10274 | */ |
| 10255 | 10275 | |
| 10256 | 10276 | /** |
| @@ -10268,8 +10288,16 @@ | ||
| 10268 | 10288 | * |
| 10269 | 10289 | */ |
| 10270 | 10290 | |
| 10271 | 10291 | /** |
| 10292 | + * Escapes a string for use within HTML. | |
| 10293 | + * | |
| 10294 | + */ | |
| 10295 | +const escape_html = str => { | |
| 10296 | + return (str + '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); | |
| 10297 | +}; | |
| 10298 | + | |
| 10299 | +/** | |
| 10272 | 10300 | * Prevent default |
| 10273 | 10301 | * |
| 10274 | 10302 | */ |
| 10275 | 10303 | const preventDefault = (evt, stop = false) => { |
| @@ -10331,31 +10359,28 @@ | ||
| 10331 | 10359 | * |
| 10332 | 10360 | */ |
| 10333 | 10361 | |
| 10334 | 10362 | function plugin (userOptions) { |
| 10335 | - const self = this; | |
| 10336 | 10363 | const options = Object.assign({ |
| 10337 | - label: '×', | |
| 10364 | + label: '×', | |
| 10338 | 10365 | title: 'Remove', |
| 10339 | 10366 | className: 'remove', |
| 10340 | - tabindex: -1, | |
| 10341 | - role: 'button', | |
| 10342 | - html: data => { | |
| 10343 | - var _data$tabindex; | |
| 10344 | - const el = document.createElement('div'); | |
| 10345 | - el.className = data.className || ''; | |
| 10346 | - el.title = data.title || ''; | |
| 10347 | - el.setAttribute('role', data.role || 'button'); | |
| 10348 | - el.tabIndex = (_data$tabindex = data.tabindex) != null ? _data$tabindex : -1; | |
| 10349 | - el.textContent = data.label || ''; | |
| 10350 | - return el; | |
| 10351 | - } | |
| 10367 | + append: true | |
| 10352 | 10368 | }, userOptions); |
| 10369 | + | |
| 10370 | + //options.className = 'remove-single'; | |
| 10371 | + var self = this; | |
| 10372 | + | |
| 10373 | + // override the render method to add remove button to each item | |
| 10374 | + if (!options.append) { | |
| 10375 | + return; | |
| 10376 | + } | |
| 10377 | + var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>'; | |
| 10353 | 10378 | self.hook('after', 'setupTemplates', () => { |
| 10354 | 10379 | var orig_render_item = self.settings.render.item; |
| 10355 | 10380 | self.settings.render.item = (data, escape) => { |
| 10356 | 10381 | var item = getDom(orig_render_item.call(self, data, escape)); |
| 10357 | - var close_button = getDom(options.html(options)); | |
| 10382 | + var close_button = getDom(html); | |
| 10358 | 10383 | item.appendChild(close_button); |
| 10359 | 10384 | addEvent(close_button, 'mousedown', evt => { |
| 10360 | 10385 | preventDefault(evt, true); |
| 10361 | 10386 | }); |
| @@ -10392,9 +10417,9 @@ | ||
| 10392 | 10417 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 10393 | 10418 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 10394 | 10419 | /* harmony export */ }); |
| 10395 | 10420 | /** |
| 10396 | -* Tom Select v2.6.2 | |
| 10421 | +* Tom Select v2.4.3 | |
| 10397 | 10422 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10398 | 10423 | */ |
| 10399 | 10424 | |
| 10400 | 10425 | /** |
| @@ -10449,9 +10474,9 @@ | ||
| 10449 | 10474 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 10450 | 10475 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 10451 | 10476 | /* harmony export */ }); |
| 10452 | 10477 | /** |
| 10453 | -* Tom Select v2.6.2 | |
| 10478 | +* Tom Select v2.4.3 | |
| 10454 | 10479 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10455 | 10480 | */ |
| 10456 | 10481 | |
| 10457 | 10482 | /** |
| @@ -10533,9 +10558,9 @@ | ||
| 10533 | 10558 | return arg; |
| 10534 | 10559 | }; |
| 10535 | 10560 | |
| 10536 | 10561 | /** |
| 10537 | - * Plugin: "virtual_scroll" (Tom Select) | |
| 10562 | + * Plugin: "restore_on_backspace" (Tom Select) | |
| 10538 | 10563 | * Copyright (c) contributors |
| 10539 | 10564 | * |
| 10540 | 10565 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this |
| 10541 | 10566 | * file except in compliance with the License. You may obtain a copy of the License at: |
| @@ -10557,12 +10582,8 @@ | ||
| 10557 | 10582 | var dropdown_content; |
| 10558 | 10583 | var loading_more = false; |
| 10559 | 10584 | var load_more_opt; |
| 10560 | 10585 | var default_values = []; |
| 10561 | - var default_values_loaded = false; | |
| 10562 | - var default_pagination; | |
| 10563 | - var default_options = []; | |
| 10564 | - var html_values = []; | |
| 10565 | 10586 | if (!self.settings.shouldLoadMore) { |
| 10566 | 10587 | // return true if additional results should be loaded |
| 10567 | 10588 | self.settings.shouldLoadMore = () => { |
| 10568 | 10589 | const scroll_percent = dropdown_content.clientHeight / (dropdown_content.scrollHeight - dropdown_content.scrollTop); |
| @@ -10592,9 +10613,9 @@ | ||
| 10592 | 10613 | }]; |
| 10593 | 10614 | |
| 10594 | 10615 | // can we load more results for given query? |
| 10595 | 10616 | const canLoadMore = query => { |
| 10596 | - if (self.settings.maxOptions !== null && typeof self.settings.maxOptions === 'number' && dropdown_content.children.length >= self.settings.maxOptions) { | |
| 10617 | + if (typeof self.settings.maxOptions === 'number' && dropdown_content.children.length >= self.settings.maxOptions) { | |
| 10597 | 10618 | return false; |
| 10598 | 10619 | } |
| 10599 | 10620 | if (query in pagination && pagination[query]) { |
| 10600 | 10621 | return true; |
| @@ -10652,13 +10673,9 @@ | ||
| 10652 | 10673 | |
| 10653 | 10674 | // wrap the load |
| 10654 | 10675 | self.hook('instead', 'loadCallback', (options, optgroups) => { |
| 10655 | 10676 | if (!loading_more) { |
| 10656 | - // When searching (non-empty query), keep selected items and HTML default options, | |
| 10657 | - // but remove preloaded remote options so they don't bleed into search results. | |
| 10658 | - // For empty query, use clearFilter (keeps default_values + items). | |
| 10659 | - const activeFilter = self.lastValue !== '' ? (_option, value) => self.items.indexOf(value) >= 0 || html_values.indexOf(value) >= 0 : clearFilter; | |
| 10660 | - self.clearOptions(activeFilter); | |
| 10677 | + self.clearOptions(clearFilter); | |
| 10661 | 10678 | } else if (load_more_opt) { |
| 10662 | 10679 | const first_option = options[0]; |
| 10663 | 10680 | if (first_option !== undefined) { |
| 10664 | 10681 | load_more_opt.dataset.value = first_option[self.settings.valueField]; |
| @@ -10664,31 +10681,11 @@ | ||
| 10664 | 10681 | load_more_opt.dataset.value = first_option[self.settings.valueField]; |
| 10665 | 10682 | } |
| 10666 | 10683 | } |
| 10667 | 10684 | orig_loadCallback.call(self, options, optgroups); |
| 10668 | - | |
| 10669 | - // After the initial preload (empty query), snapshot default_values and option objects | |
| 10670 | - // so they can be restored when the user clears their search. | |
| 10671 | - if (!loading_more && !default_values_loaded) { | |
| 10672 | - default_values_loaded = true; | |
| 10673 | - if (self.lastValue === '') { | |
| 10674 | - default_values = Object.keys(self.options); | |
| 10675 | - default_pagination = pagination['']; | |
| 10676 | - default_options = Object.values(self.options); | |
| 10677 | - } | |
| 10678 | - } | |
| 10679 | 10685 | loading_more = false; |
| 10680 | 10686 | }); |
| 10681 | 10687 | |
| 10682 | - // as the “loading_more” element will be removed from the dropdown, | |
| 10683 | - // we activate the previous option if needed | |
| 10684 | - // to avoid the dropdown being scrolled back to the first one | |
| 10685 | - self.hook('before', 'refreshOptions', () => { | |
| 10686 | - if (self.activeOption && "option" !== self.activeOption.getAttribute("role")) { | |
| 10687 | - self.setActiveOption(self.activeOption.previousElementSibling); | |
| 10688 | - } | |
| 10689 | - }); | |
| 10690 | - | |
| 10691 | 10688 | // add templates to dropdown |
| 10692 | 10689 | // loading_more if we have another url in the queue |
| 10693 | 10690 | // no_more_results if we don't have another url in the queue |
| 10694 | 10691 | self.hook('after', 'refreshOptions', () => { |
| @@ -10712,32 +10709,10 @@ | ||
| 10712 | 10709 | dropdown_content.append(option); |
| 10713 | 10710 | } |
| 10714 | 10711 | }); |
| 10715 | 10712 | |
| 10716 | - // Restore preloaded options and pagination when clearing search | |
| 10717 | - const restoreDefaults = () => { | |
| 10718 | - if (!default_values_loaded) { | |
| 10719 | - return; | |
| 10720 | - } | |
| 10721 | - // Re-add preloaded option objects (clearOptions can only remove, not restore) | |
| 10722 | - self.addOptions(default_options); | |
| 10723 | - // Remove any search results that are not part of the preloaded defaults | |
| 10724 | - self.clearOptions(clearFilter); | |
| 10725 | - if (default_pagination) { | |
| 10726 | - pagination[''] = default_pagination; | |
| 10727 | - } | |
| 10728 | - }; | |
| 10729 | - self.on('type', query => { | |
| 10730 | - if (query === '') { | |
| 10731 | - restoreDefaults(); | |
| 10732 | - self.refreshOptions(false); | |
| 10733 | - } | |
| 10734 | - }); | |
| 10735 | - self.on('dropdown_close', restoreDefaults); | |
| 10736 | - | |
| 10737 | 10713 | // add scroll listener and default templates |
| 10738 | 10714 | self.on('initialize', () => { |
| 10739 | - html_values = Object.keys(self.options); | |
| 10740 | 10715 | default_values = Object.keys(self.options); |
| 10741 | 10716 | dropdown_content = self.dropdown_content; |
| 10742 | 10717 | |
| 10743 | 10718 | // default templates |
| @@ -10877,9 +10852,8 @@ | ||
| 10877 | 10852 | this.isLocked = false; |
| 10878 | 10853 | this.isFocused = false; |
| 10879 | 10854 | this.isInputHidden = false; |
| 10880 | 10855 | this.isSetup = false; |
| 10881 | - this.isDropdownContentStale = true; | |
| 10882 | 10856 | this.ignoreFocus = false; |
| 10883 | 10857 | this.ignoreHover = false; |
| 10884 | 10858 | this.hasOptions = false; |
| 10885 | 10859 | this.lastValue = ''; |
| @@ -10954,9 +10928,9 @@ | ||
| 10954 | 10928 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown, settings.dropdownClass, inputMode); |
| 10955 | 10929 | if (settings.copyClassesToDropdown) { |
| 10956 | 10930 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown, classes); |
| 10957 | 10931 | } |
| 10958 | - ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown_content, settings.dropdownContentClass); | |
| 10932 | + (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown_content, settings.dropdownContentClass); | |
| 10959 | 10933 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.append)(dropdown, dropdown_content); |
| 10960 | 10934 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.getDom)(settings.dropdownParent || wrapper).appendChild(dropdown); |
| 10961 | 10935 | // default controlInput |
| 10962 | 10936 | if ((0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.isHtmlString)(settings.controlInput)) { |
| @@ -10961,9 +10935,9 @@ | ||
| 10961 | 10935 | // default controlInput |
| 10962 | 10936 | if ((0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.isHtmlString)(settings.controlInput)) { |
| 10963 | 10937 | control_input = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.getDom)(settings.controlInput); |
| 10964 | 10938 | // set attributes |
| 10965 | - var attrs = ['autocorrect', 'autocapitalize', 'autocomplete', 'spellcheck', 'aria-label']; | |
| 10939 | + var attrs = ['autocorrect', 'autocapitalize', 'autocomplete', 'spellcheck']; | |
| 10966 | 10940 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(attrs, (attr) => { |
| 10967 | 10941 | if (input.getAttribute(attr)) { |
| 10968 | 10942 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(control_input, { [attr]: input.getAttribute(attr) }); |
| 10969 | 10943 | } |
| @@ -11024,10 +10998,8 @@ | ||
| 11024 | 10998 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(focus_node, { 'aria-labelledby': label_id }); |
| 11025 | 10999 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(dropdown_content, { 'aria-labelledby': label_id }); |
| 11026 | 11000 | } |
| 11027 | 11001 | wrapper.style.width = input.style.width; |
| 11028 | - wrapper.style.minWidth = input.style.minWidth; | |
| 11029 | - wrapper.style.maxWidth = input.style.maxWidth; | |
| 11030 | 11002 | if (self.plugins.names.length) { |
| 11031 | 11003 | const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-'); |
| 11032 | 11004 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)([wrapper, dropdown], classes_plugins); |
| 11033 | 11005 | } |
| @@ -11045,9 +11017,9 @@ | ||
| 11045 | 11017 | // after initializePlugins() so plugins can create/modify user defined loaders |
| 11046 | 11018 | if (settings.load && settings.loadThrottle) { |
| 11047 | 11019 | settings.load = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.loadDebounce)(settings.load, settings.loadThrottle); |
| 11048 | 11020 | } |
| 11049 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mousemove', () => { | |
| 11021 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mousemove', () => { | |
| 11050 | 11022 | self.ignoreHover = false; |
| 11051 | 11023 | }); |
| 11052 | 11024 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mouseenter', (e) => { |
| 11053 | 11025 | var target_match = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.parentMatch)(e.target, '[data-selectable]', dropdown); |
| @@ -11110,21 +11082,12 @@ | ||
| 11110 | 11082 | if (self.isOpen) { |
| 11111 | 11083 | self.positionDropdown(); |
| 11112 | 11084 | } |
| 11113 | 11085 | }; |
| 11114 | - const input_invalid = () => { | |
| 11115 | - if (self.isValid) { | |
| 11116 | - self.isValid = false; | |
| 11117 | - self.isInvalid = true; | |
| 11118 | - self.refreshState(); | |
| 11119 | - } | |
| 11120 | - }; | |
| 11121 | - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(input, 'invalid', input_invalid); | |
| 11122 | 11086 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(document, 'mousedown', doc_mousedown); |
| 11123 | 11087 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(window, 'scroll', win_scroll, passive_event); |
| 11124 | 11088 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(window, 'resize', win_scroll, passive_event); |
| 11125 | 11089 | this._destroy = () => { |
| 11126 | - input.removeEventListener('invalid', input_invalid); | |
| 11127 | 11090 | document.removeEventListener('mousedown', doc_mousedown); |
| 11128 | 11091 | window.removeEventListener('scroll', win_scroll); |
| 11129 | 11092 | window.removeEventListener('resize', win_scroll); |
| 11130 | 11093 | if (label) |
| @@ -11141,12 +11104,29 @@ | ||
| 11141 | 11104 | self.sync(false); |
| 11142 | 11105 | settings.items = []; |
| 11143 | 11106 | delete settings.optgroups; |
| 11144 | 11107 | delete settings.options; |
| 11108 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(input, 'invalid', () => { | |
| 11109 | + if (self.isValid) { | |
| 11110 | + self.isValid = false; | |
| 11111 | + self.isInvalid = true; | |
| 11112 | + self.refreshState(); | |
| 11113 | + } | |
| 11114 | + }); | |
| 11115 | + self.updateOriginalInput(); | |
| 11145 | 11116 | self.refreshItems(); |
| 11146 | 11117 | self.close(false); |
| 11147 | 11118 | self.inputState(); |
| 11148 | 11119 | self.isSetup = true; |
| 11120 | + if (input.disabled) { | |
| 11121 | + self.disable(); | |
| 11122 | + } | |
| 11123 | + else if (input.readOnly) { | |
| 11124 | + self.setReadOnly(true); | |
| 11125 | + } | |
| 11126 | + else { | |
| 11127 | + self.enable(); //sets tabIndex | |
| 11128 | + } | |
| 11149 | 11129 | self.on('change', this.onChange); |
| 11150 | 11130 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(input, 'tomselected', 'ts-hidden-accessible'); |
| 11151 | 11131 | self.trigger('initialize'); |
| 11152 | 11132 | // preload options |
| @@ -11242,20 +11222,11 @@ | ||
| 11242 | 11222 | * |
| 11243 | 11223 | */ |
| 11244 | 11224 | sync(get_settings = true) { |
| 11245 | 11225 | const self = this; |
| 11246 | - const settings = get_settings ? (0,_getSettings_js__WEBPACK_IMPORTED_MODULE_6__["default"])(self.input, { delimiter: self.settings.delimiter, allowEmptyOption: self.settings.allowEmptyOption }) : self.settings; | |
| 11226 | + const settings = get_settings ? (0,_getSettings_js__WEBPACK_IMPORTED_MODULE_6__["default"])(self.input, { delimiter: self.settings.delimiter }) : self.settings; | |
| 11247 | 11227 | self.setupOptions(settings.options, settings.optgroups); |
| 11248 | 11228 | self.setValue(settings.items || [], true); // silent prevents recursion |
| 11249 | - if (self.input.disabled) { | |
| 11250 | - self.disable(); | |
| 11251 | - } | |
| 11252 | - else if (self.input.readOnly) { | |
| 11253 | - self.setReadOnly(true); | |
| 11254 | - } | |
| 11255 | - else { | |
| 11256 | - self.enable(); //sets tabIndex | |
| 11257 | - } | |
| 11258 | 11229 | self.lastQuery = null; // so updated options will be displayed in dropdown |
| 11259 | 11230 | } |
| 11260 | 11231 | /** |
| 11261 | 11232 | * Triggered when the main control element |
| @@ -11286,9 +11257,9 @@ | ||
| 11286 | 11257 | * This should propagate the event to the original DOM |
| 11287 | 11258 | * input / select element. |
| 11288 | 11259 | */ |
| 11289 | 11260 | onChange() { |
| 11290 | - ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'input'); | |
| 11261 | + (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'input'); | |
| 11291 | 11262 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'change'); |
| 11292 | 11263 | } |
| 11293 | 11264 | /** |
| 11294 | 11265 | * Triggered on <input> paste. |
| @@ -11383,9 +11354,9 @@ | ||
| 11383 | 11354 | let next = self.getAdjacent(self.activeOption, 1); |
| 11384 | 11355 | if (next) |
| 11385 | 11356 | self.setActiveOption(next); |
| 11386 | 11357 | } |
| 11387 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); | |
| 11358 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); | |
| 11388 | 11359 | return; |
| 11389 | 11360 | // up: move selection up |
| 11390 | 11361 | case _constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_UP: |
| 11391 | 11362 | if (self.activeOption) { |
| @@ -11392,9 +11363,9 @@ | ||
| 11392 | 11363 | let prev = self.getAdjacent(self.activeOption, -1); |
| 11393 | 11364 | if (prev) |
| 11394 | 11365 | self.setActiveOption(prev); |
| 11395 | 11366 | } |
| 11396 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); | |
| 11367 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); | |
| 11397 | 11368 | return; |
| 11398 | 11369 | // return: select active option |
| 11399 | 11370 | case _constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_RETURN: |
| 11400 | 11371 | if (self.canSelect(self.activeOption)) { |
| @@ -11426,9 +11397,9 @@ | ||
| 11426 | 11397 | // prevent default [tab] behaviour of jump to the next field |
| 11427 | 11398 | // if select isFull, then the dropdown won't be open and [tab] will work normally |
| 11428 | 11399 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); |
| 11429 | 11400 | } |
| 11430 | - else if (self.settings.create && self.createItem()) { | |
| 11401 | + if (self.settings.create && self.createItem()) { | |
| 11431 | 11402 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); |
| 11432 | 11403 | } |
| 11433 | 11404 | } |
| 11434 | 11405 | return; |
| @@ -11550,24 +11521,18 @@ | ||
| 11550 | 11521 | self.createItem(null, () => { |
| 11551 | 11522 | if (self.settings.closeAfterSelect) { |
| 11552 | 11523 | self.close(); |
| 11553 | 11524 | } |
| 11554 | - else if (self.settings.clearAfterSelect) { | |
| 11555 | - self.setTextboxValue(); | |
| 11556 | - } | |
| 11557 | 11525 | }); |
| 11558 | 11526 | } |
| 11559 | 11527 | else { |
| 11560 | 11528 | value = option.dataset.value; |
| 11561 | 11529 | if (typeof value !== 'undefined') { |
| 11562 | - self.isDropdownContentStale = self.settings.hideSelected; | |
| 11530 | + self.lastQuery = null; | |
| 11563 | 11531 | self.addItem(value); |
| 11564 | 11532 | if (self.settings.closeAfterSelect) { |
| 11565 | 11533 | self.close(); |
| 11566 | 11534 | } |
| 11567 | - else if (self.settings.clearAfterSelect) { | |
| 11568 | - self.setTextboxValue(); | |
| 11569 | - } | |
| 11570 | 11535 | if (!self.settings.hideSelected && evt.type && /click/.test(evt.type)) { |
| 11571 | 11536 | self.setActiveOption(option); |
| 11572 | 11537 | } |
| 11573 | 11538 | } |
| @@ -11639,9 +11604,9 @@ | ||
| 11639 | 11604 | */ |
| 11640 | 11605 | loadCallback(options, optgroups) { |
| 11641 | 11606 | const self = this; |
| 11642 | 11607 | self.loading = Math.max(self.loading - 1, 0); |
| 11643 | - self.isDropdownContentStale = true; | |
| 11608 | + self.lastQuery = null; | |
| 11644 | 11609 | self.clearActiveOption(); // when new results load, focus should be on first option |
| 11645 | 11610 | self.setupOptions(options, optgroups); |
| 11646 | 11611 | self.refreshOptions(self.isFocused && !self.isInputHidden); |
| 11647 | 11612 | if (!self.loading) { |
| @@ -11738,9 +11703,9 @@ | ||
| 11738 | 11703 | if (self.activeItems.indexOf(item) === -1) { |
| 11739 | 11704 | self.setActiveItemClass(item); |
| 11740 | 11705 | } |
| 11741 | 11706 | } |
| 11742 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); | |
| 11707 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e); | |
| 11743 | 11708 | } |
| 11744 | 11709 | else if ((eventName === 'click' && (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.isKeyDown)(_constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_SHORTCUT, e)) || (eventName === 'keydown' && (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.isKeyDown)('shiftKey', e))) { |
| 11745 | 11710 | if (item.classList.contains('active')) { |
| 11746 | 11711 | self.removeActiveItem(item); |
| @@ -11787,9 +11752,9 @@ | ||
| 11787 | 11752 | * Clears all the active items |
| 11788 | 11753 | * |
| 11789 | 11754 | */ |
| 11790 | 11755 | clearActiveItems() { |
| 11791 | - ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(this.activeItems, 'active'); | |
| 11756 | + (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(this.activeItems, 'active'); | |
| 11792 | 11757 | this.activeItems = []; |
| 11793 | 11758 | } |
| 11794 | 11759 | /** |
| 11795 | 11760 | * Sets the selected item in the dropdown menu |
| @@ -11904,21 +11869,17 @@ | ||
| 11904 | 11869 | var self = this; |
| 11905 | 11870 | if (self.isDisabled || self.isReadOnly) |
| 11906 | 11871 | return; |
| 11907 | 11872 | self.ignoreFocus = true; |
| 11908 | - const focusTarget = this.control_input.offsetWidth ? this.control_input : this.focus_node; | |
| 11909 | - focusTarget.focus(); | |
| 11873 | + if (self.control_input.offsetWidth) { | |
| 11874 | + self.control_input.focus(); | |
| 11875 | + } | |
| 11876 | + else { | |
| 11877 | + self.focus_node.focus(); | |
| 11878 | + } | |
| 11910 | 11879 | setTimeout(() => { |
| 11911 | 11880 | self.ignoreFocus = false; |
| 11912 | - // Fix https://github.com/orchidjs/tom-select/issues/806 | |
| 11913 | - // Only proceed if this instance's element is still the active element. If Edge autofill | |
| 11914 | - // (or anything else) has moved focus to a different element in the interim, calling | |
| 11915 | - // onFocus() here would steal focus back and restart the cascade loop. | |
| 11916 | - const root = focusTarget.getRootNode(); | |
| 11917 | - if (root.activeElement !== focusTarget) { | |
| 11918 | - return; | |
| 11919 | - } | |
| 11920 | - this.onFocus(); | |
| 11881 | + self.onFocus(); | |
| 11921 | 11882 | }, 0); |
| 11922 | 11883 | } |
| 11923 | 11884 | /** |
| 11924 | 11885 | * Forces the control out of focus. |
| @@ -11974,15 +11935,10 @@ | ||
| 11974 | 11935 | throw new Error('Tom Select "score" setting must be a function that returns a function'); |
| 11975 | 11936 | } |
| 11976 | 11937 | } |
| 11977 | 11938 | // perform search |
| 11978 | - if (self.isDropdownContentStale || query !== self.lastQuery) { | |
| 11939 | + if (query !== self.lastQuery) { | |
| 11979 | 11940 | self.lastQuery = query; |
| 11980 | - // temp fix for https://github.com/orchidjs/tom-select/issues/987 | |
| 11981 | - // UI crashed when more than 30 same chars in a row, prevent search and return empt result | |
| 11982 | - if (/(.)\1{15,}/.test(query)) { | |
| 11983 | - query = ''; | |
| 11984 | - } | |
| 11985 | 11941 | result = self.sifter.search(query, Object.assign(options, { score: calculateScore })); |
| 11986 | 11942 | self.currentResults = result; |
| 11987 | 11943 | } |
| 11988 | 11944 | else { |
| @@ -11991,9 +11947,9 @@ | ||
| 11991 | 11947 | // filter out selected items |
| 11992 | 11948 | if (self.settings.hideSelected) { |
| 11993 | 11949 | result.items = result.items.filter((item) => { |
| 11994 | 11950 | let hashed = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(item.id); |
| 11995 | - return !(hashed !== null && self.items.indexOf(hashed) !== -1); | |
| 11951 | + return !(hashed && self.items.indexOf(hashed) !== -1); | |
| 11996 | 11952 | }); |
| 11997 | 11953 | } |
| 11998 | 11954 | return result; |
| 11999 | 11955 | } |
| @@ -12063,15 +12019,8 @@ | ||
| 12063 | 12019 | for (j = 0, k = optgroups && optgroups.length; j < k; j++) { |
| 12064 | 12020 | optgroup = optgroups[j]; |
| 12065 | 12021 | let order = option.$order; |
| 12066 | 12022 | let self_optgroup = self.optgroups[optgroup]; |
| 12067 | - if (self_optgroup === undefined && typeof self.settings.optionGroupRegister === 'function') { | |
| 12068 | - var regGroup; | |
| 12069 | - if (regGroup = self.settings.optionGroupRegister.apply(self, [optgroup])) { | |
| 12070 | - self.registerOptionGroup(regGroup); | |
| 12071 | - } | |
| 12072 | - } | |
| 12073 | - self_optgroup = self.optgroups[optgroup]; | |
| 12074 | 12023 | if (self_optgroup === undefined) { |
| 12075 | 12024 | optgroup = ''; |
| 12076 | 12025 | } |
| 12077 | 12026 | else { |
| @@ -12124,9 +12073,8 @@ | ||
| 12124 | 12073 | } |
| 12125 | 12074 | }); |
| 12126 | 12075 | dropdown_content.innerHTML = ''; |
| 12127 | 12076 | (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.append)(dropdown_content, html); |
| 12128 | - self.isDropdownContentStale = false; | |
| 12129 | 12077 | // highlight matching terms inline |
| 12130 | 12078 | if (self.settings.highlight) { |
| 12131 | 12079 | (0,_contrib_highlight_js__WEBPACK_IMPORTED_MODULE_4__.removeHighlight)(dropdown_content); |
| 12132 | 12080 | if (results.query.length && results.tokens.length) { |
| @@ -12219,15 +12167,14 @@ | ||
| 12219 | 12167 | return false; |
| 12220 | 12168 | } |
| 12221 | 12169 | const key = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(data[self.settings.valueField]); |
| 12222 | 12170 | if (key === null || self.options.hasOwnProperty(key)) { |
| 12223 | - self.updateOption(data[self.settings.valueField], data); | |
| 12224 | 12171 | return false; |
| 12225 | 12172 | } |
| 12226 | 12173 | data.$order = data.$order || ++self.order; |
| 12227 | 12174 | data.$id = self.inputId + '-opt-' + data.$order; |
| 12228 | 12175 | self.options[key] = data; |
| 12229 | - self.isDropdownContentStale = true; | |
| 12176 | + self.lastQuery = null; | |
| 12230 | 12177 | if (user_created) { |
| 12231 | 12178 | self.userOptions[key] = user_created; |
| 12232 | 12179 | self.trigger('option_add', key, data); |
| 12233 | 12180 | } |
| @@ -12237,9 +12184,9 @@ | ||
| 12237 | 12184 | * Add multiple options |
| 12238 | 12185 | * |
| 12239 | 12186 | */ |
| 12240 | 12187 | addOptions(data, user_created = false) { |
| 12241 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(data, (dat) => { | |
| 12188 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(data, (dat) => { | |
| 12242 | 12189 | this.addOption(dat, user_created); |
| 12243 | 12190 | }); |
| 12244 | 12191 | } |
| 12245 | 12192 | /** |
| @@ -12341,10 +12288,10 @@ | ||
| 12341 | 12288 | if (item.classList.contains('active')) |
| 12342 | 12289 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(item_new, 'active'); |
| 12343 | 12290 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.replaceNode)(item, item_new); |
| 12344 | 12291 | } |
| 12345 | - // we might have updated the sortField | |
| 12346 | - self.isDropdownContentStale = true; | |
| 12292 | + // invalidate last query because we might have updated the sortField | |
| 12293 | + self.lastQuery = null; | |
| 12347 | 12294 | } |
| 12348 | 12295 | /** |
| 12349 | 12296 | * Removes a single option. |
| 12350 | 12297 | * |
| @@ -12354,9 +12301,9 @@ | ||
| 12354 | 12301 | value = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.get_hash)(value); |
| 12355 | 12302 | self.uncacheValue(value); |
| 12356 | 12303 | delete self.userOptions[value]; |
| 12357 | 12304 | delete self.options[value]; |
| 12358 | - self.isDropdownContentStale = true; | |
| 12305 | + self.lastQuery = null; | |
| 12359 | 12306 | self.trigger('option_remove', value); |
| 12360 | 12307 | self.removeItem(value, silent); |
| 12361 | 12308 | } |
| 12362 | 12309 | /** |
| @@ -12373,9 +12320,9 @@ | ||
| 12373 | 12320 | selected[key] = option; |
| 12374 | 12321 | } |
| 12375 | 12322 | }); |
| 12376 | 12323 | this.options = this.sifter.items = selected; |
| 12377 | - this.isDropdownContentStale = true; | |
| 12324 | + this.lastQuery = null; | |
| 12378 | 12325 | this.trigger('option_clear'); |
| 12379 | 12326 | } |
| 12380 | 12327 | /** |
| 12381 | 12328 | * Used by clearOptions() to decide whether or not an option should be removed |
| @@ -12505,12 +12452,8 @@ | ||
| 12505 | 12452 | if (next) { |
| 12506 | 12453 | self.setActiveOption(next); |
| 12507 | 12454 | } |
| 12508 | 12455 | } |
| 12509 | - //remove input value when enabled | |
| 12510 | - if (self.settings.clearAfterSelect) { | |
| 12511 | - self.setTextboxValue(); | |
| 12512 | - } | |
| 12513 | 12456 | // refreshOptions after setActiveOption(), |
| 12514 | 12457 | // otherwise setActiveOption() will be called by refreshOptions() with the wrong value |
| 12515 | 12458 | if (!self.isPending && !self.settings.closeAfterSelect) { |
| 12516 | 12459 | self.refreshOptions(self.isFocused && inputMode !== 'single'); |
| @@ -12552,9 +12495,9 @@ | ||
| 12552 | 12495 | self.activeItems.splice(idx, 1); |
| 12553 | 12496 | (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(item, 'active'); |
| 12554 | 12497 | } |
| 12555 | 12498 | self.items.splice(i, 1); |
| 12556 | - self.isDropdownContentStale = true; | |
| 12499 | + self.lastQuery = null; | |
| 12557 | 12500 | if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) { |
| 12558 | 12501 | self.removeOption(value, silent); |
| 12559 | 12502 | } |
| 12560 | 12503 | if (i < self.caretPos) { |
| @@ -12586,14 +12529,8 @@ | ||
| 12586 | 12529 | var caret = self.caretPos; |
| 12587 | 12530 | var output; |
| 12588 | 12531 | input = input || self.inputValue(); |
| 12589 | 12532 | if (!self.canCreate(input)) { |
| 12590 | - const hash = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(input); | |
| 12591 | - if (hash) { | |
| 12592 | - if (this.options[input]) { | |
| 12593 | - self.addItem(input); | |
| 12594 | - } | |
| 12595 | - } | |
| 12596 | 12533 | callback(); |
| 12597 | 12534 | return false; |
| 12598 | 12535 | } |
| 12599 | 12536 | self.lock(); |
| @@ -12631,9 +12568,9 @@ | ||
| 12631 | 12568 | * Re-renders the selected item lists. |
| 12632 | 12569 | */ |
| 12633 | 12570 | refreshItems() { |
| 12634 | 12571 | var self = this; |
| 12635 | - self.isDropdownContentStale = true; | |
| 12572 | + self.lastQuery = null; | |
| 12636 | 12573 | if (self.isSetup) { |
| 12637 | 12574 | self.addItems(self.items); |
| 12638 | 12575 | } |
| 12639 | 12576 | self.updateOriginalInput(); |
| @@ -12710,9 +12647,9 @@ | ||
| 12710 | 12647 | } |
| 12711 | 12648 | selected.push(option_el); |
| 12712 | 12649 | // marking empty option as selected can break validation |
| 12713 | 12650 | // fixes https://github.com/orchidjs/tom-select/issues/303 |
| 12714 | - if (option_el != empty_option || has_selected > 0 || self.settings.mode == 'multi') { | |
| 12651 | + if (option_el != empty_option || has_selected > 0) { | |
| 12715 | 12652 | option_el.selected = true; |
| 12716 | 12653 | } |
| 12717 | 12654 | return option_el; |
| 12718 | 12655 | } |
| @@ -12853,9 +12790,9 @@ | ||
| 12853 | 12790 | caret = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.nodeIndex)(tail); |
| 12854 | 12791 | if (direction > 0) { |
| 12855 | 12792 | caret++; |
| 12856 | 12793 | } |
| 12857 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(self.activeItems, (item) => rm_items.push(item)); | |
| 12794 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(self.activeItems, (item) => rm_items.push(item)); | |
| 12858 | 12795 | } |
| 12859 | 12796 | else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) { |
| 12860 | 12797 | const items = self.controlChildren(); |
| 12861 | 12798 | let rm_item; |
| @@ -12871,9 +12808,9 @@ | ||
| 12871 | 12808 | } |
| 12872 | 12809 | if (!self.shouldDelete(rm_items, e)) { |
| 12873 | 12810 | return false; |
| 12874 | 12811 | } |
| 12875 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e, true); | |
| 12812 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e, true); | |
| 12876 | 12813 | // perform removal |
| 12877 | 12814 | if (typeof caret !== 'undefined') { |
| 12878 | 12815 | self.setCaret(caret); |
| 12879 | 12816 | } |
| @@ -12890,9 +12827,9 @@ | ||
| 12890 | 12827 | */ |
| 12891 | 12828 | shouldDelete(items, evt) { |
| 12892 | 12829 | const values = items.map(item => item.dataset.value); |
| 12893 | 12830 | // allow the callback to abort |
| 12894 | - if (!values.length || (typeof this.settings.onDelete === 'function' && this.settings.onDelete.call(this, values, evt) === false)) { | |
| 12831 | + if (!values.length || (typeof this.settings.onDelete === 'function' && this.settings.onDelete(values, evt) === false)) { | |
| 12895 | 12832 | return false; |
| 12896 | 12833 | } |
| 12897 | 12834 | return true; |
| 12898 | 12835 | } |
| @@ -13109,9 +13046,9 @@ | ||
| 13109 | 13046 | * caches. |
| 13110 | 13047 | * |
| 13111 | 13048 | */ |
| 13112 | 13049 | clearCache() { |
| 13113 | - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(this.options, (option) => { | |
| 13050 | + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(this.options, (option) => { | |
| 13114 | 13051 | if (option.$div) { |
| 13115 | 13052 | option.$div.remove(); |
| 13116 | 13053 | delete option.$div; |
| 13117 | 13054 | } |
| @@ -13590,19 +13527,19 @@ | ||
| 13590 | 13527 | |
| 13591 | 13528 | /******/ }); |
| 13592 | 13529 | /************************************************************************/ |
| 13593 | 13530 | /******/ // The module cache |
| 13594 | -/******/ const __webpack_module_cache__ = {}; | |
| 13531 | +/******/ var __webpack_module_cache__ = {}; | |
| 13595 | 13532 | /******/ |
| 13596 | 13533 | /******/ // The require function |
| 13597 | 13534 | /******/ function __webpack_require__(moduleId) { |
| 13598 | 13535 | /******/ // Check if module is in cache |
| 13599 | -/******/ const cachedModule = __webpack_module_cache__[moduleId]; | |
| 13536 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 13600 | 13537 | /******/ if (cachedModule !== undefined) { |
| 13601 | 13538 | /******/ return cachedModule.exports; |
| 13602 | 13539 | /******/ } |
| 13603 | 13540 | /******/ // Create a new module (and put it into the cache) |
| 13604 | -/******/ const module = __webpack_module_cache__[moduleId] = { | |
| 13541 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 13605 | 13542 | /******/ id: moduleId, |
| 13606 | 13543 | /******/ // no module.loaded needed |
| 13607 | 13544 | /******/ exports: {} |
| 13608 | 13545 | /******/ }; |
| @@ -13609,9 +13546,9 @@ | ||
| 13609 | 13546 | /******/ |
| 13610 | 13547 | /******/ // Execute the module function |
| 13611 | 13548 | /******/ if (!(moduleId in __webpack_modules__)) { |
| 13612 | 13549 | /******/ delete __webpack_module_cache__[moduleId]; |
| 13613 | -/******/ const e = new Error("Cannot find module '" + moduleId + "'"); | |
| 13550 | +/******/ var e = new Error("Cannot find module '" + moduleId + "'"); | |
| 13614 | 13551 | /******/ e.code = 'MODULE_NOT_FOUND'; |
| 13615 | 13552 | /******/ throw e; |
| 13616 | 13553 | /******/ } |
| 13617 | 13554 | /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
| @@ -13624,9 +13561,9 @@ | ||
| 13624 | 13561 | /******/ /* webpack/runtime/compat get default export */ |
| 13625 | 13562 | /******/ (() => { |
| 13626 | 13563 | /******/ // getDefaultExport function for compatibility with non-harmony modules |
| 13627 | 13564 | /******/ __webpack_require__.n = (module) => { |
| 13628 | -/******/ const getter = module && module.__esModule ? | |
| 13565 | +/******/ var getter = module && module.__esModule ? | |
| 13629 | 13566 | /******/ () => (module['default']) : |
| 13630 | 13567 | /******/ () => (module); |
| 13631 | 13568 | /******/ __webpack_require__.d(getter, { a: getter }); |
| 13632 | 13569 | /******/ return getter; |
| @@ -13634,29 +13571,14 @@ | ||
| 13634 | 13571 | /******/ })(); |
| 13635 | 13572 | /******/ |
| 13636 | 13573 | /******/ /* webpack/runtime/define property getters */ |
| 13637 | 13574 | /******/ (() => { |
| 13638 | -/******/ // define getter/value functions for harmony exports | |
| 13575 | +/******/ // define getter functions for harmony exports | |
| 13639 | 13576 | /******/ __webpack_require__.d = (exports, definition) => { |
| 13640 | -/******/ if(Array.isArray(definition)) { | |
| 13641 | -/******/ var i = 0; | |
| 13642 | -/******/ while(i < definition.length) { | |
| 13643 | -/******/ var key = definition[i++]; | |
| 13644 | -/******/ var binding = definition[i++]; | |
| 13645 | -/******/ if(!__webpack_require__.o(exports, key)) { | |
| 13646 | -/******/ if(binding === 0) { | |
| 13647 | -/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] }); | |
| 13648 | -/******/ } else { | |
| 13649 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding }); | |
| 13650 | -/******/ } | |
| 13651 | -/******/ } else if(binding === 0) { i++; } | |
| 13577 | +/******/ for(var key in definition) { | |
| 13578 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 13579 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 13652 | 13580 | /******/ } |
| 13653 | -/******/ } else { | |
| 13654 | -/******/ for(var key in definition) { | |
| 13655 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 13656 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 13657 | -/******/ } | |
| 13658 | -/******/ } | |
| 13659 | 13581 | /******/ } |
| 13660 | 13582 | /******/ }; |
| 13661 | 13583 | /******/ })(); |
| 13662 | 13584 | /******/ |
| @@ -13661,9 +13583,9 @@ | ||
| 13661 | 13583 | /******/ })(); |
| 13662 | 13584 | /******/ |
| 13663 | 13585 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 13664 | 13586 | /******/ (() => { |
| 13665 | -/******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop)) | |
| 13587 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 13666 | 13588 | /******/ })(); |
| 13667 | 13589 | /******/ |
| 13668 | 13590 | /******/ /* webpack/runtime/make namespace object */ |
| 13669 | 13591 | /******/ (() => { |
| @@ -13668,9 +13590,9 @@ | ||
| 13668 | 13590 | /******/ /* webpack/runtime/make namespace object */ |
| 13669 | 13591 | /******/ (() => { |
| 13670 | 13592 | /******/ // define __esModule on exports |
| 13671 | 13593 | /******/ __webpack_require__.r = (exports) => { |
| 13672 | -/******/ if(Symbol.toStringTag) { | |
| 13594 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 13673 | 13595 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 13674 | 13596 | /******/ } |
| 13675 | 13597 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 13676 | 13598 | /******/ }; |
| @@ -13681,9 +13603,9 @@ | ||
| 13681 | 13603 | /******/ __webpack_require__.nc = undefined; |
| 13682 | 13604 | /******/ })(); |
| 13683 | 13605 | /******/ |
| 13684 | 13606 | /************************************************************************/ |
| 13685 | -let __webpack_exports__ = {}; | |
| 13607 | +var __webpack_exports__ = {}; | |
| 13686 | 13608 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 13687 | 13609 | (() => { |
| 13688 | 13610 | "use strict"; |
| 13689 | 13611 | /*!********************************************!*\ |