-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path7512.6cf94d814536d668.js.map
1 lines (1 loc) · 35.4 KB
/
7512.6cf94d814536d668.js.map
1
{"version":3,"file":"7512.6cf94d814536d668.js","mappings":"wNASA,MAIMA,EAAY,MACdC,YAAYC,GAAS,IAAAC,EAAAC,MACjBC,OAAiBD,KAAMF,GACvBE,KAAKE,eAAiB,IAAMF,KAAKG,aAAY,GAC7CH,KAAKI,gBAAkB,KACnB,MAAMC,EAAUL,KAAKM,0BAChBD,IASLA,EAAQE,QAAS,EACjBF,EAAQG,QAAS,OAOKC,IAAlBJ,EAAQK,QACRL,EAAQK,MAAQ,UAGxBV,KAAKM,wBAA0B,KAC3B,MAAQK,YAAaX,KACrB,IAAKW,EACD,OAMJ,MAAMC,EAAOD,EAASE,cAAc,QACpC,OAAKD,QAIyBH,IAA1BG,EAAKE,iBAEFF,EAAKE,mBAAmBC,KAAMC,GAAsB,aAAfA,EAAGC,cAN/C,CAMqE,EAEzEjB,KAAKkB,QAAU,CAACC,GAAW,KACvB,MAAMd,EAAUL,KAAKM,0BACrB,IAAKD,EACD,OAOJ,MAAME,KADOa,KAAef,GACRQ,cAAc,UAC7BN,GAGLA,EAAOc,aAAa,gBAAkB,GAAEF,IAAU,EAEtDnB,KAAKsB,eAAiB,KAClB,MAAMjB,EAAUL,KAAKM,0BACrB,IAAKD,EACD,OAEJ,MAAQkB,iBAAgBC,cAAexB,KAMvC,GAD2BK,EAAQQ,cAAc,8BAE7C,OAEJ,MAAMY,EAASC,SAASC,cAAc,YACtCF,EAAOb,KAAOW,EACdE,EAAOG,MAAO,EACdH,EAAOI,UAAUC,IAAI,6BACrBL,EAAOM,KAAOP,EACdC,EAAOJ,aAAa,cAAe,QACnChB,EAAQ2B,YAAYP,EAAM,EAE9BzB,KAAKiC,gBAAkB,CAACC,GAAgB,KACpC,MAAQC,YAAWC,oBAAqBpC,KACpCkC,QAA+BzB,IAAd0B,QAAgD1B,IAArB2B,EAC5CpC,KA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AQ7B,GAAMA,IAAM3D,GACrD,MAEIqF,EAAKF,cAASrI,EAErB,EArCyD,EAsC9D,CACAgI,kBAAkBd,EAAYU,GAC1B,MAAMnE,EAAgByD,EAAWU,EAAgB,GACjD,YAAsB5H,IAAlByD,EACOyD,EAAW,GAEfzD,CACX,CACAwE,sBAAsBf,EAAYU,GAC9B,MAAMe,EAAgBzB,EAAWU,EAAgB,GACjD,YAAsB5H,IAAlB2I,EACOzB,EAAWA,EAAWgB,OAAS,GAEnCS,CACX,CAIMxB,gBAAgB,IAAAyB,EAAArJ,KAAA,SAAA0C,KAAA,YAClB,OAAOmB,MAAMyF,KAAKD,EAAKrI,GAAGuI,iBAAiB,0BAA2B,EADpD,EAEtB,CACA7D,SACI,MAAQb,WAAUC,WAAUqC,UAAWnH,KACjC2F,KAAOC,KAAW5F,MACxB,SAAQ+F,KAAEC,IAAM,CAAEC,MAAO,CACjBuD,CAAC7D,IAAO,EACR,2BAA4Bd,EAC5B,2BAA4BC,EAC5B,CAAE,0BAAyBqC,MAAW,GACvCX,KAAM,iBAAe,EAAGT,KAAE,OAAQ,MAC7C,CACA,MAAI/E,GAAO,SAAO0F,KAAW1G,KAAO,CACpC,mBAAW2G,GAAa,MAAO,CAC3B/C,MAAS,CAAC,gBACViB,SAAY,CAAC,mBACbC,SAAY,CAAC,mBACd,GAEPgC,EAAe/D,MAAQ,CACnB6D,IApNyB,uXAqNzBC,GAnNwB","names":["Accordion","constructor","hostRef","_this","this","registerInstance","updateListener","updateState","setItemDefaults","ionItem","getSlottedHeaderIonItem","button","detail","undefined","lines","headerEl","slot","querySelector","assignedElements","find","el","tagName","setAria","expanded","getElementRoot","setAttribute","slotToggleIcon","toggleIconSlot","toggleIcon","iconEl","document","createElement","lazy","classList","add","icon","appendChild","expandAccordion","initialUpdate","contentEl","contentElWrapper","state","currentRaf","cancelAnimationFrame","shouldAnimate","raf","_asyncToGenerator","contentHeight","offsetHeight","waitForTransition","transitionEndAsync","style","setProperty","removeProperty","collapseAccordion","window","matchMedia","matches","config","get","accordionGroupEl","animated","accordionGroup","accordionValue","value","Array","isArray","includes","isNext","isPrevious","nextAccordion","getNextSibling","nextAccordionValue","previousAccordion","getPreviousSibling","previousAccordionValue","nextSibling","nextElementSibling","previousSibling","previousElementSibling","accordionIds","disabled","readonly","chevronDown","valueChanged","connectedCallback","_a","closest","addEventListener","disconnectedCallback","removeEventListener","componentDidLoad","toggleExpanded","requestAccordionToggle","render","mode","getIonMode","headerPart","contentPart","h","Host","class","e","onClick","id","part","ref","name","role","delegatesFocus","getElement","watchers","ios","md","AccordionGroup","ionChange","createEvent","ionValueChange","multiple","expand","printIonWarning","map","v","join","emit","disabledChanged","_this2","accordions","getAccordions","accordion","readonlyChanged","_this3","onKeydown","ev","_this4","activeElement","accordionEl","startingIndex","findIndex","a","key","findNextAccordion","findPreviousAccordion","length","focus","_this5","setValue","accordionExpand","_this6","groupValue","processedValue","filter","prevAccordion","_this7","from","querySelectorAll","n"],"sourceRoot":"webpack:///","sources":["./node_modules/@ionic/core/dist/esm/ion-accordion_2.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, h, H as Host, f as getElement, d as createEvent } from './index-b7d870cf.js';\nimport { r as raf, t as transitionEndAsync, a as addEventListener, b as removeEventListener, g as getElementRoot } from './helpers-ae653409.js';\nimport { l as chevronDown } from './index-c132c5f1.js';\nimport { c as config, b as getIonMode } from './ionic-global-1f99b929.js';\nimport { p as printIonWarning } from './index-9b0d46f4.js';\n\nconst accordionIosCss = \":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}\";\n\nconst accordionMdCss = \":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}\";\n\nconst Accordion = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.updateListener = () => this.updateState(false);\n this.setItemDefaults = () => {\n const ionItem = this.getSlottedHeaderIonItem();\n if (!ionItem) {\n return;\n }\n /**\n * For a11y purposes, we make\n * the ion-item a button so users\n * can tab to it and use keyboard\n * navigation to get around.\n */\n ionItem.button = true;\n ionItem.detail = false;\n /**\n * By default, the lines in an\n * item should be full here, but\n * only do that if a user has\n * not explicitly overridden them\n */\n if (ionItem.lines === undefined) {\n ionItem.lines = 'full';\n }\n };\n this.getSlottedHeaderIonItem = () => {\n const { headerEl } = this;\n if (!headerEl) {\n return;\n }\n /**\n * Get the first ion-item\n * slotted in the header slot\n */\n const slot = headerEl.querySelector('slot');\n if (!slot) {\n return;\n }\n // This is not defined in unit tests\n if (slot.assignedElements === undefined)\n return;\n return slot.assignedElements().find((el) => el.tagName === 'ION-ITEM');\n };\n this.setAria = (expanded = false) => {\n const ionItem = this.getSlottedHeaderIonItem();\n if (!ionItem) {\n return;\n }\n /**\n * Get the native <button> element inside of\n * ion-item because that is what will be focused\n */\n const root = getElementRoot(ionItem);\n const button = root.querySelector('button');\n if (!button) {\n return;\n }\n button.setAttribute('aria-expanded', `${expanded}`);\n };\n this.slotToggleIcon = () => {\n const ionItem = this.getSlottedHeaderIonItem();\n if (!ionItem) {\n return;\n }\n const { toggleIconSlot, toggleIcon } = this;\n /**\n * Check if there already is a toggle icon.\n * If so, do not add another one.\n */\n const existingToggleIcon = ionItem.querySelector('.ion-accordion-toggle-icon');\n if (existingToggleIcon) {\n return;\n }\n const iconEl = document.createElement('ion-icon');\n iconEl.slot = toggleIconSlot;\n iconEl.lazy = false;\n iconEl.classList.add('ion-accordion-toggle-icon');\n iconEl.icon = toggleIcon;\n iconEl.setAttribute('aria-hidden', 'true');\n ionItem.appendChild(iconEl);\n };\n this.expandAccordion = (initialUpdate = false) => {\n const { contentEl, contentElWrapper } = this;\n if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {\n this.state = 4 /* AccordionState.Expanded */;\n return;\n }\n if (this.state === 4 /* AccordionState.Expanded */) {\n return;\n }\n if (this.currentRaf !== undefined) {\n cancelAnimationFrame(this.currentRaf);\n }\n if (this.shouldAnimate()) {\n raf(() => {\n this.state = 8 /* AccordionState.Expanding */;\n this.currentRaf = raf(async () => {\n const contentHeight = contentElWrapper.offsetHeight;\n const waitForTransition = transitionEndAsync(contentEl, 2000);\n contentEl.style.setProperty('max-height', `${contentHeight}px`);\n await waitForTransition;\n this.state = 4 /* AccordionState.Expanded */;\n contentEl.style.removeProperty('max-height');\n });\n });\n }\n else {\n this.state = 4 /* AccordionState.Expanded */;\n }\n };\n this.collapseAccordion = (initialUpdate = false) => {\n const { contentEl } = this;\n if (initialUpdate || contentEl === undefined) {\n this.state = 1 /* AccordionState.Collapsed */;\n return;\n }\n if (this.state === 1 /* AccordionState.Collapsed */) {\n return;\n }\n if (this.currentRaf !== undefined) {\n cancelAnimationFrame(this.currentRaf);\n }\n if (this.shouldAnimate()) {\n this.currentRaf = raf(async () => {\n const contentHeight = contentEl.offsetHeight;\n contentEl.style.setProperty('max-height', `${contentHeight}px`);\n raf(async () => {\n const waitForTransition = transitionEndAsync(contentEl, 2000);\n this.state = 2 /* AccordionState.Collapsing */;\n await waitForTransition;\n this.state = 1 /* AccordionState.Collapsed */;\n contentEl.style.removeProperty('max-height');\n });\n });\n }\n else {\n this.state = 1 /* AccordionState.Collapsed */;\n }\n };\n /**\n * Helper function to determine if\n * something should animate.\n * If prefers-reduced-motion is set\n * then we should not animate, regardless\n * of what is set in the config.\n */\n this.shouldAnimate = () => {\n if (typeof window === 'undefined') {\n return false;\n }\n const prefersReducedMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (prefersReducedMotion) {\n return false;\n }\n const animated = config.get('animated', true);\n if (!animated) {\n return false;\n }\n if (this.accordionGroupEl && !this.accordionGroupEl.animated) {\n return false;\n }\n return true;\n };\n this.updateState = async (initialUpdate = false) => {\n const accordionGroup = this.accordionGroupEl;\n const accordionValue = this.value;\n if (!accordionGroup) {\n return;\n }\n const value = accordionGroup.value;\n const shouldExpand = Array.isArray(value) ? value.includes(accordionValue) : value === accordionValue;\n if (shouldExpand) {\n this.expandAccordion(initialUpdate);\n this.isNext = this.isPrevious = false;\n }\n else {\n this.collapseAccordion(initialUpdate);\n /**\n * When using popout or inset,\n * the collapsed accordion items\n * may need additional border radius\n * applied. Check to see if the\n * next or previous accordion is selected.\n */\n const nextAccordion = this.getNextSibling();\n const nextAccordionValue = nextAccordion === null || nextAccordion === void 0 ? void 0 : nextAccordion.value;\n if (nextAccordionValue !== undefined) {\n this.isPrevious = Array.isArray(value) ? value.includes(nextAccordionValue) : value === nextAccordionValue;\n }\n const previousAccordion = this.getPreviousSibling();\n const previousAccordionValue = previousAccordion === null || previousAccordion === void 0 ? void 0 : previousAccordion.value;\n if (previousAccordionValue !== undefined) {\n this.isNext = Array.isArray(value) ? value.includes(previousAccordionValue) : value === previousAccordionValue;\n }\n }\n };\n this.getNextSibling = () => {\n if (!this.el) {\n return;\n }\n const nextSibling = this.el.nextElementSibling;\n if ((nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.tagName) !== 'ION-ACCORDION') {\n return;\n }\n return nextSibling;\n };\n this.getPreviousSibling = () => {\n if (!this.el) {\n return;\n }\n const previousSibling = this.el.previousElementSibling;\n if ((previousSibling === null || previousSibling === void 0 ? void 0 : previousSibling.tagName) !== 'ION-ACCORDION') {\n return;\n }\n return previousSibling;\n };\n this.state = 1 /* AccordionState.Collapsed */;\n this.isNext = false;\n this.isPrevious = false;\n this.value = `ion-accordion-${accordionIds++}`;\n this.disabled = false;\n this.readonly = false;\n this.toggleIcon = chevronDown;\n this.toggleIconSlot = 'end';\n }\n valueChanged() {\n this.updateState();\n }\n connectedCallback() {\n var _a;\n const accordionGroupEl = (this.accordionGroupEl = (_a = this.el) === null || _a === void 0 ? void 0 : _a.closest('ion-accordion-group'));\n if (accordionGroupEl) {\n this.updateState(true);\n addEventListener(accordionGroupEl, 'ionValueChange', this.updateListener);\n }\n }\n disconnectedCallback() {\n const accordionGroupEl = this.accordionGroupEl;\n if (accordionGroupEl) {\n removeEventListener(accordionGroupEl, 'ionValueChange', this.updateListener);\n }\n }\n componentDidLoad() {\n this.setItemDefaults();\n this.slotToggleIcon();\n /**\n * We need to wait a tick because we\n * just set ionItem.button = true and\n * the button has not have been rendered yet.\n */\n raf(() => {\n /**\n * Set aria label on button inside of ion-item\n * once the inner content has been rendered.\n */\n const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;\n this.setAria(expanded);\n });\n }\n toggleExpanded() {\n const { accordionGroupEl, value, state } = this;\n if (accordionGroupEl) {\n /**\n * Because the accordion group may or may\n * not allow multiple accordions open, we\n * need to request the toggling of this\n * accordion and the accordion group will\n * make the decision on whether or not\n * to allow it.\n */\n const expand = state === 1 /* AccordionState.Collapsed */ || state === 2 /* AccordionState.Collapsing */;\n accordionGroupEl.requestAccordionToggle(value, expand);\n }\n }\n render() {\n const { disabled, readonly } = this;\n const mode = getIonMode(this);\n const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;\n const headerPart = expanded ? 'header expanded' : 'header';\n const contentPart = expanded ? 'content expanded' : 'content';\n this.setAria(expanded);\n return (h(Host, { class: {\n [mode]: true,\n 'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,\n 'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,\n 'accordion-collapsing': this.state === 2 /* AccordionState.Collapsing */,\n 'accordion-collapsed': this.state === 1 /* AccordionState.Collapsed */,\n 'accordion-next': this.isNext,\n 'accordion-previous': this.isPrevious,\n 'accordion-disabled': disabled,\n 'accordion-readonly': readonly,\n 'accordion-animated': this.shouldAnimate(),\n } }, h(\"div\", { onClick: () => this.toggleExpanded(), id: \"header\", part: headerPart, \"aria-controls\": \"content\", ref: (headerEl) => (this.headerEl = headerEl) }, h(\"slot\", { name: \"header\" })), h(\"div\", { id: \"content\", part: contentPart, role: \"region\", \"aria-labelledby\": \"header\", ref: (contentEl) => (this.contentEl = contentEl) }, h(\"div\", { id: \"content-wrapper\", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, h(\"slot\", { name: \"content\" })))));\n }\n static get delegatesFocus() { return true; }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"value\": [\"valueChanged\"]\n }; }\n};\nlet accordionIds = 0;\nAccordion.style = {\n ios: accordionIosCss,\n md: accordionMdCss\n};\n\nconst accordionGroupIosCss = \":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){border-bottom:none}\";\n\nconst accordionGroupMdCss = \":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion){-webkit-box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){margin-left:0;margin-right:0;margin-top:16px;margin-bottom:16px;border-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous){border-bottom-right-radius:6px;border-bottom-left-radius:6px}:host-context([dir=rtl]):host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous),:host-context([dir=rtl]).accordion-group-expand-inset ::slotted(ion-accordion.accordion-previous){border-bottom-right-radius:6px;border-bottom-left-radius:6px}@supports selector(:dir(rtl)){:host(.accordion-group-expand-inset:dir(rtl)) ::slotted(ion-accordion.accordion-previous){border-bottom-right-radius:6px;border-bottom-left-radius:6px}}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-next){border-top-left-radius:6px;border-top-right-radius:6px}:host-context([dir=rtl]):host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-next),:host-context([dir=rtl]).accordion-group-expand-inset ::slotted(ion-accordion.accordion-next){border-top-left-radius:6px;border-top-right-radius:6px}@supports selector(:dir(rtl)){:host(.accordion-group-expand-inset:dir(rtl)) ::slotted(ion-accordion.accordion-next){border-top-left-radius:6px;border-top-right-radius:6px}}:host(.accordion-group-expand-inset) ::slotted(ion-accordion):first-of-type{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}\";\n\nconst AccordionGroup = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionValueChange = createEvent(this, \"ionValueChange\", 7);\n this.animated = true;\n this.multiple = undefined;\n this.value = undefined;\n this.disabled = false;\n this.readonly = false;\n this.expand = 'compact';\n }\n valueChanged() {\n const { value, multiple } = this;\n if (!multiple && Array.isArray(value)) {\n /**\n * We do some processing on the `value` array so\n * that it looks more like an array when logged to\n * the console.\n * Example given ['a', 'b']\n * Default toString() behavior: a,b\n * Custom behavior: ['a', 'b']\n */\n printIonWarning(`ion-accordion-group was passed an array of values, but multiple=\"false\". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the \"value\" property when multiple=\"false\".\n\n Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]\n`, this.el);\n }\n /**\n * Do not use `value` here as that will be\n * not account for the adjustment we make above.\n */\n this.ionValueChange.emit({ value: this.value });\n }\n async disabledChanged() {\n const { disabled } = this;\n const accordions = await this.getAccordions();\n for (const accordion of accordions) {\n accordion.disabled = disabled;\n }\n }\n async readonlyChanged() {\n const { readonly } = this;\n const accordions = await this.getAccordions();\n for (const accordion of accordions) {\n accordion.readonly = readonly;\n }\n }\n async onKeydown(ev) {\n const activeElement = document.activeElement;\n if (!activeElement) {\n return;\n }\n /**\n * Make sure focus is in the header, not the body, of the accordion. This ensures\n * that if there are any interactable elements in the body, their keyboard\n * interaction doesn't get stolen by the accordion. Example: using up/down keys\n * in ion-textarea.\n */\n const activeAccordionHeader = activeElement.closest('ion-accordion [slot=\"header\"]');\n if (!activeAccordionHeader) {\n return;\n }\n const accordionEl = activeElement.tagName === 'ION-ACCORDION' ? activeElement : activeElement.closest('ion-accordion');\n if (!accordionEl) {\n return;\n }\n const closestGroup = accordionEl.closest('ion-accordion-group');\n if (closestGroup !== this.el) {\n return;\n }\n // If the active accordion is not in the current array of accordions, do not do anything\n const accordions = await this.getAccordions();\n const startingIndex = accordions.findIndex((a) => a === accordionEl);\n if (startingIndex === -1) {\n return;\n }\n let accordion;\n if (ev.key === 'ArrowDown') {\n accordion = this.findNextAccordion(accordions, startingIndex);\n }\n else if (ev.key === 'ArrowUp') {\n accordion = this.findPreviousAccordion(accordions, startingIndex);\n }\n else if (ev.key === 'Home') {\n accordion = accordions[0];\n }\n else if (ev.key === 'End') {\n accordion = accordions[accordions.length - 1];\n }\n if (accordion !== undefined && accordion !== activeElement) {\n accordion.focus();\n }\n }\n async componentDidLoad() {\n if (this.disabled) {\n this.disabledChanged();\n }\n if (this.readonly) {\n this.readonlyChanged();\n }\n /**\n * When binding values in frameworks such as Angular\n * it is possible for the value to be set after the Web Component\n * initializes but before the value watcher is set up in Stencil.\n * As a result, the watcher callback may not be fired.\n * We work around this by manually calling the watcher\n * callback when the component has loaded and the watcher\n * is configured.\n */\n this.valueChanged();\n }\n /**\n * Sets the value property and emits ionChange.\n * This should only be called when the user interacts\n * with the accordion and not for any update\n * to the value property. The exception is when\n * the app sets the value of a single-select\n * accordion group to an array.\n */\n setValue(accordionValue) {\n const value = (this.value = accordionValue);\n this.ionChange.emit({ value });\n }\n /**\n * This method is used to ensure that the value\n * of ion-accordion-group is being set in a valid\n * way. This method should only be called in\n * response to a user generated action.\n * @internal\n */\n async requestAccordionToggle(accordionValue, accordionExpand) {\n const { multiple, value, readonly, disabled } = this;\n if (readonly || disabled) {\n return;\n }\n if (accordionExpand) {\n /**\n * If group accepts multiple values\n * check to see if value is already in\n * in values array. If not, add it\n * to the array.\n */\n if (multiple) {\n const groupValue = value !== null && value !== void 0 ? value : [];\n const processedValue = Array.isArray(groupValue) ? groupValue : [groupValue];\n const valueExists = processedValue.find((v) => v === accordionValue);\n if (valueExists === undefined && accordionValue !== undefined) {\n this.setValue([...processedValue, accordionValue]);\n }\n }\n else {\n this.setValue(accordionValue);\n }\n }\n else {\n /**\n * If collapsing accordion, either filter the value\n * out of the values array or unset the value.\n */\n if (multiple) {\n const groupValue = value !== null && value !== void 0 ? value : [];\n const processedValue = Array.isArray(groupValue) ? groupValue : [groupValue];\n this.setValue(processedValue.filter((v) => v !== accordionValue));\n }\n else {\n this.setValue(undefined);\n }\n }\n }\n findNextAccordion(accordions, startingIndex) {\n const nextAccordion = accordions[startingIndex + 1];\n if (nextAccordion === undefined) {\n return accordions[0];\n }\n return nextAccordion;\n }\n findPreviousAccordion(accordions, startingIndex) {\n const prevAccordion = accordions[startingIndex - 1];\n if (prevAccordion === undefined) {\n return accordions[accordions.length - 1];\n }\n return prevAccordion;\n }\n /**\n * @internal\n */\n async getAccordions() {\n return Array.from(this.el.querySelectorAll(':scope > ion-accordion'));\n }\n render() {\n const { disabled, readonly, expand } = this;\n const mode = getIonMode(this);\n return (h(Host, { class: {\n [mode]: true,\n 'accordion-group-disabled': disabled,\n 'accordion-group-readonly': readonly,\n [`accordion-group-expand-${expand}`]: true,\n }, role: \"presentation\" }, h(\"slot\", null)));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"value\": [\"valueChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"readonly\": [\"readonlyChanged\"]\n }; }\n};\nAccordionGroup.style = {\n ios: accordionGroupIosCss,\n md: accordionGroupMdCss\n};\n\nexport { Accordion as ion_accordion, AccordionGroup as ion_accordion_group };\n"],"x_google_ignoreList":[0]}