3 lines
No EOL
16 KiB
JavaScript
3 lines
No EOL
16 KiB
JavaScript
/*! For license information please see 6023.qze1gbReg98.js.LICENSE.txt */
|
|
export const id=6023;export const ids=[6023];export const modules={6157:(e,t,a)=>{a.d(t,{d:()=>o});const r=["ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];r.map(i);function i(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}function o(e){for(const t of r)e.createProperty(t,{attribute:i(t),reflect:!0});e.addInitializer((e=>{const t={hostConnected(){e.setAttribute("role","presentation")}};e.addController(t)}))}},34131:()=>{!function(e){const t=new WeakMap,a=new WeakMap,r=new WeakMap,i=new WeakMap,o=new WeakMap,n=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,m=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,g={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"};function y(e){const t=i.get(e),{form:a}=t;V(e,a,t),S(e,t.labels)}const b=(e,t=!1)=>{const a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>i.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let r=a.nextNode();const o=!t||e.disabled;for(;r;)r.formDisabledCallback&&o&&T(r,e.disabled),r=a.nextNode()},w={attributes:!0,attributeFilter:["disabled","name"]},v=D()?new MutationObserver((e=>{for(const t of e){const e=t.target;if("disabled"===t.attributeName&&(e.constructor.formAssociated?T(e,e.hasAttribute("disabled")):"fieldset"===e.localName&&b(e)),"name"===t.attributeName&&e.constructor.formAssociated){const t=i.get(e),a=c.get(e);t.setFormValue(a)}}})):{};function E(e){e.forEach((e=>{const{addedNodes:t,removedNodes:a}=e,o=Array.from(t),n=Array.from(a);o.forEach((e=>{if(i.has(e)&&e.constructor.formAssociated&&y(e),d.has(e)){const t=d.get(e);Object.keys(g).filter((e=>null!==t[e])).forEach((a=>{e.setAttribute(g[a],t[a])})),d.delete(e)}if(p.has(e)){const t=p.get(e);e.setAttribute("internals-valid",t.validity.valid.toString()),e.setAttribute("internals-invalid",(!t.validity.valid).toString()),e.setAttribute("aria-invalid",(!t.validity.valid).toString()),p.delete(e)}if("form"===e.localName){const t=l.get(e),a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>!i.has(e)||!e.constructor.formAssociated||t&&t.has(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});let r=a.nextNode();for(;r;)y(r),r=a.nextNode()}var t;"fieldset"===e.localName&&(null===(t=v.observe)||void 0===t||t.call(v,e,w),b(e,!0))})),n.forEach((e=>{const t=i.get(e);if(t&&r.get(t)&&x(t),s.has(e)){s.get(e).disconnect()}}))}))}function M(e){e.forEach((e=>{const{removedNodes:t}=e;t.forEach((t=>{const a=h.get(e.target);i.has(t)&&P(t),a.disconnect()}))}))}!D()||new MutationObserver(E);const A={childList:!0,subtree:!0},T=(e,t)=>{e.toggleAttribute("internals-disabled",t),t?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled"),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},x=e=>{r.get(e).forEach((e=>{e.remove()})),r.set(e,[])},C=(e,t)=>{const a=document.createElement("input");return a.type="hidden",a.name=e.getAttribute("name"),e.after(a),r.get(t).push(a),a},S=(e,t)=>{if(t.length){Array.from(t).forEach((t=>t.addEventListener("click",e.click.bind(e))));let a=t[0].id;t[0].id||(a=`${t[0].htmlFor}_Label`,t[0].id=a),e.setAttribute("aria-labelledby",a)}},k=e=>{const t=Array.from(e.elements).filter((e=>!e.tagName.includes("-")&&e.validity)).map((e=>e.validity.valid)),a=l.get(e)||[],r=[...t,...Array.from(a).filter((e=>e.isConnected)).map((e=>i.get(e).validity.valid))].includes(!1);e.toggleAttribute("internals-invalid",r),e.toggleAttribute("internals-valid",!r)},I=e=>{k(O(e.target))},F=e=>{k(O(e.target))},L=e=>{const t=l.get(e.target);t&&t.size&&t.forEach((e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)}))},V=(e,t,a)=>{if(t){const r=l.get(t);if(r)r.add(e);else{const a=new Set;a.add(e),l.set(t,a),(e=>{const t=["button[type=submit]","input[type=submit]","button:not([type])"].map((e=>`${e}:not([disabled])`)).map((t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:""}`)).join(",");e.addEventListener("click",(a=>{if(a.target.closest(t)){const t=l.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map((e=>i.get(e).reportValidity())).includes(!1)&&a.preventDefault()}}))})(t),t.addEventListener("reset",L),t.addEventListener("input",I),t.addEventListener("change",F)}n.set(t,{ref:e,internals:a}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout((()=>{e.formAssociatedCallback.apply(e,[t])}),0),k(t)}},O=e=>{let t=e.parentNode;return t&&"FORM"!==t.tagName&&(t=O(t)),t},N=(e,t,a=DOMException)=>{if(!e.constructor.formAssociated)throw new a(t)},R=(e,t,a)=>{const r=l.get(e);return r&&r.size&&r.forEach((e=>{i.get(e)[a]()||(t=!1)})),t},P=e=>{if(e.constructor.formAssociated){const t=i.get(e),{labels:a,form:r}=t;S(e,a),V(e,r,t)}};function D(){return"undefined"!=typeof MutationObserver}class W{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const H=e=>{let t=!0;for(let a in e)"valid"!==a&&!1!==e[a]&&(t=!1);return t},$=new WeakMap;function j(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class z extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||-1===e.tagName.indexOf("-"))throw new TypeError("Illegal constructor");$.set(this,e)}add(e){if(!/^--/.test(e)||"string"!=typeof e)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);const t=super.add(e),a=$.get(this),r=`state${e}`;return a.isConnected?j(a,r):setTimeout((()=>{j(a,r)})),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){const t=super.delete(e),a=$.get(this);return a.isConnected?(a.toggleAttribute(`state${e}`,!1),a.part&&a.part.remove(`state${e}`)):setTimeout((()=>{a.toggleAttribute(`state${e}`,!1),a.part&&a.part.remove(`state${e}`)})),t}}function _(e,t,a,r){if("a"===a&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?r:"a"===a?r.call(e):r?r.value:t.get(e)}var q;class K{constructor(e){q.set(this,void 0),function(e,t,a,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?i.call(e,a):i?i.value=a:t.set(e,a)}(this,q,e,"f");for(let t=0;t<e.length;t++){let a=e[t];this[t]=a,a.hasAttribute("name")&&(this[a.getAttribute("name")]=a)}Object.freeze(this)}get length(){return _(this,q,"f").length}[(q=new WeakMap,Symbol.iterator)](){return _(this,q,"f")[Symbol.iterator]()}item(e){return null==this[e]?null:this[e]}namedItem(e){return null==this[e]?null:this[e]}}class U{static get isPolyfilled(){return!0}constructor(e){if(!e||!e.tagName||-1===e.tagName.indexOf("-"))throw new TypeError("Illegal constructor");const o=e.getRootNode(),n=new W;this.states=new z(e),t.set(this,e),a.set(this,n),i.set(e,this),((e,t)=>{for(let a in g){t[a]=null;let r=null;const i=g[a];Object.defineProperty(t,a,{get:()=>r,set(a){r=a,e.isConnected?e.setAttribute(i,a):d.set(e,t)}})}})(e,this),((e,t)=>{var a;r.set(t,[]),null===(a=v.observe)||void 0===a||a.call(v,e,w)})(e,this),Object.seal(this),o instanceof DocumentFragment&&(e=>{var t,a;const r=new MutationObserver(M);null!==(t=window)&&void 0!==t&&null!==(t=t.ShadyDOM)&&void 0!==t&&t.inUse&&e.mode&&e.host&&(e=e.host),null===(a=r.observe)||void 0===a||a.call(r,e,{childList:!0}),h.set(e,r)})(o)}checkValidity(){const e=t.get(this);if(N(e,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const r=a.get(this);if(!r.valid){const t=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});e.dispatchEvent(t)}return r.valid}get form(){const e=t.get(this);let a;return N(e,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."),!0===e.constructor.formAssociated&&(a=O(e)),a}get labels(){const e=t.get(this);N(e,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const a=e.getAttribute("id"),r=e.getRootNode();return r&&a?r.querySelectorAll(`[for="${a}"]`):[]}reportValidity(){const e=t.get(this);if(N(e,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const a=this.checkValidity(),r=m.get(this);if(r&&!e.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!a&&r&&(e.focus(),r.focus()),a}setFormValue(e){const a=t.get(this);if(N(a,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),x(this),null==e||e instanceof FormData)null!=e&&e instanceof FormData&&Array.from(e).reverse().forEach((([e,t])=>{if("string"==typeof t){const r=C(a,this);r.name=e,r.value=t}}));else if(a.getAttribute("name")){C(a,this).value=e}c.set(a,e)}setValidity(e,r,i){const n=t.get(this);if(N(n,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!e)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");m.set(this,i);const s=a.get(this),l={};for(const t in e)l[t]=e[t];var c;0===Object.keys(l).length&&((c=s).badInput=!1,c.customError=!1,c.patternMismatch=!1,c.rangeOverflow=!1,c.rangeUnderflow=!1,c.stepMismatch=!1,c.tooLong=!1,c.tooShort=!1,c.typeMismatch=!1,c.valid=!0,c.valueMissing=!1);const d={...s,...l};delete d.valid;const{valid:u}=((e,t,a)=>(e.valid=H(t),Object.keys(t).forEach((a=>e[a]=t[a])),a&&k(a),e))(s,d,this.form);if(!u&&!r)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");o.set(this,u?"":r),n.isConnected?(n.toggleAttribute("internals-invalid",!u),n.toggleAttribute("internals-valid",u),n.setAttribute("aria-invalid",`${!u}`)):p.set(n,this)}get shadowRoot(){const e=t.get(this),a=u.get(e);return a||null}get validationMessage(){const e=t.get(this);return N(e,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),o.get(this)}get validity(){const e=t.get(this);N(e,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.");return a.get(this)}get willValidate(){const e=t.get(this);return N(e,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(e.disabled||e.hasAttribute("disabled")||e.hasAttribute("readonly"))}}let B=!1,G=!1;function J(e){G||(G=!0,window.CustomStateSet=z,e&&(HTMLElement.prototype.attachInternals=function(...t){const a=e.call(this,t);return a.states=new z(this),a}))}function Q(e=!0){if(!B){if(B=!0,"undefined"!=typeof window&&(window.ElementInternals=U),"undefined"!=typeof CustomElementRegistry){const t=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(e,a,r){if(a.formAssociated){const e=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){f.has(this)||(f.set(this,!0),this.hasAttribute("disabled")&&T(this,!0)),null!=e&&e.apply(this),P(this)}}t.call(this,e,a,r)}}if("undefined"!=typeof HTMLElement&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(-1===this.tagName.indexOf("-"))throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");if(i.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new U(this)}),"undefined"!=typeof Element){function a(...e){const t=r.apply(this,e);if(u.set(this,t),D()){const e=new MutationObserver(E);window.ShadyDOM?e.observe(this,A):e.observe(t,A),s.set(this,e)}return t}const r=Element.prototype.attachShadow;Element.prototype.attachShadow=a}if(D()&&"undefined"!=typeof document){new MutationObserver(E).observe(document.documentElement,A)}"undefined"!=typeof HTMLFormElement&&function(){const e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=function(...t){let a=e.apply(this,t);return R(this,a,"checkValidity")};const t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=function(...e){let a=t.apply(this,e);return R(this,a,"reportValidity")};const{get:a}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...e){const t=a.call(this,...e),r=Array.from(l.get(this)||[]);if(0===r.length)return t;const i=Array.from(t).concat(r).sort(((e,t)=>e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:0));return new K(i)}})}(),(e||"undefined"!=typeof window&&!window.CustomStateSet)&&J()}}!!customElements.polyfillWrapFlushCallback||(!function(){if("undefined"==typeof window||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(t,e);const a=new e;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every((e=>e in a.internals))}()?Q(!1):"undefined"==typeof window||window.CustomStateSet||J(HTMLElement.prototype.attachInternals)),e.forceCustomStateSetPolyfill=J,e.forceElementInternalsPolyfill=Q,Object.defineProperty(e,"__esModule",{value:!0})}({})}};
|
|
//# sourceMappingURL=6023.qze1gbReg98.js.map
|