@ionic/core 9.0.7-dev.11790887756.13f9320e → 9.0.7-nightly.20261002
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.
- package/components/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-app.js +1 -1
- package/components/ion-content.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-menu-toggle.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/p-BNnmwjuy.js +4 -0
- package/components/{p-4QPSgC9s.js → p-BinR4_P7.js} +1 -1
- package/components/p-BsLM9eQu.js +4 -0
- package/components/{p-DjbwrsJd.js → p-CQjNc-Pz.js} +1 -1
- package/components/{p-BHFF2Rku.js → p-CiXOsJF2.js} +1 -1
- package/components/{p-CZlKzXag.js → p-CvzE7FFp.js} +1 -1
- package/components/p-DGLuPe1e.js +4 -0
- package/components/{p-BRCkmCrc.js → p-DPyjiKOq.js} +1 -1
- package/components/{p-CB2RQcuo.js → p-PPagT42x.js} +1 -1
- package/components/p-WMQuK_Tj.js +4 -0
- package/components/p-q2WJ5Igc.js +4 -0
- package/css/core.css.map +1 -1
- package/css/display.css.map +1 -1
- package/css/flex-utils.css.map +1 -1
- package/css/float-elements.css +1 -1
- package/css/float-elements.css.map +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/padding.css.map +1 -1
- package/css/structure.css.map +1 -1
- package/css/text-alignment.css.map +1 -1
- package/css/text-transformation.css.map +1 -1
- package/css/typography.css.map +1 -1
- package/css/utils.bundle.css +1 -1
- package/css/utils.bundle.css.map +1 -1
- package/dist/cjs/{index-fm08amr6.js → index-CElfU-dK.js} +1 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +4 -5
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{overlays-CEt1Pxnd.js → overlays-C68wNDWY.js} +16 -75
- package/dist/collection/components/menu/menu.js +3 -4
- package/dist/collection/utils/hardware-back-button.js +12 -41
- package/dist/collection/utils/menu-controller/index.js +1 -2
- package/dist/collection/utils/overlays.js +4 -30
- package/dist/docs.json +1 -1
- package/dist/esm/{index-CzPyKjAQ.js → index-B9jhwvmO.js} +1 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-app_8.entry.js +2 -2
- package/dist/esm/ion-datetime.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +4 -5
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{overlays-D5W_ly69.js → overlays-BQnV0HAU.js} +17 -74
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-5112a8ba.entry.js → p-24b0a961.entry.js} +1 -1
- package/dist/ionic/{p-d0451c11.entry.js → p-30dcf43b.entry.js} +1 -1
- package/dist/ionic/{p-0111c108.entry.js → p-3a5faaa8.entry.js} +1 -1
- package/dist/ionic/{p-8a00d904.entry.js → p-3bd7e5df.entry.js} +1 -1
- package/dist/ionic/{p-22160ced.entry.js → p-636349e2.entry.js} +1 -1
- package/dist/ionic/{p-ffd45970.entry.js → p-7441ed2b.entry.js} +1 -1
- package/dist/ionic/{p-e063a7bf.entry.js → p-76309bab.entry.js} +1 -1
- package/dist/ionic/p-83448626.entry.js +4 -0
- package/dist/ionic/p-Ba6ZV-qU.js +4 -0
- package/dist/ionic/p-DZUqAr_6.js +4 -0
- package/dist/ionic/{p-ff664022.entry.js → p-b1164028.entry.js} +1 -1
- package/dist/ionic/{p-b798b4ec.entry.js → p-efa00ce5.entry.js} +1 -1
- package/dist/ionic/{p-5edc856b.entry.js → p-f9057f70.entry.js} +1 -1
- package/dist/types/utils/config.d.ts +1 -4
- package/dist/types/utils/hardware-back-button.d.ts +0 -11
- package/dist/types/utils/overlays.d.ts +2 -5
- package/hydrate/index.js +5 -13
- package/hydrate/index.mjs +5 -13
- package/package.json +1 -1
- package/components/p-BsOZAFNI.js +0 -4
- package/components/p-CArDvZQz.js +0 -4
- package/components/p-CKtw0kcb.js +0 -4
- package/components/p-CgwJ4NuD.js +0 -4
- package/components/p-vg8joG77.js +0 -4
- package/dist/ionic/p-C036rEeA.js +0 -4
- package/dist/ionic/p-OJpZr8fg.js +0 -4
- package/dist/ionic/p-b3346b86.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{a as t,r as o,d as a,i,c as e,h as n,f as s,g as r}from"./p-D9OR05yj.js";import{E as d}from"./p-DWCzVL3Y.js";import{w as l,g as p,r as c}from"./p-B4xjg_Qu.js";import{c as h}from"./p-B-hirT0v.js";import{O as m,c as b,d as u,i as g,h as f,k as x,e as w,f as v,g as y,s as k,G as $}from"./p-C036rEeA.js";import{s as T}from"./p-BhMQahM6.js";import{c as D,g as j}from"./p-byZM6qHV.js";import{b as z}from"./p-CrAPHbJ3.js";import{c as Y}from"./p-B4wzg4z4.js";import{createGesture as C}from"./p-D0YpjgON.js";import"./p-Dojwmvde.js";import"./p-B4ELlbJE.js";import"./p-B_gJaBk0.js";const M=(t,o)=>Math.floor(t/2-o/2),B=(t,o)=>{const a=Y(),i=Y(),{position:e,top:n,bottom:s}=o,r=p(t).querySelector(".toast-wrapper");switch(i.addElement(r),e){case"top":i.fromTo("transform","translateY(-100%)",`translateY(${n})`);break;case"middle":const o=M(t.clientHeight,r.clientHeight);r.style.top=`${o}px`,i.fromTo("opacity",.01,1);break;default:i.fromTo("transform","translateY(100%)",`translateY(${s})`)}return a.easing("cubic-bezier(.155,1.105,.295,1.12)").duration(400).addAnimation(i)},E=(t,o)=>{const a=Y(),i=Y(),{position:e,top:n,bottom:s}=o,r=p(t).querySelector(".toast-wrapper");switch(i.addElement(r),e){case"top":i.fromTo("transform",`translateY(${n})`,"translateY(-100%)");break;case"middle":i.fromTo("opacity",.99,0);break;default:i.fromTo("transform",`translateY(${s})`,"translateY(100%)")}return a.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(i)},H=(t,o)=>{const a=Y(),i=Y(),{position:e,top:n,bottom:s}=o,r=p(t).querySelector(".toast-wrapper");switch(i.addElement(r),e){case"top":r.style.setProperty("transform",`translateY(${n})`),i.fromTo("opacity",.01,1);break;case"middle":const o=M(t.clientHeight,r.clientHeight);r.style.top=`${o}px`,i.fromTo("opacity",.01,1);break;default:r.style.setProperty("transform",`translateY(${s})`),i.fromTo("opacity",.01,1)}return a.easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation(i)},L=t=>{const o=Y(),a=Y(),i=p(t).querySelector(".toast-wrapper");return a.addElement(i).fromTo("opacity",.99,0),o.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(a)},P=class{constructor(t){o(this,t),this.didPresent=a(this,"ionToastDidPresent",7),this.willPresent=a(this,"ionToastWillPresent",7),this.willDismiss=a(this,"ionToastWillDismiss",7),this.didDismiss=a(this,"ionToastDidDismiss",7),this.didPresentShorthand=a(this,"didPresent",7),this.willPresentShorthand=a(this,"willPresent",7),this.willDismissShorthand=a(this,"willDismiss",7),this.didDismissShorthand=a(this,"didDismiss",7),this.delegateController=b(this),this.lockController=h(),this.triggerController=u(),this.customHTMLEnabled=i.get("innerHTMLTemplatesEnabled",d),this.presented=!1,this.revealContentToScreenReader=!1,this.hasController=!1,this.duration=i.getNumber("toastDuration",0),this.layout="baseline",this.keyboardClose=!1,this.position="bottom",this.translucent=!1,this.animated=!0,this.isOpen=!1,this.dispatchCancelHandler=t=>{if(g(t.detail.role)){const t=this.getButtons().find((t=>"cancel"===t.role));this.callButtonHandler(t)}},this.createSwipeGesture=t=>{const o=this.gesture=((t,o,a)=>{const i=p(t).querySelector(".toast-wrapper"),e=t.clientHeight,n=i.getBoundingClientRect();let s=0;const r="middle"===t.position?.5:0,d="top"===t.position?-1:1,l=M(e,n.height),c=[{offset:0,transform:`translateY(-${l+n.height}px)`},{offset:.5,transform:"translateY(0px)"},{offset:1,transform:`translateY(${l+n.height}px)`}],h=Y("toast-swipe-to-dismiss-animation").addElement(i).duration(100);switch(t.position){case"middle":s=e+n.height,h.keyframes(c),h.progressStart(!0,.5);break;case"top":s=n.bottom,h.keyframes([{offset:0,transform:`translateY(${o.top})`},{offset:1,transform:"translateY(-100%)"}]),h.progressStart(!0,0);break;default:s=e-n.top,h.keyframes([{offset:0,transform:`translateY(${o.bottom})`},{offset:1,transform:"translateY(100%)"}]),h.progressStart(!0,0)}const b=t=>t*d/s,u=C({el:i,gestureName:"toast-swipe-to-dismiss",gesturePriority:m,direction:"y",onMove:t=>{const o=r+b(t.deltaY);h.progressStep(o)},onEnd:o=>{const e=o.velocityY,n=(o.deltaY+1e3*e)/s*d;u.enable(!1);let r=!0,p=1,m=0,g=0;if("middle"===t.position){r=n>=.25||n<=-.25,p=1,m=0;const t=i.getBoundingClientRect(),a=t.top-l,e=(l+t.height)*(o.deltaY<=0?-1:1);h.keyframes([{offset:0,transform:`translateY(${a}px)`},{offset:1,transform:`translateY(${r?`${e}px`:"0px"})`}]),g=e-a}else r=n>=.5,p=r?1:0,m=b(o.deltaY),g=(r?1-m:m)*s;const f=Math.min(Math.abs(g)/Math.abs(e),200);h.onFinish((()=>{r?(a(),h.destroy()):("middle"===t.position?h.keyframes(c).progressStart(!0,.5):h.progressStart(!0,0),u.enable(!0))}),{oneTimeCallback:!0}).progressEnd(p,m,f)}});return u})(this.el,t,(()=>{this.dismiss(void 0,$)}));o.enable(!0)},this.destroySwipeGesture=()=>{const{gesture:t}=this;void 0!==t&&(t.destroy(),this.gesture=void 0)},this.prefersSwipeGesture=()=>{const{swipeGesture:t}=this;return"vertical"===t}}swipeGestureChanged(){this.destroySwipeGesture(),this.presented&&this.prefersSwipeGesture()&&this.createSwipeGesture(this.lastPresentedPosition)}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:a}=this;t&&a.addClickListener(o,t)}connectedCallback(){f(this.el),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){this.htmlAttributes?.id||x(this.el)}componentDidLoad(){!0===this.isOpen&&c((()=>this.present())),this.triggerChanged()}async present(){const o=await this.lockController.lock();await this.delegateController.attachViewToDom();const{el:a,position:i}=this,e=function(o,a,i,e){let n;if(n="md"===i?"top"===o?8:-8:"top"===o?10:-10,a&&l){!function(o,a){null===o.offsetParent&&t("[ion-toast] - The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.",a)}(a,e);const i=a.getBoundingClientRect();return"top"===o?n+=i.bottom:"bottom"===o&&(n-=l.innerHeight-i.top),{top:`${n}px`,bottom:`${n}px`}}return{top:`calc(${n}px + var(--ion-safe-area-top, 0px))`,bottom:`calc(${n}px - var(--ion-safe-area-bottom, 0px))`}}(i,this.getAnchorElement(),z(this),a);this.lastPresentedPosition=e,await w(this,"toastEnter",B,H,{position:i,top:e.top,bottom:e.bottom}),this.revealContentToScreenReader=!0,this.duration>0&&(this.durationTimeout=setTimeout((()=>this.dismiss(void 0,"timeout")),this.duration)),this.prefersSwipeGesture()&&this.createSwipeGesture(e),o()}async dismiss(t,o){const a=await this.lockController.lock(),{durationTimeout:i,position:e,lastPresentedPosition:n}=this;i&&clearTimeout(i);const s=await v(this,t,o,"toastLeave",E,L,{position:e,top:n?.top??"",bottom:n?.bottom??""});return s&&(this.delegateController.removeViewFromDom(),this.revealContentToScreenReader=!1),this.lastPresentedPosition=void 0,this.destroySwipeGesture(),a(),s}onDidDismiss(){return y(this.el,"ionToastDidDismiss")}onWillDismiss(){return y(this.el,"ionToastWillDismiss")}getButtons(){return this.buttons?this.buttons.map((t=>"string"==typeof t?{text:t}:t)):[]}getAnchorElement(){const{position:o,positionAnchor:a,el:i}=this;if(void 0!==a)if("middle"!==o||void 0===a){if("string"==typeof a){const o=document.getElementById(a);return null===o?void t(`[ion-toast] - An anchor element with an ID of "${a}" was not found in the DOM.`,i):o}if(a instanceof HTMLElement)return a;t("[ion-toast] - Invalid positionAnchor value:",a,i)}else t('[ion-toast] - The positionAnchor property is ignored when using position="middle".',this.el)}async buttonClick(t){const o=t.role;return g(o)||await this.callButtonHandler(t)?this.dismiss(void 0,o):Promise.resolve()}async callButtonHandler(t){if(t?.handler)try{if(!1===await k(t.handler))return!1}catch(t){e("[ion-toast] - Exception in callButtonHandler:",t)}return!0}renderButtons(t,o){if(0===t.length)return;const a=z(this);return n("div",{class:{"toast-button-group":!0,[`toast-button-group-${o}`]:!0}},t.map((t=>n("button",{...t.htmlAttributes,type:"button",class:A(t),tabIndex:0,onClick:()=>this.buttonClick(t),part:O(t)},n("div",{class:"toast-button-inner"},t.icon&&n("ion-icon",{"aria-hidden":"true",icon:t.icon,slot:void 0===t.text?"icon-only":void 0,class:"toast-button-icon"}),t.text),"md"===a&&n("ion-ripple-effect",{type:void 0!==t.icon&&void 0===t.text?"unbounded":"bounded"})))))}renderToastMessage(t,o=null){const{customHTMLEnabled:a,message:i}=this;return a?n("div",{key:t,"aria-hidden":o,class:"toast-message",part:"message",innerHTML:T(i)}):n("div",{key:t,"aria-hidden":o,class:"toast-message",part:"message"},i)}renderHeader(t,o=null){return n("div",{key:t,class:"toast-header","aria-hidden":o,part:"header"},this.header)}render(){const{layout:o,el:a,revealContentToScreenReader:i,header:e,message:r}=this,d=this.getButtons(),l=d.filter((t=>"start"===t.side)),p=d.filter((t=>"start"!==t.side)),c=z(this),h={"toast-wrapper":!0,[`toast-${this.position}`]:!0,[`toast-layout-${o}`]:!0};return"stacked"===o&&l.length>0&&p.length>0&&t("[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.",a),n(s,{key:"15d2ff8b689e40bb5cae3e304448dadf91b11b88",tabindex:"-1",...this.htmlAttributes,style:{zIndex:`${6e4+this.overlayIndex}`},class:D(this.color,{[c]:!0,...j(this.cssClass),"overlay-hidden":!0,"toast-translucent":this.translucent}),onIonToastWillDismiss:this.dispatchCancelHandler},n("div",{key:"d26cc17a59e3d81810e22ee422398f2cc4c7a05c",class:h,part:"wrapper"},n("div",{key:"f15e1a97f13defcbf96612df4c7ba45999e6244d",class:"toast-container",part:"container"},this.renderButtons(l,"start"),void 0!==this.icon&&n("ion-icon",{key:"639cacec828f969673071e54dc68284050e9f2fd",class:"toast-icon",part:"icon",icon:this.icon,lazy:!1,"aria-hidden":"true"}),n("div",{key:"a07e68cf68e4c507e4515de1a4b43dd8fb3541d3",class:"toast-content",part:"content",role:"status","aria-atomic":"true","aria-live":"polite"},!i&&void 0!==e&&this.renderHeader("oldHeader","true"),!i&&void 0!==r&&this.renderToastMessage("oldMessage","true"),i&&void 0!==e&&this.renderHeader("header"),i&&void 0!==r&&this.renderToastMessage("header")),this.renderButtons(p,"end"))))}get el(){return r(this)}static get watchers(){return{swipeGesture:[{swipeGestureChanged:0}],isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}]}}},A=t=>({"toast-button":!0,"toast-button-icon-only":void 0!==t.icon&&void 0===t.text,[`toast-button-${t.role}`]:void 0!==t.role,"ion-focusable":!0,"ion-activatable":!0}),O=t=>g(t.role)?"button cancel":"button";P.style={ios:":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host{inset-inline-start:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);pointer-events:auto}.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{-ms-flex:1;flex:1;min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-radius:14px;--button-color:var(--ion-color-primary, #0054e9);--color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--max-width:700px;--max-height:478px;--start:10px;--end:10px;font-size:clamp(14px, 0.875rem, 43.4px)}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}:host(.ion-color.toast-translucent) .toast-wrapper{background:rgba(var(--ion-color-base-rgb), 0.8)}}.toast-wrapper.toast-middle{opacity:0.01}.toast-content{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;min-height:44px;-webkit-transition:background-color, opacity 100ms linear;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:clamp(17px, 1.0625rem, 21.998px);font-weight:500;overflow:hidden}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}",md:":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host{inset-inline-start:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);pointer-events:auto}.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{-ms-flex:1;flex:1;min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-800, var(--ion-background-color-step-800, #333333));--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #0054e9);--color:var(--ion-color-step-50, var(--ion-text-color-step-950, #f2f2f2));--max-width:700px;--start:8px;--end:8px;font-size:0.875rem}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}.toast-content{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}.toast-header{margin-bottom:2px;font-weight:500;line-height:1.25rem}.toast-message{line-height:1.25rem}.toast-layout-baseline .toast-button-group-start{-webkit-margin-start:8px;margin-inline-start:8px}.toast-layout-stacked .toast-button-group-start{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}.toast-layout-baseline .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px}.toast-layout-stacked .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:0.875rem;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}.toast-button-cancel{color:var(--ion-color-step-100, var(--ion-text-color-step-900, #e6e6e6))}.toast-button-icon-only{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}"};export{P as ion_toast}
|
|
4
|
+
import{a as t,r as o,d as a,i,c as e,h as n,f as s,g as r}from"./p-D9OR05yj.js";import{E as d}from"./p-DWCzVL3Y.js";import{w as l,g as p,r as c}from"./p-B4xjg_Qu.js";import{c as h}from"./p-B-hirT0v.js";import{O as m,c as b,d as u,i as g,h as f,k as x,e as w,f as v,g as y,s as k,G as $}from"./p-DZUqAr_6.js";import{s as D}from"./p-BhMQahM6.js";import{c as T,g as j}from"./p-byZM6qHV.js";import{b as z}from"./p-CrAPHbJ3.js";import{c as Y}from"./p-B4wzg4z4.js";import{createGesture as M}from"./p-D0YpjgON.js";import"./p-Dojwmvde.js";import"./p-B4ELlbJE.js";import"./p-B_gJaBk0.js";const C=(t,o)=>Math.floor(t/2-o/2),B=(t,o)=>{const a=Y(),i=Y(),{position:e,top:n,bottom:s}=o,r=p(t).querySelector(".toast-wrapper");switch(i.addElement(r),e){case"top":i.fromTo("transform","translateY(-100%)",`translateY(${n})`);break;case"middle":const o=C(t.clientHeight,r.clientHeight);r.style.top=`${o}px`,i.fromTo("opacity",.01,1);break;default:i.fromTo("transform","translateY(100%)",`translateY(${s})`)}return a.easing("cubic-bezier(.155,1.105,.295,1.12)").duration(400).addAnimation(i)},E=(t,o)=>{const a=Y(),i=Y(),{position:e,top:n,bottom:s}=o,r=p(t).querySelector(".toast-wrapper");switch(i.addElement(r),e){case"top":i.fromTo("transform",`translateY(${n})`,"translateY(-100%)");break;case"middle":i.fromTo("opacity",.99,0);break;default:i.fromTo("transform",`translateY(${s})`,"translateY(100%)")}return a.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(i)},H=(t,o)=>{const a=Y(),i=Y(),{position:e,top:n,bottom:s}=o,r=p(t).querySelector(".toast-wrapper");switch(i.addElement(r),e){case"top":r.style.setProperty("transform",`translateY(${n})`),i.fromTo("opacity",.01,1);break;case"middle":const o=C(t.clientHeight,r.clientHeight);r.style.top=`${o}px`,i.fromTo("opacity",.01,1);break;default:r.style.setProperty("transform",`translateY(${s})`),i.fromTo("opacity",.01,1)}return a.easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation(i)},L=t=>{const o=Y(),a=Y(),i=p(t).querySelector(".toast-wrapper");return a.addElement(i).fromTo("opacity",.99,0),o.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(a)},P=class{constructor(t){o(this,t),this.didPresent=a(this,"ionToastDidPresent",7),this.willPresent=a(this,"ionToastWillPresent",7),this.willDismiss=a(this,"ionToastWillDismiss",7),this.didDismiss=a(this,"ionToastDidDismiss",7),this.didPresentShorthand=a(this,"didPresent",7),this.willPresentShorthand=a(this,"willPresent",7),this.willDismissShorthand=a(this,"willDismiss",7),this.didDismissShorthand=a(this,"didDismiss",7),this.delegateController=b(this),this.lockController=h(),this.triggerController=u(),this.customHTMLEnabled=i.get("innerHTMLTemplatesEnabled",d),this.presented=!1,this.revealContentToScreenReader=!1,this.hasController=!1,this.duration=i.getNumber("toastDuration",0),this.layout="baseline",this.keyboardClose=!1,this.position="bottom",this.translucent=!1,this.animated=!0,this.isOpen=!1,this.dispatchCancelHandler=t=>{if(g(t.detail.role)){const t=this.getButtons().find((t=>"cancel"===t.role));this.callButtonHandler(t)}},this.createSwipeGesture=t=>{const o=this.gesture=((t,o,a)=>{const i=p(t).querySelector(".toast-wrapper"),e=t.clientHeight,n=i.getBoundingClientRect();let s=0;const r="middle"===t.position?.5:0,d="top"===t.position?-1:1,l=C(e,n.height),c=[{offset:0,transform:`translateY(-${l+n.height}px)`},{offset:.5,transform:"translateY(0px)"},{offset:1,transform:`translateY(${l+n.height}px)`}],h=Y("toast-swipe-to-dismiss-animation").addElement(i).duration(100);switch(t.position){case"middle":s=e+n.height,h.keyframes(c),h.progressStart(!0,.5);break;case"top":s=n.bottom,h.keyframes([{offset:0,transform:`translateY(${o.top})`},{offset:1,transform:"translateY(-100%)"}]),h.progressStart(!0,0);break;default:s=e-n.top,h.keyframes([{offset:0,transform:`translateY(${o.bottom})`},{offset:1,transform:"translateY(100%)"}]),h.progressStart(!0,0)}const b=t=>t*d/s,u=M({el:i,gestureName:"toast-swipe-to-dismiss",gesturePriority:m,direction:"y",onMove:t=>{const o=r+b(t.deltaY);h.progressStep(o)},onEnd:o=>{const e=o.velocityY,n=(o.deltaY+1e3*e)/s*d;u.enable(!1);let r=!0,p=1,m=0,g=0;if("middle"===t.position){r=n>=.25||n<=-.25,p=1,m=0;const t=i.getBoundingClientRect(),a=t.top-l,e=(l+t.height)*(o.deltaY<=0?-1:1);h.keyframes([{offset:0,transform:`translateY(${a}px)`},{offset:1,transform:`translateY(${r?`${e}px`:"0px"})`}]),g=e-a}else r=n>=.5,p=r?1:0,m=b(o.deltaY),g=(r?1-m:m)*s;const f=Math.min(Math.abs(g)/Math.abs(e),200);h.onFinish((()=>{r?(a(),h.destroy()):("middle"===t.position?h.keyframes(c).progressStart(!0,.5):h.progressStart(!0,0),u.enable(!0))}),{oneTimeCallback:!0}).progressEnd(p,m,f)}});return u})(this.el,t,(()=>{this.dismiss(void 0,$)}));o.enable(!0)},this.destroySwipeGesture=()=>{const{gesture:t}=this;void 0!==t&&(t.destroy(),this.gesture=void 0)},this.prefersSwipeGesture=()=>{const{swipeGesture:t}=this;return"vertical"===t}}swipeGestureChanged(){this.destroySwipeGesture(),this.presented&&this.prefersSwipeGesture()&&this.createSwipeGesture(this.lastPresentedPosition)}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:a}=this;t&&a.addClickListener(o,t)}connectedCallback(){f(this.el),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){this.htmlAttributes?.id||x(this.el)}componentDidLoad(){!0===this.isOpen&&c((()=>this.present())),this.triggerChanged()}async present(){const o=await this.lockController.lock();await this.delegateController.attachViewToDom();const{el:a,position:i}=this,e=function(o,a,i,e){let n;if(n="md"===i?"top"===o?8:-8:"top"===o?10:-10,a&&l){!function(o,a){null===o.offsetParent&&t("[ion-toast] - The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.",a)}(a,e);const i=a.getBoundingClientRect();return"top"===o?n+=i.bottom:"bottom"===o&&(n-=l.innerHeight-i.top),{top:`${n}px`,bottom:`${n}px`}}return{top:`calc(${n}px + var(--ion-safe-area-top, 0px))`,bottom:`calc(${n}px - var(--ion-safe-area-bottom, 0px))`}}(i,this.getAnchorElement(),z(this),a);this.lastPresentedPosition=e,await w(this,"toastEnter",B,H,{position:i,top:e.top,bottom:e.bottom}),this.revealContentToScreenReader=!0,this.duration>0&&(this.durationTimeout=setTimeout((()=>this.dismiss(void 0,"timeout")),this.duration)),this.prefersSwipeGesture()&&this.createSwipeGesture(e),o()}async dismiss(t,o){const a=await this.lockController.lock(),{durationTimeout:i,position:e,lastPresentedPosition:n}=this;i&&clearTimeout(i);const s=await v(this,t,o,"toastLeave",E,L,{position:e,top:n?.top??"",bottom:n?.bottom??""});return s&&(this.delegateController.removeViewFromDom(),this.revealContentToScreenReader=!1),this.lastPresentedPosition=void 0,this.destroySwipeGesture(),a(),s}onDidDismiss(){return y(this.el,"ionToastDidDismiss")}onWillDismiss(){return y(this.el,"ionToastWillDismiss")}getButtons(){return this.buttons?this.buttons.map((t=>"string"==typeof t?{text:t}:t)):[]}getAnchorElement(){const{position:o,positionAnchor:a,el:i}=this;if(void 0!==a)if("middle"!==o||void 0===a){if("string"==typeof a){const o=document.getElementById(a);return null===o?void t(`[ion-toast] - An anchor element with an ID of "${a}" was not found in the DOM.`,i):o}if(a instanceof HTMLElement)return a;t("[ion-toast] - Invalid positionAnchor value:",a,i)}else t('[ion-toast] - The positionAnchor property is ignored when using position="middle".',this.el)}async buttonClick(t){const o=t.role;return g(o)||await this.callButtonHandler(t)?this.dismiss(void 0,o):Promise.resolve()}async callButtonHandler(t){if(t?.handler)try{if(!1===await k(t.handler))return!1}catch(t){e("[ion-toast] - Exception in callButtonHandler:",t)}return!0}renderButtons(t,o){if(0===t.length)return;const a=z(this);return n("div",{class:{"toast-button-group":!0,[`toast-button-group-${o}`]:!0}},t.map((t=>n("button",{...t.htmlAttributes,type:"button",class:A(t),tabIndex:0,onClick:()=>this.buttonClick(t),part:O(t)},n("div",{class:"toast-button-inner"},t.icon&&n("ion-icon",{"aria-hidden":"true",icon:t.icon,slot:void 0===t.text?"icon-only":void 0,class:"toast-button-icon"}),t.text),"md"===a&&n("ion-ripple-effect",{type:void 0!==t.icon&&void 0===t.text?"unbounded":"bounded"})))))}renderToastMessage(t,o=null){const{customHTMLEnabled:a,message:i}=this;return a?n("div",{key:t,"aria-hidden":o,class:"toast-message",part:"message",innerHTML:D(i)}):n("div",{key:t,"aria-hidden":o,class:"toast-message",part:"message"},i)}renderHeader(t,o=null){return n("div",{key:t,class:"toast-header","aria-hidden":o,part:"header"},this.header)}render(){const{layout:o,el:a,revealContentToScreenReader:i,header:e,message:r}=this,d=this.getButtons(),l=d.filter((t=>"start"===t.side)),p=d.filter((t=>"start"!==t.side)),c=z(this),h={"toast-wrapper":!0,[`toast-${this.position}`]:!0,[`toast-layout-${o}`]:!0};return"stacked"===o&&l.length>0&&p.length>0&&t("[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.",a),n(s,{key:"15d2ff8b689e40bb5cae3e304448dadf91b11b88",tabindex:"-1",...this.htmlAttributes,style:{zIndex:`${6e4+this.overlayIndex}`},class:T(this.color,{[c]:!0,...j(this.cssClass),"overlay-hidden":!0,"toast-translucent":this.translucent}),onIonToastWillDismiss:this.dispatchCancelHandler},n("div",{key:"d26cc17a59e3d81810e22ee422398f2cc4c7a05c",class:h,part:"wrapper"},n("div",{key:"f15e1a97f13defcbf96612df4c7ba45999e6244d",class:"toast-container",part:"container"},this.renderButtons(l,"start"),void 0!==this.icon&&n("ion-icon",{key:"639cacec828f969673071e54dc68284050e9f2fd",class:"toast-icon",part:"icon",icon:this.icon,lazy:!1,"aria-hidden":"true"}),n("div",{key:"a07e68cf68e4c507e4515de1a4b43dd8fb3541d3",class:"toast-content",part:"content",role:"status","aria-atomic":"true","aria-live":"polite"},!i&&void 0!==e&&this.renderHeader("oldHeader","true"),!i&&void 0!==r&&this.renderToastMessage("oldMessage","true"),i&&void 0!==e&&this.renderHeader("header"),i&&void 0!==r&&this.renderToastMessage("header")),this.renderButtons(p,"end"))))}get el(){return r(this)}static get watchers(){return{swipeGesture:[{swipeGestureChanged:0}],isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}]}}},A=t=>({"toast-button":!0,"toast-button-icon-only":void 0!==t.icon&&void 0===t.text,[`toast-button-${t.role}`]:void 0!==t.role,"ion-focusable":!0,"ion-activatable":!0}),O=t=>g(t.role)?"button cancel":"button";P.style={ios:":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host{inset-inline-start:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);pointer-events:auto}.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{-ms-flex:1;flex:1;min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-radius:14px;--button-color:var(--ion-color-primary, #0054e9);--color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--max-width:700px;--max-height:478px;--start:10px;--end:10px;font-size:clamp(14px, 0.875rem, 43.4px)}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}:host(.ion-color.toast-translucent) .toast-wrapper{background:rgba(var(--ion-color-base-rgb), 0.8)}}.toast-wrapper.toast-middle{opacity:0.01}.toast-content{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;min-height:44px;-webkit-transition:background-color, opacity 100ms linear;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:clamp(17px, 1.0625rem, 21.998px);font-weight:500;overflow:hidden}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}",md:":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host{inset-inline-start:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);pointer-events:auto}.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{-ms-flex:1;flex:1;min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-800, var(--ion-background-color-step-800, #333333));--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #0054e9);--color:var(--ion-color-step-50, var(--ion-text-color-step-950, #f2f2f2));--max-width:700px;--start:8px;--end:8px;font-size:0.875rem}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}.toast-content{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}.toast-header{margin-bottom:2px;font-weight:500;line-height:1.25rem}.toast-message{line-height:1.25rem}.toast-layout-baseline .toast-button-group-start{-webkit-margin-start:8px;margin-inline-start:8px}.toast-layout-stacked .toast-button-group-start{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}.toast-layout-baseline .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px}.toast-layout-stacked .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:0.875rem;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}.toast-button-cancel{color:var(--ion-color-step-100, var(--ion-text-color-step-900, #e6e6e6))}.toast-button-icon-only{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}"};export{P as ion_toast}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,d as i,a as o,w as a,i as e,h as s,f as r,g as n}from"./p-D9OR05yj.js";import{i as d,f as h,a as l,d as p,r as c,b as m,p as f}from"./p-DNxEB9-T.js";import{C as u,a as b,d as x}from"./p-B4ELlbJE.js";import{w as v,o as w,g,e as y,r as k,b as A,h as Y}from"./p-B4xjg_Qu.js";import{c as D}from"./p-B-hirT0v.js";import{g as E}from"./p-D5akOqD0.js";import{G as S,O,F as M,n as T,d as C,B,h as P,r as N,j as I,k as j,e as R,f as $,g as L}from"./p-C036rEeA.js";import{g as z}from"./p-byZM6qHV.js";import{e as F,w as H}from"./p-PkaVMJga.js";import{b as W}from"./p-CrAPHbJ3.js";import{KEYBOARD_DID_OPEN as V}from"./p-CgQdInM0.js";import{c as _}from"./p-B4wzg4z4.js";import{g as K}from"./p-hHmYLOfE.js";import{createGesture as Z}from"./p-D0YpjgON.js";import"./p-Dojwmvde.js";import"./p-B_gJaBk0.js";import"./p-DxvRP6ld.js";var J;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(J||(J={}));const G={getEngine(){const t=E();if(t?.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const i=this.getEngine();i&&i.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return J.Default;const{style:i}=await t.getInfo();return i}},U=(t,i)=>{if(1===i)return 0;const o=1/(1-i);return t*o+-i*o},q=()=>{!v||v.innerWidth>=768||G.setStyle({style:J.Dark})},Q=(t=J.Default)=>{!v||v.innerWidth>=768||G.setStyle({style:t})},X=t=>{const i=d(t)?g(t).querySelector(".inner-scroll"):t;return!h(t)&&0===i.scrollTop},tt=async(t,i)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,S)&&(i.isRunning()?i.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},it=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,ot=.915,at=(t,i)=>y(400,t/Math.abs(1.1*i),500),et=(t,i)=>{const o=window.innerHeight,a=t.getBoundingClientRect().top,e=Math.round(1e3*(1-i/(o-a)))/1e3;return Math.max(0,Math.min(1,e))},st=t=>{const{currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:a}=t,e=void 0===o||o<i,s=e?`calc(var(--backdrop-opacity) * ${i})`:"0",r=_("backdropAnimation").fromTo("opacity",0,s);return e&&r.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:_("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*i}%)`}]),backdropAnimation:r,contentAnimation:a?void 0:_("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-i)+"%"},{offset:1,opacity:1,maxHeight:100*i+"%"}])}},rt=t=>{const{currentBreakpoint:i,backdropBreakpoint:o}=t,a=`calc(var(--backdrop-opacity) * ${U(i,o)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],s=[{offset:0,opacity:a},{offset:o,opacity:0},{offset:1,opacity:0}],r=_("backdropAnimation").keyframes(0!==o?s:e);return{wrapperAnimation:_("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*i}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:r}},nt=(t,i)=>{const{presentingEl:o,currentBreakpoint:a,expandToScroll:e}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n,contentAnimation:d}=void 0!==a?st(i):{backdropAnimation:_().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:_().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&d?.addElement(t.querySelector(".ion-page"));const h=_("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([r]);if(d&&h.addAnimation(d),o){const t=window.innerWidth<768,i="ION-MODAL"===o.tagName&&void 0!==o.presentingElement,a=g(o),e=_().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${i?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>s.style.setProperty("background-color","black"))).addElement(o).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),h.addAnimation(e)}else if(h.addAnimation(n),i){const t=`translateY(-10px) scale(${i?ot:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const o=_().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([e,o])}else r.fromTo("opacity","0","1")}else h.addAnimation(n);return h},dt=(t,i,o=500)=>{const{presentingEl:a,currentBreakpoint:e}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n}=void 0!==e?rt(i):{backdropAnimation:_().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:_().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=_("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o).addAnimation(r);if(a){const t=window.innerWidth<768,i="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,o=g(a),e=_().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(s.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&s.style.setProperty("background-color",""))})),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",o=`translateY(${i?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:o,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(e)}else if(d.addAnimation(n),i){const t=`translateY(-10px) scale(${i?ot:1})`;e.addElement(o.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=_().addElement(o.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([e,a])}else r.fromTo("opacity","1","0")}else d.addAnimation(n);return d},ht=(t,i)=>{const{currentBreakpoint:o,expandToScroll:a}=i,e=g(t),{wrapperAnimation:s,backdropAnimation:r,contentAnimation:n}=void 0!==o?st(i):{backdropAnimation:_().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:_().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};r.addElement(e.querySelector("ion-backdrop")),s.addElement(e.querySelector(".modal-wrapper")),!a&&n?.addElement(t.querySelector(".ion-page"));const d=_().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([r,s]);return n&&d.addAnimation(n),d},lt=(t,i)=>{const{currentBreakpoint:o}=i,a=g(t),{wrapperAnimation:e,backdropAnimation:s}=void 0!==o?rt(i):{backdropAnimation:_().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:_().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return s.addElement(a.querySelector("ion-backdrop")),e.addElement(a.querySelector(".modal-wrapper")),_().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([s,e])};let pt=null,ct=!1;const mt=()=>{if(null!==pt)return pt;const t=v?.document;if(!t?.body)return 0;const i=t.createElement("div");i.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);",t.body.appendChild(i);const o=parseFloat(getComputedStyle(i).paddingTop)||0;return i.remove(),pt=o,ct||(ct=!0,k((()=>{pt=null,ct=!1}))),o},ft=t=>{const i=getComputedStyle(t),o=T(i.getPropertyValue("--width")),a=T(i.getPropertyValue("--height"));return"fullscreen"===o&&"fullscreen"===a?{vertical:!0,horizontal:!0}:ut(t)},ut=t=>{const i=t.shadowRoot?.querySelector(".modal-wrapper");if(null==i||void 0===v)return{vertical:!1,horizontal:!1};const o=t.classList.contains("overlay-hidden");o&&t.classList.remove("overlay-hidden");const{width:a,height:e}=i.getBoundingClientRect();return o&&t.classList.add("overlay-hidden"),{vertical:e>=v.innerHeight-5,horizontal:a>=v.innerWidth-5}},bt=(t,i)=>{t.style.setProperty("--ion-safe-area-top",i.top),t.style.setProperty("--ion-safe-area-bottom",i.bottom),t.style.setProperty("--ion-safe-area-left",i.left),t.style.setProperty("--ion-safe-area-right",i.right)},xt=class{constructor(o){t(this,o),this.didPresent=i(this,"ionModalDidPresent",7),this.willPresent=i(this,"ionModalWillPresent",7),this.willDismiss=i(this,"ionModalWillDismiss",7),this.didDismiss=i(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=i(this,"ionBreakpointDidChange",7),this.didPresentShorthand=i(this,"didPresent",7),this.willPresentShorthand=i(this,"willPresent",7),this.willDismissShorthand=i(this,"willDismiss",7),this.didDismissShorthand=i(this,"didDismiss",7),this.ionMount=i(this,"ionMount",7),this.ionDragStart=i(this,"ionDragStart",7),this.ionDragMove=i(this,"ionDragMove",7),this.ionDragEnd=i(this,"ionDragEnd",7),this.lockController=D(),this.triggerController=C(),this.coreDelegate=u(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.isPresenting=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="cycle",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:i}=this;"cycle"===i&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,B)},this.onLifecycle=t=>{const i=this.usersElement,o=vt[t.type];if(i&&o){const a=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});i.dispatchEvent(a)}},this.onModalFocus=t=>{const{dragHandleEl:i,el:o}=this;t.target===o&&null==o.shadowRoot?.activeElement&&i&&-1!==i.tabIndex&&i.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,i){!0===t&&!1===i?this.present():!1===t&&!0===i&&this.dismiss()}triggerChanged(){const{trigger:t,el:i,triggerController:o}=this;t&&o.addClickListener(i,t)}onWindowResize(){this.presented&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{const t=this.getSafeAreaContext();if(!t.isCardModal||this.enterAnimation||this.leaveAnimation||this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),!t.isSheetModal&&!t.isCardModal){this.updateSafeAreaOverrides();const{contentEl:t,hasFooter:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(t),this.applyFullscreenSafeAreaTo(t,i)}}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,i)=>t-i)))}connectedCallback(){const{el:t}=this;P(t),this.triggerChanged(),(this.presented||this.isPresenting)&&this.restoreSafeAreaOverrides(),this.presented&&(N(t),this.initParentRemovalObserver())}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.presented&&I()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:i,el:a,htmlAttributes:e}=this,s=this.isSheetModal=void 0!==t&&void 0!==i,r=["aria-label","role"];this.inheritedAttributes=A(a,r),a.parentNode&&(this.cachedOriginalParent=a.parentNode),void 0!==e&&r.forEach((t=>{e[t]&&(this.inheritedAttributes={...this.inheritedAttributes,[t]:e[t]},delete e[t])})),s&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===i||t.includes(i)||o("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),this.htmlAttributes?.id||j(this.el)}componentDidLoad(){!0===this.isOpen&&k((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const i=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:i,delegate:this.workingDelegate=i?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,i){const{canDismiss:o}=this;return"function"==typeof o?o(t,i):o}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:i,el:o}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:s}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await b(s,o,this.component,["ion-page"],this.componentProps,e),Y(o)?await F(this.usersElement):this.keepContentsMounted||await H(),a((()=>this.el.classList.add("show-modal"))),this.isSheetModal=void 0!==this.breakpoints&&void 0!==this.initialBreakpoint,this.isPresenting=!0;const r=void 0!==i;try{this.setInitialSafeAreaOverrides(),r&&"ios"===W(this)&&(this.statusBarStyle=await G.getStyle(),q()),await R(this,"modalEnter",nt,ht,{presentingEl:i,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll})}finally{this.isPresenting=!1}this.updateSafeAreaOverrides(),this.applyFullscreenSafeArea(),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),k((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(V,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():r&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){if("ios"!==W(this))return;const{el:t}=this,i=this.leaveAnimation||e.get("modalLeave",dt),o=this.animation=i(t,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});m(t)?(this.gesture=((t,i,o,a,e,s,r)=>{const n=.5,h=t.offsetHeight;let m=!1,f=!1,u=null,b=!0,x=0;const v=Z({el:t,gestureName:"modalSwipeToClose",gesturePriority:O,direction:"y",threshold:10,canStart:t=>{const i=t.event.target;return null===i||!i.closest||(u=l(i),u?X(u):null===i.closest("ion-footer"))},onStart:o=>{const{deltaY:a}=o;window.getSelection()?.removeAllRanges(),b=!u||!d(u)||u.scrollY,f=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&u&&p(u),i.progressStart(!0,m?1:0),e()},onMove:a=>{const{deltaY:e}=a;e>0&&u&&p(u);const r=a.deltaY/h,d=r>=0&&f,l=d?.2:.9999,c=d?it(r/l):r,m=y(1e-4,c,l);i.progressStep(m),m>=n&&x<n?Q(o):m<n&&x>=n&&q(),x=m;const b={currentY:a.currentY,deltaY:a.deltaY,velocityY:a.velocityY,progress:et(t,a.deltaY)};s(b)},onEnd:o=>{const e=o.velocityY,s=o.deltaY/h,d=s>=0&&f,l=d?.2:.9999,p=d?it(s/l):s,x=y(1e-4,p,l),w=!d&&(o.deltaY+1e3*e)/h>=n;let g=w?-.001:.001;w?(i.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=K([0,0],[.32,.72],[0,1],[1,1],x)[0]):(i.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=K([0,0],[1,0],[.68,.28],[1,1],x)[0]);const k=at(w?s*h:(1-x)*h,e);m=w,v.enable(!1),u&&c(u,b),i.onFinish((()=>{w||v.enable(!0)})).progressEnd(w?1:0,g,k);const A=d&&x>l/4;A?tt(t,i):w&&a();const Y=d?A&&"function"==typeof t.canDismiss:w,D={currentY:o.currentY,deltaY:o.deltaY,velocityY:o.velocityY,progress:et(t,o.deltaY),isDismissing:Y};r(D)}});return v})(t,o,this.statusBarStyle??J.Default,(()=>this.cardOnDismiss()),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t))),this.gesture.enable(!0)):f(t)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:i,backdropBreakpoint:o}=this;if(!t||void 0===i)return;const a=this.enterAnimation||e.get("modalEnter",nt),s=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:this.expandToScroll});s.progressStart(!0,1);const{gesture:r,moveSheetToBreakpoint:n,resetContentScroll:h}=((t,i,o,a,e,s,r=[],n,h,p,c,m,f,u)=>{const b={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},x=t.querySelector("ion-content"),v=x?.scrollY??!0,w=o.clientHeight;let A=a,Y=0,D=!1,E=null,S=null,O=null,T=null;const C=r[r.length-1],B=r[0],P=s.childAnimations.find((t=>"wrapperAnimation"===t.id)),N=s.childAnimations.find((t=>"backdropAnimation"===t.id)),I=s.childAnimations.find((t=>"contentAnimation"===t.id)),j=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),i.style.setProperty("pointer-events","auto"),t.classList.remove(M))},R=()=>{t.style.setProperty("pointer-events","none"),i.style.setProperty("pointer-events","none"),t.classList.add(M)},$=i=>{if(!S&&(S=Array.from(t.querySelectorAll("ion-footer")),!S.length))return;const o=t.querySelector(".ion-page");if(T=i,"stationary"===i)S.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),o?.style.removeProperty("padding-bottom"),o?.appendChild(t)}));else{let i=0;S.forEach(((o,a)=>{const e=o.getBoundingClientRect(),s=document.body.getBoundingClientRect();i+=o.clientHeight;const r=e.top-s.top,n=e.left-s.left;if(o.style.setProperty("--pinned-width",`${o.clientWidth}px`),o.style.setProperty("--pinned-height",`${o.clientHeight}px`),o.style.setProperty("--pinned-top",`${r}px`),o.style.setProperty("--pinned-left",`${n}px`),0===a){O=r;const i=t.querySelector("ion-header");i&&(O-=i.clientHeight)}})),S.forEach((t=>{o?.style.setProperty("padding-bottom",`${i}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};P&&N&&(P.keyframes([...b.WRAPPER_KEYFRAMES]),N.keyframes([...b.BACKDROP_KEYFRAMES]),I?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-A),A>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():R()),x&&A!==C&&n&&(x.scrollY=!1);const L=i=>{const{breakpoint:o,canDismiss:a,breakpointOffset:d,animated:h}=i,l=a&&0===o,m=l?A:o,f=0!==m;return A=0,P&&N&&(P.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-m)}%)`}]),N.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${U(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${U(m,e)})`}]),I&&I.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*m+"%"}]),s.progressStep(0)),W.enable(!1),l?tt(t,s):f||p(),!x||m!==r[r.length-1]&&n||(x.scrollY=v),n||0!==m||$("stationary"),new Promise((i=>{s.onFinish((()=>{f?(n||$("stationary"),P&&N?k((()=>{P.keyframes([...b.WRAPPER_KEYFRAMES]),N.keyframes([...b.BACKDROP_KEYFRAMES]),I?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-m),A=m,c(A),A>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():R(),W.enable(!0),i()})):(W.enable(!0),i())):i()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},z=t=>{const i=o.getBoundingClientRect().top+t,a=F(i);return r.reduce(((t,i)=>Math.abs(i-a)<Math.abs(t-a)?i:t))},F=t=>{const i=r[r.length-1],o=H(r[0]),a=H(i),e=Math.round((o-t)/(o-a)*1e3)/1e3;return Math.max(0,Math.min(1,e))},H=i=>{const o=t.getBoundingClientRect();return window.innerHeight-o.height*i},W=Z({el:o,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const i=l(t.event.target);return A=h(),!(i&&(!n||1===A))||X(i)},onStart:i=>{if(window.getSelection()?.removeAllRanges(),D=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===B,!n){const t=l(i.event.target);E=t&&d(t)?g(t).querySelector(".inner-scroll"):t}n||$("moving"),i.deltaY>0&&x&&(x.scrollY=!1),k((()=>{t.focus()})),s.progressStart(!0,1-A),m()},onMove:t=>{if(n||null===O||null===T||(t.currentY>=O&&"moving"===T?$("stationary"):t.currentY<O&&"stationary"===T&&$("moving")),!n&&t.deltaY<=0&&E)return;t.deltaY>0&&x&&(x.scrollY=!1);const i=r.length>1?1-r[1]:void 0,o=1-A+t.deltaY/w,a=void 0!==i&&o>=i&&D,e=a?.95:.9999,d=a&&void 0!==i?i+it((o-i)/(e-i)):o;Y=y(1e-4,d,e),s.progressStep(Y);const h=z(t.deltaY),l={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:F(t.currentY),snapBreakpoint:h};f(l)},onEnd:i=>{const o=z(i.deltaY),a=D&&0===o?"function"==typeof t.canDismiss:0===o,e={currentY:i.currentY,deltaY:i.deltaY,velocityY:i.velocityY,progress:F(i.currentY),snapBreakpoint:o,isDismissing:a};if(!n&&i.deltaY<=0&&E&&E.scrollTop>0)return $("stationary"),void u({...e,isDismissing:!1});L({breakpoint:o,breakpointOffset:Y,canDismiss:D,animated:!0}),u(e)}});return{gesture:W,moveSheetToBreakpoint:L,resetContentScroll:()=>{x&&(x.scrollY=v)}}})(this.el,this.backdropEl,t,i,o,s,this.sortedBreakpoints,this.expandToScroll,(()=>this.currentBreakpoint??0),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t)));this.gesture=r,this.moveSheetToBreakpoint=n,this.resetSheetContentScroll=h,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||o>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){this.cachedPageParent=this.getOriginalPageParent();const t=this.cachedPageParent;if(!t||"ION-APP"===t.tagName)return;if(Array.from(t.children).some((t=>!(t===this.el||t instanceof HTMLElement&&"none"===window.getComputedStyle(t).display||"TEMPLATE"===t.tagName||"SLOT"===t.tagName||t.nodeType===Node.TEXT_NODE&&!t.textContent?.trim()))))return;t.classList.add("ion-page-overlay-passthrough");const i=t.parentElement;"ION-ROUTER-OUTLET"===i?.tagName&&"ION-APP"!==i.parentElement?.tagName&&(i.style.setProperty("pointer-events","none"),i.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){const t=this.cachedPageParent;if(!t)return;t.classList.remove("ion-page-overlay-passthrough");const i=t.parentElement;i?.hasAttribute("data-overlay-passthrough")&&(i.style.removeProperty("pointer-events"),i.removeAttribute("data-overlay-passthrough")),this.cachedPageParent=void 0}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,S),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,Q(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,S),this.gestureAnimationDismissing=!1}))}async dismiss(t,i){if(this.gestureAnimationDismissing&&i!==S)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;const o=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==i&&!await this.checkCanDismiss(t,i))return o(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===W(this)&&Q(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(V,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await $(this,t,i,"modalLeave",dt,lt,{presentingEl:e,currentBreakpoint:this.currentBreakpoint??this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await x(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),this.resetSheetContentScroll?.(),this.resetSheetContentScroll=void 0,this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,o(),s}onDidDismiss(){return L(this.el,"ionModalDidDismiss")}onWillDismiss(){return L(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void o("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void o(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:i,moveSheetToBreakpoint:a,canDismiss:e,breakpoints:s,animated:r}=this;i!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-i,canDismiss:void 0!==e&&!0!==e&&0===s[0],animated:r}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:i}=this;if(!t||null==i)return!1;const o=t.filter((t=>0!==t)),a=o.indexOf(i),e=o[(a+1)%o.length];return await this.setCurrentBreakpoint(e),!0}initViewTransitionListener(){"ios"!==W(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){if(!this.presented)return;const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:i}=this;if(!i)return;let o;o=this.currentViewIsPortrait&&!t?((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return _("portrait-to-landscape-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,s=g(a),r=document.body,n=_("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=_().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0px) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i).fromTo("filter","contrast(0.85)","contrast(1)");const o=_().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=_().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=_().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>r.style.setProperty("background-color",""))).fromTo("transform",s,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),n.addAnimation([d,o,e])}return n})(this.el,{presentingEl:i}):((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return _("landscape-to-portrait-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,s=g(a),r=document.body,n=_("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=_().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i);const o=_().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=_().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=_().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:s}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:s,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),n.addAnimation([d,o,e])}return n})(this.el,{presentingEl:i}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=o,o.play().then((()=>{this.viewTransitionAnimation=void 0,k((()=>this.updateSafeAreaOverrides())),this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===W(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),k((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:i}=this,o=g(t).querySelector(".modal-wrapper");if(o&&(o.style.transform="translateY(0vh)",o.style.opacity="1"),"ION-MODAL"===i?.tagName)if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";i.style.transform=`translateY(${t}) scale(0.915)`}else i.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);t?.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.hasController||this.cachedOriginalParent===document.body||"ION-APP"===this.cachedOriginalParent.tagName||(this.cleanupParentRemovalObserver(),this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{const i=t===this.cachedOriginalParent,o=!!this.cachedOriginalParent&&t.contains?.(this.cachedOriginalParent);return i||o}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0})))}cleanupParentRemovalObserver(){this.parentRemovalObserver?.disconnect(),this.parentRemovalObserver=void 0}onDragStart(){this.ionDragStart.emit()}onDragMove(t){this.ionDragMove.emit(t)}onDragEnd(t){this.ionDragEnd.emit(t)}getSafeAreaContext(){return{isSheetModal:this.isSheetModal,isCardModal:void 0!==this.presentingElement&&"ios"===W(this),presentingElement:this.presentingElement,breakpoints:this.breakpoints,currentBreakpoint:this.currentBreakpoint}}watchHeightForContent(){var t;this.isSheetModal||(this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=(t=()=>{this.el.querySelectorAll("ion-content").forEach((t=>t.recalculateDimensions()))},w(this.el,"--height",(()=>t()))))}setInitialSafeAreaOverrides(){const t={...this.getSafeAreaContext(),coveredAxes:ft(this.el)},i=(t=>{const{isSheetModal:i,isCardModal:o}=t;if(i)return{top:"0px",bottom:"inherit",left:"0px",right:"0px"};if(o)return{top:"inherit",bottom:"inherit",left:"0px",right:"0px"};const{vertical:a,horizontal:e}=t.coveredAxes??{vertical:!0,horizontal:!0};return{top:a?"inherit":"0px",bottom:a?"inherit":"0px",left:e?"inherit":"0px",right:e?"inherit":"0px"}})(t);var o;bt(this.el,i),this.watchHeightForContent(),t.isSheetModal&&(this.updateSheetOffsetTop(),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=(o=t=>this.updateSheetOffsetTop(t),w(v?.document?.body,"--ion-safe-area-top",o,mt())))}updateSheetOffsetTop(t){const i=t??mt();this.el.style.setProperty("--ion-modal-offset-top",`${i}px`)}updateSafeAreaOverrides(){const{wrapperEl:t,el:i}=this,o=this.getSafeAreaContext();if(o.isSheetModal)return;if(o.isCardModal)return;if(!t)return;const a=(t=>{const i=t.getBoundingClientRect();return{top:i.top<=5?"inherit":"0px",bottom:i.bottom>=(v?.innerHeight??0)-5?"inherit":"0px",left:i.left<=5?"inherit":"0px",right:i.right>=(v?.innerWidth??0)-5?"inherit":"0px"}})(t);bt(i,a)}applyFullscreenSafeArea(){const t=this.getSafeAreaContext();if(t.isSheetModal||t.isCardModal)return;const{contentEl:i,hasFooter:o}=this.findContentAndFooter();this.applyFullscreenSafeAreaTo(i,o)}applyFullscreenSafeAreaTo(t,i){t&&!i&&t.style.setProperty("--internal-content-safe-area-padding-bottom","var(--ion-safe-area-bottom, 0px)")}clearContentSafeAreaPadding(t){t&&t.style.removeProperty("--internal-content-safe-area-padding-bottom")}findContentAndFooter(){let t=null,i=!1;for(const o of Array.from(this.el.children)){"ION-CONTENT"===o.tagName&&(t=o),"ION-FOOTER"===o.tagName&&(i=!0);for(const a of Array.from(o.children))"ION-CONTENT"!==a.tagName||t||(t=a),"ION-FOOTER"===a.tagName&&(i=!0)}return{contentEl:t,hasFooter:i}}cleanupSafeAreaOverrides(){var t;(t=this.el).style.removeProperty("--ion-safe-area-top"),t.style.removeProperty("--ion-safe-area-bottom"),t.style.removeProperty("--ion-safe-area-left"),t.style.removeProperty("--ion-safe-area-right"),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=void 0,this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=void 0,this.el.style.removeProperty("--ion-modal-offset-top");const{contentEl:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(i)}restoreSafeAreaOverrides(){this.setInitialSafeAreaOverrides(),this.applyFullscreenSafeArea(),k((()=>{if(!this.presented||!this.el.isConnected||this.isPresenting)return;const{width:t,height:i}=this.el.getBoundingClientRect();0===t&&0===i||this.updateSafeAreaOverrides()}))}render(){const{handle:t,isSheetModal:i,presentingElement:o,htmlAttributes:a,handleBehavior:e,inheritedAttributes:n,focusTrap:d,expandToScroll:h}=this,l=!1!==t&&i,p=W(this),c=void 0!==o&&"ios"===p,m="cycle"===e;return s(r,{key:"17a95bd7722bac2344bea041aff97db17f55c0cf","no-router":!0,tabIndex:m&&i&&l?0:-1,...a,style:{zIndex:`${2e4+this.overlayIndex}`},class:{[p]:!0,"modal-default":!c&&!i,"modal-card":c,"modal-sheet":i,"modal-no-expand-scroll":i&&!h,"overlay-hidden":!0,[M]:!1===d,...z(this.cssClass)},onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus},s("ion-backdrop",{key:"9dab1ef4771c0d847ba2be8672afbaa2748517f3",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&s("div",{key:"64af7ed1c5f552b61fc4b9387b926acc76c8a99a",class:"modal-shadow"}),s("div",{key:"7e76d77d5b2e8f0467bb793facf5aa86f8d01bbe",role:"dialog",...n,"aria-modal":"true",tabIndex:-1,class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t},l&&s("button",{key:"5efc0bb0a59adcc594ac48da9fd90e57908a7ffb",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),s("slot",{key:"6175fcd0b39c086b4e9eb9e96c4d631c2a86774b",onSlotchange:this.onSlotChange})))}get el(){return n(this)}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}}},vt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};xt.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{xt as ion_modal}
|
|
4
|
+
import{r as t,d as i,a as o,w as a,i as e,h as s,f as r,g as n}from"./p-D9OR05yj.js";import{i as d,f as h,a as l,d as p,r as c,b as m,p as f}from"./p-DNxEB9-T.js";import{C as u,a as b,d as x}from"./p-B4ELlbJE.js";import{w as v,o as w,g,e as y,r as k,b as A,h as Y}from"./p-B4xjg_Qu.js";import{c as D}from"./p-B-hirT0v.js";import{g as S}from"./p-D5akOqD0.js";import{G as E,O,F as M,n as T,d as C,B,h as P,r as N,j as I,k as j,e as R,f as $,g as L}from"./p-DZUqAr_6.js";import{g as z}from"./p-byZM6qHV.js";import{e as F,w as H}from"./p-PkaVMJga.js";import{b as W}from"./p-CrAPHbJ3.js";import{KEYBOARD_DID_OPEN as V}from"./p-CgQdInM0.js";import{c as _}from"./p-B4wzg4z4.js";import{g as Z}from"./p-hHmYLOfE.js";import{createGesture as K}from"./p-D0YpjgON.js";import"./p-Dojwmvde.js";import"./p-B_gJaBk0.js";import"./p-DxvRP6ld.js";var J;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(J||(J={}));const U={getEngine(){const t=S();if(t?.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const i=this.getEngine();i&&i.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return J.Default;const{style:i}=await t.getInfo();return i}},q=(t,i)=>{if(1===i)return 0;const o=1/(1-i);return t*o+-i*o},G=()=>{!v||v.innerWidth>=768||U.setStyle({style:J.Dark})},Q=(t=J.Default)=>{!v||v.innerWidth>=768||U.setStyle({style:t})},X=t=>{const i=d(t)?g(t).querySelector(".inner-scroll"):t;return!h(t)&&0===i.scrollTop},tt=async(t,i)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,E)&&(i.isRunning()?i.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},it=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,ot=.915,at=(t,i)=>y(400,t/Math.abs(1.1*i),500),et=(t,i)=>{const o=window.innerHeight,a=t.getBoundingClientRect().top,e=Math.round(1e3*(1-i/(o-a)))/1e3;return Math.max(0,Math.min(1,e))},st=t=>{const{currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:a}=t,e=void 0===o||o<i,s=e?`calc(var(--backdrop-opacity) * ${i})`:"0",r=_("backdropAnimation").fromTo("opacity",0,s);return e&&r.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:_("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*i}%)`}]),backdropAnimation:r,contentAnimation:a?void 0:_("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-i)+"%"},{offset:1,opacity:1,maxHeight:100*i+"%"}])}},rt=t=>{const{currentBreakpoint:i,backdropBreakpoint:o}=t,a=`calc(var(--backdrop-opacity) * ${q(i,o)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],s=[{offset:0,opacity:a},{offset:o,opacity:0},{offset:1,opacity:0}],r=_("backdropAnimation").keyframes(0!==o?s:e);return{wrapperAnimation:_("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*i}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:r}},nt=(t,i)=>{const{presentingEl:o,currentBreakpoint:a,expandToScroll:e}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n,contentAnimation:d}=void 0!==a?st(i):{backdropAnimation:_().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:_().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&d?.addElement(t.querySelector(".ion-page"));const h=_("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([r]);if(d&&h.addAnimation(d),o){const t=window.innerWidth<768,i="ION-MODAL"===o.tagName&&void 0!==o.presentingElement,a=g(o),e=_().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${i?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>s.style.setProperty("background-color","black"))).addElement(o).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),h.addAnimation(e)}else if(h.addAnimation(n),i){const t=`translateY(-10px) scale(${i?ot:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const o=_().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([e,o])}else r.fromTo("opacity","0","1")}else h.addAnimation(n);return h},dt=(t,i,o=500)=>{const{presentingEl:a,currentBreakpoint:e}=i,s=g(t),{wrapperAnimation:r,backdropAnimation:n}=void 0!==e?rt(i):{backdropAnimation:_().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:_().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(s.querySelector("ion-backdrop")),r.addElement(s.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=_("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o).addAnimation(r);if(a){const t=window.innerWidth<768,i="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,o=g(a),e=_().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(s.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&s.style.setProperty("background-color",""))})),s=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",o=`translateY(${i?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:o,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(e)}else if(d.addAnimation(n),i){const t=`translateY(-10px) scale(${i?ot:1})`;e.addElement(o.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=_().addElement(o.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([e,a])}else r.fromTo("opacity","1","0")}else d.addAnimation(n);return d},ht=(t,i)=>{const{currentBreakpoint:o,expandToScroll:a}=i,e=g(t),{wrapperAnimation:s,backdropAnimation:r,contentAnimation:n}=void 0!==o?st(i):{backdropAnimation:_().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:_().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};r.addElement(e.querySelector("ion-backdrop")),s.addElement(e.querySelector(".modal-wrapper")),!a&&n?.addElement(t.querySelector(".ion-page"));const d=_().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([r,s]);return n&&d.addAnimation(n),d},lt=(t,i)=>{const{currentBreakpoint:o}=i,a=g(t),{wrapperAnimation:e,backdropAnimation:s}=void 0!==o?rt(i):{backdropAnimation:_().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:_().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return s.addElement(a.querySelector("ion-backdrop")),e.addElement(a.querySelector(".modal-wrapper")),_().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([s,e])};let pt=null,ct=!1;const mt=()=>{if(null!==pt)return pt;const t=v?.document;if(!t?.body)return 0;const i=t.createElement("div");i.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);",t.body.appendChild(i);const o=parseFloat(getComputedStyle(i).paddingTop)||0;return i.remove(),pt=o,ct||(ct=!0,k((()=>{pt=null,ct=!1}))),o},ft=t=>{const i=getComputedStyle(t),o=T(i.getPropertyValue("--width")),a=T(i.getPropertyValue("--height"));return"fullscreen"===o&&"fullscreen"===a?{vertical:!0,horizontal:!0}:ut(t)},ut=t=>{const i=t.shadowRoot?.querySelector(".modal-wrapper");if(null==i||void 0===v)return{vertical:!1,horizontal:!1};const o=t.classList.contains("overlay-hidden");o&&t.classList.remove("overlay-hidden");const{width:a,height:e}=i.getBoundingClientRect();return o&&t.classList.add("overlay-hidden"),{vertical:e>=v.innerHeight-5,horizontal:a>=v.innerWidth-5}},bt=(t,i)=>{t.style.setProperty("--ion-safe-area-top",i.top),t.style.setProperty("--ion-safe-area-bottom",i.bottom),t.style.setProperty("--ion-safe-area-left",i.left),t.style.setProperty("--ion-safe-area-right",i.right)},xt=class{constructor(o){t(this,o),this.didPresent=i(this,"ionModalDidPresent",7),this.willPresent=i(this,"ionModalWillPresent",7),this.willDismiss=i(this,"ionModalWillDismiss",7),this.didDismiss=i(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=i(this,"ionBreakpointDidChange",7),this.didPresentShorthand=i(this,"didPresent",7),this.willPresentShorthand=i(this,"willPresent",7),this.willDismissShorthand=i(this,"willDismiss",7),this.didDismissShorthand=i(this,"didDismiss",7),this.ionMount=i(this,"ionMount",7),this.ionDragStart=i(this,"ionDragStart",7),this.ionDragMove=i(this,"ionDragMove",7),this.ionDragEnd=i(this,"ionDragEnd",7),this.lockController=D(),this.triggerController=C(),this.coreDelegate=u(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.isPresenting=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="cycle",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:i}=this;"cycle"===i&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,B)},this.onLifecycle=t=>{const i=this.usersElement,o=vt[t.type];if(i&&o){const a=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});i.dispatchEvent(a)}},this.onModalFocus=t=>{const{dragHandleEl:i,el:o}=this;t.target===o&&null==o.shadowRoot?.activeElement&&i&&-1!==i.tabIndex&&i.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,i){!0===t&&!1===i?this.present():!1===t&&!0===i&&this.dismiss()}triggerChanged(){const{trigger:t,el:i,triggerController:o}=this;t&&o.addClickListener(i,t)}onWindowResize(){this.presented&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{const t=this.getSafeAreaContext();if(!t.isCardModal||this.enterAnimation||this.leaveAnimation||this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),!t.isSheetModal&&!t.isCardModal){this.updateSafeAreaOverrides();const{contentEl:t,hasFooter:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(t),this.applyFullscreenSafeAreaTo(t,i)}}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,i)=>t-i)))}connectedCallback(){const{el:t}=this;P(t),this.triggerChanged(),(this.presented||this.isPresenting)&&this.restoreSafeAreaOverrides(),this.presented&&(N(t),this.initParentRemovalObserver())}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.presented&&I()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:i,el:a,htmlAttributes:e}=this,s=this.isSheetModal=void 0!==t&&void 0!==i,r=["aria-label","role"];this.inheritedAttributes=A(a,r),a.parentNode&&(this.cachedOriginalParent=a.parentNode),void 0!==e&&r.forEach((t=>{e[t]&&(this.inheritedAttributes={...this.inheritedAttributes,[t]:e[t]},delete e[t])})),s&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===i||t.includes(i)||o("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),this.htmlAttributes?.id||j(this.el)}componentDidLoad(){!0===this.isOpen&&k((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const i=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:i,delegate:this.workingDelegate=i?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,i){const{canDismiss:o}=this;return"function"==typeof o?o(t,i):o}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:i,el:o}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:s}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await b(s,o,this.component,["ion-page"],this.componentProps,e),Y(o)?await F(this.usersElement):this.keepContentsMounted||await H(),a((()=>this.el.classList.add("show-modal"))),this.isSheetModal=void 0!==this.breakpoints&&void 0!==this.initialBreakpoint,this.isPresenting=!0;const r=void 0!==i;try{this.setInitialSafeAreaOverrides(),r&&"ios"===W(this)&&(this.statusBarStyle=await U.getStyle(),G()),await R(this,"modalEnter",nt,ht,{presentingEl:i,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll})}finally{this.isPresenting=!1}this.updateSafeAreaOverrides(),this.applyFullscreenSafeArea(),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),k((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(V,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():r&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){if("ios"!==W(this))return;const{el:t}=this,i=this.leaveAnimation||e.get("modalLeave",dt),o=this.animation=i(t,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});m(t)?(this.gesture=((t,i,o,a,e,s,r)=>{const n=.5,h=t.offsetHeight;let m=!1,f=!1,u=null,b=!0,x=0;const v=K({el:t,gestureName:"modalSwipeToClose",gesturePriority:O,direction:"y",threshold:10,canStart:t=>{const i=t.event.target;return null===i||!i.closest||(u=l(i),u?X(u):null===i.closest("ion-footer"))},onStart:o=>{const{deltaY:a}=o;window.getSelection()?.removeAllRanges(),b=!u||!d(u)||u.scrollY,f=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&u&&p(u),i.progressStart(!0,m?1:0),e()},onMove:a=>{const{deltaY:e}=a;e>0&&u&&p(u);const r=a.deltaY/h,d=r>=0&&f,l=d?.2:.9999,c=d?it(r/l):r,m=y(1e-4,c,l);i.progressStep(m),m>=n&&x<n?Q(o):m<n&&x>=n&&G(),x=m;const b={currentY:a.currentY,deltaY:a.deltaY,velocityY:a.velocityY,progress:et(t,a.deltaY)};s(b)},onEnd:o=>{const e=o.velocityY,s=o.deltaY/h,d=s>=0&&f,l=d?.2:.9999,p=d?it(s/l):s,x=y(1e-4,p,l),w=!d&&(o.deltaY+1e3*e)/h>=n;let g=w?-.001:.001;w?(i.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=Z([0,0],[.32,.72],[0,1],[1,1],x)[0]):(i.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=Z([0,0],[1,0],[.68,.28],[1,1],x)[0]);const k=at(w?s*h:(1-x)*h,e);m=w,v.enable(!1),u&&c(u,b),i.onFinish((()=>{w||v.enable(!0)})).progressEnd(w?1:0,g,k);const A=d&&x>l/4;A?tt(t,i):w&&a();const Y=d?A&&"function"==typeof t.canDismiss:w,D={currentY:o.currentY,deltaY:o.deltaY,velocityY:o.velocityY,progress:et(t,o.deltaY),isDismissing:Y};r(D)}});return v})(t,o,this.statusBarStyle??J.Default,(()=>this.cardOnDismiss()),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t))),this.gesture.enable(!0)):f(t)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:i,backdropBreakpoint:o}=this;if(!t||void 0===i)return;const a=this.enterAnimation||e.get("modalEnter",nt),s=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:this.expandToScroll});s.progressStart(!0,1);const{gesture:r,moveSheetToBreakpoint:n,resetContentScroll:h}=((t,i,o,a,e,s,r=[],n,h,p,c,m,f,u)=>{const b={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},x=t.querySelector("ion-content"),v=x?.scrollY??!0,w=o.clientHeight;let A=a,Y=0,D=!1,S=null,E=null,O=null,T=null;const C=r[r.length-1],B=r[0],P=s.childAnimations.find((t=>"wrapperAnimation"===t.id)),N=s.childAnimations.find((t=>"backdropAnimation"===t.id)),I=s.childAnimations.find((t=>"contentAnimation"===t.id)),j=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),i.style.setProperty("pointer-events","auto"),t.classList.remove(M))},R=()=>{t.style.setProperty("pointer-events","none"),i.style.setProperty("pointer-events","none"),t.classList.add(M)},$=i=>{if(!E&&(E=Array.from(t.querySelectorAll("ion-footer")),!E.length))return;const o=t.querySelector(".ion-page");if(T=i,"stationary"===i)E.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),o?.style.removeProperty("padding-bottom"),o?.appendChild(t)}));else{let i=0;E.forEach(((o,a)=>{const e=o.getBoundingClientRect(),s=document.body.getBoundingClientRect();i+=o.clientHeight;const r=e.top-s.top,n=e.left-s.left;if(o.style.setProperty("--pinned-width",`${o.clientWidth}px`),o.style.setProperty("--pinned-height",`${o.clientHeight}px`),o.style.setProperty("--pinned-top",`${r}px`),o.style.setProperty("--pinned-left",`${n}px`),0===a){O=r;const i=t.querySelector("ion-header");i&&(O-=i.clientHeight)}})),E.forEach((t=>{o?.style.setProperty("padding-bottom",`${i}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};P&&N&&(P.keyframes([...b.WRAPPER_KEYFRAMES]),N.keyframes([...b.BACKDROP_KEYFRAMES]),I?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-A),A>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():R()),x&&A!==C&&n&&(x.scrollY=!1);const L=i=>{const{breakpoint:o,canDismiss:a,breakpointOffset:d,animated:h}=i,l=a&&0===o,m=l?A:o,f=0!==m;return A=0,P&&N&&(P.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-m)}%)`}]),N.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${q(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${q(m,e)})`}]),I&&I.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*m+"%"}]),s.progressStep(0)),W.enable(!1),l?tt(t,s):f||p(),!x||m!==r[r.length-1]&&n||(x.scrollY=v),n||0!==m||$("stationary"),new Promise((i=>{s.onFinish((()=>{f?(n||$("stationary"),P&&N?k((()=>{P.keyframes([...b.WRAPPER_KEYFRAMES]),N.keyframes([...b.BACKDROP_KEYFRAMES]),I?.keyframes([...b.CONTENT_KEYFRAMES]),s.progressStart(!0,1-m),A=m,c(A),A>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?j():R(),W.enable(!0),i()})):(W.enable(!0),i())):i()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},z=t=>{const i=o.getBoundingClientRect().top+t,a=F(i);return r.reduce(((t,i)=>Math.abs(i-a)<Math.abs(t-a)?i:t))},F=t=>{const i=r[r.length-1],o=H(r[0]),a=H(i),e=Math.round((o-t)/(o-a)*1e3)/1e3;return Math.max(0,Math.min(1,e))},H=i=>{const o=t.getBoundingClientRect();return window.innerHeight-o.height*i},W=K({el:o,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const i=l(t.event.target);return A=h(),!(i&&(!n||1===A))||X(i)},onStart:i=>{if(window.getSelection()?.removeAllRanges(),D=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===B,!n){const t=l(i.event.target);S=t&&d(t)?g(t).querySelector(".inner-scroll"):t}n||$("moving"),i.deltaY>0&&x&&(x.scrollY=!1),k((()=>{t.focus()})),s.progressStart(!0,1-A),m()},onMove:t=>{if(n||null===O||null===T||(t.currentY>=O&&"moving"===T?$("stationary"):t.currentY<O&&"stationary"===T&&$("moving")),!n&&t.deltaY<=0&&S)return;t.deltaY>0&&x&&(x.scrollY=!1);const i=r.length>1?1-r[1]:void 0,o=1-A+t.deltaY/w,a=void 0!==i&&o>=i&&D,e=a?.95:.9999,d=a&&void 0!==i?i+it((o-i)/(e-i)):o;Y=y(1e-4,d,e),s.progressStep(Y);const h=z(t.deltaY),l={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:F(t.currentY),snapBreakpoint:h};f(l)},onEnd:i=>{const o=z(i.deltaY),a=D&&0===o?"function"==typeof t.canDismiss:0===o,e={currentY:i.currentY,deltaY:i.deltaY,velocityY:i.velocityY,progress:F(i.currentY),snapBreakpoint:o,isDismissing:a};if(!n&&i.deltaY<=0&&S&&S.scrollTop>0)return $("stationary"),void u({...e,isDismissing:!1});L({breakpoint:o,breakpointOffset:Y,canDismiss:D,animated:!0}),u(e)}});return{gesture:W,moveSheetToBreakpoint:L,resetContentScroll:()=>{x&&(x.scrollY=v)}}})(this.el,this.backdropEl,t,i,o,s,this.sortedBreakpoints,this.expandToScroll,(()=>this.currentBreakpoint??0),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t)));this.gesture=r,this.moveSheetToBreakpoint=n,this.resetSheetContentScroll=h,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||o>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){this.cachedPageParent=this.getOriginalPageParent();const t=this.cachedPageParent;if(!t||"ION-APP"===t.tagName)return;if(Array.from(t.children).some((t=>!(t===this.el||t instanceof HTMLElement&&"none"===window.getComputedStyle(t).display||"TEMPLATE"===t.tagName||"SLOT"===t.tagName||t.nodeType===Node.TEXT_NODE&&!t.textContent?.trim()))))return;t.classList.add("ion-page-overlay-passthrough");const i=t.parentElement;"ION-ROUTER-OUTLET"===i?.tagName&&"ION-APP"!==i.parentElement?.tagName&&(i.style.setProperty("pointer-events","none"),i.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){const t=this.cachedPageParent;if(!t)return;t.classList.remove("ion-page-overlay-passthrough");const i=t.parentElement;i?.hasAttribute("data-overlay-passthrough")&&(i.style.removeProperty("pointer-events"),i.removeAttribute("data-overlay-passthrough")),this.cachedPageParent=void 0}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,E),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,Q(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,E),this.gestureAnimationDismissing=!1}))}async dismiss(t,i){if(this.gestureAnimationDismissing&&i!==E)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;const o=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==i&&!await this.checkCanDismiss(t,i))return o(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===W(this)&&Q(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(V,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await $(this,t,i,"modalLeave",dt,lt,{presentingEl:e,currentBreakpoint:this.currentBreakpoint??this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await x(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),this.resetSheetContentScroll?.(),this.resetSheetContentScroll=void 0,this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,o(),s}onDidDismiss(){return L(this.el,"ionModalDidDismiss")}onWillDismiss(){return L(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void o("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void o(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:i,moveSheetToBreakpoint:a,canDismiss:e,breakpoints:s,animated:r}=this;i!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-i,canDismiss:void 0!==e&&!0!==e&&0===s[0],animated:r}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:i}=this;if(!t||null==i)return!1;const o=t.filter((t=>0!==t)),a=o.indexOf(i),e=o[(a+1)%o.length];return await this.setCurrentBreakpoint(e),!0}initViewTransitionListener(){"ios"!==W(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){if(!this.presented)return;const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:i}=this;if(!i)return;let o;o=this.currentViewIsPortrait&&!t?((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return _("portrait-to-landscape-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,s=g(a),r=document.body,n=_("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=_().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0px) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i).fromTo("filter","contrast(0.85)","contrast(1)");const o=_().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=_().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=_().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>r.style.setProperty("background-color",""))).fromTo("transform",s,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),n.addAnimation([d,o,e])}return n})(this.el,{presentingEl:i}):((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return _("landscape-to-portrait-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,s=g(a),r=document.body,n=_("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=_().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i);const o=_().addElement(s.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);n.addAnimation([d,o])}else{const i=g(t),o=_().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=_().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),s=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:s}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:s,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),n.addAnimation([d,o,e])}return n})(this.el,{presentingEl:i}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=o,o.play().then((()=>{this.viewTransitionAnimation=void 0,k((()=>this.updateSafeAreaOverrides())),this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===W(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),k((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:i}=this,o=g(t).querySelector(".modal-wrapper");if(o&&(o.style.transform="translateY(0vh)",o.style.opacity="1"),"ION-MODAL"===i?.tagName)if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";i.style.transform=`translateY(${t}) scale(0.915)`}else i.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);t?.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.hasController||this.cachedOriginalParent===document.body||"ION-APP"===this.cachedOriginalParent.tagName||(this.cleanupParentRemovalObserver(),this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{const i=t===this.cachedOriginalParent,o=!!this.cachedOriginalParent&&t.contains?.(this.cachedOriginalParent);return i||o}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0})))}cleanupParentRemovalObserver(){this.parentRemovalObserver?.disconnect(),this.parentRemovalObserver=void 0}onDragStart(){this.ionDragStart.emit()}onDragMove(t){this.ionDragMove.emit(t)}onDragEnd(t){this.ionDragEnd.emit(t)}getSafeAreaContext(){return{isSheetModal:this.isSheetModal,isCardModal:void 0!==this.presentingElement&&"ios"===W(this),presentingElement:this.presentingElement,breakpoints:this.breakpoints,currentBreakpoint:this.currentBreakpoint}}watchHeightForContent(){var t;this.isSheetModal||(this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=(t=()=>{this.el.querySelectorAll("ion-content").forEach((t=>t.recalculateDimensions()))},w(this.el,"--height",(()=>t()))))}setInitialSafeAreaOverrides(){const t={...this.getSafeAreaContext(),coveredAxes:ft(this.el)},i=(t=>{const{isSheetModal:i,isCardModal:o}=t;if(i)return{top:"0px",bottom:"inherit",left:"0px",right:"0px"};if(o)return{top:"inherit",bottom:"inherit",left:"0px",right:"0px"};const{vertical:a,horizontal:e}=t.coveredAxes??{vertical:!0,horizontal:!0};return{top:a?"inherit":"0px",bottom:a?"inherit":"0px",left:e?"inherit":"0px",right:e?"inherit":"0px"}})(t);var o;bt(this.el,i),this.watchHeightForContent(),t.isSheetModal&&(this.updateSheetOffsetTop(),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=(o=t=>this.updateSheetOffsetTop(t),w(v?.document?.body,"--ion-safe-area-top",o,mt())))}updateSheetOffsetTop(t){const i=t??mt();this.el.style.setProperty("--ion-modal-offset-top",`${i}px`)}updateSafeAreaOverrides(){const{wrapperEl:t,el:i}=this,o=this.getSafeAreaContext();if(o.isSheetModal)return;if(o.isCardModal)return;if(!t)return;const a=(t=>{const i=t.getBoundingClientRect();return{top:i.top<=5?"inherit":"0px",bottom:i.bottom>=(v?.innerHeight??0)-5?"inherit":"0px",left:i.left<=5?"inherit":"0px",right:i.right>=(v?.innerWidth??0)-5?"inherit":"0px"}})(t);bt(i,a)}applyFullscreenSafeArea(){const t=this.getSafeAreaContext();if(t.isSheetModal||t.isCardModal)return;const{contentEl:i,hasFooter:o}=this.findContentAndFooter();this.applyFullscreenSafeAreaTo(i,o)}applyFullscreenSafeAreaTo(t,i){t&&!i&&t.style.setProperty("--internal-content-safe-area-padding-bottom","var(--ion-safe-area-bottom, 0px)")}clearContentSafeAreaPadding(t){t&&t.style.removeProperty("--internal-content-safe-area-padding-bottom")}findContentAndFooter(){let t=null,i=!1;for(const o of Array.from(this.el.children)){"ION-CONTENT"===o.tagName&&(t=o),"ION-FOOTER"===o.tagName&&(i=!0);for(const a of Array.from(o.children))"ION-CONTENT"!==a.tagName||t||(t=a),"ION-FOOTER"===a.tagName&&(i=!0)}return{contentEl:t,hasFooter:i}}cleanupSafeAreaOverrides(){var t;(t=this.el).style.removeProperty("--ion-safe-area-top"),t.style.removeProperty("--ion-safe-area-bottom"),t.style.removeProperty("--ion-safe-area-left"),t.style.removeProperty("--ion-safe-area-right"),this.unsubscribeRootSafeAreaTop?.(),this.unsubscribeRootSafeAreaTop=void 0,this.unsubscribeHeightChange?.(),this.unsubscribeHeightChange=void 0,this.el.style.removeProperty("--ion-modal-offset-top");const{contentEl:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(i)}restoreSafeAreaOverrides(){this.setInitialSafeAreaOverrides(),this.applyFullscreenSafeArea(),k((()=>{if(!this.presented||!this.el.isConnected||this.isPresenting)return;const{width:t,height:i}=this.el.getBoundingClientRect();0===t&&0===i||this.updateSafeAreaOverrides()}))}render(){const{handle:t,isSheetModal:i,presentingElement:o,htmlAttributes:a,handleBehavior:e,inheritedAttributes:n,focusTrap:d,expandToScroll:h}=this,l=!1!==t&&i,p=W(this),c=void 0!==o&&"ios"===p,m="cycle"===e;return s(r,{key:"17a95bd7722bac2344bea041aff97db17f55c0cf","no-router":!0,tabIndex:m&&i&&l?0:-1,...a,style:{zIndex:`${2e4+this.overlayIndex}`},class:{[p]:!0,"modal-default":!c&&!i,"modal-card":c,"modal-sheet":i,"modal-no-expand-scroll":i&&!h,"overlay-hidden":!0,[M]:!1===d,...z(this.cssClass)},onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus},s("ion-backdrop",{key:"9dab1ef4771c0d847ba2be8672afbaa2748517f3",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&s("div",{key:"64af7ed1c5f552b61fc4b9387b926acc76c8a99a",class:"modal-shadow"}),s("div",{key:"7e76d77d5b2e8f0467bb793facf5aa86f8d01bbe",role:"dialog",...n,"aria-modal":"true",tabIndex:-1,class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t},l&&s("button",{key:"5efc0bb0a59adcc594ac48da9fd90e57908a7ffb",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),s("slot",{key:"6175fcd0b39c086b4e9eb9e96c4d631c2a86774b",onSlotchange:this.onSlotChange})))}get el(){return n(this)}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}}},vt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};xt.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:100%;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{xt as ion_modal}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,d as e,a as o,h as r,f as i,g as s}from"./p-D9OR05yj.js";import{B as a,h as n,r as p,j as c,k as d,e as h,o as l,f as v,g as f,F as g}from"./p-C036rEeA.js";import{C as m,a as x,d as b}from"./p-B4ELlbJE.js";import{g as w,r as u,f as k,h as y}from"./p-B4xjg_Qu.js";import{c as P}from"./p-B-hirT0v.js";import{b as D,a as T}from"./p-CrAPHbJ3.js";import{g as $}from"./p-byZM6qHV.js";import{e as A,w as I}from"./p-PkaVMJga.js";import{c as L}from"./p-B4wzg4z4.js";import"./p-B_gJaBk0.js";import"./p-Dojwmvde.js";let C=null,W=!1;const N=t=>{if(null!==C)return C;if(null===t.body)return{top:0,bottom:0,left:0,right:0};const e=t.createElement("div");e.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);padding-bottom:var(--ion-safe-area-bottom,0px);padding-left:var(--ion-safe-area-left,0px);padding-right:var(--ion-safe-area-right,0px);",t.body.appendChild(e);const o=getComputedStyle(e),r={top:parseFloat(o.paddingTop)||0,bottom:parseFloat(o.paddingBottom)||0,left:parseFloat(o.paddingLeft)||0,right:parseFloat(o.paddingRight)||0};return e.remove(),C=r,W||(W=!0,u((()=>{C=null,W=!1}))),r},j=t=>{if(!t)return 1;const e=t.currentCSSZoom;if("number"==typeof e&&e>0)return e;const{width:o}=t.getBoundingClientRect(),{offsetWidth:r}=t;if(r>0&&o>0){const t=o/r;return Math.abs(t-1)<.01?1:t}return 1},z=(t,e,o,r=1)=>{const i=e.getBoundingClientRect(),s=i.height/r;let a=i.width/r;return"cover"===t&&o&&(a=o.getBoundingClientRect().width/r),{contentWidth:a,contentHeight:s}},O=(t,e)=>e&&"ION-ITEM"===e.tagName?t.findIndex((t=>t===e)):-1,B=t=>{const e=w(t).querySelector("button");e&&u((()=>e.focus()))},E=(t,e,o,r,i,s,a,n,p,c,d,h=1)=>{let l={top:0,left:0,width:0,height:0};if("event"===s){if(!d)return p;l={top:d.clientY/h,left:d.clientX/h,width:1,height:1}}else{const t=d,e=c||t?.detail?.ionShadowTarget||t?.target;if(!e)return p;const o=e.getBoundingClientRect();l={top:o.top/h,left:o.left/h,width:o.width/h,height:o.height/h}}const v=H(a,l,e,o,r,i,t),f=R(n,a,l,e,o),g=v.top+f.top,m=v.left+f.left,{arrowTop:x,arrowLeft:b}=M(a,r,i,g,m,e,o,t),{originX:w,originY:u}=S(a,n,t);return{top:g,left:m,referenceCoordinates:l,arrowTop:x,arrowLeft:b,originX:w,originY:u}},S=(t,e,o)=>{switch(t){case"top":return{originX:X(e),originY:"bottom"};case"bottom":return{originX:X(e),originY:"top"};case"left":return{originX:"right",originY:Y(e)};case"right":return{originX:"left",originY:Y(e)};case"start":return{originX:o?"left":"right",originY:Y(e)};case"end":return{originX:o?"right":"left",originY:Y(e)}}},X=t=>{switch(t){case"start":return"left";case"center":return"center";case"end":return"right"}},Y=t=>{switch(t){case"start":return"top";case"center":return"center";case"end":return"bottom"}},M=(t,e,o,r,i,s,a,n)=>{const p={arrowTop:r+a/2-e/2,arrowLeft:i+s-e/2},c={arrowTop:r+a/2-e/2,arrowLeft:i-1.5*e};switch(t){case"top":return{arrowTop:r+a,arrowLeft:i+s/2-e/2};case"bottom":return{arrowTop:r-o,arrowLeft:i+s/2-e/2};case"left":return p;case"right":return c;case"start":return n?c:p;case"end":return n?p:c;default:return{arrowTop:0,arrowLeft:0}}},H=(t,e,o,r,i,s,a)=>{const n={top:e.top,left:e.left-o-i},p={top:e.top,left:e.left+e.width+i};switch(t){case"top":return{top:e.top-r-s,left:e.left};case"right":return p;case"bottom":return{top:e.top+e.height+s,left:e.left};case"left":return n;case"start":return a?p:n;case"end":return a?n:p}},R=(t,e,o,r,i)=>{switch(t){case"center":return F(e,o,r,i);case"end":return V(e,o,r,i);default:return{top:0,left:0}}},V=(t,e,o,r)=>{switch(t){case"start":case"end":case"left":case"right":return{top:-(r-e.height),left:0};default:return{top:0,left:-(o-e.width)}}},F=(t,e,o,r)=>{switch(t){case"start":case"end":case"left":case"right":return{top:-(r/2-e.height/2),left:0};default:return{top:0,left:-(o/2-e.width/2)}}},J=(t,e,o,r,i,s,a,n,p,c,d,h,l=0,v=0,f=0)=>{let g,m=l,x=o,b=e,w=c,u=d,k=!1,y=!1,P=!1,D=!1;const T=h?h.top+h.height:s/2-n/2,$=h?h.height:0;let A=!1;if(x<r+p.left?(x=r,k=!0,w="left"):a+r+x+p.right>i&&(y=!0,x=i-a-r,w="right"),T+$+n>s-p.bottom&&("top"===t||"bottom"===t)){const t=T-n-$-(f-1);t>=p.top+r?(b=t,m=b+n,u="bottom",A=!0):(g=r,D=!0,b>=s-p.bottom-r&&(b=p.top+r,P=!0))}return{top:b,left:x,bottom:g,originX:w,originY:u,checkSafeAreaLeft:k,checkSafeAreaRight:y,checkSafeAreaTop:P,checkSafeAreaBottom:D,arrowTop:m,arrowLeft:v,addPopoverBottomClass:A,hideArrow:!1}},_=(t,e)=>{const{event:o,size:r,trigger:i,reference:s,side:a,align:n}=e,p=t.ownerDocument,c="rtl"===p.dir,d=w(t),h=d.querySelector(".popover-content"),l=d.querySelector(".popover-arrow"),v=j(h),f=p.defaultView.innerWidth/v,g=p.defaultView.innerHeight/v,m=i||o?.detail?.ionShadowTarget||o?.target,{contentWidth:x,contentHeight:b}=z(r,h,m,v),{arrowWidth:u,arrowHeight:k}=((t,e=1)=>{if(!t)return{arrowWidth:0,arrowHeight:0};const{width:o,height:r}=t.getBoundingClientRect();return{arrowWidth:o/e,arrowHeight:r/e}})(l,v),y=E(c,x,b,u,k,s,a,n,{top:g/2-b/2,left:f/2-x/2,originX:c?"right":"left",originY:"top"},i,o,v),P="cover"===r?0:5,D=N(p),T="cover"===r?{top:0,bottom:0,left:0,right:0}:{top:Math.max(D.top,25),bottom:Math.max(D.bottom,25),left:Math.max(D.left,25),right:Math.max(D.right,25)},{originX:$,originY:A,top:I,left:C,bottom:W,checkSafeAreaLeft:O,checkSafeAreaRight:B,checkSafeAreaTop:S,checkSafeAreaBottom:X,arrowTop:Y,arrowLeft:M,addPopoverBottomClass:H}=J(a,y.top,y.left,P,f,g,x,b,T,y.originX,y.originY,y.referenceCoordinates,y.arrowTop,y.arrowLeft,k),R=L(),V=L(),F=L();return V.addElement(d.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),F.addElement(d.querySelector(".popover-arrow")).addElement(d.querySelector(".popover-content")).fromTo("opacity",.01,1),R.easing("ease").duration(100).beforeAddWrite((()=>{if("cover"===r&&t.style.setProperty("--width",`${x}px`),H&&t.classList.add("popover-bottom"),void 0!==W){let t=`${W}px`;X&&(t=`${W}px + var(--ion-safe-area-bottom, 0px)`),h.style.setProperty("bottom",`calc(${t})`)}let e=`${C}px`;O&&(e=`${C}px + var(--ion-safe-area-left, 0px)`),B&&(e=`${C}px - var(--ion-safe-area-right, 0px)`);let s=`${I}px`;if(S&&(s=`${I}px + var(--ion-safe-area-top, 0px)`),h.style.setProperty("top",`calc(${s} + var(--offset-y, 0))`),h.style.setProperty("left",`calc(${e} + var(--offset-x, 0))`),h.style.setProperty("transform-origin",`${A} ${$}`),null!==l){const t=((t,e=!1,o,r)=>!(!o&&!r||"top"!==t&&"bottom"!==t&&e))(a,y.top!==I||y.left!==C,o,i);t?(l.style.setProperty("top",`calc(${Y}px + var(--offset-y, 0))`),l.style.setProperty("left",`calc(${M}px + var(--offset-x, 0))`)):l.style.setProperty("display","none")}})).addAnimation([V,F])},K=t=>{const e=w(t),o=e.querySelector(".popover-content"),r=e.querySelector(".popover-arrow"),i=L(),s=L(),a=L();return s.addElement(e.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0),a.addElement(e.querySelector(".popover-arrow")).addElement(e.querySelector(".popover-content")).fromTo("opacity",.99,0),i.easing("ease").afterAddWrite((()=>{t.style.removeProperty("--width"),t.classList.remove("popover-bottom"),o.style.removeProperty("top"),o.style.removeProperty("left"),o.style.removeProperty("bottom"),o.style.removeProperty("transform-origin"),r&&(r.style.removeProperty("top"),r.style.removeProperty("left"),r.style.removeProperty("display"))})).duration(300).addAnimation([s,a])},q=(t,e)=>{const{event:o,size:r,trigger:i,reference:s,side:a,align:n}=e,p=t.ownerDocument,c="rtl"===p.dir,d=w(t),h=d.querySelector(".popover-content"),l=j(h),v=p.defaultView.innerWidth/l,f=p.defaultView.innerHeight/l,g=i||o?.detail?.ionShadowTarget||o?.target,{contentWidth:m,contentHeight:x}=z(r,h,g,l),b=E(c,m,x,0,0,s,a,n,{top:f/2-x/2,left:v/2-m/2,originX:c?"right":"left",originY:"top"},i,o,l),u="cover"===r?0:12,k="cover"===r?{top:0,bottom:0,left:0,right:0}:N(p),{originX:y,originY:P,top:D,left:T,bottom:$,checkSafeAreaLeft:A,checkSafeAreaRight:I,checkSafeAreaTop:C,checkSafeAreaBottom:W,addPopoverBottomClass:O}=J(a,b.top,b.left,u,v,f,m,x,k,b.originX,b.originY,b.referenceCoordinates);let B=`${T}px`;A&&(B=`${T}px + var(--ion-safe-area-left, 0px)`),I&&(B=`${T}px - var(--ion-safe-area-right, 0px)`);let S=`${D}px`;C&&(S=`${D}px + var(--ion-safe-area-top, 0px)`);const X=L(),Y=L(),M=L(),H=L(),R=L();return Y.addElement(d.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),M.addElement(d.querySelector(".popover-wrapper")).duration(150).fromTo("opacity",.01,1),H.addElement(h).beforeStyles({top:`calc(${S} + var(--offset-y, 0px))`,left:`calc(${B} + var(--offset-x, 0px))`,"transform-origin":`${P} ${y}`}).beforeAddWrite((()=>{if(void 0!==$){let t=`${$}px`;W&&(t=`${$}px + var(--ion-safe-area-bottom, 0px)`),h.style.setProperty("bottom",`calc(${t})`)}})).fromTo("transform","scale(0.8)","scale(1)"),R.addElement(d.querySelector(".popover-viewport")).fromTo("opacity",.01,1),X.easing("cubic-bezier(0.36,0.66,0.04,1)").duration(300).beforeAddWrite((()=>{"cover"===r&&t.style.setProperty("--width",`${m}px`),O&&t.classList.add("popover-bottom")})).addAnimation([Y,M,H,R])},Q=t=>{const e=w(t),o=e.querySelector(".popover-content"),r=L(),i=L(),s=L();return i.addElement(e.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0),s.addElement(e.querySelector(".popover-wrapper")).fromTo("opacity",.99,0),r.easing("ease").afterAddWrite((()=>{t.style.removeProperty("--width"),t.classList.remove("popover-bottom"),o.style.removeProperty("top"),o.style.removeProperty("left"),o.style.removeProperty("bottom"),o.style.removeProperty("transform-origin")})).duration(150).addAnimation([i,s])},U=class{constructor(r){t(this,r),this.didPresent=e(this,"ionPopoverDidPresent",7),this.willPresent=e(this,"ionPopoverWillPresent",7),this.willDismiss=e(this,"ionPopoverWillDismiss",7),this.didDismiss=e(this,"ionPopoverDidDismiss",7),this.didPresentShorthand=e(this,"didPresent",7),this.willPresentShorthand=e(this,"willPresent",7),this.willDismissShorthand=e(this,"willDismiss",7),this.didDismissShorthand=e(this,"didDismiss",7),this.ionMount=e(this,"ionMount",7),this.parentPopover=null,this.coreDelegate=m(),this.lockController=P(),this.inline=!1,this.focusDescendantOnPresent=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.backdropDismiss=!0,this.showBackdrop=!0,this.translucent=!1,this.animated=!0,this.triggerAction="click",this.size="auto",this.dismissOnSelect=!1,this.reference="trigger",this.side="bottom",this.arrow=!0,this.isOpen=!1,this.keyboardEvents=!1,this.focusTrap=!0,this.keepContentsMounted=!1,this.onBackdropTap=()=>{this.dismiss(void 0,a)},this.onLifecycle=t=>{const e=this.usersElement,o=Z[t.type];if(e&&o){const r=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});e.dispatchEvent(r)}},this.configureTriggerInteraction=()=>{const{trigger:t,triggerAction:e,el:r,destroyTriggerInteraction:i}=this;if(i&&i(),void 0===t)return;const s=this.triggerEl=void 0!==t?document.getElementById(t):null;s?this.destroyTriggerInteraction=((t,e,o)=>{let r=[];switch(e){case"hover":let t;r=[{eventName:"mouseenter",callback:async e=>{e.stopPropagation(),t&&clearTimeout(t),t=setTimeout((()=>{u((()=>{o.presentFromTrigger(e),t=void 0}))}),100)}},{eventName:"mouseleave",callback:e=>{t&&clearTimeout(t);const r=e.relatedTarget;r&&r.closest("ion-popover")!==o&&o.dismiss(void 0,void 0,!1)}},{eventName:"click",callback:t=>t.stopPropagation()},{eventName:"ionPopoverActivateTrigger",callback:t=>o.presentFromTrigger(t,!0)}];break;case"context-menu":r=[{eventName:"contextmenu",callback:t=>{t.preventDefault(),o.presentFromTrigger(t)}},{eventName:"click",callback:t=>t.stopPropagation()},{eventName:"ionPopoverActivateTrigger",callback:t=>o.presentFromTrigger(t,!0)}];break;default:r=[{eventName:"click",callback:t=>o.presentFromTrigger(t)},{eventName:"ionPopoverActivateTrigger",callback:t=>o.presentFromTrigger(t,!0)}]}return r.forEach((({eventName:e,callback:o})=>t.addEventListener(e,o))),t.setAttribute("data-ion-popover-trigger","true"),()=>{r.forEach((({eventName:e,callback:o})=>t.removeEventListener(e,o))),t.removeAttribute("data-ion-popover-trigger")}})(s,e,r):o(`[ion-popover] - A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on ion-popover.`,this.el)},this.configureKeyboardInteraction=()=>{const{destroyKeyboardInteraction:t,el:e}=this;t&&t(),this.destroyKeyboardInteraction=(t=>{const e=async e=>{const o=document.activeElement;let r=[];const i=e.target?.tagName;if("ION-POPOVER"===i||"ION-ITEM"===i){try{r=Array.from(t.querySelectorAll("ion-item:not(ion-popover ion-popover *):not([disabled])"))}catch{}switch(e.key){case"ArrowLeft":await t.getParentPopover()&&t.dismiss(void 0,void 0,!1);break;case"ArrowDown":e.preventDefault();const i=((t,e)=>t[O(t,e)+1])(r,o);void 0!==i&&B(i);break;case"ArrowUp":e.preventDefault();const s=((t,e)=>t[O(t,e)-1])(r,o);void 0!==s&&B(s);break;case"Home":e.preventDefault();const a=r[0];void 0!==a&&B(a);break;case"End":e.preventDefault();const n=r[r.length-1];void 0!==n&&B(n);break;case"ArrowRight":case" ":case"Enter":if(o&&o.hasAttribute("data-ion-popover-trigger")){const t=new CustomEvent("ionPopoverActivateTrigger");o.dispatchEvent(t)}}}};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)})(e)},this.configureDismissInteraction=()=>{const{destroyDismissInteraction:t,parentPopover:e,triggerAction:o,triggerEl:r,el:i}=this;e&&r&&(t&&t(),this.destroyDismissInteraction=((t,e,o,r)=>{let i=[];const s=w(r).querySelector(".popover-content");return i="hover"===e?[{eventName:"mouseenter",callback:e=>{document.elementFromPoint(e.clientX,e.clientY)!==t&&o.dismiss(void 0,void 0,!1)}}]:[{eventName:"click",callback:e=>{e.target.closest("[data-ion-popover-trigger]")!==t?o.dismiss(void 0,void 0,!1):e.stopPropagation()}}],i.forEach((({eventName:t,callback:e})=>s.addEventListener(t,e))),()=>{i.forEach((({eventName:t,callback:e})=>s.removeEventListener(t,e)))}})(r,o,i,e))}}onTriggerChange(){this.configureTriggerInteraction()}onIsOpenChange(t,e){!0===t&&!1===e?this.present():!1===t&&!0===e&&this.dismiss()}connectedCallback(){const{configureTriggerInteraction:t,el:e}=this;n(e),t(),this.presented&&(p(e),this.recalculateContentOnHeaderReady())}disconnectedCallback(){const{destroyTriggerInteraction:t}=this;t&&t(),this.headerResizeObserver&&(this.headerResizeObserver.disconnect(),this.headerResizeObserver=void 0),this.presented&&c()}componentWillLoad(){const{el:t}=this,e=this.htmlAttributes?.id??d(t);this.parentPopover=t.closest(`ion-popover:not(#${e})`),void 0===this.alignment&&(this.alignment="ios"===D(this)?"center":"start")}componentDidLoad(){const{parentPopover:t,isOpen:e}=this;!0===e&&u((()=>this.present())),t&&k(t,"ionPopoverWillDismiss",(()=>{this.dismiss(void 0,void 0,!1)})),this.configureTriggerInteraction()}async presentFromTrigger(t,e=!1){this.focusDescendantOnPresent=e,await this.present(t),this.focusDescendantOnPresent=!1}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const e=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:e,delegate:this.workingDelegate=e?this.delegate||this.coreDelegate:this.delegate}}async present(t){const e=await this.lockController.lock();if(this.presented)return void e();const{el:o}=this,{inline:r,delegate:i}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await x(i,o,this.component,["popover-viewport"],this.componentProps,r),this.recalculateContentOnHeaderReady(),this.keyboardEvents||this.configureKeyboardInteraction(),this.configureDismissInteraction(),y(o)?await A(this.usersElement):this.keepContentsMounted||await I(),await h(this,"popoverEnter",_,q,{event:t||this.event,size:this.size,trigger:this.triggerEl,reference:this.reference,side:this.side,align:this.alignment}),this.focusDescendantOnPresent&&l(o),e()}recalculateContentOnHeaderReady(){const t=this.el.shadowRoot?.querySelector(".popover-content");if(!t)return;const e=this.usersElement||t,o=e.querySelector("ion-header"),r=e.querySelectorAll("ion-content");o&&0!==r.length&&(this.headerResizeObserver&&(this.headerResizeObserver.disconnect(),this.headerResizeObserver=void 0),this.headerResizeObserver=new ResizeObserver((async()=>{if(o.offsetHeight>0){this.headerResizeObserver?.disconnect(),this.headerResizeObserver=void 0;for(const t of r)await t.recalculateDimensions()}})),this.headerResizeObserver.observe(o))}async dismiss(t,e,o=!0){const r=await this.lockController.lock(),{destroyKeyboardInteraction:i,destroyDismissInteraction:s}=this;o&&this.parentPopover&&this.parentPopover.dismiss(t,e,o);const a=await v(this,t,e,"popoverLeave",K,Q,this.event);if(a){i&&(i(),this.destroyKeyboardInteraction=void 0),s&&(s(),this.destroyDismissInteraction=void 0);const{delegate:t}=this.getDelegate();await b(t,this.usersElement)}return r(),a}async getParentPopover(){return this.parentPopover}onDidDismiss(){return f(this.el,"ionPopoverDidDismiss")}onWillDismiss(){return f(this.el,"ionPopoverWillDismiss")}render(){const t=D(this),{onLifecycle:e,parentPopover:o,dismissOnSelect:s,side:a,arrow:n,htmlAttributes:p,focusTrap:c}=this,d=T("desktop"),h=n&&!o;return r(i,{key:"b5e9c788f58397203976d5f8302dfb89e916efe1","aria-modal":"true","no-router":!0,tabindex:"-1",...p,style:{zIndex:`${2e4+this.overlayIndex}`},class:{...$(this.cssClass),[t]:!0,"popover-translucent":this.translucent,"overlay-hidden":!0,"popover-desktop":d,[`popover-side-${a}`]:!0,[g]:!1===c,"popover-nested":!!o},onIonPopoverDidPresent:e,onIonPopoverWillPresent:e,onIonPopoverWillDismiss:e,onIonPopoverDidDismiss:e,onIonBackdropTap:this.onBackdropTap},!o&&r("ion-backdrop",{key:"f3977833c5b2c0087c286ee54363b478d69eb115",tappable:this.backdropDismiss,visible:this.showBackdrop,part:"backdrop"}),r("div",{key:"1059893d6fd2932ca8adcdf8d45a5d66f4794727",class:"popover-wrapper ion-overlay-wrapper",onClick:s?()=>this.dismiss():void 0},h&&r("div",{key:"24d7988bdd95882ad77fcaa7112aeda55878bee4",class:"popover-arrow",part:"arrow"}),r("div",{key:"4d6992e0a9d629f11763045f9199f9a77fa521ab",class:"popover-content",part:"content"},r("slot",{key:"b29747419620a01a6c34e9e846cd529b0b210145"}))))}get el(){return s(this)}static get watchers(){return{trigger:[{onTriggerChange:0}],triggerAction:[{onTriggerChange:0}],isOpen:[{onIsOpenChange:0}]}}},Z={ionPopoverDidPresent:"ionViewDidEnter",ionPopoverWillPresent:"ionViewWillEnter",ionPopoverWillDismiss:"ionViewWillLeave",ionPopoverDidDismiss:"ionViewDidLeave"};U.style={ios:':host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host(.select-popover-rich-content){--width:clamp(250px, calc(100vw - 40px), 400px)}:host{--width:200px;--max-height:90%;--box-shadow:none;--backdrop-opacity:var(--ion-backdrop-opacity, 0.08)}:host(.popover-desktop){--box-shadow:0px 4px 16px 0px rgba(0, 0, 0, 0.12)}.popover-content{border-radius:10px}:host(.popover-desktop) .popover-content{border:0.5px solid var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.popover-arrow{display:block;position:absolute;width:20px;height:10px;overflow:hidden;z-index:11}.popover-arrow::after{top:3px;border-radius:3px;position:absolute;width:14px;height:14px;-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--background);content:"";z-index:10}.popover-arrow::after{inset-inline-start:3px}:host(.popover-bottom) .popover-arrow{top:auto;bottom:-10px}:host(.popover-bottom) .popover-arrow::after{top:-6px}:host(.popover-side-left) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host(.popover-side-right) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}:host(.popover-side-top) .popover-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host(.popover-side-start) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host-context([dir=rtl]):host(.popover-side-start) .popover-arrow,:host-context([dir=rtl]).popover-side-start .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@supports selector(:dir(rtl)){:host(.popover-side-start:dir(rtl)) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}}:host(.popover-side-end) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}:host-context([dir=rtl]):host(.popover-side-end) .popover-arrow,:host-context([dir=rtl]).popover-side-end .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}@supports selector(:dir(rtl)){:host(.popover-side-end:dir(rtl)) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}}.popover-arrow,.popover-content{opacity:0}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.popover-translucent) .popover-content,:host(.popover-translucent) .popover-arrow::after{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}',md:":host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host(.select-popover-rich-content){--width:clamp(250px, calc(100vw - 40px), 400px)}:host{--width:250px;--max-height:90%;--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}.popover-content{border-radius:4px;-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]) .popover-content{-webkit-transform-origin:right top;transform-origin:right top}[dir=rtl] .popover-content{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.popover-content:dir(rtl){-webkit-transform-origin:right top;transform-origin:right top}}.popover-viewport{-webkit-transition-delay:100ms;transition-delay:100ms}.popover-wrapper{opacity:0}"};export{U as ion_popover}
|
|
4
|
+
import{r as t,d as e,a as o,h as r,f as i,g as s}from"./p-D9OR05yj.js";import{B as a,h as n,r as p,j as c,k as d,e as h,o as l,f as v,g as f,F as g}from"./p-DZUqAr_6.js";import{C as m,a as x,d as b}from"./p-B4ELlbJE.js";import{g as w,r as u,f as k,h as y}from"./p-B4xjg_Qu.js";import{c as P}from"./p-B-hirT0v.js";import{b as D,a as T}from"./p-CrAPHbJ3.js";import{g as $}from"./p-byZM6qHV.js";import{e as A,w as I}from"./p-PkaVMJga.js";import{c as L}from"./p-B4wzg4z4.js";import"./p-B_gJaBk0.js";import"./p-Dojwmvde.js";let W=null,C=!1;const N=t=>{if(null!==W)return W;if(null===t.body)return{top:0,bottom:0,left:0,right:0};const e=t.createElement("div");e.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);padding-bottom:var(--ion-safe-area-bottom,0px);padding-left:var(--ion-safe-area-left,0px);padding-right:var(--ion-safe-area-right,0px);",t.body.appendChild(e);const o=getComputedStyle(e),r={top:parseFloat(o.paddingTop)||0,bottom:parseFloat(o.paddingBottom)||0,left:parseFloat(o.paddingLeft)||0,right:parseFloat(o.paddingRight)||0};return e.remove(),W=r,C||(C=!0,u((()=>{W=null,C=!1}))),r},j=t=>{if(!t)return 1;const e=t.currentCSSZoom;if("number"==typeof e&&e>0)return e;const{width:o}=t.getBoundingClientRect(),{offsetWidth:r}=t;if(r>0&&o>0){const t=o/r;return Math.abs(t-1)<.01?1:t}return 1},z=(t,e,o,r=1)=>{const i=e.getBoundingClientRect(),s=i.height/r;let a=i.width/r;return"cover"===t&&o&&(a=o.getBoundingClientRect().width/r),{contentWidth:a,contentHeight:s}},O=(t,e)=>e&&"ION-ITEM"===e.tagName?t.findIndex((t=>t===e)):-1,B=t=>{const e=w(t).querySelector("button");e&&u((()=>e.focus()))},S=(t,e,o,r,i,s,a,n,p,c,d,h=1)=>{let l={top:0,left:0,width:0,height:0};if("event"===s){if(!d)return p;l={top:d.clientY/h,left:d.clientX/h,width:1,height:1}}else{const t=d,e=c||t?.detail?.ionShadowTarget||t?.target;if(!e)return p;const o=e.getBoundingClientRect();l={top:o.top/h,left:o.left/h,width:o.width/h,height:o.height/h}}const v=H(a,l,e,o,r,i,t),f=R(n,a,l,e,o),g=v.top+f.top,m=v.left+f.left,{arrowTop:x,arrowLeft:b}=M(a,r,i,g,m,e,o,t),{originX:w,originY:u}=E(a,n,t);return{top:g,left:m,referenceCoordinates:l,arrowTop:x,arrowLeft:b,originX:w,originY:u}},E=(t,e,o)=>{switch(t){case"top":return{originX:X(e),originY:"bottom"};case"bottom":return{originX:X(e),originY:"top"};case"left":return{originX:"right",originY:Y(e)};case"right":return{originX:"left",originY:Y(e)};case"start":return{originX:o?"left":"right",originY:Y(e)};case"end":return{originX:o?"right":"left",originY:Y(e)}}},X=t=>{switch(t){case"start":return"left";case"center":return"center";case"end":return"right"}},Y=t=>{switch(t){case"start":return"top";case"center":return"center";case"end":return"bottom"}},M=(t,e,o,r,i,s,a,n)=>{const p={arrowTop:r+a/2-e/2,arrowLeft:i+s-e/2},c={arrowTop:r+a/2-e/2,arrowLeft:i-1.5*e};switch(t){case"top":return{arrowTop:r+a,arrowLeft:i+s/2-e/2};case"bottom":return{arrowTop:r-o,arrowLeft:i+s/2-e/2};case"left":return p;case"right":return c;case"start":return n?c:p;case"end":return n?p:c;default:return{arrowTop:0,arrowLeft:0}}},H=(t,e,o,r,i,s,a)=>{const n={top:e.top,left:e.left-o-i},p={top:e.top,left:e.left+e.width+i};switch(t){case"top":return{top:e.top-r-s,left:e.left};case"right":return p;case"bottom":return{top:e.top+e.height+s,left:e.left};case"left":return n;case"start":return a?p:n;case"end":return a?n:p}},R=(t,e,o,r,i)=>{switch(t){case"center":return F(e,o,r,i);case"end":return V(e,o,r,i);default:return{top:0,left:0}}},V=(t,e,o,r)=>{switch(t){case"start":case"end":case"left":case"right":return{top:-(r-e.height),left:0};default:return{top:0,left:-(o-e.width)}}},F=(t,e,o,r)=>{switch(t){case"start":case"end":case"left":case"right":return{top:-(r/2-e.height/2),left:0};default:return{top:0,left:-(o/2-e.width/2)}}},J=(t,e,o,r,i,s,a,n,p,c,d,h,l=0,v=0,f=0)=>{let g,m=l,x=o,b=e,w=c,u=d,k=!1,y=!1,P=!1,D=!1;const T=h?h.top+h.height:s/2-n/2,$=h?h.height:0;let A=!1;if(x<r+p.left?(x=r,k=!0,w="left"):a+r+x+p.right>i&&(y=!0,x=i-a-r,w="right"),T+$+n>s-p.bottom&&("top"===t||"bottom"===t)){const t=T-n-$-(f-1);t>=p.top+r?(b=t,m=b+n,u="bottom",A=!0):(g=r,D=!0,b>=s-p.bottom-r&&(b=p.top+r,P=!0))}return{top:b,left:x,bottom:g,originX:w,originY:u,checkSafeAreaLeft:k,checkSafeAreaRight:y,checkSafeAreaTop:P,checkSafeAreaBottom:D,arrowTop:m,arrowLeft:v,addPopoverBottomClass:A,hideArrow:!1}},_=(t,e)=>{const{event:o,size:r,trigger:i,reference:s,side:a,align:n}=e,p=t.ownerDocument,c="rtl"===p.dir,d=w(t),h=d.querySelector(".popover-content"),l=d.querySelector(".popover-arrow"),v=j(h),f=p.defaultView.innerWidth/v,g=p.defaultView.innerHeight/v,m=i||o?.detail?.ionShadowTarget||o?.target,{contentWidth:x,contentHeight:b}=z(r,h,m,v),{arrowWidth:u,arrowHeight:k}=((t,e=1)=>{if(!t)return{arrowWidth:0,arrowHeight:0};const{width:o,height:r}=t.getBoundingClientRect();return{arrowWidth:o/e,arrowHeight:r/e}})(l,v),y=S(c,x,b,u,k,s,a,n,{top:g/2-b/2,left:f/2-x/2,originX:c?"right":"left",originY:"top"},i,o,v),P="cover"===r?0:5,D=N(p),T="cover"===r?{top:0,bottom:0,left:0,right:0}:{top:Math.max(D.top,25),bottom:Math.max(D.bottom,25),left:Math.max(D.left,25),right:Math.max(D.right,25)},{originX:$,originY:A,top:I,left:W,bottom:C,checkSafeAreaLeft:O,checkSafeAreaRight:B,checkSafeAreaTop:E,checkSafeAreaBottom:X,arrowTop:Y,arrowLeft:M,addPopoverBottomClass:H}=J(a,y.top,y.left,P,f,g,x,b,T,y.originX,y.originY,y.referenceCoordinates,y.arrowTop,y.arrowLeft,k),R=L(),V=L(),F=L();return V.addElement(d.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),F.addElement(d.querySelector(".popover-arrow")).addElement(d.querySelector(".popover-content")).fromTo("opacity",.01,1),R.easing("ease").duration(100).beforeAddWrite((()=>{if("cover"===r&&t.style.setProperty("--width",`${x}px`),H&&t.classList.add("popover-bottom"),void 0!==C){let t=`${C}px`;X&&(t=`${C}px + var(--ion-safe-area-bottom, 0px)`),h.style.setProperty("bottom",`calc(${t})`)}let e=`${W}px`;O&&(e=`${W}px + var(--ion-safe-area-left, 0px)`),B&&(e=`${W}px - var(--ion-safe-area-right, 0px)`);let s=`${I}px`;if(E&&(s=`${I}px + var(--ion-safe-area-top, 0px)`),h.style.setProperty("top",`calc(${s} + var(--offset-y, 0))`),h.style.setProperty("left",`calc(${e} + var(--offset-x, 0))`),h.style.setProperty("transform-origin",`${A} ${$}`),null!==l){const t=((t,e=!1,o,r)=>!(!o&&!r||"top"!==t&&"bottom"!==t&&e))(a,y.top!==I||y.left!==W,o,i);t?(l.style.setProperty("top",`calc(${Y}px + var(--offset-y, 0))`),l.style.setProperty("left",`calc(${M}px + var(--offset-x, 0))`)):l.style.setProperty("display","none")}})).addAnimation([V,F])},q=t=>{const e=w(t),o=e.querySelector(".popover-content"),r=e.querySelector(".popover-arrow"),i=L(),s=L(),a=L();return s.addElement(e.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0),a.addElement(e.querySelector(".popover-arrow")).addElement(e.querySelector(".popover-content")).fromTo("opacity",.99,0),i.easing("ease").afterAddWrite((()=>{t.style.removeProperty("--width"),t.classList.remove("popover-bottom"),o.style.removeProperty("top"),o.style.removeProperty("left"),o.style.removeProperty("bottom"),o.style.removeProperty("transform-origin"),r&&(r.style.removeProperty("top"),r.style.removeProperty("left"),r.style.removeProperty("display"))})).duration(300).addAnimation([s,a])},K=(t,e)=>{const{event:o,size:r,trigger:i,reference:s,side:a,align:n}=e,p=t.ownerDocument,c="rtl"===p.dir,d=w(t),h=d.querySelector(".popover-content"),l=j(h),v=p.defaultView.innerWidth/l,f=p.defaultView.innerHeight/l,g=i||o?.detail?.ionShadowTarget||o?.target,{contentWidth:m,contentHeight:x}=z(r,h,g,l),b=S(c,m,x,0,0,s,a,n,{top:f/2-x/2,left:v/2-m/2,originX:c?"right":"left",originY:"top"},i,o,l),u="cover"===r?0:12,k="cover"===r?{top:0,bottom:0,left:0,right:0}:N(p),{originX:y,originY:P,top:D,left:T,bottom:$,checkSafeAreaLeft:A,checkSafeAreaRight:I,checkSafeAreaTop:W,checkSafeAreaBottom:C,addPopoverBottomClass:O}=J(a,b.top,b.left,u,v,f,m,x,k,b.originX,b.originY,b.referenceCoordinates);let B=`${T}px`;A&&(B=`${T}px + var(--ion-safe-area-left, 0px)`),I&&(B=`${T}px - var(--ion-safe-area-right, 0px)`);let E=`${D}px`;W&&(E=`${D}px + var(--ion-safe-area-top, 0px)`);const X=L(),Y=L(),M=L(),H=L(),R=L();return Y.addElement(d.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),M.addElement(d.querySelector(".popover-wrapper")).duration(150).fromTo("opacity",.01,1),H.addElement(h).beforeStyles({top:`calc(${E} + var(--offset-y, 0px))`,left:`calc(${B} + var(--offset-x, 0px))`,"transform-origin":`${P} ${y}`}).beforeAddWrite((()=>{if(void 0!==$){let t=`${$}px`;C&&(t=`${$}px + var(--ion-safe-area-bottom, 0px)`),h.style.setProperty("bottom",`calc(${t})`)}})).fromTo("transform","scale(0.8)","scale(1)"),R.addElement(d.querySelector(".popover-viewport")).fromTo("opacity",.01,1),X.easing("cubic-bezier(0.36,0.66,0.04,1)").duration(300).beforeAddWrite((()=>{"cover"===r&&t.style.setProperty("--width",`${m}px`),O&&t.classList.add("popover-bottom")})).addAnimation([Y,M,H,R])},U=t=>{const e=w(t),o=e.querySelector(".popover-content"),r=L(),i=L(),s=L();return i.addElement(e.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0),s.addElement(e.querySelector(".popover-wrapper")).fromTo("opacity",.99,0),r.easing("ease").afterAddWrite((()=>{t.style.removeProperty("--width"),t.classList.remove("popover-bottom"),o.style.removeProperty("top"),o.style.removeProperty("left"),o.style.removeProperty("bottom"),o.style.removeProperty("transform-origin")})).duration(150).addAnimation([i,s])},Z=class{constructor(r){t(this,r),this.didPresent=e(this,"ionPopoverDidPresent",7),this.willPresent=e(this,"ionPopoverWillPresent",7),this.willDismiss=e(this,"ionPopoverWillDismiss",7),this.didDismiss=e(this,"ionPopoverDidDismiss",7),this.didPresentShorthand=e(this,"didPresent",7),this.willPresentShorthand=e(this,"willPresent",7),this.willDismissShorthand=e(this,"willDismiss",7),this.didDismissShorthand=e(this,"didDismiss",7),this.ionMount=e(this,"ionMount",7),this.parentPopover=null,this.coreDelegate=m(),this.lockController=P(),this.inline=!1,this.focusDescendantOnPresent=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.backdropDismiss=!0,this.showBackdrop=!0,this.translucent=!1,this.animated=!0,this.triggerAction="click",this.size="auto",this.dismissOnSelect=!1,this.reference="trigger",this.side="bottom",this.arrow=!0,this.isOpen=!1,this.keyboardEvents=!1,this.focusTrap=!0,this.keepContentsMounted=!1,this.onBackdropTap=()=>{this.dismiss(void 0,a)},this.onLifecycle=t=>{const e=this.usersElement,o=Q[t.type];if(e&&o){const r=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});e.dispatchEvent(r)}},this.configureTriggerInteraction=()=>{const{trigger:t,triggerAction:e,el:r,destroyTriggerInteraction:i}=this;if(i&&i(),void 0===t)return;const s=this.triggerEl=void 0!==t?document.getElementById(t):null;s?this.destroyTriggerInteraction=((t,e,o)=>{let r=[];switch(e){case"hover":let t;r=[{eventName:"mouseenter",callback:async e=>{e.stopPropagation(),t&&clearTimeout(t),t=setTimeout((()=>{u((()=>{o.presentFromTrigger(e),t=void 0}))}),100)}},{eventName:"mouseleave",callback:e=>{t&&clearTimeout(t);const r=e.relatedTarget;r&&r.closest("ion-popover")!==o&&o.dismiss(void 0,void 0,!1)}},{eventName:"click",callback:t=>t.stopPropagation()},{eventName:"ionPopoverActivateTrigger",callback:t=>o.presentFromTrigger(t,!0)}];break;case"context-menu":r=[{eventName:"contextmenu",callback:t=>{t.preventDefault(),o.presentFromTrigger(t)}},{eventName:"click",callback:t=>t.stopPropagation()},{eventName:"ionPopoverActivateTrigger",callback:t=>o.presentFromTrigger(t,!0)}];break;default:r=[{eventName:"click",callback:t=>o.presentFromTrigger(t)},{eventName:"ionPopoverActivateTrigger",callback:t=>o.presentFromTrigger(t,!0)}]}return r.forEach((({eventName:e,callback:o})=>t.addEventListener(e,o))),t.setAttribute("data-ion-popover-trigger","true"),()=>{r.forEach((({eventName:e,callback:o})=>t.removeEventListener(e,o))),t.removeAttribute("data-ion-popover-trigger")}})(s,e,r):o(`[ion-popover] - A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on ion-popover.`,this.el)},this.configureKeyboardInteraction=()=>{const{destroyKeyboardInteraction:t,el:e}=this;t&&t(),this.destroyKeyboardInteraction=(t=>{const e=async e=>{const o=document.activeElement;let r=[];const i=e.target?.tagName;if("ION-POPOVER"===i||"ION-ITEM"===i){try{r=Array.from(t.querySelectorAll("ion-item:not(ion-popover ion-popover *):not([disabled])"))}catch{}switch(e.key){case"ArrowLeft":await t.getParentPopover()&&t.dismiss(void 0,void 0,!1);break;case"ArrowDown":e.preventDefault();const i=((t,e)=>t[O(t,e)+1])(r,o);void 0!==i&&B(i);break;case"ArrowUp":e.preventDefault();const s=((t,e)=>t[O(t,e)-1])(r,o);void 0!==s&&B(s);break;case"Home":e.preventDefault();const a=r[0];void 0!==a&&B(a);break;case"End":e.preventDefault();const n=r[r.length-1];void 0!==n&&B(n);break;case"ArrowRight":case" ":case"Enter":if(o&&o.hasAttribute("data-ion-popover-trigger")){const t=new CustomEvent("ionPopoverActivateTrigger");o.dispatchEvent(t)}}}};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)})(e)},this.configureDismissInteraction=()=>{const{destroyDismissInteraction:t,parentPopover:e,triggerAction:o,triggerEl:r,el:i}=this;e&&r&&(t&&t(),this.destroyDismissInteraction=((t,e,o,r)=>{let i=[];const s=w(r).querySelector(".popover-content");return i="hover"===e?[{eventName:"mouseenter",callback:e=>{document.elementFromPoint(e.clientX,e.clientY)!==t&&o.dismiss(void 0,void 0,!1)}}]:[{eventName:"click",callback:e=>{e.target.closest("[data-ion-popover-trigger]")!==t?o.dismiss(void 0,void 0,!1):e.stopPropagation()}}],i.forEach((({eventName:t,callback:e})=>s.addEventListener(t,e))),()=>{i.forEach((({eventName:t,callback:e})=>s.removeEventListener(t,e)))}})(r,o,i,e))}}onTriggerChange(){this.configureTriggerInteraction()}onIsOpenChange(t,e){!0===t&&!1===e?this.present():!1===t&&!0===e&&this.dismiss()}connectedCallback(){const{configureTriggerInteraction:t,el:e}=this;n(e),t(),this.presented&&(p(e),this.recalculateContentOnHeaderReady())}disconnectedCallback(){const{destroyTriggerInteraction:t}=this;t&&t(),this.headerResizeObserver&&(this.headerResizeObserver.disconnect(),this.headerResizeObserver=void 0),this.presented&&c()}componentWillLoad(){const{el:t}=this,e=this.htmlAttributes?.id??d(t);this.parentPopover=t.closest(`ion-popover:not(#${e})`),void 0===this.alignment&&(this.alignment="ios"===D(this)?"center":"start")}componentDidLoad(){const{parentPopover:t,isOpen:e}=this;!0===e&&u((()=>this.present())),t&&k(t,"ionPopoverWillDismiss",(()=>{this.dismiss(void 0,void 0,!1)})),this.configureTriggerInteraction()}async presentFromTrigger(t,e=!1){this.focusDescendantOnPresent=e,await this.present(t),this.focusDescendantOnPresent=!1}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const e=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:e,delegate:this.workingDelegate=e?this.delegate||this.coreDelegate:this.delegate}}async present(t){const e=await this.lockController.lock();if(this.presented)return void e();const{el:o}=this,{inline:r,delegate:i}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await x(i,o,this.component,["popover-viewport"],this.componentProps,r),this.recalculateContentOnHeaderReady(),this.keyboardEvents||this.configureKeyboardInteraction(),this.configureDismissInteraction(),y(o)?await A(this.usersElement):this.keepContentsMounted||await I(),await h(this,"popoverEnter",_,K,{event:t||this.event,size:this.size,trigger:this.triggerEl,reference:this.reference,side:this.side,align:this.alignment}),this.focusDescendantOnPresent&&l(o),e()}recalculateContentOnHeaderReady(){const t=this.el.shadowRoot?.querySelector(".popover-content");if(!t)return;const e=this.usersElement||t,o=e.querySelector("ion-header"),r=e.querySelectorAll("ion-content");o&&0!==r.length&&(this.headerResizeObserver&&(this.headerResizeObserver.disconnect(),this.headerResizeObserver=void 0),this.headerResizeObserver=new ResizeObserver((async()=>{if(o.offsetHeight>0){this.headerResizeObserver?.disconnect(),this.headerResizeObserver=void 0;for(const t of r)await t.recalculateDimensions()}})),this.headerResizeObserver.observe(o))}async dismiss(t,e,o=!0){const r=await this.lockController.lock(),{destroyKeyboardInteraction:i,destroyDismissInteraction:s}=this;o&&this.parentPopover&&this.parentPopover.dismiss(t,e,o);const a=await v(this,t,e,"popoverLeave",q,U,this.event);if(a){i&&(i(),this.destroyKeyboardInteraction=void 0),s&&(s(),this.destroyDismissInteraction=void 0);const{delegate:t}=this.getDelegate();await b(t,this.usersElement)}return r(),a}async getParentPopover(){return this.parentPopover}onDidDismiss(){return f(this.el,"ionPopoverDidDismiss")}onWillDismiss(){return f(this.el,"ionPopoverWillDismiss")}render(){const t=D(this),{onLifecycle:e,parentPopover:o,dismissOnSelect:s,side:a,arrow:n,htmlAttributes:p,focusTrap:c}=this,d=T("desktop"),h=n&&!o;return r(i,{key:"b5e9c788f58397203976d5f8302dfb89e916efe1","aria-modal":"true","no-router":!0,tabindex:"-1",...p,style:{zIndex:`${2e4+this.overlayIndex}`},class:{...$(this.cssClass),[t]:!0,"popover-translucent":this.translucent,"overlay-hidden":!0,"popover-desktop":d,[`popover-side-${a}`]:!0,[g]:!1===c,"popover-nested":!!o},onIonPopoverDidPresent:e,onIonPopoverWillPresent:e,onIonPopoverWillDismiss:e,onIonPopoverDidDismiss:e,onIonBackdropTap:this.onBackdropTap},!o&&r("ion-backdrop",{key:"f3977833c5b2c0087c286ee54363b478d69eb115",tappable:this.backdropDismiss,visible:this.showBackdrop,part:"backdrop"}),r("div",{key:"1059893d6fd2932ca8adcdf8d45a5d66f4794727",class:"popover-wrapper ion-overlay-wrapper",onClick:s?()=>this.dismiss():void 0},h&&r("div",{key:"24d7988bdd95882ad77fcaa7112aeda55878bee4",class:"popover-arrow",part:"arrow"}),r("div",{key:"4d6992e0a9d629f11763045f9199f9a77fa521ab",class:"popover-content",part:"content"},r("slot",{key:"b29747419620a01a6c34e9e846cd529b0b210145"}))))}get el(){return s(this)}static get watchers(){return{trigger:[{onTriggerChange:0}],triggerAction:[{onTriggerChange:0}],isOpen:[{onIsOpenChange:0}]}}},Q={ionPopoverDidPresent:"ionViewDidEnter",ionPopoverWillPresent:"ionViewWillEnter",ionPopoverWillDismiss:"ionViewWillLeave",ionPopoverDidDismiss:"ionViewDidLeave"};Z.style={ios:':host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host(.select-popover-rich-content){--width:clamp(250px, calc(100vw - 40px), 400px)}:host{--width:200px;--max-height:90%;--box-shadow:none;--backdrop-opacity:var(--ion-backdrop-opacity, 0.08)}:host(.popover-desktop){--box-shadow:0px 4px 16px 0px rgba(0, 0, 0, 0.12)}.popover-content{border-radius:10px}:host(.popover-desktop) .popover-content{border:0.5px solid var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.popover-arrow{display:block;position:absolute;width:20px;height:10px;overflow:hidden;z-index:11}.popover-arrow::after{top:3px;border-radius:3px;position:absolute;width:14px;height:14px;-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--background);content:"";z-index:10}.popover-arrow::after{inset-inline-start:3px}:host(.popover-bottom) .popover-arrow{top:auto;bottom:-10px}:host(.popover-bottom) .popover-arrow::after{top:-6px}:host(.popover-side-left) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host(.popover-side-right) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}:host(.popover-side-top) .popover-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host(.popover-side-start) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host-context([dir=rtl]):host(.popover-side-start) .popover-arrow,:host-context([dir=rtl]).popover-side-start .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@supports selector(:dir(rtl)){:host(.popover-side-start:dir(rtl)) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}}:host(.popover-side-end) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}:host-context([dir=rtl]):host(.popover-side-end) .popover-arrow,:host-context([dir=rtl]).popover-side-end .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}@supports selector(:dir(rtl)){:host(.popover-side-end:dir(rtl)) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}}.popover-arrow,.popover-content{opacity:0}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.popover-translucent) .popover-content,:host(.popover-translucent) .popover-arrow::after{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}',md:":host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host(.select-popover-rich-content){--width:clamp(250px, calc(100vw - 40px), 400px)}:host{--width:250px;--max-height:90%;--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}.popover-content{border-radius:4px;-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]) .popover-content{-webkit-transform-origin:right top;transform-origin:right top}[dir=rtl] .popover-content{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.popover-content:dir(rtl){-webkit-transform-origin:right top;transform-origin:right top}}.popover-viewport{-webkit-transition-delay:100ms;transition-delay:100ms}.popover-wrapper{opacity:0}"};export{Z as ion_popover}
|
|
@@ -168,10 +168,7 @@ export interface IonicConfig {
|
|
|
168
168
|
/**
|
|
169
169
|
* @experimental
|
|
170
170
|
* If `true`, the [CloseWatcher API](https://github.com/WICG/close-watcher) will be used to handle
|
|
171
|
-
* Escape key and
|
|
172
|
-
* while a menu or an overlay other than a toast is open, so back navigation works as usual
|
|
173
|
-
* otherwise. Hybrid apps still handle the hardware back button through the native `backbutton`
|
|
174
|
-
* event.
|
|
171
|
+
* all Escape key and hardware back button presses to dismiss menus and overlays and to navigate.
|
|
175
172
|
* Note that the `hardwareBackButton` config option must also be `true`.
|
|
176
173
|
*/
|
|
177
174
|
experimentalCloseWatcher?: boolean;
|
|
@@ -26,17 +26,6 @@ export declare const shouldUseCloseWatcher: () => any;
|
|
|
26
26
|
* will still happen.
|
|
27
27
|
*/
|
|
28
28
|
export declare const blockHardwareBackButton: () => void;
|
|
29
|
-
/**
|
|
30
|
-
* Registers a check for whether the back button
|
|
31
|
-
* has something to close. The CloseWatcher is only
|
|
32
|
-
* active while one of these checks passes.
|
|
33
|
-
*/
|
|
34
|
-
export declare const addCloseWatcherCondition: (condition: () => boolean) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Call this whenever something the back button
|
|
37
|
-
* can close opens or closes.
|
|
38
|
-
*/
|
|
39
|
-
export declare const updateCloseWatcher: () => void;
|
|
40
29
|
export declare const startHardwareBackButton: () => void;
|
|
41
30
|
export declare const OVERLAY_BACK_BUTTON_PRIORITY = 100;
|
|
42
31
|
export declare const MENU_BACK_BUTTON_PRIORITY = 99;
|
|
@@ -82,8 +82,7 @@ export declare const setRootAriaHidden: (hidden?: boolean) => void;
|
|
|
82
82
|
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
83
83
|
* an overlay is removed from the DOM without going through
|
|
84
84
|
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
85
|
-
* overlay during a route change).
|
|
86
|
-
* CloseWatcher if nothing is left to close.
|
|
85
|
+
* overlay during a route change).
|
|
87
86
|
*
|
|
88
87
|
* Should be called from an overlay's `disconnectedCallback`
|
|
89
88
|
* when the overlay was still presented at the time of removal.
|
|
@@ -91,9 +90,7 @@ export declare const setRootAriaHidden: (hidden?: boolean) => void;
|
|
|
91
90
|
export declare const cleanupRootFocusTrapAccessibility: () => void;
|
|
92
91
|
/**
|
|
93
92
|
* Re-applies the root lock that `cleanupRootFocusTrapAccessibility()` released.
|
|
94
|
-
* Call from `connectedCallback` when the overlay is still presented.
|
|
95
|
-
* re-arms the CloseWatcher, which every overlay needs, so that happens
|
|
96
|
-
* before the `locksAppRoot` check.
|
|
93
|
+
* Call from `connectedCallback` when the overlay is still presented.
|
|
97
94
|
*
|
|
98
95
|
* A synchronous move keeps the overlay connected, so the lock survives. A
|
|
99
96
|
* detach with a re-insert in a later task releases it, which is the shape a
|
package/hydrate/index.js
CHANGED
|
@@ -8083,11 +8083,6 @@ const CoreDelegate = () => {
|
|
|
8083
8083
|
|
|
8084
8084
|
let lastOverlayIndex = 0;
|
|
8085
8085
|
let lastId = 0;
|
|
8086
|
-
/**
|
|
8087
|
-
* Every overlay except toast, which doesn't trap
|
|
8088
|
-
* focus or close on back.
|
|
8089
|
-
*/
|
|
8090
|
-
const NON_TOAST_OVERLAYS = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover';
|
|
8091
8086
|
const activeAnimations = new WeakMap();
|
|
8092
8087
|
/**
|
|
8093
8088
|
* Determines if the overlay's backdrop is always blocking (no background interaction).
|
|
@@ -8212,7 +8207,7 @@ const focusElementInOverlay = (hostToFocus, overlay) => {
|
|
|
8212
8207
|
* Should NOT include: Toast
|
|
8213
8208
|
*/
|
|
8214
8209
|
const trapKeyboardFocus = (ev, doc) => {
|
|
8215
|
-
const lastOverlay = getPresentedOverlay(doc,
|
|
8210
|
+
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover');
|
|
8216
8211
|
const target = ev.target;
|
|
8217
8212
|
/**
|
|
8218
8213
|
* If no active overlay, ignore this event.
|
|
@@ -8518,8 +8513,7 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
8518
8513
|
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
8519
8514
|
* an overlay is removed from the DOM without going through
|
|
8520
8515
|
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
8521
|
-
* overlay during a route change).
|
|
8522
|
-
* CloseWatcher if nothing is left to close.
|
|
8516
|
+
* overlay during a route change).
|
|
8523
8517
|
*
|
|
8524
8518
|
* Should be called from an overlay's `disconnectedCallback`
|
|
8525
8519
|
* when the overlay was still presented at the time of removal.
|
|
@@ -8549,9 +8543,7 @@ const applyRootLock = (el) => {
|
|
|
8549
8543
|
};
|
|
8550
8544
|
/**
|
|
8551
8545
|
* Re-applies the root lock that `cleanupRootFocusTrapAccessibility()` released.
|
|
8552
|
-
* Call from `connectedCallback` when the overlay is still presented.
|
|
8553
|
-
* re-arms the CloseWatcher, which every overlay needs, so that happens
|
|
8554
|
-
* before the `locksAppRoot` check.
|
|
8546
|
+
* Call from `connectedCallback` when the overlay is still presented.
|
|
8555
8547
|
*
|
|
8556
8548
|
* A synchronous move keeps the overlay connected, so the lock survives. A
|
|
8557
8549
|
* detach with a re-insert in a later task releases it, which is the shape a
|
|
@@ -24587,14 +24579,14 @@ class Menu {
|
|
|
24587
24579
|
* the ionBackButton listener in the menu controller
|
|
24588
24580
|
* will handle closing the menu when Escape is pressed.
|
|
24589
24581
|
*/
|
|
24590
|
-
return (hAsync(Host, { key: '
|
|
24582
|
+
return (hAsync(Host, { key: '1208ba437fa58680325408d3d4c8580950da1d68', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
|
|
24591
24583
|
[mode]: true,
|
|
24592
24584
|
[`menu-type-${type}`]: true,
|
|
24593
24585
|
'menu-enabled': !disabled,
|
|
24594
24586
|
[`menu-side-${side}`]: true,
|
|
24595
24587
|
'menu-pane-visible': isPaneVisible,
|
|
24596
24588
|
'split-pane-side': hostContext('ion-split-pane', el),
|
|
24597
|
-
} }, hAsync("div", { key: '
|
|
24589
|
+
} }, hAsync("div", { key: 'c0ddc957b7a7956b41901d77ae02d91e73071c55', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, hAsync("slot", { key: '6e44c56116431a024f114ab85ded1b822c942fac' })), hAsync("ion-backdrop", { key: '5f4bbcf84444d96ec6b02bf567e1aaf95f59078d', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
|
|
24598
24590
|
}
|
|
24599
24591
|
get el() { return getElement(this); }
|
|
24600
24592
|
static get watchers() { return {
|