@ionic/core 9.0.14 → 9.0.15-nightly.20261126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-action-sheet.js +1 -1
  3. package/components/ion-alert.js +1 -1
  4. package/components/ion-content.js +1 -1
  5. package/components/ion-datetime.js +1 -1
  6. package/components/ion-loading.js +1 -1
  7. package/components/ion-menu.js +1 -1
  8. package/components/ion-modal.js +1 -1
  9. package/components/ion-popover.js +1 -1
  10. package/components/ion-select-modal.js +1 -1
  11. package/components/ion-select-popover.js +1 -1
  12. package/components/ion-select.js +1 -1
  13. package/components/ion-toast.js +1 -1
  14. package/components/{p-CB9IiUSo.js → p-8KzDdVGg.js} +1 -1
  15. package/components/{p-DRTHzs2D.js → p-B3sthsuC.js} +1 -1
  16. package/components/{p-C-egLJs7.js → p-B9WD9GEd.js} +1 -1
  17. package/components/{p-vU3qJ6VA.js → p-BG4RtAZT.js} +1 -1
  18. package/components/p-BI0fCetH.js +4 -0
  19. package/components/{p-DCqB6VKV.js → p-CATz3x_G.js} +1 -1
  20. package/components/p-CkGvoxlv.js +4 -0
  21. package/components/{p-Dnw1qYup.js → p-Cot8b0Ud.js} +1 -1
  22. package/components/{p-dQRWGlyU.js → p-Dc297fYS.js} +1 -1
  23. package/dist/cjs/{index-CuWyDtHj.js → index-DeuODCYU.js} +1 -1
  24. package/dist/cjs/index.cjs.js +2 -2
  25. package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
  26. package/dist/cjs/ion-alert.cjs.entry.js +7 -5
  27. package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
  28. package/dist/cjs/ion-datetime.cjs.entry.js +1 -1
  29. package/dist/cjs/ion-loading.cjs.entry.js +2 -2
  30. package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
  31. package/dist/cjs/ion-modal.cjs.entry.js +2 -2
  32. package/dist/cjs/ion-popover.cjs.entry.js +2 -2
  33. package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
  34. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  35. package/dist/cjs/ion-toast.cjs.entry.js +6 -4
  36. package/dist/cjs/{overlay-focus-boundary-D9-g1MNP.js → overlay-focus-boundary-ChtKRiQh.js} +1 -1
  37. package/dist/cjs/{overlays-DGefLyN2.js → overlays-DQ_xxwyU.js} +30 -0
  38. package/dist/collection/components/alert/alert.js +6 -4
  39. package/dist/collection/components/toast/toast.js +6 -4
  40. package/dist/collection/utils/overlays.js +29 -0
  41. package/dist/docs.json +1 -1
  42. package/dist/esm/{index-C_t3NkxF.js → index-BcYECvUu.js} +1 -1
  43. package/dist/esm/index.js +2 -2
  44. package/dist/esm/ion-action-sheet.entry.js +2 -2
  45. package/dist/esm/ion-alert.entry.js +7 -5
  46. package/dist/esm/ion-app_8.entry.js +2 -2
  47. package/dist/esm/ion-datetime.entry.js +1 -1
  48. package/dist/esm/ion-loading.entry.js +2 -2
  49. package/dist/esm/ion-menu_3.entry.js +2 -2
  50. package/dist/esm/ion-modal.entry.js +2 -2
  51. package/dist/esm/ion-popover.entry.js +2 -2
  52. package/dist/esm/ion-select-modal.entry.js +1 -1
  53. package/dist/esm/ion-select_3.entry.js +1 -1
  54. package/dist/esm/ion-toast.entry.js +6 -4
  55. package/dist/esm/{overlay-focus-boundary-C04QMmsL.js → overlay-focus-boundary-Y7bUWprL.js} +1 -1
  56. package/dist/esm/{overlays-IKvNe-3C.js → overlays-eLEPzRwt.js} +30 -1
  57. package/dist/ionic/index.esm.js +1 -1
  58. package/dist/ionic/ionic.esm.js +1 -1
  59. package/dist/ionic/{p-2af6e96d.entry.js → p-12390e17.entry.js} +1 -1
  60. package/dist/ionic/{p-9d18ce91.entry.js → p-14c5aaaf.entry.js} +1 -1
  61. package/dist/ionic/{p-17f1bb8d.entry.js → p-26830217.entry.js} +1 -1
  62. package/dist/ionic/{p-57eb421d.entry.js → p-3359e788.entry.js} +1 -1
  63. package/dist/ionic/p-5b6e4b8f.entry.js +4 -0
  64. package/dist/ionic/{p-84c4684b.entry.js → p-8bbbce87.entry.js} +1 -1
  65. package/dist/ionic/{p-95e63cdc.entry.js → p-91c95a24.entry.js} +1 -1
  66. package/dist/ionic/p-9ec0ef9a.entry.js +4 -0
  67. package/dist/ionic/{p-CDg1wDHC.js → p-CbBiIQxG.js} +1 -1
  68. package/dist/ionic/{p-Bywjvc3Y.js → p-DXP3e75r.js} +1 -1
  69. package/dist/ionic/{p-e760443e.entry.js → p-c3cd03d0.entry.js} +1 -1
  70. package/dist/ionic/{p-29e158ee.entry.js → p-cf171eff.entry.js} +1 -1
  71. package/dist/ionic/{p-B-J0WNxH.js → p-e91gX-0O.js} +1 -1
  72. package/dist/ionic/{p-661c34d1.entry.js → p-f5af160c.entry.js} +1 -1
  73. package/dist/types/components/alert/alert.d.ts +1 -0
  74. package/dist/types/components/toast/toast.d.ts +1 -0
  75. package/dist/types/utils/overlays.d.ts +12 -0
  76. package/hydrate/index.js +39 -6
  77. package/hydrate/index.mjs +39 -6
  78. package/package.json +1 -1
  79. package/components/p-C46T-8zV.js +0 -4
  80. package/components/p-CdDNVOXF.js +0 -4
  81. package/dist/ionic/p-62b7db81.entry.js +0 -4
  82. package/dist/ionic/p-81a842f7.entry.js +0 -4
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import{d as n}from"./p-ZjP4CjeZ.js";import{f as e,c as t,g as o,a as i,b as a}from"./p-vBBGetx6.js";import{updateCloseWatcher as s,OVERLAY_BACK_BUTTON_PRIORITY as r,shouldUseCloseWatcher as d,addCloseWatcherCondition as c}from"./p-CixYrL7E.js";import{e as l,c as u,p as m}from"./p-CyKwPay6.js";import{b as p}from"./p-DFlkSd5_.js";import{C as f}from"./p-BbMAsoPz.js";import{B as h}from"./p-B_gJaBk0.js";const v='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-checkbox:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-radio:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',b=(n,e)=>{const t=n.querySelector(v);y(t,e??n)},w=(n,e)=>{const t=Array.from(n.querySelectorAll(v));y(t.length>0?t[t.length-1]:null,e??n)},y=(n,t)=>{let o=n;const i=n?.shadowRoot;if(i&&(o=i.querySelector(v)||n),o){const n=o.closest("ion-radio-group");n?n.setFocus():e(o)}else t.focus()};let g=0,x=0;const k="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover",O=new WeakMap,j=n=>"ION-TOAST"!==n.tagName&&!1!==n.focusTrap&&(n=>!1!==n.showBackdrop&&!((n.backdropBreakpoint??0)>0))(n),B=n=>({create:e=>N(n,e),dismiss:(e,t,o)=>G(document,e,t,n,o),getTop:async()=>$(document,n)}),T=B("ion-alert"),C=B("ion-action-sheet"),A=B("ion-loading"),P=B("ion-modal"),D=B("ion-popover"),S=B("ion-toast"),I=n=>{"undefined"!=typeof document&&F(document);const e=g++;n.overlayIndex=e},M=n=>(n.hasAttribute("id")||(n.id="ion-overlay-"+ ++x),n.id),N=(n,e)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(n).then((()=>{const o=document.createElement(n);return o.classList.add("overlay-hidden"),Object.assign(o,{...e,hasController:!0}),Y(document).appendChild(o),new Promise((n=>t(o,n)))})):Promise.resolve(),E=(n,t)=>{let o=n;const i=n?.shadowRoot;i&&(o=i.querySelector(v)||n),o?e(o):t.focus()},F=n=>{0===g&&(g=1,n.addEventListener("focus",(e=>{((n,e)=>{const t=$(e,k),i=n.target;t&&i&&(t.classList.contains(un)||(t.shadowRoot?(()=>{if(t.contains(i))t.lastFocus=i;else if("ION-TOAST"===i.tagName)E(t.lastFocus,t);else{const n=t.lastFocus;b(t),n===e.activeElement&&w(t),t.lastFocus=e.activeElement}})():(()=>{if(t===i)t.lastFocus=void 0;else if("ION-TOAST"===i.tagName)E(t.lastFocus,t);else{const n=o(t);if(!n.contains(i))return;const e=n.querySelector(".ion-overlay-wrapper");if(!e)return;(e.contains(i)||i===n.querySelector("ion-backdrop"))&&(t.lastFocus=i)}})()))})(e,n)}),!0),c((()=>void 0!==$(n,k))),n.addEventListener("ionBackButton",(e=>{const t=$(n);t?.backdropDismiss&&e.detail.register(r,(()=>{t.dismiss(void 0,an)}))})),d()||n.addEventListener("keydown",(e=>{if("Escape"===e.key){const e=$(n);e?.backdropDismiss&&e.dismiss(void 0,an)}})))},G=(n,e,t,o,i)=>{const a=$(n,o,i);return a?a.dismiss(e,t):Promise.reject("overlay does not exist")},L=(n,e)=>((n,e)=>(void 0===e&&(e="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover,ion-toast"),Array.from(n.querySelectorAll(e)).filter((n=>n.overlayIndex>0))))(n,e).filter((n=>!n.classList.contains("overlay-hidden"))),$=(n,e,t)=>{const o=L(n,e);return(void 0===t?o:o.filter((n=>n.id===t))).slice(-1)[0]},_=()=>Y(document).querySelector("ion-router-outlet, #ion-view-container-root"),z=(n=!1)=>{const e=_();e&&(n?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden"))},V=()=>{"undefined"!=typeof document&&(s(),L(document).some((n=>j(n)))||(z(!1),document.body.classList.remove(h)))},Z=n=>{_()?.contains(n)||z(!0),document.body.classList.add(h)},q=n=>{if("undefined"==typeof document)return;s();const e=n;j(e)&&Z(e)},J=async(n,e,t,i,a)=>{if(n.presented)return;"ION-TOAST"!==n.el.tagName&&K(n.el);const s=n.el,r=j(s);n.presented=!0,n.willPresent.emit(),r&&Z(s),n.willPresentShorthand?.emit();const d=p(n),c=n.enterAnimation?n.enterAnimation:l.get(e,"ios"===d?t:i);if(await H(n,c,n.el,a)&&(n.didPresent.emit(),n.didPresentShorthand?.emit()),n.keyboardClose&&(null===document.activeElement||!n.el.contains(document.activeElement))){const e=o(n.el).querySelector('[role="dialog"][tabindex]')??n.el;try{e.focus({preventScroll:!0})}catch{e.focus()}}n.el.removeAttribute("aria-hidden"),n.el.removeAttribute("inert")},K=async n=>{let e=document.activeElement;if(!e)return;e.blur();const t=e?.shadowRoot;t&&(e=t.querySelector(v)||e),await n.onDidDismiss(),null!==document.activeElement&&document.activeElement!==document.body||e.focus()},W=async(e,t,o,i,a,r,d)=>{if(!e.presented)return!1;const c=(void 0!==n?L(n):[]).filter((n=>j(n))),m=e.el;j(m)&&1===c.length&&c[0].id===m.id&&(z(!1),document.body.classList.remove(h)),e.presented=!1;try{e.el.style.setProperty("pointer-events","none"),e.willDismiss.emit({data:t,role:o}),e.willDismissShorthand?.emit({data:t,role:o});const n=p(e),s=e.leaveAnimation?e.leaveAnimation:l.get(i,"ios"===n?a:r);o!==sn&&await H(e,s,e.el,d),e.didDismiss.emit({data:t,role:o}),e.didDismissShorthand?.emit({data:t,role:o}),(O.get(e)||[]).forEach((n=>n.destroy())),O.delete(e),e.el.classList.add("overlay-hidden"),e.el.style.removeProperty("pointer-events"),void 0!==e.el.lastFocus&&(e.el.lastFocus=void 0)}catch(n){u(`[${e.el.tagName.toLowerCase()}] - `,n)}return e.el.remove(),s(),!0},Y=n=>n.querySelector("ion-app")||n.body,H=async(n,e,t,o)=>{t.classList.remove("overlay-hidden"),s();const i=e(n.el,o);n.animated&&l.getBoolean("animated",!0)||i.duration(0),n.keyboardClose&&i.beforeAddWrite((()=>{const n=t.ownerDocument.activeElement;n?.matches("input,ion-input, ion-textarea")&&n.blur()}));const a=O.get(n)||[];return O.set(n,[...a,i]),await i.play(),!0},Q=(n,e)=>{let t;const o=new Promise((n=>t=n));return R(n,e,(n=>{t(n.detail)})),o},R=(n,e,t)=>{const o=i=>{a(n,e,o),t(i)};i(n,e,o)},U=n=>"cancel"===n||n===an,X=n=>n(),nn=(n,e)=>{if("function"==typeof n)return l.get("_zoneGate",X)((()=>{try{return n(e)}catch(n){throw n}}))},en=["","100%","100vw","100vh","100dvw","100dvh","100svw","100svh"],tn=["auto","fit-content","min-content","max-content"],on=n=>{const e=n.trim().toLowerCase();return en.includes(e)?"fullscreen":tn.some((n=>e.endsWith(n)))?"content":"definite"},an="backdrop",sn="gesture",rn=39,dn=n=>{let e,t=!1;const o=f(),i=(i=!1)=>{if(e&&!i)return{delegate:e,inline:t};const{el:a,hasController:s,delegate:r}=n;return t=null!==a.parentNode&&!s,e=t?r||o:r,{inline:t,delegate:e}};return{attachViewToDom:async e=>{const{delegate:t}=i(!0);if(t)return await t.attachViewToDom(n.el,e);const{hasController:o}=n;if(o&&void 0!==e)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:e}=i();e&&void 0!==n.el&&e.removeViewFromDom(n.el.parentElement,n.el)}}},cn=()=>{let n;const e=()=>{n&&(n(),n=void 0)};return{addClickListener:(t,o)=>{e();const i=void 0!==o?document.getElementById(o):null;i?n=((n,e)=>{const t=()=>{e.present()};return n.addEventListener("click",t),()=>{n.removeEventListener("click",t)}})(i,t):m(`[${t.tagName.toLowerCase()}] - A trigger element with the ID "${o}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,t)},removeClickListener:e}},ln=()=>{let n;return{setPressedButton:e=>{n=e},getCancelButton:e=>{const t=n??e.find((n=>"cancel"===n.role));return n=void 0,t}}},un="ion-disable-focus-trap";export{an as B,un as F,sn as G,rn as O,T as a,C as b,dn as c,cn as d,J as e,W as f,Q as g,I as h,U as i,V as j,M as k,A as l,P as m,b as n,w as o,D as p,ln as q,q as r,nn as s,S as t,on as u,$ as v}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import{d as o,H as e,h as t,j as i,f as c,t as s}from"./p-CyKwPay6.js";import{b as n}from"./p-DFlkSd5_.js";import{a as l,g as a}from"./p-BSQPZ79H.js";import{s as d}from"./p-C46T-8zV.js";import{r}from"./p-DxAKY2xh.js";import{g as m}from"./p-byZM6qHV.js";import{d as p}from"./p-DbC2vOiv.js";import{d as h}from"./p-CdtEBKAI.js";import{d as b}from"./p-B8OjE3wE.js";import{d as x}from"./p-dQRWGlyU.js";import{d as f}from"./p-BPmpUt4g.js";import{d as g}from"./p-B8n838RS.js";import{d as u}from"./p-zY1uGLy0.js";import{d as k}from"./p-xlBarDrV.js";import{d as v}from"./p-CfRsUABV.js";import{d as y}from"./p-B5DtZRQt.js";import{d as w}from"./p-B5YExYUd.js";import{d as j}from"./p-QFF8S5ej.js";import{d as E}from"./p-CqmHpRNu.js";const C=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.pendingEnterTarget=null,this.cancelText="Close",this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:e}=this;return e.find((e=>e.value===o.target.value))}getValues(o){const{multiple:e,options:t}=this;if(e)return t.filter((o=>o.checked)).map((o=>o.value));const i=o?this.findOptionFromEvent(o):null;return i?i.value:void 0}callOptionHandler(o){const e=this.findOptionFromEvent(o),t=this.getValues(o);e?.handler&&d(e.handler,t)}setChecked(o){const{multiple:e}=this,t=this.findOptionFromEvent(o);e&&t&&(t.checked=o.detail.checked)}renderRadioOptions(){const o=n(this),e=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return t("ion-radio-group",{value:e,onIonChange:o=>this.callOptionHandler(o)},this.options.map(((i,c)=>{const s=i,n=!!s.startContent||!!s.endContent||!!s.description,d={id:`modal-option-${c}`,label:s.text,startContent:s.startContent,endContent:s.endContent,description:s.description},p=l(o,"radio","modal"),h=a(o,"radio","modal");return t("ion-item",{lines:"none",disabled:i.disabled,class:{"item-radio-checked":i.value===e,...m(i.cssClass)}},t("ion-radio",{class:{"select-option-has-rich-content":n},value:i.value,disabled:i.disabled,justify:s.justify??h,labelPlacement:s.labelPlacement??p,onClick:()=>this.closeModal(),onKeyDown:o=>{"Enter"!==o.key||o.repeat||(this.pendingEnterTarget=o.currentTarget)},onKeyUp:o=>{if(" "===o.key)this.closeModal();else if("Enter"===o.key){const e=this.pendingEnterTarget===o.currentTarget;this.pendingEnterTarget=null,e&&this.closeModal()}}},r(d,"select-option-label")))})))}renderCheckboxOptions(){const o=n(this);return this.options.map(((e,c)=>{const s=e,n=!!s.startContent||!!s.endContent||!!s.description,d={id:`modal-option-${c}`,label:s.text,startContent:s.startContent,endContent:s.endContent,description:s.description},p=l(o,"checkbox","modal"),h=a(o,"checkbox","modal");return t("ion-item",{disabled:e.disabled,class:{"item-checkbox-checked":e.checked,...m(e.cssClass)}},t("ion-checkbox",{class:{"select-option-has-rich-content":n},value:e.value,disabled:e.disabled,checked:e.checked,justify:s.justify??h,labelPlacement:s.labelPlacement??p,onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),i(this)}},r(d,"select-option-label")))}))}render(){return t(c,{key:"2637fb69c9388122020b9cf628cf16fdd2e2179b",class:n(this)},t("ion-header",{key:"ff9e61a03c09f43c27db940e39db14dd2737e221"},t("ion-toolbar",{key:"56aa98fa0f06dd65cbc8fe7b383659d1df8d9626"},void 0!==this.header&&t("ion-title",{key:"c30642e641445d5ed826f2285d7296ea0c71469e"},this.header),t("ion-buttons",{key:"e87ec2fc60857219870d2e07d3287695a8d1e668",slot:"end"},t("ion-button",{key:"33801ad7c3706a89faad34fc557943628444b84a",onClick:()=>this.closeModal()},this.cancelText)))),t("ion-content",{key:"6796d924d0cfd0840c121eb2e703f6fc7b7137cb"},t("ion-list",{key:"82ebe25cc0854f6edf51a2eae83c880b2772dc3a"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return this}static get style(){return{ionic:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ionic,.alert-checkbox-label-text.sc-ion-select-modal-ionic,.alert-radio-label-text.sc-ion-select-modal-ionic,.select-option-label-text.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-ionic{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-ionic:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic{width:40px;height:40px}.select-option-start.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic{font-size:24px}.select-option-start.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic{width:56px;height:56px}.select-option-start.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic{width:114px;height:56px}.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}',ios:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ios,.alert-checkbox-label-text.sc-ion-select-modal-ios,.alert-radio-label-text.sc-ion-select-modal-ios,.select-option-label-text.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-ios{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-ios:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios{width:44px;height:44px}.select-option-start.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios{font-size:28px}.action-sheet-button-label-text.sc-ion-select-modal-ios{-ms-flex-pack:center;justify-content:center}.select-option-has-rich-content.sc-ion-select-modal-ios{-webkit-padding-end:16px;padding-inline-end:16px}.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-md,.alert-checkbox-label-text.sc-ion-select-modal-md,.alert-radio-label-text.sc-ion-select-modal-md,.select-option-label-text.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-md{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-md:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md{width:40px;height:40px}.select-option-start.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md{font-size:24px}.select-option-start.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md{width:56px;height:56px}.select-option-start.sc-ion-select-modal-md>video.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>video.sc-ion-select-modal-md{width:114px;height:56px}.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'}}},[34,"ion-select-modal",{header:[1],cancelText:[1,"cancel-text"],multiple:[4],options:[16]}]);function B(){"undefined"!=typeof customElements&&["ion-select-modal","ion-button","ion-buttons","ion-checkbox","ion-content","ion-header","ion-icon","ion-item","ion-list","ion-radio","ion-radio-group","ion-ripple-effect","ion-title","ion-toolbar"].forEach((o=>{switch(o){case"ion-select-modal":customElements.get(s(o))||customElements.define(s(o),C);break;case"ion-button":customElements.get(s(o))||p();break;case"ion-buttons":customElements.get(s(o))||h();break;case"ion-checkbox":customElements.get(s(o))||b();break;case"ion-content":customElements.get(s(o))||x();break;case"ion-header":customElements.get(s(o))||f();break;case"ion-icon":customElements.get(s(o))||g();break;case"ion-item":customElements.get(s(o))||u();break;case"ion-list":customElements.get(s(o))||k();break;case"ion-radio":customElements.get(s(o))||v();break;case"ion-radio-group":customElements.get(s(o))||y();break;case"ion-ripple-effect":customElements.get(s(o))||w();break;case"ion-title":customElements.get(s(o))||j();break;case"ion-toolbar":customElements.get(s(o))||E()}}))}export{C as S,B as d}
4
+ import{d as o,H as e,h as t,j as i,f as c,t as s}from"./p-CyKwPay6.js";import{b as n}from"./p-DFlkSd5_.js";import{a as l,g as a}from"./p-BSQPZ79H.js";import{s as d}from"./p-CkGvoxlv.js";import{r}from"./p-DxAKY2xh.js";import{g as m}from"./p-byZM6qHV.js";import{d as p}from"./p-DbC2vOiv.js";import{d as h}from"./p-CdtEBKAI.js";import{d as b}from"./p-B8OjE3wE.js";import{d as x}from"./p-Dc297fYS.js";import{d as f}from"./p-BPmpUt4g.js";import{d as g}from"./p-B8n838RS.js";import{d as u}from"./p-zY1uGLy0.js";import{d as k}from"./p-xlBarDrV.js";import{d as v}from"./p-CfRsUABV.js";import{d as y}from"./p-B5DtZRQt.js";import{d as w}from"./p-B5YExYUd.js";import{d as j}from"./p-QFF8S5ej.js";import{d as E}from"./p-CqmHpRNu.js";const C=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.pendingEnterTarget=null,this.cancelText="Close",this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:e}=this;return e.find((e=>e.value===o.target.value))}getValues(o){const{multiple:e,options:t}=this;if(e)return t.filter((o=>o.checked)).map((o=>o.value));const i=o?this.findOptionFromEvent(o):null;return i?i.value:void 0}callOptionHandler(o){const e=this.findOptionFromEvent(o),t=this.getValues(o);e?.handler&&d(e.handler,t)}setChecked(o){const{multiple:e}=this,t=this.findOptionFromEvent(o);e&&t&&(t.checked=o.detail.checked)}renderRadioOptions(){const o=n(this),e=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return t("ion-radio-group",{value:e,onIonChange:o=>this.callOptionHandler(o)},this.options.map(((i,c)=>{const s=i,n=!!s.startContent||!!s.endContent||!!s.description,d={id:`modal-option-${c}`,label:s.text,startContent:s.startContent,endContent:s.endContent,description:s.description},p=l(o,"radio","modal"),h=a(o,"radio","modal");return t("ion-item",{lines:"none",disabled:i.disabled,class:{"item-radio-checked":i.value===e,...m(i.cssClass)}},t("ion-radio",{class:{"select-option-has-rich-content":n},value:i.value,disabled:i.disabled,justify:s.justify??h,labelPlacement:s.labelPlacement??p,onClick:()=>this.closeModal(),onKeyDown:o=>{"Enter"!==o.key||o.repeat||(this.pendingEnterTarget=o.currentTarget)},onKeyUp:o=>{if(" "===o.key)this.closeModal();else if("Enter"===o.key){const e=this.pendingEnterTarget===o.currentTarget;this.pendingEnterTarget=null,e&&this.closeModal()}}},r(d,"select-option-label")))})))}renderCheckboxOptions(){const o=n(this);return this.options.map(((e,c)=>{const s=e,n=!!s.startContent||!!s.endContent||!!s.description,d={id:`modal-option-${c}`,label:s.text,startContent:s.startContent,endContent:s.endContent,description:s.description},p=l(o,"checkbox","modal"),h=a(o,"checkbox","modal");return t("ion-item",{disabled:e.disabled,class:{"item-checkbox-checked":e.checked,...m(e.cssClass)}},t("ion-checkbox",{class:{"select-option-has-rich-content":n},value:e.value,disabled:e.disabled,checked:e.checked,justify:s.justify??h,labelPlacement:s.labelPlacement??p,onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),i(this)}},r(d,"select-option-label")))}))}render(){return t(c,{key:"2637fb69c9388122020b9cf628cf16fdd2e2179b",class:n(this)},t("ion-header",{key:"ff9e61a03c09f43c27db940e39db14dd2737e221"},t("ion-toolbar",{key:"56aa98fa0f06dd65cbc8fe7b383659d1df8d9626"},void 0!==this.header&&t("ion-title",{key:"c30642e641445d5ed826f2285d7296ea0c71469e"},this.header),t("ion-buttons",{key:"e87ec2fc60857219870d2e07d3287695a8d1e668",slot:"end"},t("ion-button",{key:"33801ad7c3706a89faad34fc557943628444b84a",onClick:()=>this.closeModal()},this.cancelText)))),t("ion-content",{key:"6796d924d0cfd0840c121eb2e703f6fc7b7137cb"},t("ion-list",{key:"82ebe25cc0854f6edf51a2eae83c880b2772dc3a"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return this}static get style(){return{ionic:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ionic,.alert-checkbox-label-text.sc-ion-select-modal-ionic,.alert-radio-label-text.sc-ion-select-modal-ionic,.select-option-label-text.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-ionic{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-ionic:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic{width:40px;height:40px}.select-option-start.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic{font-size:24px}.select-option-start.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic{width:56px;height:56px}.select-option-start.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic{width:114px;height:56px}.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}',ios:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ios,.alert-checkbox-label-text.sc-ion-select-modal-ios,.alert-radio-label-text.sc-ion-select-modal-ios,.select-option-label-text.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-ios{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-ios:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios{width:44px;height:44px}.select-option-start.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios{font-size:28px}.action-sheet-button-label-text.sc-ion-select-modal-ios{-ms-flex-pack:center;justify-content:center}.select-option-has-rich-content.sc-ion-select-modal-ios{-webkit-padding-end:16px;padding-inline-end:16px}.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-md,.alert-checkbox-label-text.sc-ion-select-modal-md,.alert-radio-label-text.sc-ion-select-modal-md,.select-option-label-text.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-md{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-md:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md{width:40px;height:40px}.select-option-start.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md{font-size:24px}.select-option-start.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md{width:56px;height:56px}.select-option-start.sc-ion-select-modal-md>video.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>video.sc-ion-select-modal-md{width:114px;height:56px}.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'}}},[34,"ion-select-modal",{header:[1],cancelText:[1,"cancel-text"],multiple:[4],options:[16]}]);function B(){"undefined"!=typeof customElements&&["ion-select-modal","ion-button","ion-buttons","ion-checkbox","ion-content","ion-header","ion-icon","ion-item","ion-list","ion-radio","ion-radio-group","ion-ripple-effect","ion-title","ion-toolbar"].forEach((o=>{switch(o){case"ion-select-modal":customElements.get(s(o))||customElements.define(s(o),C);break;case"ion-button":customElements.get(s(o))||p();break;case"ion-buttons":customElements.get(s(o))||h();break;case"ion-checkbox":customElements.get(s(o))||b();break;case"ion-content":customElements.get(s(o))||x();break;case"ion-header":customElements.get(s(o))||f();break;case"ion-icon":customElements.get(s(o))||g();break;case"ion-item":customElements.get(s(o))||u();break;case"ion-list":customElements.get(s(o))||k();break;case"ion-radio":customElements.get(s(o))||v();break;case"ion-radio-group":customElements.get(s(o))||y();break;case"ion-ripple-effect":customElements.get(s(o))||w();break;case"ion-title":customElements.get(s(o))||j();break;case"ion-toolbar":customElements.get(s(o))||E()}}))}export{C as S,B as d}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import{d as t,H as o,i,k as s,j as e,h as n,f as r,t as l}from"./p-CyKwPay6.js";import{i as a,l as c,c as h}from"./p-vBBGetx6.js";import{q as d}from"./p-C46T-8zV.js";import{b as f,a as p}from"./p-DFlkSd5_.js";import{i as u}from"./p-Dj4J3LkD.js";import{h as m,c as v}from"./p-byZM6qHV.js";const b=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionScrollStart=i(this,"ionScrollStart",7),this.ionScroll=i(this,"ionScroll",7),this.ionScrollEnd=i(this,"ionScrollEnd",7),this.watchDog=null,this.isScrolling=!1,this.lastScroll=0,this.queued=!1,this.cTop=-1,this.cBottom=-1,this.isMainContent=!0,this.resizeTimeout=null,this.inheritedAttributes={},this.tabsElement=null,this.detail={scrollTop:0,scrollLeft:0,type:"scroll",event:void 0,startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,data:void 0,isScrolling:!0},this.sizeToContent=!1,this.fullscreen=!1,this.fixedSlotPlacement="after",this.scrollX=!1,this.scrollY=!0,this.scrollEvents=!1}fullscreenChanged(){this.setupFullscreenResizeObserver()}componentWillLoad(){this.inheritedAttributes=a(this.el),this.sizeToContent=this.readSizeToContent()}connectedCallback(){if(this.isMainContent=null===this.el.closest("ion-menu, ion-popover, ion-modal"),c(this.el)){const t=this.tabsElement=this.el.closest("ion-tabs");null!==t&&(this.tabsLoadCallback=()=>this.resize(),t.addEventListener("ionTabBarLoaded",this.tabsLoadCallback))}this.setupFullscreenResizeObserver(),this.updateSizeToContent()}componentDidLoad(){this.setupFullscreenResizeObserver()}disconnectedCallback(){if(this.onScrollEnd(),c(this.el)){const{tabsElement:t,tabsLoadCallback:o}=this;null!==t&&void 0!==o&&t.removeEventListener("ionTabBarLoaded",o),this.tabsElement=null,this.tabsLoadCallback=void 0}this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.destroyFullscreenResizeObserver()}setupFullscreenResizeObserver(){"undefined"!=typeof ResizeObserver&&(this.fullscreen&&!m("ion-popover",this.el)?void 0===this.fullscreenResizeObserver&&(this.fullscreenResizeObserver=new ResizeObserver((()=>{null!==this.el.offsetParent&&this.resize()})),this.fullscreenResizeObserver.observe(this.el)):this.destroyFullscreenResizeObserver())}updateSizeToContent(){s((()=>{this.sizeToContent=this.readSizeToContent()}))}destroyFullscreenResizeObserver(){void 0!==this.fullscreenResizeObserver&&(this.fullscreenResizeObserver.disconnect(),this.fullscreenResizeObserver=void 0)}onResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.resizeTimeout=setTimeout((()=>{null!==this.el.offsetParent&&this.resize()}),100)}shouldForceOverscroll(){const{forceOverscroll:t}=this,o=f(this);return void 0===t?"ios"===o&&p("ios"):t}readSizeToContent(){if(m("ion-popover",this.el))return!0;const t=this.el.closest("ion-modal");if(null===t)return!1;const o=getComputedStyle(t).getPropertyValue("--height");return"content"===d(o)}resize(){this.updateSizeToContent(),this.fullscreen?s((()=>this.readDimensions())):0===this.cTop&&0===this.cBottom||(this.cTop=this.cBottom=0,e(this))}async recalculateDimensions(){s((()=>this.readDimensions())),this.updateSizeToContent()}readDimensions(){const t=g(this.el),o=Math.max(this.el.offsetTop,0),i=Math.max(t.offsetHeight-o-this.el.offsetHeight,0);(o!==this.cTop||i!==this.cBottom)&&(this.cTop=o,this.cBottom=i,e(this))}onScroll(t){const o=Date.now(),i=!this.isScrolling;this.lastScroll=o,i&&this.onScrollStart(),!this.queued&&this.scrollEvents&&(this.queued=!0,s((o=>{this.queued=!1,this.detail.event=t,x(this.detail,this.scrollEl,o,i),this.ionScroll.emit(this.detail)})))}async getScrollElement(){return this.scrollEl||await new Promise((t=>h(this.el,t))),Promise.resolve(this.scrollEl)}async getBackgroundElement(){return this.backgroundContentEl||await new Promise((t=>h(this.el,t))),Promise.resolve(this.backgroundContentEl)}scrollToTop(t=0){return this.scrollToPoint(void 0,0,t)}async scrollToBottom(t=0){const o=await this.getScrollElement();return this.scrollToPoint(void 0,o.scrollHeight-o.clientHeight,t)}async scrollByPoint(t,o,i){const s=await this.getScrollElement();return this.scrollToPoint(t+s.scrollLeft,o+s.scrollTop,i)}async scrollToPoint(t,o,i=0){const s=await this.getScrollElement();if(i<32)return null!=o&&(s.scrollTop=o),void(null!=t&&(s.scrollLeft=t));let e,n=0;const r=new Promise((t=>e=t)),l=s.scrollTop,a=s.scrollLeft,c=null!=o?o-l:0,h=null!=t?t-a:0,d=t=>{const o=Math.min(1,(t-n)/i)-1,r=Math.pow(o,3)+1;0!==c&&(s.scrollTop=Math.floor(r*c+l)),0!==h&&(s.scrollLeft=Math.floor(r*h+a)),r<1?requestAnimationFrame(d):e()};return requestAnimationFrame((t=>{n=t,d(t)})),r}onScrollStart(){this.isScrolling=!0,this.ionScrollStart.emit({isScrolling:!0}),this.watchDog&&clearInterval(this.watchDog),this.watchDog=setInterval((()=>{this.lastScroll<Date.now()-120&&this.onScrollEnd()}),100)}onScrollEnd(){this.watchDog&&clearInterval(this.watchDog),this.watchDog=null,this.isScrolling&&(this.isScrolling=!1,this.ionScrollEnd.emit({isScrolling:!1}))}render(){const{fixedSlotPlacement:t,inheritedAttributes:o,isMainContent:i,scrollX:s,scrollY:e,el:l}=this,a=u(l)?"rtl":"ltr",c=f(this),h=this.shouldForceOverscroll(),d="ios"===c;return this.resize(),n(r,{key:"e1013621096729354ef92915af52dd823e69fdff",role:i?"main":void 0,class:v(this.color,{[c]:!0,"content-fullscreen":this.fullscreen,"content-sizing":this.sizeToContent,overscroll:h,[`content-${a}`]:!0}),style:{"--offset-top":`${this.cTop}px`,"--offset-bottom":`${this.cBottom}px`},...o},n("div",{key:"3d8649b164d6324beaa1bc50e1d204ad06c2ec1a",ref:t=>this.backgroundContentEl=t,id:"background-content",part:"background"}),"before"===t?n("slot",{name:"fixed"}):null,n("div",{key:"dd2d3bed8690b4f5027a43f5ec60e7e7df18106d",class:{"inner-scroll":!0,"scroll-x":s,"scroll-y":e,overscroll:(s||e)&&h},ref:t=>this.scrollEl=t,onScroll:this.scrollEvents?t=>this.onScroll(t):void 0,part:"scroll"},n("slot",{key:"dc3d4584d9e9afd43699525a619b8e873078fbbf"})),d?n("div",{class:"transition-effect"},n("div",{class:"transition-cover"}),n("div",{class:"transition-shadow"})):null,"after"===t?n("slot",{name:"fixed"}):null)}get el(){return this}static get watchers(){return{fullscreen:[{fullscreenChanged:0}]}}static get style(){return':host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}'}},[257,"ion-content",{color:[513],fullscreen:[4],fixedSlotPlacement:[1,"fixed-slot-placement"],forceOverscroll:[1028,"force-overscroll"],scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],scrollEvents:[4,"scroll-events"],sizeToContent:[32],recalculateDimensions:[64],getScrollElement:[64],getBackgroundElement:[64],scrollToTop:[64],scrollToBottom:[64],scrollByPoint:[64],scrollToPoint:[64]},[[9,"resize","onResize"]],{fullscreen:[{fullscreenChanged:0}]}]),g=t=>{const o=t.closest("ion-tabs");if(o)return o;return t.closest("ion-app, ion-page, .ion-page, page-inner, .popover-content")||(t=>t.parentElement?t.parentElement:t.parentNode?.host?t.parentNode.host:null)(t)},x=(t,o,i,s)=>{const e=t.currentX,n=t.currentY,r=o.scrollLeft,l=o.scrollTop,a=i-t.currentTime;if(s&&(t.startTime=i,t.startX=r,t.startY=l,t.velocityX=t.velocityY=0),t.currentTime=i,t.currentX=t.scrollLeft=r,t.currentY=t.scrollTop=l,t.deltaX=r-t.startX,t.deltaY=l-t.startY,a>0&&a<100){const o=(l-n)/a;t.velocityX=(r-e)/a*.7+.3*t.velocityX,t.velocityY=.7*o+.3*t.velocityY}};function y(){"undefined"!=typeof customElements&&["ion-content"].forEach((t=>{"ion-content"===t&&(customElements.get(l(t))||customElements.define(l(t),b))}))}export{b as C,y as d}
4
+ import{d as t,H as o,i,k as s,j as e,h as n,f as r,t as l}from"./p-CyKwPay6.js";import{i as a,l as c,c as h}from"./p-vBBGetx6.js";import{u as d}from"./p-CkGvoxlv.js";import{b as f,a as p}from"./p-DFlkSd5_.js";import{i as u}from"./p-Dj4J3LkD.js";import{h as m,c as v}from"./p-byZM6qHV.js";const b=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionScrollStart=i(this,"ionScrollStart",7),this.ionScroll=i(this,"ionScroll",7),this.ionScrollEnd=i(this,"ionScrollEnd",7),this.watchDog=null,this.isScrolling=!1,this.lastScroll=0,this.queued=!1,this.cTop=-1,this.cBottom=-1,this.isMainContent=!0,this.resizeTimeout=null,this.inheritedAttributes={},this.tabsElement=null,this.detail={scrollTop:0,scrollLeft:0,type:"scroll",event:void 0,startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,data:void 0,isScrolling:!0},this.sizeToContent=!1,this.fullscreen=!1,this.fixedSlotPlacement="after",this.scrollX=!1,this.scrollY=!0,this.scrollEvents=!1}fullscreenChanged(){this.setupFullscreenResizeObserver()}componentWillLoad(){this.inheritedAttributes=a(this.el),this.sizeToContent=this.readSizeToContent()}connectedCallback(){if(this.isMainContent=null===this.el.closest("ion-menu, ion-popover, ion-modal"),c(this.el)){const t=this.tabsElement=this.el.closest("ion-tabs");null!==t&&(this.tabsLoadCallback=()=>this.resize(),t.addEventListener("ionTabBarLoaded",this.tabsLoadCallback))}this.setupFullscreenResizeObserver(),this.updateSizeToContent()}componentDidLoad(){this.setupFullscreenResizeObserver()}disconnectedCallback(){if(this.onScrollEnd(),c(this.el)){const{tabsElement:t,tabsLoadCallback:o}=this;null!==t&&void 0!==o&&t.removeEventListener("ionTabBarLoaded",o),this.tabsElement=null,this.tabsLoadCallback=void 0}this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.destroyFullscreenResizeObserver()}setupFullscreenResizeObserver(){"undefined"!=typeof ResizeObserver&&(this.fullscreen&&!m("ion-popover",this.el)?void 0===this.fullscreenResizeObserver&&(this.fullscreenResizeObserver=new ResizeObserver((()=>{null!==this.el.offsetParent&&this.resize()})),this.fullscreenResizeObserver.observe(this.el)):this.destroyFullscreenResizeObserver())}updateSizeToContent(){s((()=>{this.sizeToContent=this.readSizeToContent()}))}destroyFullscreenResizeObserver(){void 0!==this.fullscreenResizeObserver&&(this.fullscreenResizeObserver.disconnect(),this.fullscreenResizeObserver=void 0)}onResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.resizeTimeout=setTimeout((()=>{null!==this.el.offsetParent&&this.resize()}),100)}shouldForceOverscroll(){const{forceOverscroll:t}=this,o=f(this);return void 0===t?"ios"===o&&p("ios"):t}readSizeToContent(){if(m("ion-popover",this.el))return!0;const t=this.el.closest("ion-modal");if(null===t)return!1;const o=getComputedStyle(t).getPropertyValue("--height");return"content"===d(o)}resize(){this.updateSizeToContent(),this.fullscreen?s((()=>this.readDimensions())):0===this.cTop&&0===this.cBottom||(this.cTop=this.cBottom=0,e(this))}async recalculateDimensions(){s((()=>this.readDimensions())),this.updateSizeToContent()}readDimensions(){const t=g(this.el),o=Math.max(this.el.offsetTop,0),i=Math.max(t.offsetHeight-o-this.el.offsetHeight,0);(o!==this.cTop||i!==this.cBottom)&&(this.cTop=o,this.cBottom=i,e(this))}onScroll(t){const o=Date.now(),i=!this.isScrolling;this.lastScroll=o,i&&this.onScrollStart(),!this.queued&&this.scrollEvents&&(this.queued=!0,s((o=>{this.queued=!1,this.detail.event=t,x(this.detail,this.scrollEl,o,i),this.ionScroll.emit(this.detail)})))}async getScrollElement(){return this.scrollEl||await new Promise((t=>h(this.el,t))),Promise.resolve(this.scrollEl)}async getBackgroundElement(){return this.backgroundContentEl||await new Promise((t=>h(this.el,t))),Promise.resolve(this.backgroundContentEl)}scrollToTop(t=0){return this.scrollToPoint(void 0,0,t)}async scrollToBottom(t=0){const o=await this.getScrollElement();return this.scrollToPoint(void 0,o.scrollHeight-o.clientHeight,t)}async scrollByPoint(t,o,i){const s=await this.getScrollElement();return this.scrollToPoint(t+s.scrollLeft,o+s.scrollTop,i)}async scrollToPoint(t,o,i=0){const s=await this.getScrollElement();if(i<32)return null!=o&&(s.scrollTop=o),void(null!=t&&(s.scrollLeft=t));let e,n=0;const r=new Promise((t=>e=t)),l=s.scrollTop,a=s.scrollLeft,c=null!=o?o-l:0,h=null!=t?t-a:0,d=t=>{const o=Math.min(1,(t-n)/i)-1,r=Math.pow(o,3)+1;0!==c&&(s.scrollTop=Math.floor(r*c+l)),0!==h&&(s.scrollLeft=Math.floor(r*h+a)),r<1?requestAnimationFrame(d):e()};return requestAnimationFrame((t=>{n=t,d(t)})),r}onScrollStart(){this.isScrolling=!0,this.ionScrollStart.emit({isScrolling:!0}),this.watchDog&&clearInterval(this.watchDog),this.watchDog=setInterval((()=>{this.lastScroll<Date.now()-120&&this.onScrollEnd()}),100)}onScrollEnd(){this.watchDog&&clearInterval(this.watchDog),this.watchDog=null,this.isScrolling&&(this.isScrolling=!1,this.ionScrollEnd.emit({isScrolling:!1}))}render(){const{fixedSlotPlacement:t,inheritedAttributes:o,isMainContent:i,scrollX:s,scrollY:e,el:l}=this,a=u(l)?"rtl":"ltr",c=f(this),h=this.shouldForceOverscroll(),d="ios"===c;return this.resize(),n(r,{key:"e1013621096729354ef92915af52dd823e69fdff",role:i?"main":void 0,class:v(this.color,{[c]:!0,"content-fullscreen":this.fullscreen,"content-sizing":this.sizeToContent,overscroll:h,[`content-${a}`]:!0}),style:{"--offset-top":`${this.cTop}px`,"--offset-bottom":`${this.cBottom}px`},...o},n("div",{key:"3d8649b164d6324beaa1bc50e1d204ad06c2ec1a",ref:t=>this.backgroundContentEl=t,id:"background-content",part:"background"}),"before"===t?n("slot",{name:"fixed"}):null,n("div",{key:"dd2d3bed8690b4f5027a43f5ec60e7e7df18106d",class:{"inner-scroll":!0,"scroll-x":s,"scroll-y":e,overscroll:(s||e)&&h},ref:t=>this.scrollEl=t,onScroll:this.scrollEvents?t=>this.onScroll(t):void 0,part:"scroll"},n("slot",{key:"dc3d4584d9e9afd43699525a619b8e873078fbbf"})),d?n("div",{class:"transition-effect"},n("div",{class:"transition-cover"}),n("div",{class:"transition-shadow"})):null,"after"===t?n("slot",{name:"fixed"}):null)}get el(){return this}static get watchers(){return{fullscreen:[{fullscreenChanged:0}]}}static get style(){return':host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}'}},[257,"ion-content",{color:[513],fullscreen:[4],fixedSlotPlacement:[1,"fixed-slot-placement"],forceOverscroll:[1028,"force-overscroll"],scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],scrollEvents:[4,"scroll-events"],sizeToContent:[32],recalculateDimensions:[64],getScrollElement:[64],getBackgroundElement:[64],scrollToTop:[64],scrollToBottom:[64],scrollByPoint:[64],scrollToPoint:[64]},[[9,"resize","onResize"]],{fullscreen:[{fullscreenChanged:0}]}]),g=t=>{const o=t.closest("ion-tabs");if(o)return o;return t.closest("ion-app, ion-page, .ion-page, page-inner, .popover-content")||(t=>t.parentElement?t.parentElement:t.parentNode?.host?t.parentNode.host:null)(t)},x=(t,o,i,s)=>{const e=t.currentX,n=t.currentY,r=o.scrollLeft,l=o.scrollTop,a=i-t.currentTime;if(s&&(t.startTime=i,t.startX=r,t.startY=l,t.velocityX=t.velocityY=0),t.currentTime=i,t.currentX=t.scrollLeft=r,t.currentY=t.scrollTop=l,t.deltaX=r-t.startX,t.deltaY=l-t.startY,a>0&&a<100){const o=(l-n)/a;t.velocityX=(r-e)/a*.7+.3*t.velocityX,t.velocityY=.7*o+.3*t.velocityY}};function y(){"undefined"!=typeof customElements&&["ion-content"].forEach((t=>{"ion-content"===t&&(customElements.get(l(t))||customElements.define(l(t),b))}))}export{b as C,y as d}
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  var helpers = require('./helpers-FmL1S9fF.js');
7
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
7
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
8
8
  var index = require('./index-BgvnEkoK.js');
9
9
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
10
10
  var animation = require('./animation-D_4jcN2s.js');
@@ -15,8 +15,8 @@ var index$2 = require('./index-BgvnEkoK.js');
15
15
  var index$3 = require('./index-Cr44j4Rb.js');
16
16
  var config = require('./config-CjUbvdPW.js');
17
17
  var theme = require('./theme-Bw0rpaNN.js');
18
- var index$4 = require('./index-CuWyDtHj.js');
19
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
18
+ var index$4 = require('./index-DeuODCYU.js');
19
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
20
20
  require('./dir-Bma_9Lqh.js');
21
21
  require('./gesture-controller-CeJslptU.js');
22
22
  require('./framework-delegate-BJGOfqpQ.js');
@@ -7,8 +7,8 @@ var index = require('./index-BgvnEkoK.js');
7
7
  var buttonActive = require('./button-active-XwZjcCSL.js');
8
8
  var helpers = require('./helpers-FmL1S9fF.js');
9
9
  var lockController = require('./lock-controller-aDB9wrEf.js');
10
- var overlayFocusBoundary = require('./overlay-focus-boundary-D9-g1MNP.js');
11
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
10
+ var overlayFocusBoundary = require('./overlay-focus-boundary-ChtKRiQh.js');
11
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
12
12
  var selectOptionRender = require('./select-option-render-7HwDXt5q.js');
13
13
  var theme = require('./theme-Bw0rpaNN.js');
14
14
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
@@ -9,8 +9,8 @@ var buttonActive = require('./button-active-XwZjcCSL.js');
9
9
  var helpers = require('./helpers-FmL1S9fF.js');
10
10
  var lockController = require('./lock-controller-aDB9wrEf.js');
11
11
  var overlayControlLabel = require('./overlay-control-label-D2sdL2O8.js');
12
- var overlayFocusBoundary = require('./overlay-focus-boundary-D9-g1MNP.js');
13
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
12
+ var overlayFocusBoundary = require('./overlay-focus-boundary-ChtKRiQh.js');
13
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
14
14
  var index$1 = require('./index-Cr44j4Rb.js');
15
15
  var selectOptionRender = require('./select-option-render-7HwDXt5q.js');
16
16
  var theme = require('./theme-Bw0rpaNN.js');
@@ -127,6 +127,7 @@ const Alert = class {
127
127
  this.delegateController = hardwareBackButton.createDelegateController(this);
128
128
  this.lockController = lockController.createLockController();
129
129
  this.triggerController = hardwareBackButton.createTriggerController();
130
+ this.cancelButtonController = hardwareBackButton.createCancelButtonController();
130
131
  this.customHTMLEnabled = index.config.get('innerHTMLTemplatesEnabled', config.ENABLE_HTML_CONTENT_DEFAULT);
131
132
  this.processedInputs = [];
132
133
  this.processedButtons = [];
@@ -182,7 +183,7 @@ const Alert = class {
182
183
  this.dispatchCancelHandler = (ev) => {
183
184
  const role = ev.detail.role;
184
185
  if (hardwareBackButton.isCancel(role)) {
185
- const cancelButton = this.processedButtons.find((b) => b.role === 'cancel');
186
+ const cancelButton = this.cancelButtonController.getCancelButton(this.processedButtons);
186
187
  this.callButtonHandler(cancelButton);
187
188
  }
188
189
  };
@@ -434,6 +435,7 @@ const Alert = class {
434
435
  const role = button.role;
435
436
  const values = this.getValues();
436
437
  if (hardwareBackButton.isCancel(role)) {
438
+ this.cancelButtonController.setPressedButton(button);
437
439
  return this.dismiss({ values }, role);
438
440
  }
439
441
  const returnData = await this.callButtonHandler(button, values);
@@ -664,14 +666,14 @@ const Alert = class {
664
666
  * If neither are defined, do not set aria-labelledby.
665
667
  */
666
668
  const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
667
- return (index.h(index.Host, { key: 'b650ede6e9475db0ee22f3b144178cc35bbb37bc', tabindex: "-1", style: {
669
+ return (index.h(index.Host, { key: '34098847a42a4a3d8247f5ecd5104aa70f4e0776', tabindex: "-1", style: {
668
670
  zIndex: `${20000 + overlayIndex}`,
669
671
  }, class: {
670
672
  ...theme.getClassMap(this.cssClass),
671
673
  [mode]: true,
672
674
  'overlay-hidden': true,
673
675
  'alert-translucent': this.translucent,
674
- }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, index.h("ion-backdrop", { key: 'a2f5f314c9f87ebc5c20b2d618587a8254deb8f2', tappable: this.backdropDismiss }), index.h(overlayFocusBoundary.OverlayFocusBoundary, { key: '9b5b9d5c65cf1849c1c1736d185bb4acc992df50', overlay: this.el, edge: "start" }), index.h("div", { key: '9a7bc59ef57f54a3466a092c25dad4ad72298fef', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el), ...htmlAttributes }, index.h("div", { key: 'e6a4843f8efc9f26a03278b0b853ee3ab769c91f', class: "alert-head" }, header && (index.h("h2", { key: 'c9979c124fe9f2515b0dcf98f2944cfc34682338', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (index.h("h2", { key: 'a7454486d3c2ff3d1088a235e679bb193cd326ac', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (index.h("h3", { key: '594862f712d17033f6f897295958ad283dc57a5d', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), index.h(overlayFocusBoundary.OverlayFocusBoundary, { key: '03987719e8d60d3bd7792ed303471dd341e23b34', overlay: this.el, edge: "end" })));
676
+ }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, index.h("ion-backdrop", { key: '6cefbd420bea2968a71d618749f02dfc8645e1be', tappable: this.backdropDismiss }), index.h(overlayFocusBoundary.OverlayFocusBoundary, { key: '13312a9087025a187561c9ced86e59eea48901b6', overlay: this.el, edge: "start" }), index.h("div", { key: 'feb0349ea7f0d3e5a3bda45d5d7d99e82ea06fcf', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el), ...htmlAttributes }, index.h("div", { key: '2fe1d07b673707ea22322e1b932edcb529ee8599', class: "alert-head" }, header && (index.h("h2", { key: 'bcc3b1808b02fc5c1fbd5ac44f70dabe49f487d1', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (index.h("h2", { key: 'e0848101ade1b499bdf66610a2084cba18fd9acf', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (index.h("h3", { key: 'aaef7c1d72e80828ae4a70edf12c08d3d80193f3', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), index.h(overlayFocusBoundary.OverlayFocusBoundary, { key: '19287f879b40d1c5e5f99b800a63e2b4f5d1b717', overlay: this.el, edge: "end" })));
675
677
  }
676
678
  get el() { return index.getElement(this); }
677
679
  static get watchers() { return {
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  var index = require('./index-BgvnEkoK.js');
7
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
7
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
8
8
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
9
9
  var helpers = require('./helpers-FmL1S9fF.js');
10
10
  var dir = require('./dir-Bma_9Lqh.js');
@@ -44,7 +44,7 @@ const App = class {
44
44
  const platform = ionicGlobal.isPlatform(window, 'ios') ? 'ios' : 'android';
45
45
  Promise.resolve().then(function () { return require('./input-shims-B2reKZod.js'); }).then((module) => module.startInputShims(index.config, platform));
46
46
  }
47
- const hardwareBackButtonModule = await Promise.resolve().then(function () { return require('./overlays-DGefLyN2.js'); }).then(function (n) { return n.hardwareBackButton; });
47
+ const hardwareBackButtonModule = await Promise.resolve().then(function () { return require('./overlays-DQ_xxwyU.js'); }).then(function (n) { return n.hardwareBackButton; });
48
48
  const supportsHardwareBackButtonEvents = isHybrid || hardwareBackButton.shouldUseCloseWatcher();
49
49
  if (index.config.getBoolean('hardwareBackButton', supportsHardwareBackButtonEvents)) {
50
50
  hardwareBackButtonModule.startHardwareBackButton();
@@ -6,7 +6,7 @@
6
6
  var index = require('./index-BgvnEkoK.js');
7
7
  var focusVisible = require('./focus-visible-CCvKiLh3.js');
8
8
  var helpers = require('./helpers-FmL1S9fF.js');
9
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
9
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
10
10
  var dir = require('./dir-Bma_9Lqh.js');
11
11
  var theme = require('./theme-Bw0rpaNN.js');
12
12
  var index$1 = require('./index-Cmm8nXxe.js');
@@ -7,8 +7,8 @@ var index = require('./index-BgvnEkoK.js');
7
7
  var config = require('./config-CjUbvdPW.js');
8
8
  var helpers = require('./helpers-FmL1S9fF.js');
9
9
  var lockController = require('./lock-controller-aDB9wrEf.js');
10
- var overlayFocusBoundary = require('./overlay-focus-boundary-D9-g1MNP.js');
11
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
10
+ var overlayFocusBoundary = require('./overlay-focus-boundary-ChtKRiQh.js');
11
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
12
12
  var index$1 = require('./index-Cr44j4Rb.js');
13
13
  var theme = require('./theme-Bw0rpaNN.js');
14
14
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
@@ -5,10 +5,10 @@
5
5
 
6
6
  var index = require('./index-BgvnEkoK.js');
7
7
  var cubicBezier = require('./cubic-bezier-DAjy1V-e.js');
8
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
8
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
9
9
  var gestureController = require('./gesture-controller-CeJslptU.js');
10
10
  var helpers = require('./helpers-FmL1S9fF.js');
11
- var index$1 = require('./index-CuWyDtHj.js');
11
+ var index$1 = require('./index-DeuODCYU.js');
12
12
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
13
13
  var attributeController = require('./attribute-controller-CrSdKZx1.js');
14
14
  var theme = require('./theme-Bw0rpaNN.js');
@@ -9,8 +9,8 @@ var frameworkDelegate = require('./framework-delegate-BJGOfqpQ.js');
9
9
  var helpers = require('./helpers-FmL1S9fF.js');
10
10
  var lockController = require('./lock-controller-aDB9wrEf.js');
11
11
  var capacitor = require('./capacitor-Dj9b-0Gr.js');
12
- var overlayFocusBoundary = require('./overlay-focus-boundary-D9-g1MNP.js');
13
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
12
+ var overlayFocusBoundary = require('./overlay-focus-boundary-ChtKRiQh.js');
13
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
14
14
  var theme = require('./theme-Bw0rpaNN.js');
15
15
  var index$3 = require('./index-BQAe0Paq.js');
16
16
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
@@ -4,11 +4,11 @@
4
4
  'use strict';
5
5
 
6
6
  var index = require('./index-BgvnEkoK.js');
7
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
7
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
8
8
  var frameworkDelegate = require('./framework-delegate-BJGOfqpQ.js');
9
9
  var helpers = require('./helpers-FmL1S9fF.js');
10
10
  var lockController = require('./lock-controller-aDB9wrEf.js');
11
- var overlayFocusBoundary = require('./overlay-focus-boundary-D9-g1MNP.js');
11
+ var overlayFocusBoundary = require('./overlay-focus-boundary-ChtKRiQh.js');
12
12
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
13
13
  var dir = require('./dir-Bma_9Lqh.js');
14
14
  var theme = require('./theme-Bw0rpaNN.js');
@@ -6,7 +6,7 @@
6
6
  var index = require('./index-BgvnEkoK.js');
7
7
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
8
8
  var overlayControlLabel = require('./overlay-control-label-D2sdL2O8.js');
9
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
9
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
10
10
  var selectOptionRender = require('./select-option-render-7HwDXt5q.js');
11
11
  var theme = require('./theme-Bw0rpaNN.js');
12
12
  require('./helpers-FmL1S9fF.js');
@@ -10,7 +10,7 @@ var slotMutationController = require('./slot-mutation-controller-CDHnVqHS.js');
10
10
  var compareWithUtils = require('./compare-with-utils-DSicavqM.js');
11
11
  var validity = require('./validity-BpS37YFM.js');
12
12
  var helpers = require('./helpers-FmL1S9fF.js');
13
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
13
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
14
14
  var dir = require('./dir-Bma_9Lqh.js');
15
15
  var index$2 = require('./index-Cr44j4Rb.js');
16
16
  var theme = require('./theme-Bw0rpaNN.js');
@@ -7,7 +7,7 @@ var index = require('./index-BgvnEkoK.js');
7
7
  var config = require('./config-CjUbvdPW.js');
8
8
  var helpers = require('./helpers-FmL1S9fF.js');
9
9
  var lockController = require('./lock-controller-aDB9wrEf.js');
10
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
10
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
11
11
  var index$2 = require('./index-Cr44j4Rb.js');
12
12
  var theme = require('./theme-Bw0rpaNN.js');
13
13
  var ionicGlobal = require('./ionic-global-Ds4aqSrj.js');
@@ -470,6 +470,7 @@ const Toast = class {
470
470
  this.delegateController = hardwareBackButton.createDelegateController(this);
471
471
  this.lockController = lockController.createLockController();
472
472
  this.triggerController = hardwareBackButton.createTriggerController();
473
+ this.cancelButtonController = hardwareBackButton.createCancelButtonController();
473
474
  this.customHTMLEnabled = index.config.get('innerHTMLTemplatesEnabled', config.ENABLE_HTML_CONTENT_DEFAULT);
474
475
  this.presented = false;
475
476
  /**
@@ -523,7 +524,7 @@ const Toast = class {
523
524
  this.dispatchCancelHandler = (ev) => {
524
525
  const role = ev.detail.role;
525
526
  if (hardwareBackButton.isCancel(role)) {
526
- const cancelButton = this.getButtons().find((b) => b.role === 'cancel');
527
+ const cancelButton = this.cancelButtonController.getCancelButton(this.getButtons());
527
528
  this.callButtonHandler(cancelButton);
528
529
  }
529
530
  };
@@ -776,6 +777,7 @@ const Toast = class {
776
777
  async buttonClick(button) {
777
778
  const role = button.role;
778
779
  if (hardwareBackButton.isCancel(role)) {
780
+ this.cancelButtonController.setPressedButton(button);
779
781
  return this.dismiss(undefined, role);
780
782
  }
781
783
  const shouldDismiss = await this.callButtonHandler(button);
@@ -850,14 +852,14 @@ const Toast = class {
850
852
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
851
853
  index.printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
852
854
  }
853
- return (index.h(index.Host, { key: 'e1974e5ea2a134f5447f9b1efcc11a87a6aa744b', tabindex: "-1", ...this.htmlAttributes, style: {
855
+ return (index.h(index.Host, { key: '0f9584d20e110965100fd14f90bb8c22dba885f9', tabindex: "-1", ...this.htmlAttributes, style: {
854
856
  zIndex: `${60000 + this.overlayIndex}`,
855
857
  }, class: theme.createColorClasses(this.color, {
856
858
  [mode]: true,
857
859
  ...theme.getClassMap(this.cssClass),
858
860
  'overlay-hidden': true,
859
861
  'toast-translucent': this.translucent,
860
- }), onIonToastWillDismiss: this.dispatchCancelHandler }, index.h("div", { key: '966d19ec901fa3cbea1bfc1ca3540bcc3263fd96', class: wrapperClass, part: "wrapper" }, index.h("div", { key: 'd3449bab878af046678897bc4c35d3f779c7d5e9', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index.h("ion-icon", { key: 'cf989fb1908f7a075745c567e504599a091ab5cd', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index.h("div", { key: '33bb13417030085d9d19629e4df4a4492a7f36c9', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
862
+ }), onIonToastWillDismiss: this.dispatchCancelHandler }, index.h("div", { key: '29d99bb085ce1f000ce6fe6db207502dc020b55b', class: wrapperClass, part: "wrapper" }, index.h("div", { key: '915ea476bf2cf9bbbd1e555b016202de67150bb5', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index.h("ion-icon", { key: 'a07aae4c41aa8abf8f45186267b6c3aceb3cebed', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index.h("div", { key: '4730a5b6b29a28be79649c0882092030f4656477', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
861
863
  }
862
864
  get el() { return index.getElement(this); }
863
865
  static get watchers() { return {
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  var index = require('./index-BgvnEkoK.js');
7
- var hardwareBackButton = require('./overlays-DGefLyN2.js');
7
+ var hardwareBackButton = require('./overlays-DQ_xxwyU.js');
8
8
 
9
9
  /**
10
10
  * Moves focus off a boundary. Focus arriving from inside the overlay
@@ -1145,6 +1145,35 @@ const createTriggerController = () => {
1145
1145
  removeClickListener,
1146
1146
  };
1147
1147
  };
1148
+ /**
1149
+ * Tracks which cancel button was pressed. Alert and toast render every
1150
+ * cancel button they are given, and the cancel handler runs after the
1151
+ * dismiss starts, so the pressed button must be stored to run its handler
1152
+ * instead of the first cancel button's.
1153
+ */
1154
+ const createCancelButtonController = () => {
1155
+ let pressedButton;
1156
+ /**
1157
+ * Stores the pressed cancel button. Call it before dismissing the overlay.
1158
+ */
1159
+ const setPressedButton = (button) => {
1160
+ pressedButton = button;
1161
+ };
1162
+ /**
1163
+ * Returns the pressed cancel button and clears it. When no button was
1164
+ * pressed, such as on a backdrop tap or a dismiss() call with the cancel
1165
+ * role, it returns the first cancel button.
1166
+ */
1167
+ const getCancelButton = (buttons) => {
1168
+ const button = pressedButton ?? buttons.find((b) => b.role === 'cancel');
1169
+ pressedButton = undefined;
1170
+ return button;
1171
+ };
1172
+ return {
1173
+ setPressedButton,
1174
+ getCancelButton,
1175
+ };
1176
+ };
1148
1177
  const FOCUS_TRAP_DISABLE_CLASS = 'ion-disable-focus-trap';
1149
1178
 
1150
1179
  exports.BACKDROP = BACKDROP;
@@ -1156,6 +1185,7 @@ exports.actionSheetController = actionSheetController;
1156
1185
  exports.addCloseWatcherCondition = addCloseWatcherCondition;
1157
1186
  exports.alertController = alertController;
1158
1187
  exports.cleanupRootFocusTrapAccessibility = cleanupRootFocusTrapAccessibility;
1188
+ exports.createCancelButtonController = createCancelButtonController;
1159
1189
  exports.createDelegateController = createDelegateController;
1160
1190
  exports.createTriggerController = createTriggerController;
1161
1191
  exports.dismiss = dismiss;
@@ -9,7 +9,7 @@ import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
10
  import { getOverlayLabelJustify, getOverlayLabelPlacement } from "../../utils/overlay-control-label";
11
11
  import { OverlayFocusBoundary } from "../../utils/overlay-focus-boundary";
12
- import { BACKDROP, cleanupRootFocusTrapAccessibility, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, restoreRootFocusTrapAccessibility, safeCall, setOverlayId, } from "../../utils/overlays";
12
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, createCancelButtonController, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, restoreRootFocusTrapAccessibility, safeCall, setOverlayId, } from "../../utils/overlays";
13
13
  import { sanitizeDOMString } from "../../utils/sanitization/index";
14
14
  import { renderOptionLabel } from "../../utils/select-option-render";
15
15
  import { getClassMap } from "../../utils/theme";
@@ -28,6 +28,7 @@ export class Alert {
28
28
  this.delegateController = createDelegateController(this);
29
29
  this.lockController = createLockController();
30
30
  this.triggerController = createTriggerController();
31
+ this.cancelButtonController = createCancelButtonController();
31
32
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
32
33
  this.processedInputs = [];
33
34
  this.processedButtons = [];
@@ -83,7 +84,7 @@ export class Alert {
83
84
  this.dispatchCancelHandler = (ev) => {
84
85
  const role = ev.detail.role;
85
86
  if (isCancel(role)) {
86
- const cancelButton = this.processedButtons.find((b) => b.role === 'cancel');
87
+ const cancelButton = this.cancelButtonController.getCancelButton(this.processedButtons);
87
88
  this.callButtonHandler(cancelButton);
88
89
  }
89
90
  };
@@ -335,6 +336,7 @@ export class Alert {
335
336
  const role = button.role;
336
337
  const values = this.getValues();
337
338
  if (isCancel(role)) {
339
+ this.cancelButtonController.setPressedButton(button);
338
340
  return this.dismiss({ values }, role);
339
341
  }
340
342
  const returnData = await this.callButtonHandler(button, values);
@@ -565,14 +567,14 @@ export class Alert {
565
567
  * If neither are defined, do not set aria-labelledby.
566
568
  */
567
569
  const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
568
- return (h(Host, { key: 'b650ede6e9475db0ee22f3b144178cc35bbb37bc', tabindex: "-1", style: {
570
+ return (h(Host, { key: '34098847a42a4a3d8247f5ecd5104aa70f4e0776', tabindex: "-1", style: {
569
571
  zIndex: `${20000 + overlayIndex}`,
570
572
  }, class: {
571
573
  ...getClassMap(this.cssClass),
572
574
  [mode]: true,
573
575
  'overlay-hidden': true,
574
576
  'alert-translucent': this.translucent,
575
- }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: 'a2f5f314c9f87ebc5c20b2d618587a8254deb8f2', tappable: this.backdropDismiss }), h(OverlayFocusBoundary, { key: '9b5b9d5c65cf1849c1c1736d185bb4acc992df50', overlay: this.el, edge: "start" }), h("div", { key: '9a7bc59ef57f54a3466a092c25dad4ad72298fef', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el), ...htmlAttributes }, h("div", { key: 'e6a4843f8efc9f26a03278b0b853ee3ab769c91f', class: "alert-head" }, header && (h("h2", { key: 'c9979c124fe9f2515b0dcf98f2944cfc34682338', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: 'a7454486d3c2ff3d1088a235e679bb193cd326ac', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '594862f712d17033f6f897295958ad283dc57a5d', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h(OverlayFocusBoundary, { key: '03987719e8d60d3bd7792ed303471dd341e23b34', overlay: this.el, edge: "end" })));
577
+ }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '6cefbd420bea2968a71d618749f02dfc8645e1be', tappable: this.backdropDismiss }), h(OverlayFocusBoundary, { key: '13312a9087025a187561c9ced86e59eea48901b6', overlay: this.el, edge: "start" }), h("div", { key: 'feb0349ea7f0d3e5a3bda45d5d7d99e82ea06fcf', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el), ...htmlAttributes }, h("div", { key: '2fe1d07b673707ea22322e1b932edcb529ee8599', class: "alert-head" }, header && (h("h2", { key: 'bcc3b1808b02fc5c1fbd5ac44f70dabe49f487d1', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: 'e0848101ade1b499bdf66610a2084cba18fd9acf', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: 'aaef7c1d72e80828ae4a70edf12c08d3d80193f3', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h(OverlayFocusBoundary, { key: '19287f879b40d1c5e5f99b800a63e2b4f5d1b717', overlay: this.el, edge: "end" })));
576
578
  }
577
579
  static get is() { return "ion-alert"; }
578
580
  static get encapsulation() { return "scoped"; }
@@ -6,7 +6,7 @@ import { ENABLE_HTML_CONTENT_DEFAULT } from "../../utils/config";
6
6
  import { raf } from "../../utils/helpers";
7
7
  import { createLockController } from "../../utils/lock-controller";
8
8
  import { printIonError, printIonWarning } from "../../utils/logging/index";
9
- import { GESTURE, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
9
+ import { GESTURE, createCancelButtonController, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
10
10
  import { sanitizeDOMString } from "../../utils/sanitization/index";
11
11
  import { createColorClasses, getClassMap } from "../../utils/theme";
12
12
  import { config } from "../../global/config";
@@ -35,6 +35,7 @@ export class Toast {
35
35
  this.delegateController = createDelegateController(this);
36
36
  this.lockController = createLockController();
37
37
  this.triggerController = createTriggerController();
38
+ this.cancelButtonController = createCancelButtonController();
38
39
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
39
40
  this.presented = false;
40
41
  /**
@@ -88,7 +89,7 @@ export class Toast {
88
89
  this.dispatchCancelHandler = (ev) => {
89
90
  const role = ev.detail.role;
90
91
  if (isCancel(role)) {
91
- const cancelButton = this.getButtons().find((b) => b.role === 'cancel');
92
+ const cancelButton = this.cancelButtonController.getCancelButton(this.getButtons());
92
93
  this.callButtonHandler(cancelButton);
93
94
  }
94
95
  };
@@ -341,6 +342,7 @@ export class Toast {
341
342
  async buttonClick(button) {
342
343
  const role = button.role;
343
344
  if (isCancel(role)) {
345
+ this.cancelButtonController.setPressedButton(button);
344
346
  return this.dismiss(undefined, role);
345
347
  }
346
348
  const shouldDismiss = await this.callButtonHandler(button);
@@ -415,14 +417,14 @@ export class Toast {
415
417
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
416
418
  printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
417
419
  }
418
- return (h(Host, { key: 'e1974e5ea2a134f5447f9b1efcc11a87a6aa744b', tabindex: "-1", ...this.htmlAttributes, style: {
420
+ return (h(Host, { key: '0f9584d20e110965100fd14f90bb8c22dba885f9', tabindex: "-1", ...this.htmlAttributes, style: {
419
421
  zIndex: `${60000 + this.overlayIndex}`,
420
422
  }, class: createColorClasses(this.color, {
421
423
  [mode]: true,
422
424
  ...getClassMap(this.cssClass),
423
425
  'overlay-hidden': true,
424
426
  'toast-translucent': this.translucent,
425
- }), onIonToastWillDismiss: this.dispatchCancelHandler }, h("div", { key: '966d19ec901fa3cbea1bfc1ca3540bcc3263fd96', class: wrapperClass, part: "wrapper" }, h("div", { key: 'd3449bab878af046678897bc4c35d3f779c7d5e9', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: 'cf989fb1908f7a075745c567e504599a091ab5cd', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '33bb13417030085d9d19629e4df4a4492a7f36c9', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
427
+ }), onIonToastWillDismiss: this.dispatchCancelHandler }, h("div", { key: '29d99bb085ce1f000ce6fe6db207502dc020b55b', class: wrapperClass, part: "wrapper" }, h("div", { key: '915ea476bf2cf9bbbd1e555b016202de67150bb5', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: 'a07aae4c41aa8abf8f45186267b6c3aceb3cebed', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '4730a5b6b29a28be79649c0882092030f4656477', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
426
428
  }
427
429
  static get is() { return "ion-toast"; }
428
430
  static get encapsulation() { return "shadow"; }