@ionic/core 8.7.10-dev.11763478209.1d9c4cd8 → 8.7.10-dev.11763578076.1047c3c7
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/ion-datetime.js +2 -33
- package/dist/cjs/{animation-Bt3H9L1C.js → animation-B70U3AYi.js} +1 -1
- package/dist/cjs/{app-globals-Ciccnk9_.js → app-globals-D_8sGbx8.js} +1 -1
- package/dist/cjs/{button-active-CMc8cD90.js → button-active-TAhq9qwd.js} +1 -1
- package/dist/cjs/{config-C5fsO43a.js → config-4ndaqsYM.js} +1 -1
- package/dist/cjs/{data-JwZKaIQB.js → data-j96wY7cX.js} +1 -1
- package/dist/cjs/{framework-delegate-DMJRBuDi.js → framework-delegate-DZC3n8LU.js} +1 -1
- package/dist/cjs/{hardware-back-button-VCK4V3mG.js → hardware-back-button-pmRhkPKl.js} +1 -1
- package/dist/cjs/{helpers-DrTqNghc.js → helpers-Crx5-kj7.js} +1 -1
- package/dist/cjs/{index-C534ULug.js → index-BOY9qrZP.js} +2 -2
- package/dist/cjs/{index-CO6eryBo.js → index-CRulAvdl.js} +2 -2
- package/dist/cjs/{index-DrMUZJj6.js → index-CbLK066G.js} +5 -5
- package/dist/cjs/{index-D6Wc6v08.js → index-DV5E8h1q.js} +44 -4
- package/dist/cjs/{index-094mMFB-.js → index-fI8UppQq.js} +4 -4
- package/dist/cjs/index.cjs.js +12 -12
- package/dist/cjs/{input-shims-CW0KUFTQ.js → input-shims-D-MYGARH.js} +3 -3
- package/dist/cjs/{input.utils-B_QROI2g.js → input.utils-Bac31sZX.js} +2 -2
- package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -8
- package/dist/cjs/ion-alert.cjs.entry.js +9 -9
- package/dist/cjs/ion-app_8.cjs.entry.js +12 -12
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-button_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-card_5.cjs.entry.js +3 -3
- package/dist/cjs/ion-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -4
- package/dist/cjs/ion-datetime_3.cjs.entry.js +10 -41
- package/dist/cjs/ion-fab_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-img.cjs.entry.js +3 -3
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +5 -5
- package/dist/cjs/ion-input-otp.cjs.entry.js +3 -3
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +5 -5
- package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +3 -3
- package/dist/cjs/ion-loading.cjs.entry.js +8 -8
- package/dist/cjs/ion-menu_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-modal.cjs.entry.js +9 -9
- package/dist/cjs/ion-nav_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-column.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +8 -8
- package/dist/cjs/ion-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/ion-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-range.cjs.entry.js +4 -4
- package/dist/cjs/ion-refresher_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +3 -3
- package/dist/cjs/ion-searchbar.cjs.entry.js +3 -3
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-select-modal.cjs.entry.js +6 -6
- package/dist/cjs/ion-select_3.cjs.entry.js +7 -7
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +5 -5
- package/dist/cjs/ion-toast.cjs.entry.js +8 -8
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/{ionic-global-HMVqOFGO.js → ionic-global-CLnCYlRe.js} +1 -1
- package/dist/cjs/ionic.cjs.js +4 -4
- package/dist/cjs/{ios.transition-BOt_uW73.js → ios.transition-B3iTqeDM.js} +4 -4
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{md.transition-Dt968VXB.js → md.transition-CbvDffNA.js} +4 -4
- package/dist/cjs/{notch-controller-Bzqhjm4f.js → notch-controller-CEJ89ece.js} +1 -1
- package/dist/cjs/{overlays-DxIZwUXI.js → overlays-Cf7PK4fA.js} +5 -5
- package/dist/cjs/{status-tap-g0sWWkXk.js → status-tap-fXl5XlmU.js} +3 -3
- package/dist/cjs/{swipe-back-BIayeNOD.js → swipe-back-B4O7zZWT.js} +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/datetime/datetime.js +2 -33
- package/dist/docs.json +3 -3
- package/dist/esm/{animation-Dt8bGnA-.js → animation-CRTqL-Kl.js} +1 -1
- package/dist/esm/{app-globals-BDSf8fOA.js → app-globals-Cr9vegdL.js} +1 -1
- package/dist/esm/{button-active-L570Swow.js → button-active-Cd7eQc30.js} +1 -1
- package/dist/esm/{config-mCdtaoPe.js → config-WpCAgwYn.js} +1 -1
- package/dist/esm/{data-DCORV9FH.js → data-BPJsyAbv.js} +1 -1
- package/dist/esm/{framework-delegate-BYawdMXj.js → framework-delegate-DoF4sHL_.js} +1 -1
- package/dist/esm/{hardware-back-button-CPLxO-Ev.js → hardware-back-button-CC9TYUx5.js} +1 -1
- package/dist/esm/{helpers-DEn3pfjm.js → helpers-CYp9QPPu.js} +1 -1
- package/dist/esm/{index-Bs3kT4bc.js → index-BAvq7qKN.js} +2 -2
- package/dist/esm/{index-r2D9DEro.js → index-Cc9McEPW.js} +4 -4
- package/dist/esm/{index-CvDIirVx.js → index-DB8ZghHw.js} +5 -5
- package/dist/esm/{index-ceb5RaMT.js → index-Dkyfot_N.js} +2 -2
- package/dist/esm/{index-C8IsBmNU.js → index-K56Zjrdc.js} +44 -4
- package/dist/esm/index.js +12 -12
- package/dist/esm/{input-shims-DyOpfTg6.js → input-shims-CK9_3FdS.js} +3 -3
- package/dist/esm/{input.utils-DrvTa8gz.js → input.utils-UBoHDVrt.js} +2 -2
- package/dist/esm/ion-accordion_2.entry.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +8 -8
- package/dist/esm/ion-alert.entry.js +9 -9
- package/dist/esm/ion-app_8.entry.js +12 -12
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +3 -3
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +3 -3
- package/dist/esm/ion-button_2.entry.js +3 -3
- package/dist/esm/ion-card_5.entry.js +3 -3
- package/dist/esm/ion-checkbox.entry.js +3 -3
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +4 -4
- package/dist/esm/ion-datetime_3.entry.js +10 -41
- package/dist/esm/ion-fab_3.entry.js +3 -3
- package/dist/esm/ion-img.entry.js +3 -3
- package/dist/esm/ion-infinite-scroll_2.entry.js +5 -5
- package/dist/esm/ion-input-otp.entry.js +3 -3
- package/dist/esm/ion-input-password-toggle.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +5 -5
- package/dist/esm/ion-item-option_3.entry.js +4 -4
- package/dist/esm/ion-item_8.entry.js +3 -3
- package/dist/esm/ion-loading.entry.js +8 -8
- package/dist/esm/ion-menu_3.entry.js +8 -8
- package/dist/esm/ion-modal.entry.js +9 -9
- package/dist/esm/ion-nav_2.entry.js +6 -6
- package/dist/esm/ion-picker-column-option.entry.js +3 -3
- package/dist/esm/ion-picker-column.entry.js +3 -3
- package/dist/esm/ion-picker.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +8 -8
- package/dist/esm/ion-progress-bar.entry.js +3 -3
- package/dist/esm/ion-radio_2.entry.js +3 -3
- package/dist/esm/ion-range.entry.js +4 -4
- package/dist/esm/ion-refresher_2.entry.js +6 -6
- package/dist/esm/ion-reorder_2.entry.js +4 -4
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +3 -3
- package/dist/esm/ion-searchbar.entry.js +3 -3
- package/dist/esm/ion-segment-content.entry.js +1 -1
- package/dist/esm/ion-segment-view.entry.js +1 -1
- package/dist/esm/ion-segment_2.entry.js +3 -3
- package/dist/esm/ion-select-modal.entry.js +6 -6
- package/dist/esm/ion-select_3.entry.js +7 -7
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +3 -3
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +5 -5
- package/dist/esm/ion-toast.entry.js +8 -8
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/{ionic-global-CDrldh-5.js → ionic-global-DRuUdNt8.js} +1 -1
- package/dist/esm/ionic.js +5 -5
- package/dist/esm/{ios.transition-BDzw0_Hm.js → ios.transition-IKPYPZBa.js} +4 -4
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-BzDYi3qq.js → md.transition-Bc2DC3ZN.js} +4 -4
- package/dist/esm/{notch-controller-BwelN_JM.js → notch-controller-CGadnxjv.js} +1 -1
- package/dist/esm/{overlays-BymNv-BL.js → overlays-yoteY47V.js} +5 -5
- package/dist/esm/{status-tap-5DQ7Fc4V.js → status-tap-BF62uqKM.js} +3 -3
- package/dist/esm/{swipe-back-BKw2CAHc.js → swipe-back-wkhTYnhW.js} +2 -2
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p--UHDD5Kg.js +4 -0
- package/dist/ionic/{p-c19f63d0.entry.js → p-007477f1.entry.js} +1 -1
- package/dist/ionic/{p-d0a2a1ab.entry.js → p-06cf24a5.entry.js} +1 -1
- package/dist/ionic/{p-6d070558.entry.js → p-07b95be2.entry.js} +1 -1
- package/dist/ionic/p-10e02483.entry.js +4 -0
- package/dist/ionic/{p-e16b69e1.entry.js → p-16b3cb0d.entry.js} +1 -1
- package/dist/ionic/{p-0b80d700.entry.js → p-1ee109b5.entry.js} +1 -1
- package/dist/ionic/{p-79bd78f9.entry.js → p-26d6386b.entry.js} +1 -1
- package/dist/ionic/{p-7da39a4d.entry.js → p-2a445e15.entry.js} +1 -1
- package/dist/ionic/{p-9575b654.entry.js → p-310b61b0.entry.js} +1 -1
- package/dist/ionic/{p-49d06882.entry.js → p-313df453.entry.js} +1 -1
- package/dist/ionic/{p-d1f54e28.entry.js → p-36394917.entry.js} +1 -1
- package/dist/ionic/{p-d126e8d3.entry.js → p-36ff77bb.entry.js} +1 -1
- package/dist/ionic/{p-dbbe606a.entry.js → p-3a0b521f.entry.js} +1 -1
- package/dist/ionic/{p-639dd543.entry.js → p-40fcbc5c.entry.js} +1 -1
- package/dist/ionic/{p-cc45bcbc.entry.js → p-42db60c6.entry.js} +1 -1
- package/dist/ionic/{p-b57c6d3e.entry.js → p-45e6bb3b.entry.js} +1 -1
- package/dist/ionic/{p-11518b31.entry.js → p-4dfd581d.entry.js} +1 -1
- package/dist/ionic/{p-94de5cfa.entry.js → p-54726ad8.entry.js} +1 -1
- package/dist/ionic/{p-6241ce47.entry.js → p-58fb9eea.entry.js} +1 -1
- package/dist/ionic/{p-da7d04cc.entry.js → p-5d0cfcb3.entry.js} +1 -1
- package/dist/ionic/p-62c7bac8.entry.js +4 -0
- package/dist/ionic/{p-1647c46c.entry.js → p-712e2cc9.entry.js} +1 -1
- package/dist/ionic/{p-46d74291.entry.js → p-716917c3.entry.js} +1 -1
- package/dist/ionic/{p-7268efa5.entry.js → p-7370baa4.entry.js} +1 -1
- package/dist/ionic/{p-a80f1b04.entry.js → p-7b15c56b.entry.js} +1 -1
- package/dist/ionic/{p-6444c606.entry.js → p-89242ba6.entry.js} +1 -1
- package/dist/ionic/{p-316c0420.entry.js → p-89f60304.entry.js} +1 -1
- package/dist/ionic/{p-86f53961.entry.js → p-8ee70fe5.entry.js} +1 -1
- package/dist/ionic/{p-72c38b88.entry.js → p-9538e532.entry.js} +1 -1
- package/dist/ionic/{p-40c261a3.entry.js → p-9996f0d9.entry.js} +1 -1
- package/dist/ionic/{p-020af078.entry.js → p-9b75f8b5.entry.js} +1 -1
- package/dist/ionic/{p-b0a7585c.entry.js → p-9fa6e33e.entry.js} +1 -1
- package/dist/ionic/{p-CJxh_yLS.js → p-B9_I1hx7.js} +1 -1
- package/dist/ionic/p-BFdLXUmQ.js +4 -0
- package/dist/ionic/{p-QHYY4sjU.js → p-BL9_ds6e.js} +1 -1
- package/dist/ionic/{p-D0dMcSkw.js → p-BdOUQlr6.js} +1 -1
- package/dist/ionic/{p-BFvmZNyx.js → p-BuiN7eei.js} +1 -1
- package/dist/ionic/{p-Dc45iWE4.js → p-C2Hdln5D.js} +1 -1
- package/dist/ionic/{p-D-eFFUkA.js → p-C5BtUTU0.js} +1 -1
- package/dist/ionic/{p-CwgG81ZD.js → p-C6NxSVl3.js} +1 -1
- package/dist/ionic/{p-BYEqWnSg.js → p-D9G6G5Lr.js} +1 -1
- package/dist/ionic/p-DJTLROMd.js +4 -0
- package/dist/ionic/p-DODo5BkR.js +4 -0
- package/dist/ionic/{p-DCv9sLH2.js → p-DSnebHgG.js} +1 -1
- package/dist/ionic/p-DTe_Nv0R.js +4 -0
- package/dist/ionic/{p-D87hU-Ly.js → p-Da9B2ZO4.js} +1 -1
- package/dist/ionic/{p-DUt5fQmA.js → p-Da9FzgKM.js} +1 -1
- package/dist/ionic/p-Dj35jSF7.js +4 -0
- package/dist/ionic/{p-DbQ5QkTP.js → p-Dx6HlEVi.js} +1 -1
- package/dist/ionic/p-K56Zjrdc.js +5 -0
- package/dist/ionic/{p-DNcfiJwE.js → p-MGqh2rc5.js} +1 -1
- package/dist/ionic/{p-CTfR9YZG.js → p-RUyJri7q.js} +1 -1
- package/dist/ionic/{p-31f7095f.entry.js → p-a1701bdd.entry.js} +1 -1
- package/dist/ionic/{p-0dfa5a37.entry.js → p-a5e898c0.entry.js} +1 -1
- package/dist/ionic/{p-370e4237.entry.js → p-aefc57ac.entry.js} +1 -1
- package/dist/ionic/{p-d3014190.entry.js → p-b2e6c9fa.entry.js} +1 -1
- package/dist/ionic/{p-15193d01.entry.js → p-c14d03e2.entry.js} +1 -1
- package/dist/ionic/{p-a127bee2.entry.js → p-c151a44e.entry.js} +1 -1
- package/dist/ionic/{p-ac4eb91d.entry.js → p-c4193a91.entry.js} +1 -1
- package/dist/ionic/{p-675b1a31.entry.js → p-c838270f.entry.js} +1 -1
- package/dist/ionic/{p-f8f22cc0.entry.js → p-ce45fd8a.entry.js} +1 -1
- package/dist/ionic/{p-98fc09eb.entry.js → p-d19eae86.entry.js} +1 -1
- package/dist/ionic/{p-582824c5.entry.js → p-d89565e9.entry.js} +1 -1
- package/dist/ionic/{p-83be404e.entry.js → p-d8cdffc1.entry.js} +1 -1
- package/dist/ionic/{p-7380261c.entry.js → p-e3f3180d.entry.js} +1 -1
- package/dist/ionic/{p-510d86e1.entry.js → p-e594c6b9.entry.js} +1 -1
- package/dist/ionic/{p-074839fc.entry.js → p-e7486c70.entry.js} +1 -1
- package/dist/ionic/{p-2a939845.entry.js → p-eecad8a6.entry.js} +1 -1
- package/dist/ionic/{p-43ed1ef5.entry.js → p-f3cd6e01.entry.js} +1 -1
- package/dist/ionic/{p-4e41ea20.entry.js → p-f5f3561f.entry.js} +1 -1
- package/dist/ionic/{p-4c85d268.entry.js → p-f6a4a75b.entry.js} +1 -1
- package/dist/ionic/{p-3a6caca9.entry.js → p-f8657651.entry.js} +1 -1
- package/dist/ionic/{p-C7hRNDhM.js → p-oh-p68hr.js} +1 -1
- package/dist/types/components/datetime/datetime.d.ts +0 -9
- package/dist/types/components/header/header.utils.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +19 -9
- package/dist/types/utils/gesture/listener.d.ts +2 -1
- package/hydrate/index.js +122 -114
- package/hydrate/index.mjs +122 -114
- package/package.json +2 -2
- package/dist/ionic/p-51a60e0f.entry.js +0 -4
- package/dist/ionic/p-B0q1YL7N.js +0 -4
- package/dist/ionic/p-BKc55Xev.js +0 -4
- package/dist/ionic/p-BOVrCkpJ.js +0 -4
- package/dist/ionic/p-Bmgaetn_.js +0 -4
- package/dist/ionic/p-C8IsBmNU.js +0 -5
- package/dist/ionic/p-DDb5r57F.js +0 -4
- package/dist/ionic/p-DZRJwG4S.js +0 -4
- package/dist/ionic/p-a0036e36.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,c as t,h as o,d as r,g as c}from"./p-C8IsBmNU.js";import{i,a}from"./p-CTfR9YZG.js";import{c as n}from"./p-DJztqcrH.js";import{c as s,h as l}from"./p-DiVJyqlX.js";import{b as h}from"./p-BFvmZNyx.js";const b=class{constructor(o){e(this,o),this.ionChange=t(this,"ionChange",7),this.ionFocus=t(this,"ionFocus",7),this.ionBlur=t(this,"ionBlur",7),this.inputId="ion-cb-"+p++,this.inputLabelId=`${this.inputId}-lbl`,this.helperTextId=`${this.inputId}-helper-text`,this.errorTextId=`${this.inputId}-error-text`,this.inheritedAttributes={},this.name=this.inputId,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.value="on",this.labelPlacement="start",this.required=!1,this.isInvalid=!1,this.setChecked=e=>{const t=this.checked=e;this.ionChange.emit({checked:t,value:this.value})},this.toggleChecked=e=>{e.preventDefault(),this.setChecked(!this.checked),this.indeterminate=!1},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.onKeyDown=e=>{" "===e.key&&(e.preventDefault(),this.disabled||this.toggleChecked(e))},this.onClick=e=>{this.disabled||this.toggleChecked(e)},this.onDivLabelClick=e=>{e.stopPropagation()}}connectedCallback(){const{el:e}=this;"undefined"!=typeof MutationObserver&&(this.validationObserver=new MutationObserver((()=>{const t=n(e);this.isInvalid!==t&&(this.isInvalid=t,Promise.resolve().then((()=>{this.hintTextId=this.getHintTextId()})))})),this.validationObserver.observe(e,{attributes:!0,attributeFilter:["class"]})),this.isInvalid=n(e)}componentWillLoad(){this.inheritedAttributes=Object.assign({},i(this.el)),this.hintTextId=this.getHintTextId()}disconnectedCallback(){this.validationObserver&&(this.validationObserver.disconnect(),this.validationObserver=void 0)}async setFocus(){this.el.focus()}getHintTextId(){const{helperText:e,errorText:t,helperTextId:o,errorTextId:r,isInvalid:c}=this;return c&&t?r:e?o:void 0}renderHintText(){const{helperText:e,errorText:t,helperTextId:r,errorTextId:c,isInvalid:i}=this;if(e||t)return o("div",{class:"checkbox-bottom"},o("div",{id:r,class:"helper-text",part:"supporting-text helper-text","aria-live":"polite"},i?null:e),o("div",{id:c,class:"error-text",part:"supporting-text error-text",role:"alert"},i?t:null))}render(){const{color:e,checked:t,disabled:c,el:i,getSVGPath:n,indeterminate:b,inheritedAttributes:p,inputId:x,justify:d,labelPlacement:k,name:m,value:f,alignment:g,required:w}=this,u=h(this),v=n(u,b),y=""!==i.textContent;return a(!0,i,m,t?f:"",c),o(r,{key:"ae0fbd4b21accbac132e6b85c513512ad9179394",role:"checkbox","aria-checked":b?"mixed":`${t}`,"aria-describedby":this.hintTextId,"aria-invalid":this.isInvalid?"true":void 0,"aria-labelledby":y?this.inputLabelId:null,"aria-label":p["aria-label"]||null,"aria-disabled":c?"true":null,"aria-required":w?"true":void 0,tabindex:c?void 0:0,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,class:s(e,{[u]:!0,"in-item":l("ion-item",i),"checkbox-checked":t,"checkbox-disabled":c,"checkbox-indeterminate":b,interactive:!0,[`checkbox-justify-${d}`]:void 0!==d,[`checkbox-alignment-${g}`]:void 0!==g,[`checkbox-label-placement-${k}`]:!0})},o("label",{key:"7a3d7f3c27dde514f2dbf2e34f4629fad33ec3bf",class:"checkbox-wrapper",htmlFor:x},o("input",Object.assign({key:"4130d77ddf034271fecccda14e101a5a809921b6",type:"checkbox",checked:!!t||void 0,disabled:c,id:x,onChange:this.toggleChecked,required:w},p)),o("div",{key:"5daa74f4e62b0947e37764762524001ee42609d9",class:{"label-text-wrapper":!0,"label-text-wrapper-hidden":!y},part:"label",id:this.inputLabelId,onClick:this.onDivLabelClick},o("slot",{key:"23ff66138f8c3a2f56f39113fc842d54b2f7952a"}),this.renderHintText()),o("div",{key:"ab914d9623c19fc46821d5e62db92f1192ebbe7e",class:"native-wrapper"},o("svg",{key:"66e3f4f5dcaa9756fb0e9452299954f9ed3dcb7b",class:"checkbox-icon",viewBox:"0 0 24 24",part:"container","aria-hidden":"true"},v))))}getSVGPath(e,t){let r=o("path",t?{d:"M6 12L18 12",part:"mark"}:{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});return"md"===e&&(r=o("path",t?{d:"M2 12H22",part:"mark"}:{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})),r}get el(){return c(this)}};let p=0;b.style={ios:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:0.125rem;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--size:min(1.375rem, 55.836px);--checkmark-width:1.5px}:host(.checkbox-disabled){opacity:0.3}",md:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--checkmark-width:3;--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled) .label-text-wrapper{opacity:0.38}:host(.checkbox-disabled) .native-wrapper{opacity:0.63}"};export{b as ion_checkbox}
|
|
4
|
+
import{r as e,c as t,h as o,d as r,g as c}from"./p-K56Zjrdc.js";import{i,a}from"./p-RUyJri7q.js";import{c as n}from"./p-DJztqcrH.js";import{c as s,h as l}from"./p-DiVJyqlX.js";import{b as h}from"./p-BuiN7eei.js";const b=class{constructor(o){e(this,o),this.ionChange=t(this,"ionChange",7),this.ionFocus=t(this,"ionFocus",7),this.ionBlur=t(this,"ionBlur",7),this.inputId="ion-cb-"+p++,this.inputLabelId=`${this.inputId}-lbl`,this.helperTextId=`${this.inputId}-helper-text`,this.errorTextId=`${this.inputId}-error-text`,this.inheritedAttributes={},this.name=this.inputId,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.value="on",this.labelPlacement="start",this.required=!1,this.isInvalid=!1,this.setChecked=e=>{const t=this.checked=e;this.ionChange.emit({checked:t,value:this.value})},this.toggleChecked=e=>{e.preventDefault(),this.setChecked(!this.checked),this.indeterminate=!1},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.onKeyDown=e=>{" "===e.key&&(e.preventDefault(),this.disabled||this.toggleChecked(e))},this.onClick=e=>{this.disabled||this.toggleChecked(e)},this.onDivLabelClick=e=>{e.stopPropagation()}}connectedCallback(){const{el:e}=this;"undefined"!=typeof MutationObserver&&(this.validationObserver=new MutationObserver((()=>{const t=n(e);this.isInvalid!==t&&(this.isInvalid=t,Promise.resolve().then((()=>{this.hintTextId=this.getHintTextId()})))})),this.validationObserver.observe(e,{attributes:!0,attributeFilter:["class"]})),this.isInvalid=n(e)}componentWillLoad(){this.inheritedAttributes=Object.assign({},i(this.el)),this.hintTextId=this.getHintTextId()}disconnectedCallback(){this.validationObserver&&(this.validationObserver.disconnect(),this.validationObserver=void 0)}async setFocus(){this.el.focus()}getHintTextId(){const{helperText:e,errorText:t,helperTextId:o,errorTextId:r,isInvalid:c}=this;return c&&t?r:e?o:void 0}renderHintText(){const{helperText:e,errorText:t,helperTextId:r,errorTextId:c,isInvalid:i}=this;if(e||t)return o("div",{class:"checkbox-bottom"},o("div",{id:r,class:"helper-text",part:"supporting-text helper-text","aria-live":"polite"},i?null:e),o("div",{id:c,class:"error-text",part:"supporting-text error-text",role:"alert"},i?t:null))}render(){const{color:e,checked:t,disabled:c,el:i,getSVGPath:n,indeterminate:b,inheritedAttributes:p,inputId:x,justify:d,labelPlacement:k,name:m,value:f,alignment:g,required:w}=this,u=h(this),v=n(u,b),y=""!==i.textContent;return a(!0,i,m,t?f:"",c),o(r,{key:"ae0fbd4b21accbac132e6b85c513512ad9179394",role:"checkbox","aria-checked":b?"mixed":`${t}`,"aria-describedby":this.hintTextId,"aria-invalid":this.isInvalid?"true":void 0,"aria-labelledby":y?this.inputLabelId:null,"aria-label":p["aria-label"]||null,"aria-disabled":c?"true":null,"aria-required":w?"true":void 0,tabindex:c?void 0:0,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,class:s(e,{[u]:!0,"in-item":l("ion-item",i),"checkbox-checked":t,"checkbox-disabled":c,"checkbox-indeterminate":b,interactive:!0,[`checkbox-justify-${d}`]:void 0!==d,[`checkbox-alignment-${g}`]:void 0!==g,[`checkbox-label-placement-${k}`]:!0})},o("label",{key:"7a3d7f3c27dde514f2dbf2e34f4629fad33ec3bf",class:"checkbox-wrapper",htmlFor:x},o("input",Object.assign({key:"4130d77ddf034271fecccda14e101a5a809921b6",type:"checkbox",checked:!!t||void 0,disabled:c,id:x,onChange:this.toggleChecked,required:w},p)),o("div",{key:"5daa74f4e62b0947e37764762524001ee42609d9",class:{"label-text-wrapper":!0,"label-text-wrapper-hidden":!y},part:"label",id:this.inputLabelId,onClick:this.onDivLabelClick},o("slot",{key:"23ff66138f8c3a2f56f39113fc842d54b2f7952a"}),this.renderHintText()),o("div",{key:"ab914d9623c19fc46821d5e62db92f1192ebbe7e",class:"native-wrapper"},o("svg",{key:"66e3f4f5dcaa9756fb0e9452299954f9ed3dcb7b",class:"checkbox-icon",viewBox:"0 0 24 24",part:"container","aria-hidden":"true"},v))))}getSVGPath(e,t){let r=o("path",t?{d:"M6 12L18 12",part:"mark"}:{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});return"md"===e&&(r=o("path",t?{d:"M2 12H22",part:"mark"}:{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})),r}get el(){return c(this)}};let p=0;b.style={ios:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:0.125rem;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--size:min(1.375rem, 55.836px);--checkmark-width:1.5px}:host(.checkbox-disabled){opacity:0.3}",md:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--checkmark-width:3;--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled) .label-text-wrapper{opacity:0.38}:host(.checkbox-disabled) .native-wrapper{opacity:0.63}"};export{b as ion_checkbox}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as o,h as i,d as a}from"./p-
|
|
4
|
+
import{r as o,h as i,d as a}from"./p-K56Zjrdc.js";import{b as r}from"./p-BuiN7eei.js";import{c as d}from"./p-DiVJyqlX.js";const t=class{constructor(i){o(this,i)}render(){return i(a,{key:"998217066084f966bf5d356fed85bcbd451f675a",class:r(this)},i("slot",{key:"1a6f7c9d4dc6a875f86b5b3cda6d59cb39587f22"}))}};t.style={ios:":host{border-radius:var(--border-radius);display:block}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}:host{--border-radius:50%;width:48px;height:48px}",md:":host{border-radius:var(--border-radius);display:block}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}:host{--border-radius:50%;width:64px;height:64px}"};const n=class{constructor(i){o(this,i)}render(){const o=r(this);return i(a,{key:"1a2d39c5deec771a2f2196447627b62a7d4c8389",class:d(this.color,{[o]:!0})},i("slot",{key:"fc1b6587f1ed24715748eb6785e7fb7a57cdd5cd"}))}};n.style={ios:":host{--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff);--padding-top:3px;--padding-end:8px;--padding-bottom:3px;--padding-start:8px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:inline-block;min-width:10px;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);font-size:0.8125rem;font-weight:bold;line-height:1;text-align:center;white-space:nowrap;contain:content;vertical-align:baseline}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(:empty){display:none}:host{border-radius:10px;font-size:max(13px, 0.8125rem)}",md:":host{--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff);--padding-top:3px;--padding-end:8px;--padding-bottom:3px;--padding-start:8px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:inline-block;min-width:10px;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);font-size:0.8125rem;font-weight:bold;line-height:1;text-align:center;white-space:nowrap;contain:content;vertical-align:baseline}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(:empty){display:none}:host{--padding-top:3px;--padding-end:4px;--padding-bottom:4px;--padding-start:4px;border-radius:4px}"};const e=class{constructor(i){o(this,i)}render(){return i(a,{key:"70ada828e8cf541ab3b47f94b7e56ce34114ef88",class:r(this)},i("slot",{key:"c43e105669d2bae123619b616f3af8ca2f722d61"}))}};e.style=":host{--size:48px;--border-radius:0;border-radius:var(--border-radius);display:block;width:var(--size);height:var(--size)}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}";export{t as ion_avatar,n as ion_badge,e as ion_thumbnail}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as i,e as s,f as e,h as n,g as o,d as r}from"./p-C8IsBmNU.js";import{g as a}from"./p-hHmYLOfE.js";import{s as h,l as c}from"./p-CTfR9YZG.js";import{l as d,t as l,s as u,d as v,b as f,c as m}from"./p-DUt5fQmA.js";import{b as p}from"./p-BFvmZNyx.js";import{a as w}from"./p-D-eFFUkA.js";class b{constructor(t,i){this.component=t,this.params=i,this.state=1}async init(t){if(this.state=2,!this.element){const i=this.component;this.element=await w(this.delegate,t,i,["ion-page","ion-page-invisible"],this.params)}}_destroy(){c(3!==this.state,"view state must be ATTACHED");const t=this.element;t&&(this.delegate?this.delegate.removeViewFromDom(t.parentElement,t):t.remove()),this.nav=void 0,this.state=3}}const g=(t,i,s)=>!!t&&t.component===i&&h(t.params,s),y=(t,i)=>t?t instanceof b?t:new b(t,i):null,k=class{constructor(s){t(this,s),this.ionNavWillLoad=i(this,"ionNavWillLoad",7),this.ionNavWillChange=i(this,"ionNavWillChange",3),this.ionNavDidChange=i(this,"ionNavDidChange",3),this.transInstr=[],this.gestureOrAnimationInProgress=!1,this.useRouter=!1,this.isTransitioning=!1,this.destroyed=!1,this.views=[],this.didLoad=!1,this.animated=!0}swipeGestureChanged(){this.gesture&&this.gesture.enable(!0===this.swipeGesture)}rootChanged(){void 0!==this.root&&!1!==this.didLoad&&(this.useRouter||void 0!==this.root&&this.setRoot(this.root,this.rootParams))}componentWillLoad(){if(this.useRouter=null!==document.querySelector("ion-router")&&null===this.el.closest("[no-router]"),void 0===this.swipeGesture){const t=p(this);this.swipeGesture=s.getBoolean("swipeBackEnabled","ios"===t)}this.ionNavWillLoad.emit()}async componentDidLoad(){this.didLoad=!0,this.rootChanged(),this.gesture=(await import("./p-BKc55Xev.js")).createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this)),this.swipeGestureChanged()}connectedCallback(){this.destroyed=!1}disconnectedCallback(){for(const t of this.views)d(t.element,v),t._destroy();this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.transInstr.length=0,this.views.length=0,this.destroyed=!0}push(t,i,s,e){return this.insert(-1,t,i,s,e)}insert(t,i,s,e,n){return this.insertPages(t,[{component:i,componentProps:s}],e,n)}insertPages(t,i,s,e){return this.queueTrns({insertStart:t,insertViews:i,opts:s},e)}pop(t,i){return this.removeIndex(-1,1,t,i)}popTo(t,i,s){const e={removeStart:-1,removeCount:-1,opts:i};return"object"==typeof t&&t.component?(e.removeView=t,e.removeStart=1):"number"==typeof t&&(e.removeStart=t+1),this.queueTrns(e,s)}popToRoot(t,i){return this.removeIndex(1,-1,t,i)}removeIndex(t,i=1,s,e){return this.queueTrns({removeStart:t,removeCount:i,opts:s},e)}setRoot(t,i,s,e){return this.setPages([{component:t,componentProps:i}],s,e)}setPages(t,i,s){return null!=i||(i={}),!0!==i.animated&&(i.animated=!1),this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:i},s)}setRouteId(t,i,s,e){const n=this.getActiveSync();if(g(n,t,i))return Promise.resolve({changed:!1,element:n.element});let o;const r=new Promise((t=>o=t));let a;const h={updateURL:!1,viewIsReady:t=>{let i;const s=new Promise((t=>i=t));return o({changed:!0,element:t,markVisible:async()=>{i(),await a}}),s}};if("root"===s)a=this.setRoot(t,i,h);else{const n=this.views.find((s=>g(s,t,i)));n?a=this.popTo(n,Object.assign(Object.assign({},h),{direction:"back",animationBuilder:e})):"forward"===s?a=this.push(t,i,Object.assign(Object.assign({},h),{animationBuilder:e})):"back"===s&&(a=this.setRoot(t,i,Object.assign(Object.assign({},h),{direction:"back",animated:!0,animationBuilder:e})))}return r}async getRouteId(){const t=this.getActiveSync();if(t)return{id:t.element.tagName,params:t.params,element:t.element}}async getActive(){return this.getActiveSync()}async getByIndex(t){return this.views[t]}async canGoBack(t){return this.canGoBackSync(t)}async getPrevious(t){return this.getPreviousSync(t)}async getLength(){return Promise.resolve(this.views.length)}getActiveSync(){return this.views[this.views.length-1]}canGoBackSync(t=this.getActiveSync()){return!(!t||!this.getPreviousSync(t))}getPreviousSync(t=this.getActiveSync()){if(!t)return;const i=this.views,s=i.indexOf(t);return s>0?i[s-1]:void 0}async queueTrns(t,i){var s,e;if(this.isTransitioning&&(null===(s=t.opts)||void 0===s?void 0:s.skipIfBusy))return!1;const n=new Promise(((i,s)=>{t.resolve=i,t.reject=s}));if(t.done=i,t.opts&&!1!==t.opts.updateURL&&this.useRouter){const i=document.querySelector("ion-router");if(i){const s=await i.canTransition();if(!1===s)return!1;if("string"==typeof s)return i.push(s,t.opts.direction||"back"),!1}}return 0===(null===(e=t.insertViews)||void 0===e?void 0:e.length)&&(t.insertViews=void 0),this.transInstr.push(t),this.nextTrns(),n}success(t,i){if(this.destroyed)this.fireError("nav controller was destroyed",i);else if(i.done&&i.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction),i.resolve(t.hasCompleted),!1!==i.opts.updateURL&&this.useRouter){const i=document.querySelector("ion-router");i&&i.navChanged("back"===t.direction?"back":"forward")}}failed(t,i){this.destroyed?this.fireError("nav controller was destroyed",i):(this.transInstr.length=0,this.fireError(t,i))}fireError(t,i){i.done&&i.done(!1,!1,t),i.reject&&!this.destroyed?i.reject(t):i.resolve(!1)}nextTrns(){if(this.isTransitioning)return!1;const t=this.transInstr.shift();return!!t&&(this.runTransition(t),!0)}async runTransition(t){try{this.ionNavWillChange.emit(),this.isTransitioning=!0,this.prepareTI(t);const i=this.getActiveSync(),s=this.getEnteringView(t,i);if(!i&&!s)throw new Error("no views in the stack to be removed");s&&1===s.state&&await s.init(this.el),this.postViewInit(s,i,t);const e=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&s!==i;let n;e&&t.opts&&i&&("back"===t.opts.direction&&(t.opts.animationBuilder=t.opts.animationBuilder||(null==s?void 0:s.animationBuilder)),i.animationBuilder=t.opts.animationBuilder),n=e?await this.transition(s,i,t):{hasCompleted:!0,requiresTransition:!1},this.success(n,t),this.ionNavDidChange.emit()}catch(i){this.failed(i,t)}this.isTransitioning=!1,this.nextTrns()}prepareTI(t){var i,s,e;const n=this.views.length;if(null!==(i=t.opts)&&void 0!==i||(t.opts={}),null!==(s=(e=t.opts).delegate)&&void 0!==s||(e.delegate=this.delegate),void 0!==t.removeView){c(void 0!==t.removeStart,"removeView needs removeStart"),c(void 0!==t.removeCount,"removeView needs removeCount");const i=this.views.indexOf(t.removeView);if(i<0)throw new Error("removeView was not found");t.removeStart+=i}void 0!==t.removeStart&&(t.removeStart<0&&(t.removeStart=n-1),t.removeCount<0&&(t.removeCount=n-t.removeStart),t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===n),t.insertViews&&((t.insertStart<0||t.insertStart>n)&&(t.insertStart=n),t.enteringRequiresTransition=t.insertStart===n);const o=t.insertViews;if(!o)return;c(o.length>0,"length can not be zero");const r=o.map((t=>t instanceof b?t:"component"in t?y(t.component,null===t.componentProps?void 0:t.componentProps):y(t,void 0))).filter((t=>null!==t));if(0===r.length)throw new Error("invalid views to insert");for(const i of r){i.delegate=t.opts.delegate;const s=i.nav;if(s&&s!==this)throw new Error("inserted view was already inserted");if(3===i.state)throw new Error("inserted view was already destroyed")}t.insertViews=r}getEnteringView(t,i){const s=t.insertViews;if(void 0!==s)return s[s.length-1];const e=t.removeStart;if(void 0!==e){const s=this.views,n=e+t.removeCount;for(let t=s.length-1;t>=0;t--){const o=s[t];if((t<e||t>=n)&&o!==i)return o}}}postViewInit(t,i,s){var n,o,r;c(i||t,"Both leavingView and enteringView are null"),c(s.resolve,"resolve must be valid"),c(s.reject,"reject must be valid");const a=s.opts,{insertViews:h,removeStart:l,removeCount:u}=s;let p;if(void 0!==l&&void 0!==u){c(l>=0,"removeStart can not be negative"),c(u>=0,"removeCount can not be negative"),p=[];for(let s=l;s<l+u;s++){const e=this.views[s];void 0!==e&&e!==t&&e!==i&&p.push(e)}null!==(n=a.direction)&&void 0!==n||(a.direction="back")}const w=this.views.length+(null!==(o=null==h?void 0:h.length)&&void 0!==o?o:0)-(null!=u?u:0);if(c(w>=0,"final balance can not be negative"),0===w)throw e("[ion-nav] - You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el),new Error("navigation stack needs at least one root page");if(h){let t=s.insertStart;for(const i of h)this.insertViewAt(i,t),t++;s.enteringRequiresTransition&&(null!==(r=a.direction)&&void 0!==r||(a.direction="forward"))}if(p&&p.length>0){for(const t of p)d(t.element,f),d(t.element,m),d(t.element,v);for(const t of p)this.destroyView(t)}}async transition(t,i,e){const n=e.opts,o=n.progressAnimation?t=>{void 0===t||this.gestureOrAnimationInProgress?this.sbAni=t:(this.gestureOrAnimationInProgress=!0,t.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0}),t.progressEnd(0,0,0))}:void 0,r=p(this),a=t.element,h=i&&i.element,c=Object.assign(Object.assign({mode:r,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:o,animated:this.animated&&s.getBoolean("animated",!0),enteringEl:a,leavingEl:h},n),{animationBuilder:n.animationBuilder||this.animation||s.get("navAnimation")}),{hasCompleted:d}=await l(c);return this.transitionFinish(d,t,i,n)}transitionFinish(t,i,s,e){const n=t?i:s;return n&&this.unmountInactiveViews(n),{hasCompleted:t,requiresTransition:!0,enteringView:i,leavingView:s,direction:e.direction}}insertViewAt(t,i){const s=this.views,e=s.indexOf(t);e>-1?(c(t.nav===this,"view is not part of the nav"),s.splice(e,1),s.splice(i,0,t)):(c(!t.nav,"nav is used"),t.nav=this,s.splice(i,0,t))}removeView(t){c(2===t.state||3===t.state,"view state should be loaded or destroyed");const i=this.views,s=i.indexOf(t);c(s>-1,"view must be part of the stack"),s>=0&&i.splice(s,1)}destroyView(t){t._destroy(),this.removeView(t)}unmountInactiveViews(t){if(this.destroyed)return;const i=this.views,s=i.indexOf(t);for(let t=i.length-1;t>=0;t--){const e=i[t],n=e.element;n&&(t>s?(d(n,v),this.destroyView(e)):t<s&&u(n,!0))}}canStart(){return!this.gestureOrAnimationInProgress&&!!this.swipeGesture&&!this.isTransitioning&&0===this.transInstr.length&&this.canGoBackSync()}onStart(){this.gestureOrAnimationInProgress=!0,this.pop({direction:"back",progressAnimation:!0})}onMove(t){this.sbAni&&this.sbAni.progressStep(t)}onEnd(t,i,s){if(this.sbAni){this.sbAni.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0});let e=t?-.001:.001;t?e+=a([0,0],[.32,.72],[0,1],[1,1],i)[0]:(this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)"),e+=a([0,0],[1,0],[.68,.28],[1,1],i)[0]),this.sbAni.progressEnd(t?1:0,e,s)}else this.gestureOrAnimationInProgress=!1}render(){return n("slot",{key:"8067c9835d255daec61f33dba200fd3a6ff839a0"})}get el(){return o(this)}static get watchers(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}}};k.style=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";const C=class{constructor(i){t(this,i),this.routerDirection="forward",this.onClick=()=>((t,i,s,e,n)=>{const o=this.el.closest("ion-nav");if(o)if("forward"===i){if(void 0!==s)return o.push(s,e,{skipIfBusy:!0,animationBuilder:n})}else if("root"===i){if(void 0!==s)return o.setRoot(s,e,{skipIfBusy:!0,animationBuilder:n})}else if("back"===i)return o.pop({skipIfBusy:!0,animationBuilder:n});return Promise.resolve(!1)})(0,this.routerDirection,this.component,this.componentProps,this.routerAnimation)}render(){return n(r,{key:"6dbb1ad4f351e9215375aac11ab9b53762e07a08",onClick:this.onClick})}get el(){return o(this)}};export{k as ion_nav,C as ion_nav_link}
|
|
4
|
+
import{r as t,c as i,e as s,f as e,h as n,g as o,d as r}from"./p-K56Zjrdc.js";import{g as a}from"./p-hHmYLOfE.js";import{s as h,l as c}from"./p-RUyJri7q.js";import{l as d,t as l,s as u,d as v,b as f,c as m}from"./p-Da9FzgKM.js";import{b as p}from"./p-BuiN7eei.js";import{a as w}from"./p-C5BtUTU0.js";class b{constructor(t,i){this.component=t,this.params=i,this.state=1}async init(t){if(this.state=2,!this.element){const i=this.component;this.element=await w(this.delegate,t,i,["ion-page","ion-page-invisible"],this.params)}}_destroy(){c(3!==this.state,"view state must be ATTACHED");const t=this.element;t&&(this.delegate?this.delegate.removeViewFromDom(t.parentElement,t):t.remove()),this.nav=void 0,this.state=3}}const g=(t,i,s)=>!!t&&t.component===i&&h(t.params,s),y=(t,i)=>t?t instanceof b?t:new b(t,i):null,k=class{constructor(s){t(this,s),this.ionNavWillLoad=i(this,"ionNavWillLoad",7),this.ionNavWillChange=i(this,"ionNavWillChange",3),this.ionNavDidChange=i(this,"ionNavDidChange",3),this.transInstr=[],this.gestureOrAnimationInProgress=!1,this.useRouter=!1,this.isTransitioning=!1,this.destroyed=!1,this.views=[],this.didLoad=!1,this.animated=!0}swipeGestureChanged(){this.gesture&&this.gesture.enable(!0===this.swipeGesture)}rootChanged(){void 0!==this.root&&!1!==this.didLoad&&(this.useRouter||void 0!==this.root&&this.setRoot(this.root,this.rootParams))}componentWillLoad(){if(this.useRouter=null!==document.querySelector("ion-router")&&null===this.el.closest("[no-router]"),void 0===this.swipeGesture){const t=p(this);this.swipeGesture=s.getBoolean("swipeBackEnabled","ios"===t)}this.ionNavWillLoad.emit()}async componentDidLoad(){this.didLoad=!0,this.rootChanged(),this.gesture=(await import("./p--UHDD5Kg.js")).createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this)),this.swipeGestureChanged()}connectedCallback(){this.destroyed=!1}disconnectedCallback(){for(const t of this.views)d(t.element,v),t._destroy();this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.transInstr.length=0,this.views.length=0,this.destroyed=!0}push(t,i,s,e){return this.insert(-1,t,i,s,e)}insert(t,i,s,e,n){return this.insertPages(t,[{component:i,componentProps:s}],e,n)}insertPages(t,i,s,e){return this.queueTrns({insertStart:t,insertViews:i,opts:s},e)}pop(t,i){return this.removeIndex(-1,1,t,i)}popTo(t,i,s){const e={removeStart:-1,removeCount:-1,opts:i};return"object"==typeof t&&t.component?(e.removeView=t,e.removeStart=1):"number"==typeof t&&(e.removeStart=t+1),this.queueTrns(e,s)}popToRoot(t,i){return this.removeIndex(1,-1,t,i)}removeIndex(t,i=1,s,e){return this.queueTrns({removeStart:t,removeCount:i,opts:s},e)}setRoot(t,i,s,e){return this.setPages([{component:t,componentProps:i}],s,e)}setPages(t,i,s){return null!=i||(i={}),!0!==i.animated&&(i.animated=!1),this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:i},s)}setRouteId(t,i,s,e){const n=this.getActiveSync();if(g(n,t,i))return Promise.resolve({changed:!1,element:n.element});let o;const r=new Promise((t=>o=t));let a;const h={updateURL:!1,viewIsReady:t=>{let i;const s=new Promise((t=>i=t));return o({changed:!0,element:t,markVisible:async()=>{i(),await a}}),s}};if("root"===s)a=this.setRoot(t,i,h);else{const n=this.views.find((s=>g(s,t,i)));n?a=this.popTo(n,Object.assign(Object.assign({},h),{direction:"back",animationBuilder:e})):"forward"===s?a=this.push(t,i,Object.assign(Object.assign({},h),{animationBuilder:e})):"back"===s&&(a=this.setRoot(t,i,Object.assign(Object.assign({},h),{direction:"back",animated:!0,animationBuilder:e})))}return r}async getRouteId(){const t=this.getActiveSync();if(t)return{id:t.element.tagName,params:t.params,element:t.element}}async getActive(){return this.getActiveSync()}async getByIndex(t){return this.views[t]}async canGoBack(t){return this.canGoBackSync(t)}async getPrevious(t){return this.getPreviousSync(t)}async getLength(){return Promise.resolve(this.views.length)}getActiveSync(){return this.views[this.views.length-1]}canGoBackSync(t=this.getActiveSync()){return!(!t||!this.getPreviousSync(t))}getPreviousSync(t=this.getActiveSync()){if(!t)return;const i=this.views,s=i.indexOf(t);return s>0?i[s-1]:void 0}async queueTrns(t,i){var s,e;if(this.isTransitioning&&(null===(s=t.opts)||void 0===s?void 0:s.skipIfBusy))return!1;const n=new Promise(((i,s)=>{t.resolve=i,t.reject=s}));if(t.done=i,t.opts&&!1!==t.opts.updateURL&&this.useRouter){const i=document.querySelector("ion-router");if(i){const s=await i.canTransition();if(!1===s)return!1;if("string"==typeof s)return i.push(s,t.opts.direction||"back"),!1}}return 0===(null===(e=t.insertViews)||void 0===e?void 0:e.length)&&(t.insertViews=void 0),this.transInstr.push(t),this.nextTrns(),n}success(t,i){if(this.destroyed)this.fireError("nav controller was destroyed",i);else if(i.done&&i.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction),i.resolve(t.hasCompleted),!1!==i.opts.updateURL&&this.useRouter){const i=document.querySelector("ion-router");i&&i.navChanged("back"===t.direction?"back":"forward")}}failed(t,i){this.destroyed?this.fireError("nav controller was destroyed",i):(this.transInstr.length=0,this.fireError(t,i))}fireError(t,i){i.done&&i.done(!1,!1,t),i.reject&&!this.destroyed?i.reject(t):i.resolve(!1)}nextTrns(){if(this.isTransitioning)return!1;const t=this.transInstr.shift();return!!t&&(this.runTransition(t),!0)}async runTransition(t){try{this.ionNavWillChange.emit(),this.isTransitioning=!0,this.prepareTI(t);const i=this.getActiveSync(),s=this.getEnteringView(t,i);if(!i&&!s)throw new Error("no views in the stack to be removed");s&&1===s.state&&await s.init(this.el),this.postViewInit(s,i,t);const e=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&s!==i;let n;e&&t.opts&&i&&("back"===t.opts.direction&&(t.opts.animationBuilder=t.opts.animationBuilder||(null==s?void 0:s.animationBuilder)),i.animationBuilder=t.opts.animationBuilder),n=e?await this.transition(s,i,t):{hasCompleted:!0,requiresTransition:!1},this.success(n,t),this.ionNavDidChange.emit()}catch(i){this.failed(i,t)}this.isTransitioning=!1,this.nextTrns()}prepareTI(t){var i,s,e;const n=this.views.length;if(null!==(i=t.opts)&&void 0!==i||(t.opts={}),null!==(s=(e=t.opts).delegate)&&void 0!==s||(e.delegate=this.delegate),void 0!==t.removeView){c(void 0!==t.removeStart,"removeView needs removeStart"),c(void 0!==t.removeCount,"removeView needs removeCount");const i=this.views.indexOf(t.removeView);if(i<0)throw new Error("removeView was not found");t.removeStart+=i}void 0!==t.removeStart&&(t.removeStart<0&&(t.removeStart=n-1),t.removeCount<0&&(t.removeCount=n-t.removeStart),t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===n),t.insertViews&&((t.insertStart<0||t.insertStart>n)&&(t.insertStart=n),t.enteringRequiresTransition=t.insertStart===n);const o=t.insertViews;if(!o)return;c(o.length>0,"length can not be zero");const r=o.map((t=>t instanceof b?t:"component"in t?y(t.component,null===t.componentProps?void 0:t.componentProps):y(t,void 0))).filter((t=>null!==t));if(0===r.length)throw new Error("invalid views to insert");for(const i of r){i.delegate=t.opts.delegate;const s=i.nav;if(s&&s!==this)throw new Error("inserted view was already inserted");if(3===i.state)throw new Error("inserted view was already destroyed")}t.insertViews=r}getEnteringView(t,i){const s=t.insertViews;if(void 0!==s)return s[s.length-1];const e=t.removeStart;if(void 0!==e){const s=this.views,n=e+t.removeCount;for(let t=s.length-1;t>=0;t--){const o=s[t];if((t<e||t>=n)&&o!==i)return o}}}postViewInit(t,i,s){var n,o,r;c(i||t,"Both leavingView and enteringView are null"),c(s.resolve,"resolve must be valid"),c(s.reject,"reject must be valid");const a=s.opts,{insertViews:h,removeStart:l,removeCount:u}=s;let p;if(void 0!==l&&void 0!==u){c(l>=0,"removeStart can not be negative"),c(u>=0,"removeCount can not be negative"),p=[];for(let s=l;s<l+u;s++){const e=this.views[s];void 0!==e&&e!==t&&e!==i&&p.push(e)}null!==(n=a.direction)&&void 0!==n||(a.direction="back")}const w=this.views.length+(null!==(o=null==h?void 0:h.length)&&void 0!==o?o:0)-(null!=u?u:0);if(c(w>=0,"final balance can not be negative"),0===w)throw e("[ion-nav] - You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el),new Error("navigation stack needs at least one root page");if(h){let t=s.insertStart;for(const i of h)this.insertViewAt(i,t),t++;s.enteringRequiresTransition&&(null!==(r=a.direction)&&void 0!==r||(a.direction="forward"))}if(p&&p.length>0){for(const t of p)d(t.element,f),d(t.element,m),d(t.element,v);for(const t of p)this.destroyView(t)}}async transition(t,i,e){const n=e.opts,o=n.progressAnimation?t=>{void 0===t||this.gestureOrAnimationInProgress?this.sbAni=t:(this.gestureOrAnimationInProgress=!0,t.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0}),t.progressEnd(0,0,0))}:void 0,r=p(this),a=t.element,h=i&&i.element,c=Object.assign(Object.assign({mode:r,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:o,animated:this.animated&&s.getBoolean("animated",!0),enteringEl:a,leavingEl:h},n),{animationBuilder:n.animationBuilder||this.animation||s.get("navAnimation")}),{hasCompleted:d}=await l(c);return this.transitionFinish(d,t,i,n)}transitionFinish(t,i,s,e){const n=t?i:s;return n&&this.unmountInactiveViews(n),{hasCompleted:t,requiresTransition:!0,enteringView:i,leavingView:s,direction:e.direction}}insertViewAt(t,i){const s=this.views,e=s.indexOf(t);e>-1?(c(t.nav===this,"view is not part of the nav"),s.splice(e,1),s.splice(i,0,t)):(c(!t.nav,"nav is used"),t.nav=this,s.splice(i,0,t))}removeView(t){c(2===t.state||3===t.state,"view state should be loaded or destroyed");const i=this.views,s=i.indexOf(t);c(s>-1,"view must be part of the stack"),s>=0&&i.splice(s,1)}destroyView(t){t._destroy(),this.removeView(t)}unmountInactiveViews(t){if(this.destroyed)return;const i=this.views,s=i.indexOf(t);for(let t=i.length-1;t>=0;t--){const e=i[t],n=e.element;n&&(t>s?(d(n,v),this.destroyView(e)):t<s&&u(n,!0))}}canStart(){return!this.gestureOrAnimationInProgress&&!!this.swipeGesture&&!this.isTransitioning&&0===this.transInstr.length&&this.canGoBackSync()}onStart(){this.gestureOrAnimationInProgress=!0,this.pop({direction:"back",progressAnimation:!0})}onMove(t){this.sbAni&&this.sbAni.progressStep(t)}onEnd(t,i,s){if(this.sbAni){this.sbAni.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0});let e=t?-.001:.001;t?e+=a([0,0],[.32,.72],[0,1],[1,1],i)[0]:(this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)"),e+=a([0,0],[1,0],[.68,.28],[1,1],i)[0]),this.sbAni.progressEnd(t?1:0,e,s)}else this.gestureOrAnimationInProgress=!1}render(){return n("slot",{key:"8067c9835d255daec61f33dba200fd3a6ff839a0"})}get el(){return o(this)}static get watchers(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}}};k.style=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";const C=class{constructor(i){t(this,i),this.routerDirection="forward",this.onClick=()=>((t,i,s,e,n)=>{const o=this.el.closest("ion-nav");if(o)if("forward"===i){if(void 0!==s)return o.push(s,e,{skipIfBusy:!0,animationBuilder:n})}else if("root"===i){if(void 0!==s)return o.setRoot(s,e,{skipIfBusy:!0,animationBuilder:n})}else if("back"===i)return o.pop({skipIfBusy:!0,animationBuilder:n});return Promise.resolve(!1)})(0,this.routerDirection,this.component,this.componentProps,this.routerAnimation)}render(){return n(r,{key:"6dbb1ad4f351e9215375aac11ab9b53762e07a08",onClick:this.onClick})}get el(){return o(this)}};export{k as ion_nav,C as ion_nav_link}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{w as e,r,c as i,a as s,j as t,h as n,d as o,g as h,e as a}from"./p-C8IsBmNU.js";import{g as f}from"./p-hHmYLOfE.js";import{I as l,b as c,p,g as d}from"./p-CwgG81ZD.js";import{c as g,t as m,e as u,g as b,r as v}from"./p-CTfR9YZG.js";import{d as x,I as y}from"./p-CKvCXMs9.js";import{b as k}from"./p-BFvmZNyx.js";import{c as w}from"./p-DDb5r57F.js";import{E as j,a as C}from"./p-DbQ5QkTP.js";import{h as S,i as R}from"./p-DV3sJJW8.js";import{S as E}from"./p-D4RIp70E.js";import"./p-CIGNaXM1.js";import"./p-ZjP4CjeZ.js";const M=e=>{const r=e.querySelector("ion-spinner"),i=r.shadowRoot.querySelector("circle"),s=e.querySelector(".spinner-arrow-container"),t=e.querySelector(".arrow-container"),n=t?t.querySelector("ion-icon"):null,o=w().duration(1e3).easing("ease-out"),h=w().addElement(s).keyframes([{offset:0,opacity:"0.3"},{offset:.45,opacity:"0.3"},{offset:.55,opacity:"1"},{offset:1,opacity:"1"}]),a=w().addElement(i).keyframes([{offset:0,strokeDasharray:"1px, 200px"},{offset:.2,strokeDasharray:"1px, 200px"},{offset:.55,strokeDasharray:"100px, 200px"},{offset:1,strokeDasharray:"100px, 200px"}]),f=w().addElement(r).keyframes([{offset:0,transform:"rotate(-90deg)"},{offset:1,transform:"rotate(210deg)"}]);if(t&&n){const e=w().addElement(t).keyframes([{offset:0,transform:"rotate(0deg)"},{offset:.3,transform:"rotate(0deg)"},{offset:.55,transform:"rotate(280deg)"},{offset:1,transform:"rotate(400deg)"}]),r=w().addElement(n).keyframes([{offset:0,transform:"translateX(2px) scale(0)"},{offset:.3,transform:"translateX(2px) scale(0)"},{offset:.55,transform:"translateX(-1.5px) scale(1)"},{offset:1,transform:"translateX(-1.5px) scale(1)"}]);o.addAnimation([e,r])}return o.addAnimation([h,a,f])},N=(r,i,s=200)=>{if(!r)return Promise.resolve();const t=m(r,s);return e((()=>{r.style.setProperty("transition",`${s}ms all ease-out`),void 0===i?r.style.removeProperty("transform"):r.style.setProperty("transform",`translate3d(0px, ${i}, 0px)`)})),t},Y=()=>navigator.maxTouchPoints>0&&CSS.supports("background: -webkit-named-image(apple-pay-logo-black)"),D=async(e,r)=>{const i=e.querySelector("ion-refresher-content");if(!i)return Promise.resolve(!1);await new Promise((e=>g(i,e)));const s=e.querySelector("ion-refresher-content .refresher-pulling ion-spinner"),t=e.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");return null!==s&&null!==t&&("ios"===r&&Y()||"md"===r)},T=class{constructor(e){r(this,e),this.ionRefresh=i(this,"ionRefresh",7),this.ionPull=i(this,"ionPull",7),this.ionStart=i(this,"ionStart",7),this.appliedStyles=!1,this.didStart=!1,this.progress=0,this.pointerDown=!1,this.needsCompletion=!1,this.didRefresh=!1,this.contentFullscreen=!1,this.lastVelocityY=0,this.animations=[],this.nativeRefresher=!1,this.state=1,this.pullMin=60,this.pullMax=this.pullMin+60,this.closeDuration="280ms",this.snapbackDuration="280ms",this.pullFactor=1,this.disabled=!1}disabledChanged(){this.gesture&&this.gesture.enable(!this.disabled)}async checkNativeRefresher(){const e=await D(this.el,k(this));if(e&&!this.nativeRefresher){const e=this.el.closest("ion-content");this.setupNativeRefresher(e)}else e||this.destroyNativeRefresher()}destroyNativeRefresher(){this.scrollEl&&this.scrollListenerCallback&&(this.scrollEl.removeEventListener("scroll",this.scrollListenerCallback),this.scrollListenerCallback=void 0),this.nativeRefresher=!1}async resetNativeRefresher(e,r){this.state=r,"ios"===k(this)?await N(e,void 0,300):await m(this.el.querySelector(".refresher-refreshing-icon"),200),this.didRefresh=!1,this.needsCompletion=!1,this.pointerDown=!1,this.animations.forEach((e=>e.destroy())),this.animations=[],this.progress=0,this.state=1}async setupiOSNativeRefresher(r,i){this.elementToTransform=this.scrollEl;const t=r.shadowRoot.querySelectorAll("svg");let n=.16*this.scrollEl.clientHeight;const o=t.length;e((()=>t.forEach((e=>e.style.setProperty("animation","none"))))),this.scrollListenerCallback=()=>{(this.pointerDown||1!==this.state)&&s((()=>{const r=this.scrollEl.scrollTop,s=this.el.clientHeight;if(r>0){if(8===this.state){const t=u(0,r/(.5*s),1);return void e((()=>{i.style.setProperty("opacity",(1-t).toString())}))}return}this.pointerDown&&(this.didStart||(this.didStart=!0,this.ionStart.emit()),this.pointerDown&&this.ionPull.emit());const h=this.didStart?30:0,a=this.progress=u(0,(Math.abs(r)-h)/n,1);if(8===this.state||1===a){if(this.pointerDown&&(f=i,l=this.lastVelocityY,e((()=>{f.style.setProperty("--refreshing-rotation-duration",l>=1?"0.5s":"2s"),f.style.setProperty("opacity","1")}))),!this.didRefresh){this.beginRefresh(),this.didRefresh=!0,x({style:y.Light});const e=document.activeElement;void 0!==(null==e?void 0:e.blur)&&e.blur(),this.pointerDown||N(this.elementToTransform,`${s}px`)}}else this.state=2,((r,i,s)=>{e((()=>{r.forEach(((e,r)=>{const t=r*(1/i),n=u(0,(s-t)/(1-t),1);e.style.setProperty("opacity",n.toString())}))}))})(t,o,a);var f,l}))},this.scrollEl.addEventListener("scroll",this.scrollListenerCallback),this.gesture=(await import("./p-Cl0B-RWe.js")).createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,onStart:()=>{this.pointerDown=!0,this.didRefresh||N(this.elementToTransform,"0px"),0===n&&(n=.16*this.scrollEl.clientHeight)},onMove:e=>{this.lastVelocityY=e.velocityY},onEnd:()=>{this.pointerDown=!1,this.didStart=!1,this.needsCompletion?(this.resetNativeRefresher(this.elementToTransform,32),this.needsCompletion=!1):this.didRefresh&&s((()=>N(this.elementToTransform,`${this.el.clientHeight}px`)))}}),this.disabledChanged()}async setupMDNativeRefresher(r,i,s){const t=b(i).querySelector("circle"),n=this.el.querySelector("ion-refresher-content .refresher-pulling-icon"),o=b(s).querySelector("circle");null!==t&&null!==o&&e((()=>{t.style.setProperty("animation","none"),s.style.setProperty("animation-delay","-655ms"),o.style.setProperty("animation-delay","-655ms")})),this.gesture=(await import("./p-Cl0B-RWe.js")).createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,canStart:()=>8!==this.state&&32!==this.state&&0===this.scrollEl.scrollTop,onStart:e=>{this.progress=0,e.data={animation:void 0,didStart:!1,cancelled:!1}},onMove:i=>{if(i.velocityY<0&&0===this.progress&&!i.data.didStart||i.data.cancelled)i.data.cancelled=!0;else{if(!i.data.didStart){i.data.didStart=!0,this.state=2;const{scrollEl:s}=this,t=s.matches(l)?"overflow":"--overflow";e((()=>s.style.setProperty(t,"hidden")));const o=(e=>{const r=e.previousElementSibling;return null!==r&&"ION-HEADER"===r.tagName?"translate":"scale"})(r),h=((e,r,i)=>"scale"===e?((e,r)=>{const i=r.clientHeight,s=w().addElement(e).keyframes([{offset:0,transform:`scale(0) translateY(-${i}px)`},{offset:1,transform:"scale(1) translateY(100px)"}]);return M(e).addAnimation([s])})(r,i):((e,r)=>{const i=r.clientHeight,s=w().addElement(e).keyframes([{offset:0,transform:`translateY(-${i}px)`},{offset:1,transform:"translateY(100px)"}]);return M(e).addAnimation([s])})(r,i))(o,n,this.el);return i.data.animation=h,h.progressStart(!1,0),this.ionStart.emit(),void this.animations.push(h)}this.progress=u(0,i.deltaY/180*.5,1),i.data.animation.progressStep(this.progress),this.ionPull.emit()}},onEnd:r=>{if(!r.data.didStart)return;this.gesture.enable(!1);const{scrollEl:i}=this,s=i.matches(l)?"overflow":"--overflow";if(e((()=>i.style.removeProperty(s))),this.progress<=.4)return void r.data.animation.progressEnd(0,this.progress,500).onFinish((()=>{this.animations.forEach((e=>e.destroy())),this.animations=[],this.gesture.enable(!0),this.state=1}));const t=f([0,0],[0,0],[1,1],[1,1],this.progress)[0],o=(e=>w().duration(125).addElement(e).fromTo("transform","translateY(var(--ion-pulling-refresher-translate, 100px))","translateY(0px)"))(n);this.animations.push(o),e((async()=>{n.style.setProperty("--ion-pulling-refresher-translate",100*t+"px"),r.data.animation.progressEnd(),await o.play(),this.beginRefresh(),r.data.animation.destroy(),this.gesture.enable(!0)}))}}),this.disabledChanged()}async setupNativeRefresher(e){if(this.scrollListenerCallback||!e||this.nativeRefresher||!this.scrollEl)return;this.setCss(0,"",!1,""),this.nativeRefresher=!0;const r=this.el.querySelector("ion-refresher-content .refresher-pulling ion-spinner"),i=this.el.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");"ios"===k(this)?this.setupiOSNativeRefresher(r,i):this.setupMDNativeRefresher(e,r,i)}componentDidUpdate(){this.checkNativeRefresher()}async connectedCallback(){if("fixed"!==this.el.getAttribute("slot"))return void t('[ion-refresher] - Make sure you use: <ion-refresher slot="fixed">');const e=this.el.closest(c);e?g(e,(async()=>{const r=e.querySelector(l);this.scrollEl=await d(null!=r?r:e),this.backgroundContentEl=await e.getBackgroundElement(),this.contentFullscreen=e.fullscreen,await D(this.el,k(this))?this.setupNativeRefresher(e):(this.gesture=(await import("./p-Cl0B-RWe.js")).createGesture({el:e,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:20,passive:!1,canStart:()=>this.canStart(),onStart:()=>this.onStart(),onMove:e=>this.onMove(e),onEnd:()=>this.onEnd()}),this.disabledChanged())})):p(this.el)}disconnectedCallback(){this.destroyNativeRefresher(),this.scrollEl=void 0,this.gesture&&(this.gesture.destroy(),this.gesture=void 0)}async complete(){this.nativeRefresher?(this.needsCompletion=!0,this.pointerDown||v((()=>v((()=>this.resetNativeRefresher(this.elementToTransform,32)))))):this.close(32,"120ms")}async cancel(){this.nativeRefresher?this.pointerDown||v((()=>v((()=>this.resetNativeRefresher(this.elementToTransform,16))))):this.close(16,"")}getProgress(){return Promise.resolve(this.progress)}canStart(){return!(!this.scrollEl||1!==this.state||this.scrollEl.scrollTop>0)}onStart(){this.progress=0,this.state=1,this.memoizeOverflowStyle(),this.contentFullscreen&&this.backgroundContentEl&&this.backgroundContentEl.style.setProperty("--offset-top","0px")}onMove(e){if(!this.scrollEl)return;const r=e.event;if(void 0!==r.touches&&r.touches.length>1)return;if(56&this.state)return;const i=Number.isNaN(this.pullFactor)||this.pullFactor<0?1:this.pullFactor,s=e.deltaY*i;if(s<=0)return this.progress=0,this.state=1,this.appliedStyles?void this.setCss(0,"",!1,""):void 0;if(1===this.state){if(this.scrollEl.scrollTop>0)return void(this.progress=0);this.state=2}if(r.cancelable&&r.preventDefault(),this.setCss(s,"0ms",!0,""),0===s)return void(this.progress=0);const t=this.pullMin;this.progress=s/t,this.didStart||(this.didStart=!0,this.ionStart.emit()),this.ionPull.emit(),s<t?this.state=2:s>this.pullMax?this.beginRefresh():this.state=4}onEnd(){4===this.state?this.beginRefresh():2===this.state?this.cancel():1===this.state&&this.restoreOverflowStyle()}beginRefresh(){this.state=8,this.setCss(this.pullMin,this.snapbackDuration,!0,"");const e=document.activeElement;void 0!==(null==e?void 0:e.blur)&&e.blur(),this.ionRefresh.emit({complete:this.complete.bind(this)})}close(e,r){setTimeout((()=>{var e;this.state=1,this.progress=0,this.didStart=!1,this.setCss(0,"0ms",!1,"",!0),this.contentFullscreen&&this.backgroundContentEl&&(null===(e=this.backgroundContentEl)||void 0===e||e.style.removeProperty("--offset-top"))}),600),this.state=e,this.setCss(0,this.closeDuration,!0,r)}setCss(r,i,s,t,n=!1){this.nativeRefresher||(this.appliedStyles=r>0,e((()=>{if(this.scrollEl&&this.backgroundContentEl){const e=this.scrollEl.style,n=this.backgroundContentEl.style;e.transform=n.transform=r>0?`translateY(${r}px) translateZ(0px)`:"",e.transitionDuration=n.transitionDuration=i,e.transitionDelay=n.transitionDelay=t,e.overflow=s?"hidden":""}n&&this.restoreOverflowStyle()})))}memoizeOverflowStyle(){if(this.scrollEl){const{overflow:e,overflowX:r,overflowY:i}=this.scrollEl.style;this.overflowStyles={overflow:null!=e?e:"",overflowX:null!=r?r:"",overflowY:null!=i?i:""}}}restoreOverflowStyle(){if(void 0!==this.overflowStyles&&void 0!==this.scrollEl){const{overflow:e,overflowX:r,overflowY:i}=this.overflowStyles;this.scrollEl.style.overflow=e,this.scrollEl.style.overflowX=r,this.scrollEl.style.overflowY=i,this.overflowStyles=void 0}}render(){const e=k(this);return n(o,{key:"2d1bd880877b698604542ab2d602d38b9504d975",slot:"fixed",class:{[e]:!0,[`refresher-${e}`]:!0,"refresher-native":this.nativeRefresher,"refresher-active":1!==this.state,"refresher-pulling":2===this.state,"refresher-ready":4===this.state,"refresher-refreshing":8===this.state,"refresher-cancelling":16===this.state,"refresher-completing":32===this.state}})}get el(){return h(this)}static get watchers(){return{disabled:["disabledChanged"]}}};T.style={ios:"ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}ion-refresher{inset-inline-start:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-ios .refresher-pulling-icon,.refresher-ios .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-ios .refresher-pulling-text,.refresher-ios .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-lines-ios line,.refresher-ios .refresher-refreshing .spinner-lines-small-ios line,.refresher-ios .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-bubbles circle,.refresher-ios .refresher-refreshing .spinner-circles circle,.refresher-ios .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}.refresher-native .refresher-refreshing ion-spinner{--refreshing-rotation-duration:2s;display:none;-webkit-animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards;animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards}.refresher-native .refresher-refreshing{display:none;-webkit-animation:250ms linear refresher-pop forwards;animation:250ms linear refresher-pop forwards}.refresher-native ion-spinner{width:32px;height:32px;color:var(--ion-color-step-450, var(--ion-background-color-step-450, #747577))}.refresher-native.refresher-refreshing .refresher-pulling ion-spinner,.refresher-native.refresher-completing .refresher-pulling ion-spinner{display:none}.refresher-native.refresher-refreshing .refresher-refreshing ion-spinner,.refresher-native.refresher-completing .refresher-refreshing ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-pulling ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-refreshing ion-spinner{display:none}.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0) rotate(180deg);transform:scale(0) rotate(180deg);-webkit-transition:300ms;transition:300ms}@-webkit-keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}",md:"ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}ion-refresher{inset-inline-start:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-md .refresher-pulling-icon,.refresher-md .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-md .refresher-pulling-text,.refresher-md .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-lines-md line,.refresher-md .refresher-refreshing .spinner-lines-small-md line,.refresher-md .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-bubbles circle,.refresher-md .refresher-refreshing .spinner-circles circle,.refresher-md .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;width:24px;height:24px;color:var(--ion-color-primary, #0054e9)}ion-refresher.refresher-native .spinner-arrow-container{display:inherit}ion-refresher.refresher-native .arrow-container{display:block;position:absolute;width:24px;height:24px}ion-refresher.refresher-native .arrow-container ion-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;left:0;right:0;bottom:-4px;position:absolute;color:var(--ion-color-primary, #0054e9);font-size:12px}ion-refresher.refresher-native.refresher-pulling ion-refresher-content .refresher-pulling,ion-refresher.refresher-native.refresher-ready ion-refresher-content .refresher-pulling{display:-ms-flexbox;display:flex}ion-refresher.refresher-native.refresher-refreshing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-cancelling ion-refresher-content .refresher-refreshing{display:-ms-flexbox;display:flex}ion-refresher.refresher-native .refresher-pulling-icon{-webkit-transform:translateY(calc(-100% - 10px));transform:translateY(calc(-100% - 10px))}ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;border-radius:100%;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;display:-ms-flexbox;display:flex;border:1px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #ececec));background:var(--ion-color-step-250, var(--ion-background-color-step-250, #ffffff));-webkit-box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1);box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1)}"};const P=class{constructor(e){r(this,e),this.customHTMLEnabled=a.get("innerHTMLTemplatesEnabled",j)}componentWillLoad(){if(void 0===this.pullingIcon){const e=Y(),r=k(this);this.pullingIcon=a.get("refreshingIcon","ios"===r&&e?a.get("spinner",e?"lines":S):"circular")}if(void 0===this.refreshingSpinner){const e=k(this);this.refreshingSpinner=a.get("refreshingSpinner",a.get("spinner","ios"===e?"lines":"circular"))}}renderPullingText(){const{customHTMLEnabled:e,pullingText:r}=this;return e?n("div",{class:"refresher-pulling-text",innerHTML:C(r)}):n("div",{class:"refresher-pulling-text"},r)}renderRefreshingText(){const{customHTMLEnabled:e,refreshingText:r}=this;return e?n("div",{class:"refresher-refreshing-text",innerHTML:C(r)}):n("div",{class:"refresher-refreshing-text"},r)}render(){const e=this.pullingIcon,r=null!=e&&void 0!==E[e],i=k(this);return n(o,{key:"e235f8a9a84070ece2e2066ced234a64663bfa1d",class:i},n("div",{key:"9121691818ddaa35801a5f442e144ac27686cf19",class:"refresher-pulling"},this.pullingIcon&&r&&n("div",{key:"c8d65d740f1575041bd3b752c789077927397fe4",class:"refresher-pulling-icon"},n("div",{key:"309dd904977eaa788b09ea95b7fa4996a73bec5b",class:"spinner-arrow-container"},n("ion-spinner",{key:"a2a1480f67775d56ca7822e76be1e9f983bca2f9",name:this.pullingIcon,paused:!0}),"md"===i&&"circular"===this.pullingIcon&&n("div",{key:"811d7e06d324bf4b6a18a31427a43e5177f3ae3a",class:"arrow-container"},n("ion-icon",{key:"86cc48e2e8dc054ff6ff1299094da35b524be63d",icon:R,"aria-hidden":"true"})))),this.pullingIcon&&!r&&n("div",{key:"464ae097dbc95c18a2dd7dfd03f8489153dab719",class:"refresher-pulling-icon"},n("ion-icon",{key:"ed6875978b9035add562caa743a68353743d978f",icon:this.pullingIcon,lazy:!1,"aria-hidden":"true"})),void 0!==this.pullingText&&this.renderPullingText()),n("div",{key:"aff891924e44354543fec484e5cde1ca92e69904",class:"refresher-refreshing"},this.refreshingSpinner&&n("div",{key:"842d7ac4ff10a1058775493d62f31cbdcd34f7a0",class:"refresher-refreshing-icon"},n("ion-spinner",{key:"8c3e6195501e7e78d5cde1e3ad1fef90fd4a953f",name:this.refreshingSpinner})),void 0!==this.refreshingText&&this.renderRefreshingText()))}get el(){return h(this)}};export{T as ion_refresher,P as ion_refresher_content}
|
|
4
|
+
import{w as e,r,c as i,a as s,j as t,h as n,d as o,g as h,e as a}from"./p-K56Zjrdc.js";import{g as f}from"./p-hHmYLOfE.js";import{I as l,b as c,p,g as d}from"./p-C6NxSVl3.js";import{c as g,t as m,e as u,g as b,r as x}from"./p-RUyJri7q.js";import{d as v,I as y}from"./p-CKvCXMs9.js";import{b as k}from"./p-BuiN7eei.js";import{c as w}from"./p-BFdLXUmQ.js";import{E as j,a as S}from"./p-Dx6HlEVi.js";import{h as E,i as R}from"./p-DV3sJJW8.js";import{S as C}from"./p-D4RIp70E.js";import"./p-CIGNaXM1.js";import"./p-ZjP4CjeZ.js";const M=e=>{const r=e.querySelector("ion-spinner"),i=r.shadowRoot.querySelector("circle"),s=e.querySelector(".spinner-arrow-container"),t=e.querySelector(".arrow-container"),n=t?t.querySelector("ion-icon"):null,o=w().duration(1e3).easing("ease-out"),h=w().addElement(s).keyframes([{offset:0,opacity:"0.3"},{offset:.45,opacity:"0.3"},{offset:.55,opacity:"1"},{offset:1,opacity:"1"}]),a=w().addElement(i).keyframes([{offset:0,strokeDasharray:"1px, 200px"},{offset:.2,strokeDasharray:"1px, 200px"},{offset:.55,strokeDasharray:"100px, 200px"},{offset:1,strokeDasharray:"100px, 200px"}]),f=w().addElement(r).keyframes([{offset:0,transform:"rotate(-90deg)"},{offset:1,transform:"rotate(210deg)"}]);if(t&&n){const e=w().addElement(t).keyframes([{offset:0,transform:"rotate(0deg)"},{offset:.3,transform:"rotate(0deg)"},{offset:.55,transform:"rotate(280deg)"},{offset:1,transform:"rotate(400deg)"}]),r=w().addElement(n).keyframes([{offset:0,transform:"translateX(2px) scale(0)"},{offset:.3,transform:"translateX(2px) scale(0)"},{offset:.55,transform:"translateX(-1.5px) scale(1)"},{offset:1,transform:"translateX(-1.5px) scale(1)"}]);o.addAnimation([e,r])}return o.addAnimation([h,a,f])},N=(r,i,s=200)=>{if(!r)return Promise.resolve();const t=m(r,s);return e((()=>{r.style.setProperty("transition",`${s}ms all ease-out`),void 0===i?r.style.removeProperty("transform"):r.style.setProperty("transform",`translate3d(0px, ${i}, 0px)`)})),t},Y=()=>navigator.maxTouchPoints>0&&CSS.supports("background: -webkit-named-image(apple-pay-logo-black)"),z=async(e,r)=>{const i=e.querySelector("ion-refresher-content");if(!i)return Promise.resolve(!1);await new Promise((e=>g(i,e)));const s=e.querySelector("ion-refresher-content .refresher-pulling ion-spinner"),t=e.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");return null!==s&&null!==t&&("ios"===r&&Y()||"md"===r)},P=class{constructor(e){r(this,e),this.ionRefresh=i(this,"ionRefresh",7),this.ionPull=i(this,"ionPull",7),this.ionStart=i(this,"ionStart",7),this.appliedStyles=!1,this.didStart=!1,this.progress=0,this.pointerDown=!1,this.needsCompletion=!1,this.didRefresh=!1,this.contentFullscreen=!1,this.lastVelocityY=0,this.animations=[],this.nativeRefresher=!1,this.state=1,this.pullMin=60,this.pullMax=this.pullMin+60,this.closeDuration="280ms",this.snapbackDuration="280ms",this.pullFactor=1,this.disabled=!1}disabledChanged(){this.gesture&&this.gesture.enable(!this.disabled)}async checkNativeRefresher(){const e=await z(this.el,k(this));if(e&&!this.nativeRefresher){const e=this.el.closest("ion-content");this.setupNativeRefresher(e)}else e||this.destroyNativeRefresher()}destroyNativeRefresher(){this.scrollEl&&this.scrollListenerCallback&&(this.scrollEl.removeEventListener("scroll",this.scrollListenerCallback),this.scrollListenerCallback=void 0),this.nativeRefresher=!1}async resetNativeRefresher(e,r){this.state=r,"ios"===k(this)?await N(e,void 0,300):await m(this.el.querySelector(".refresher-refreshing-icon"),200),this.didRefresh=!1,this.needsCompletion=!1,this.pointerDown=!1,this.animations.forEach((e=>e.destroy())),this.animations=[],this.progress=0,this.state=1}async setupiOSNativeRefresher(r,i){this.elementToTransform=this.scrollEl;const t=r.shadowRoot.querySelectorAll("svg");let n=.16*this.scrollEl.clientHeight;const o=t.length;e((()=>t.forEach((e=>e.style.setProperty("animation","none"))))),this.scrollListenerCallback=()=>{(this.pointerDown||1!==this.state)&&s((()=>{const r=this.scrollEl.scrollTop,s=this.el.clientHeight;if(r>0){if(8===this.state){const t=u(0,r/(.5*s),1);return void e((()=>{i.style.setProperty("opacity",(1-t).toString())}))}return}this.pointerDown&&(this.didStart||(this.didStart=!0,this.ionStart.emit()),this.pointerDown&&this.ionPull.emit());const h=this.didStart?30:0,a=this.progress=u(0,(Math.abs(r)-h)/n,1);if(8===this.state||1===a){if(this.pointerDown&&(f=i,l=this.lastVelocityY,e((()=>{f.style.setProperty("--refreshing-rotation-duration",l>=1?"0.5s":"2s"),f.style.setProperty("opacity","1")}))),!this.didRefresh){this.beginRefresh(),this.didRefresh=!0,v({style:y.Light});const e=document.activeElement;void 0!==(null==e?void 0:e.blur)&&e.blur(),this.pointerDown||N(this.elementToTransform,`${s}px`)}}else this.state=2,((r,i,s)=>{e((()=>{r.forEach(((e,r)=>{const t=r*(1/i),n=u(0,(s-t)/(1-t),1);e.style.setProperty("opacity",n.toString())}))}))})(t,o,a);var f,l}))},this.scrollEl.addEventListener("scroll",this.scrollListenerCallback),this.gesture=(await import("./p-Cl0B-RWe.js")).createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,onStart:()=>{this.pointerDown=!0,this.didRefresh||N(this.elementToTransform,"0px"),0===n&&(n=.16*this.scrollEl.clientHeight)},onMove:e=>{this.lastVelocityY=e.velocityY},onEnd:()=>{this.pointerDown=!1,this.didStart=!1,this.needsCompletion?(this.resetNativeRefresher(this.elementToTransform,32),this.needsCompletion=!1):this.didRefresh&&s((()=>N(this.elementToTransform,`${this.el.clientHeight}px`)))}}),this.disabledChanged()}async setupMDNativeRefresher(r,i,s){const t=b(i).querySelector("circle"),n=this.el.querySelector("ion-refresher-content .refresher-pulling-icon"),o=b(s).querySelector("circle");null!==t&&null!==o&&e((()=>{t.style.setProperty("animation","none"),s.style.setProperty("animation-delay","-655ms"),o.style.setProperty("animation-delay","-655ms")})),this.gesture=(await import("./p-Cl0B-RWe.js")).createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,canStart:()=>8!==this.state&&32!==this.state&&0===this.scrollEl.scrollTop,onStart:e=>{this.progress=0,e.data={animation:void 0,didStart:!1,cancelled:!1}},onMove:i=>{if(i.velocityY<0&&0===this.progress&&!i.data.didStart||i.data.cancelled)i.data.cancelled=!0;else{if(!i.data.didStart){i.data.didStart=!0,this.state=2;const{scrollEl:s}=this,t=s.matches(l)?"overflow":"--overflow";e((()=>s.style.setProperty(t,"hidden")));const o=(e=>{const r=e.previousElementSibling;return null!==r&&"ION-HEADER"===r.tagName?"translate":"scale"})(r),h=((e,r,i)=>"scale"===e?((e,r)=>{const i=r.clientHeight,s=w().addElement(e).keyframes([{offset:0,transform:`scale(0) translateY(-${i}px)`},{offset:1,transform:"scale(1) translateY(100px)"}]);return M(e).addAnimation([s])})(r,i):((e,r)=>{const i=r.clientHeight,s=w().addElement(e).keyframes([{offset:0,transform:`translateY(-${i}px)`},{offset:1,transform:"translateY(100px)"}]);return M(e).addAnimation([s])})(r,i))(o,n,this.el);return i.data.animation=h,h.progressStart(!1,0),this.ionStart.emit(),void this.animations.push(h)}this.progress=u(0,i.deltaY/180*.5,1),i.data.animation.progressStep(this.progress),this.ionPull.emit()}},onEnd:r=>{if(!r.data.didStart)return;this.gesture.enable(!1);const{scrollEl:i}=this,s=i.matches(l)?"overflow":"--overflow";if(e((()=>i.style.removeProperty(s))),this.progress<=.4)return void r.data.animation.progressEnd(0,this.progress,500).onFinish((()=>{this.animations.forEach((e=>e.destroy())),this.animations=[],this.gesture.enable(!0),this.state=1}));const t=f([0,0],[0,0],[1,1],[1,1],this.progress)[0],o=(e=>w().duration(125).addElement(e).fromTo("transform","translateY(var(--ion-pulling-refresher-translate, 100px))","translateY(0px)"))(n);this.animations.push(o),e((async()=>{n.style.setProperty("--ion-pulling-refresher-translate",100*t+"px"),r.data.animation.progressEnd(),await o.play(),this.beginRefresh(),r.data.animation.destroy(),this.gesture.enable(!0)}))}}),this.disabledChanged()}async setupNativeRefresher(e){if(this.scrollListenerCallback||!e||this.nativeRefresher||!this.scrollEl)return;this.setCss(0,"",!1,""),this.nativeRefresher=!0;const r=this.el.querySelector("ion-refresher-content .refresher-pulling ion-spinner"),i=this.el.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");"ios"===k(this)?this.setupiOSNativeRefresher(r,i):this.setupMDNativeRefresher(e,r,i)}componentDidUpdate(){this.checkNativeRefresher()}async connectedCallback(){if("fixed"!==this.el.getAttribute("slot"))return void t('[ion-refresher] - Make sure you use: <ion-refresher slot="fixed">');const e=this.el.closest(c);e?g(e,(async()=>{const r=e.querySelector(l);this.scrollEl=await d(null!=r?r:e),this.backgroundContentEl=await e.getBackgroundElement(),this.contentFullscreen=e.fullscreen,await z(this.el,k(this))?this.setupNativeRefresher(e):(this.gesture=(await import("./p-Cl0B-RWe.js")).createGesture({el:e,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:20,passive:!1,canStart:()=>this.canStart(),onStart:()=>this.onStart(),onMove:e=>this.onMove(e),onEnd:()=>this.onEnd()}),this.disabledChanged())})):p(this.el)}disconnectedCallback(){this.destroyNativeRefresher(),this.scrollEl=void 0,this.gesture&&(this.gesture.destroy(),this.gesture=void 0)}async complete(){this.nativeRefresher?(this.needsCompletion=!0,this.pointerDown||x((()=>x((()=>this.resetNativeRefresher(this.elementToTransform,32)))))):this.close(32,"120ms")}async cancel(){this.nativeRefresher?this.pointerDown||x((()=>x((()=>this.resetNativeRefresher(this.elementToTransform,16))))):this.close(16,"")}getProgress(){return Promise.resolve(this.progress)}canStart(){return!(!this.scrollEl||1!==this.state||this.scrollEl.scrollTop>0)}onStart(){this.progress=0,this.state=1,this.memoizeOverflowStyle(),this.contentFullscreen&&this.backgroundContentEl&&this.backgroundContentEl.style.setProperty("--offset-top","0px")}onMove(e){if(!this.scrollEl)return;const r=e.event;if(void 0!==r.touches&&r.touches.length>1)return;if(56&this.state)return;const i=Number.isNaN(this.pullFactor)||this.pullFactor<0?1:this.pullFactor,s=e.deltaY*i;if(s<=0)return this.progress=0,this.state=1,this.appliedStyles?void this.setCss(0,"",!1,""):void 0;if(1===this.state){if(this.scrollEl.scrollTop>0)return void(this.progress=0);this.state=2}if(r.cancelable&&r.preventDefault(),this.setCss(s,"0ms",!0,""),0===s)return void(this.progress=0);const t=this.pullMin;this.progress=s/t,this.didStart||(this.didStart=!0,this.ionStart.emit()),this.ionPull.emit(),s<t?this.state=2:s>this.pullMax?this.beginRefresh():this.state=4}onEnd(){4===this.state?this.beginRefresh():2===this.state?this.cancel():1===this.state&&this.restoreOverflowStyle()}beginRefresh(){this.state=8,this.setCss(this.pullMin,this.snapbackDuration,!0,"");const e=document.activeElement;void 0!==(null==e?void 0:e.blur)&&e.blur(),this.ionRefresh.emit({complete:this.complete.bind(this)})}close(e,r){setTimeout((()=>{var e;this.state=1,this.progress=0,this.didStart=!1,this.setCss(0,"0ms",!1,"",!0),this.contentFullscreen&&this.backgroundContentEl&&(null===(e=this.backgroundContentEl)||void 0===e||e.style.removeProperty("--offset-top"))}),600),this.state=e,this.setCss(0,this.closeDuration,!0,r)}setCss(r,i,s,t,n=!1){this.nativeRefresher||(this.appliedStyles=r>0,e((()=>{if(this.scrollEl&&this.backgroundContentEl){const e=this.scrollEl.style,n=this.backgroundContentEl.style;e.transform=n.transform=r>0?`translateY(${r}px) translateZ(0px)`:"",e.transitionDuration=n.transitionDuration=i,e.transitionDelay=n.transitionDelay=t,e.overflow=s?"hidden":""}n&&this.restoreOverflowStyle()})))}memoizeOverflowStyle(){if(this.scrollEl){const{overflow:e,overflowX:r,overflowY:i}=this.scrollEl.style;this.overflowStyles={overflow:null!=e?e:"",overflowX:null!=r?r:"",overflowY:null!=i?i:""}}}restoreOverflowStyle(){if(void 0!==this.overflowStyles&&void 0!==this.scrollEl){const{overflow:e,overflowX:r,overflowY:i}=this.overflowStyles;this.scrollEl.style.overflow=e,this.scrollEl.style.overflowX=r,this.scrollEl.style.overflowY=i,this.overflowStyles=void 0}}render(){const e=k(this);return n(o,{key:"2d1bd880877b698604542ab2d602d38b9504d975",slot:"fixed",class:{[e]:!0,[`refresher-${e}`]:!0,"refresher-native":this.nativeRefresher,"refresher-active":1!==this.state,"refresher-pulling":2===this.state,"refresher-ready":4===this.state,"refresher-refreshing":8===this.state,"refresher-cancelling":16===this.state,"refresher-completing":32===this.state}})}get el(){return h(this)}static get watchers(){return{disabled:["disabledChanged"]}}};P.style={ios:"ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}ion-refresher{inset-inline-start:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-ios .refresher-pulling-icon,.refresher-ios .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-ios .refresher-pulling-text,.refresher-ios .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-lines-ios line,.refresher-ios .refresher-refreshing .spinner-lines-small-ios line,.refresher-ios .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-bubbles circle,.refresher-ios .refresher-refreshing .spinner-circles circle,.refresher-ios .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}.refresher-native .refresher-refreshing ion-spinner{--refreshing-rotation-duration:2s;display:none;-webkit-animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards;animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards}.refresher-native .refresher-refreshing{display:none;-webkit-animation:250ms linear refresher-pop forwards;animation:250ms linear refresher-pop forwards}.refresher-native ion-spinner{width:32px;height:32px;color:var(--ion-color-step-450, var(--ion-background-color-step-450, #747577))}.refresher-native.refresher-refreshing .refresher-pulling ion-spinner,.refresher-native.refresher-completing .refresher-pulling ion-spinner{display:none}.refresher-native.refresher-refreshing .refresher-refreshing ion-spinner,.refresher-native.refresher-completing .refresher-refreshing ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-pulling ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-refreshing ion-spinner{display:none}.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0) rotate(180deg);transform:scale(0) rotate(180deg);-webkit-transition:300ms;transition:300ms}@-webkit-keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}",md:"ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}ion-refresher{inset-inline-start:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-md .refresher-pulling-icon,.refresher-md .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-md .refresher-pulling-text,.refresher-md .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-lines-md line,.refresher-md .refresher-refreshing .spinner-lines-small-md line,.refresher-md .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-bubbles circle,.refresher-md .refresher-refreshing .spinner-circles circle,.refresher-md .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;width:24px;height:24px;color:var(--ion-color-primary, #0054e9)}ion-refresher.refresher-native .spinner-arrow-container{display:inherit}ion-refresher.refresher-native .arrow-container{display:block;position:absolute;width:24px;height:24px}ion-refresher.refresher-native .arrow-container ion-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;left:0;right:0;bottom:-4px;position:absolute;color:var(--ion-color-primary, #0054e9);font-size:12px}ion-refresher.refresher-native.refresher-pulling ion-refresher-content .refresher-pulling,ion-refresher.refresher-native.refresher-ready ion-refresher-content .refresher-pulling{display:-ms-flexbox;display:flex}ion-refresher.refresher-native.refresher-refreshing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-cancelling ion-refresher-content .refresher-refreshing{display:-ms-flexbox;display:flex}ion-refresher.refresher-native .refresher-pulling-icon{-webkit-transform:translateY(calc(-100% - 10px));transform:translateY(calc(-100% - 10px))}ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;border-radius:100%;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;display:-ms-flexbox;display:flex;border:1px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #ececec));background:var(--ion-color-step-250, var(--ion-background-color-step-250, #ffffff));-webkit-box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1);box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1)}"};const T=class{constructor(e){r(this,e),this.customHTMLEnabled=a.get("innerHTMLTemplatesEnabled",j)}componentWillLoad(){if(void 0===this.pullingIcon){const e=Y(),r=k(this);this.pullingIcon=a.get("refreshingIcon","ios"===r&&e?a.get("spinner",e?"lines":E):"circular")}if(void 0===this.refreshingSpinner){const e=k(this);this.refreshingSpinner=a.get("refreshingSpinner",a.get("spinner","ios"===e?"lines":"circular"))}}renderPullingText(){const{customHTMLEnabled:e,pullingText:r}=this;return e?n("div",{class:"refresher-pulling-text",innerHTML:S(r)}):n("div",{class:"refresher-pulling-text"},r)}renderRefreshingText(){const{customHTMLEnabled:e,refreshingText:r}=this;return e?n("div",{class:"refresher-refreshing-text",innerHTML:S(r)}):n("div",{class:"refresher-refreshing-text"},r)}render(){const e=this.pullingIcon,r=null!=e&&void 0!==C[e],i=k(this);return n(o,{key:"e235f8a9a84070ece2e2066ced234a64663bfa1d",class:i},n("div",{key:"9121691818ddaa35801a5f442e144ac27686cf19",class:"refresher-pulling"},this.pullingIcon&&r&&n("div",{key:"c8d65d740f1575041bd3b752c789077927397fe4",class:"refresher-pulling-icon"},n("div",{key:"309dd904977eaa788b09ea95b7fa4996a73bec5b",class:"spinner-arrow-container"},n("ion-spinner",{key:"a2a1480f67775d56ca7822e76be1e9f983bca2f9",name:this.pullingIcon,paused:!0}),"md"===i&&"circular"===this.pullingIcon&&n("div",{key:"811d7e06d324bf4b6a18a31427a43e5177f3ae3a",class:"arrow-container"},n("ion-icon",{key:"86cc48e2e8dc054ff6ff1299094da35b524be63d",icon:R,"aria-hidden":"true"})))),this.pullingIcon&&!r&&n("div",{key:"464ae097dbc95c18a2dd7dfd03f8489153dab719",class:"refresher-pulling-icon"},n("ion-icon",{key:"ed6875978b9035add562caa743a68353743d978f",icon:this.pullingIcon,lazy:!1,"aria-hidden":"true"})),void 0!==this.pullingText&&this.renderPullingText()),n("div",{key:"aff891924e44354543fec484e5cde1ca92e69904",class:"refresher-refreshing"},this.refreshingSpinner&&n("div",{key:"842d7ac4ff10a1058775493d62f31cbdcd34f7a0",class:"refresher-refreshing-icon"},n("ion-spinner",{key:"8c3e6195501e7e78d5cde1e3ad1fef90fd4a953f",name:this.refreshingSpinner})),void 0!==this.refreshingText&&this.renderRefreshingText()))}get el(){return h(this)}};export{P as ion_refresher,T as ion_refresher_content}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,c as n,w as t,a as e,h as s,d as o,g as l,e as r}from"./p-
|
|
4
|
+
import{r as i,c as n,w as t,a as e,h as s,d as o,g as l,e as r}from"./p-K56Zjrdc.js";import{f as c,p as a,g as d}from"./p-C6NxSVl3.js";import{b as h}from"./p-BuiN7eei.js";import{E as f,a as p}from"./p-Dx6HlEVi.js";import"./p-RUyJri7q.js";const m=class{constructor(t){i(this,t),this.ionInfinite=n(this,"ionInfinite",7),this.thrPx=0,this.thrPc=0,this.didFire=!1,this.isBusy=!1,this.isLoading=!1,this.threshold="15%",this.disabled=!1,this.position="bottom",this.onScroll=()=>{const i=this.scrollEl;if(!i||!this.canStart())return 1;const n=this.el.offsetHeight;if(0===n)return 2;const t=i.scrollTop,e=i.offsetHeight,s=0!==this.thrPc?e*this.thrPc:this.thrPx;return("bottom"===this.position?i.scrollHeight-n-t-s-e:t-n-s)<0&&!this.didFire?(this.isLoading=!0,this.didFire=!0,this.ionInfinite.emit(),3):4}}thresholdChanged(){const i=this.threshold;i.lastIndexOf("%")>-1?(this.thrPx=0,this.thrPc=parseFloat(i)/100):(this.thrPx=parseFloat(i),this.thrPc=0)}disabledChanged(){const i=this.disabled;i&&(this.isLoading=!1,this.isBusy=!1),this.enableScrollEvents(!i)}async connectedCallback(){const i=c(this.el);i?(this.scrollEl=await d(i),this.thresholdChanged(),this.disabledChanged(),"top"===this.position&&t((()=>{this.scrollEl&&(this.scrollEl.scrollTop=this.scrollEl.scrollHeight-this.scrollEl.clientHeight)}))):a(this.el)}disconnectedCallback(){this.enableScrollEvents(!1),this.scrollEl=void 0}async complete(){const i=this.scrollEl;if(this.isLoading&&i)if(this.isLoading=!1,"top"===this.position){this.isBusy=!0;const n=i.scrollHeight-i.scrollTop;requestAnimationFrame((()=>{e((()=>{const e=i.scrollHeight-n;requestAnimationFrame((()=>{t((()=>{i.scrollTop=e,this.isBusy=!1,this.didFire=!1}))}))}))}))}else this.didFire=!1}canStart(){return!(this.disabled||this.isBusy||!this.scrollEl||this.isLoading)}enableScrollEvents(i){this.scrollEl&&(i?this.scrollEl.addEventListener("scroll",this.onScroll):this.scrollEl.removeEventListener("scroll",this.onScroll))}render(){const i=h(this),n=this.disabled;return s(o,{key:"e844956795f69be33396ce4480aa7a54ad01b28c",class:{[i]:!0,"infinite-scroll-loading":this.isLoading,"infinite-scroll-enabled":!n}})}get el(){return l(this)}static get watchers(){return{threshold:["thresholdChanged"],disabled:["disabledChanged"]}}};m.style="ion-infinite-scroll{display:none;width:100%}.infinite-scroll-enabled{display:block}";const g=class{constructor(n){i(this,n),this.customHTMLEnabled=r.get("innerHTMLTemplatesEnabled",f)}componentDidLoad(){if(void 0===this.loadingSpinner){const i=h(this);this.loadingSpinner=r.get("infiniteLoadingSpinner",r.get("spinner","ios"===i?"lines":"crescent"))}}renderLoadingText(){const{customHTMLEnabled:i,loadingText:n}=this;return i?s("div",{class:"infinite-loading-text",innerHTML:p(n)}):s("div",{class:"infinite-loading-text"},this.loadingText)}render(){const i=h(this);return s(o,{key:"7c16060dcfe2a0b0fb3e2f8f4c449589a76f1baa",class:{[i]:!0,[`infinite-scroll-content-${i}`]:!0}},s("div",{key:"a94f4d8746e053dc718f97520bd7e48cb316443a",class:"infinite-loading"},this.loadingSpinner&&s("div",{key:"10143d5d2a50a2a2bc5de1cee8e7ab51263bcf23",class:"infinite-loading-spinner"},s("ion-spinner",{key:"8846e88191690d9c61a0b462889ed56fbfed8b0d",name:this.loadingSpinner})),void 0!==this.loadingText&&this.renderLoadingText()))}};g.style={ios:"ion-infinite-scroll-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.infinite-loading{margin-left:0;margin-right:0;margin-top:0;margin-bottom:32px;display:none;width:100%}.infinite-loading-text{-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px;margin-top:4px;margin-bottom:0}.infinite-scroll-loading ion-infinite-scroll-content>.infinite-loading{display:block}.infinite-scroll-content-ios .infinite-loading-text{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}.infinite-scroll-content-ios .infinite-loading-spinner .spinner-lines-ios line,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-lines-small-ios line,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-crescent circle{stroke:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}.infinite-scroll-content-ios .infinite-loading-spinner .spinner-bubbles circle,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-circles circle,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-dots circle{fill:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}",md:"ion-infinite-scroll-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.infinite-loading{margin-left:0;margin-right:0;margin-top:0;margin-bottom:32px;display:none;width:100%}.infinite-loading-text{-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px;margin-top:4px;margin-bottom:0}.infinite-scroll-loading ion-infinite-scroll-content>.infinite-loading{display:block}.infinite-scroll-content-md .infinite-loading-text{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-small-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-crescent circle{stroke:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}.infinite-scroll-content-md .infinite-loading-spinner .spinner-bubbles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-circles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-dots circle{fill:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}"};export{m as ion_infinite_scroll,g as ion_infinite_scroll_content}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,f as o,h as s,d as e,g as i}from"./p-
|
|
4
|
+
import{r as t,f as o,h as s,d as e,g as i}from"./p-K56Zjrdc.js";import{c as n}from"./p-DiVJyqlX.js";import{x as a,y as r}from"./p-DV3sJJW8.js";import{b as c}from"./p-BuiN7eei.js";const p=class{constructor(o){t(this,o),this.type="password",this.togglePasswordVisibility=()=>{const{inputElRef:t}=this;t&&(t.type="text"===t.type?"password":"text")}}onTypeChange(t){"text"===t||"password"===t||o(`[ion-input-password-toggle] - Only inputs of type "text" or "password" are supported. Input of type "${t}" is not compatible.`,this.el)}connectedCallback(){const{el:t}=this,s=this.inputElRef=t.closest("ion-input");s?this.type=s.type:o("[ion-input-password-toggle] - No ancestor ion-input found. This component must be slotted inside of an ion-input.",t)}disconnectedCallback(){this.inputElRef=null}render(){var t,o;const{color:i,type:p}=this,d=c(this),l=null!==(t=this.showIcon)&&void 0!==t?t:r,u=null!==(o=this.hideIcon)&&void 0!==o?o:a,h="text"===p;return s(e,{key:"91bc55664d496fe457518bd112865dd7811d0c17",class:n(i,{[d]:!0})},s("ion-button",{key:"f3e436422110c9cb4d5c0b83500255b24ab4cdef",mode:d,color:i,fill:"clear",shape:"round","aria-checked":h?"true":"false","aria-label":h?"Hide password":"Show password",role:"switch",type:"button",onPointerDown:t=>{t.preventDefault()},onClick:this.togglePasswordVisibility},s("ion-icon",{key:"5c8b121153f148f92aa7cba0447673a4f6f3ad1e",slot:"icon-only","aria-hidden":"true",icon:h?u:l})))}get el(){return i(this)}static get watchers(){return{type:["onTypeChange"]}}};p.style={ios:"",md:""};export{p as ion_input_password_toggle}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,c as o,f as t,h as n,F as s,d as r,g as p}from"./p-C8IsBmNU.js";import{i as e}from"./p-CTfR9YZG.js";import{i as a}from"./p-C53feagD.js";import{c as l}from"./p-DiVJyqlX.js";import{b as d}from"./p-BFvmZNyx.js";const u=class{constructor(t){i(this,t),this.ionInput=o(this,"ionInput",7),this.ionChange=o(this,"ionChange",7),this.ionComplete=o(this,"ionComplete",7),this.ionBlur=o(this,"ionBlur",7),this.ionFocus=o(this,"ionFocus",7),this.inheritedAttributes={},this.inputRefs=[],this.inputId="ion-input-otp-"+c++,this.parsedSeparators=[],this.isKeyboardNavigation=!1,this.inputValues=[],this.hasFocus=!1,this.previousInputValues=[],this.autocapitalize="off",this.disabled=!1,this.fill="outline",this.length=4,this.readonly=!1,this.shape="round",this.size="medium",this.type="number",this.value="",this.onFocus=i=>o=>{var t;const{inputRefs:n}=this;this.hasFocus||(this.ionFocus.emit(o),this.focusedValue=this.value),this.hasFocus=!0;let s=i;if(!this.isKeyboardNavigation){const o=this.inputValues[i]?i:this.getFirstEmptyIndex();s=-1===o?this.length-1:o,null===(t=this.inputRefs[s])||void 0===t||t.focus()}n.forEach(((i,o)=>{i.tabIndex=o===s?0:-1})),this.isKeyboardNavigation=!1},this.onBlur=i=>{const{inputRefs:o}=this,t=i.relatedTarget;null!=t&&o.includes(t)||(this.hasFocus=!1,this.updateTabIndexes(),this.ionBlur.emit(i),this.focusedValue!==this.value&&this.emitIonChange(i))},this.onKeyDown=i=>o=>{const{length:t}=this,n=a(this.el),s=o.target;if(!(s.selectionStart!==s.selectionEnd||(o.metaKey||o.ctrlKey)&&["a","c","v","x","r","z","y"].includes(o.key.toLowerCase())))if("Backspace"===o.key)if(this.inputValues[i]){for(let o=i;o<t-1;o++)this.inputValues[o]=this.inputValues[o+1];this.inputValues[t-1]="";for(let i=0;i<t;i++)this.inputRefs[i].value=this.inputValues[i]||"";this.updateValue(o),o.preventDefault()}else!this.inputValues[i]&&i>0&&this.focusPrevious(i);else if("ArrowLeft"===o.key||"ArrowRight"===o.key){this.isKeyboardNavigation=!0,o.preventDefault();const s="ArrowLeft"===o.key;s&&n||!s&&!n?this.inputValues[i]&&i<t-1&&this.focusNext(i):this.focusPrevious(i)}else if("Tab"===o.key)return void(this.isKeyboardNavigation=!0)},this.onInput=i=>o=>{var t,n;const{length:s,validKeyPattern:r}=this,p=o.target,e=p.value,a=this.previousInputValues[i]||"";if(e.length-a.length>1){const i=e.split("").filter((i=>r.test(i))).slice(0,s);0===i.length&&requestAnimationFrame((()=>{this.inputRefs.forEach((i=>{i.value=""}))}));for(let o=0;o<s;o++)this.inputValues[o]=i[o]||"",this.inputRefs[o].value=i[o]||"";return this.updateValue(o),setTimeout((()=>{var o;null===(o=this.inputRefs[i.length<s?i.length:s-1])||void 0===o||o.focus()}),20),void(this.previousInputValues=[...this.inputValues])}if(e.length>0&&!r.test(e[e.length-1]))return p.value=this.inputValues[i]||"",void(this.previousInputValues=[...this.inputValues]);if(0===p.selectionStart&&p.selectionEnd===e.length||!this.inputValues[i])return this.inputValues[i]=e,p.value=e,this.updateValue(o),this.focusNext(i),void(this.previousInputValues=[...this.inputValues]);if(this.inputValues[i]&&""===this.inputValues[this.inputValues.length-1]&&2===e.length){let t=o.data;if(t||(t=e.split("").find(((i,o)=>i!==a[o]))||e[e.length-1]),!r.test(t))return p.value=this.inputValues[i]||"",void(this.previousInputValues=[...this.inputValues]);for(let o=this.inputValues.length-1;o>i;o--)this.inputValues[o]=this.inputValues[o-1],this.inputRefs[o].value=this.inputValues[o]||"";return this.inputValues[i]=t,this.inputRefs[i].value=t,this.updateValue(o),void(this.previousInputValues=[...this.inputValues])}const l=null!==(n=e[(null!==(t=p.selectionStart)&&void 0!==t?t:e.length)-1])&&void 0!==n?n:e[0];if(!r.test(l))return p.value=this.inputValues[i]||"",void(this.previousInputValues=[...this.inputValues]);this.inputValues[i]=l,p.value=l,this.updateValue(o),this.previousInputValues=[...this.inputValues]},this.onPaste=i=>{var o,t;const{inputRefs:n,length:s,validKeyPattern:r}=this;i.preventDefault();const p=null===(o=i.clipboardData)||void 0===o?void 0:o.getData("text");if(!p)return void this.emitIonInput(i);const e=p.split("").filter((i=>r.test(i))).slice(0,s);e.forEach(((i,o)=>{o<s&&(this.inputRefs[o].value=i,this.inputValues[o]=i)})),this.value=e.join(""),this.updateValue(i),null===(t=n[e.length<s?e.length:s-1])||void 0===t||t.focus()}}async setFocus(i){var o,t;if("number"==typeof i){const t=Math.max(0,Math.min(i,this.length-1));null===(o=this.inputRefs[t])||void 0===o||o.focus()}else{const i=this.getTabbableIndex();null===(t=this.inputRefs[i])||void 0===t||t.focus()}}valueChanged(){this.initializeValues(),this.updateTabIndexes()}processSeparators(){const{separators:i,length:o}=this;if(void 0===i)return void(this.parsedSeparators=[]);if("string"==typeof i&&"all"!==i&&!/^(\d+)(,\d+)*$/.test(i))return t(`[ion-input-otp] - Invalid separators format. Expected a comma-separated list of numbers, an array of numbers, or "all". Received: ${i}`,this.el),void(this.parsedSeparators=[]);let n;n="all"===i?Array.from({length:o-1},((i,o)=>o+1)):Array.isArray(i)?i:i.split(",").map((i=>parseInt(i,10))).filter((i=>!isNaN(i))),n.filter(((i,o)=>n.indexOf(i)!==o)).length>0&&t(`[ion-input-otp] - Duplicate separator positions are not allowed. Received: ${i}`,this.el);const s=n.filter((i=>i>o));s.length>0&&t(`[ion-input-otp] - The following separator positions are greater than the input length (${o}): ${s.join(", ")}. These separators will be ignored.`,this.el),this.parsedSeparators=n.filter((i=>i<=o))}componentWillLoad(){this.inheritedAttributes=e(this.el),this.processSeparators(),this.initializeValues()}componentDidLoad(){this.updateTabIndexes()}get validKeyPattern(){return new RegExp(`^${this.getPattern()}$`,"u")}getPattern(){const{pattern:i,type:o}=this;return i||("number"===o?"[\\p{N}]":"[\\p{L}\\p{N}]")}getInputmode(){const{inputmode:i}=this;return i||("number"==this.type?"numeric":"text")}initializeValues(){this.inputValues=Array(this.length).fill(""),null!=this.value&&0!==String(this.value).length&&(String(this.value).split("").slice(0,this.length).forEach(((i,o)=>{this.validKeyPattern.test(i)&&(this.inputValues[o]=i)})),this.value=this.inputValues.join(""),this.previousInputValues=[...this.inputValues])}updateValue(i){const{inputValues:o,length:t}=this,n=o.join("");this.value=n,this.emitIonInput(i),n.length===t&&this.ionComplete.emit({value:n})}emitIonChange(i){const{value:o}=this,t=null==o?o:o.toString();this.ionChange.emit({value:t,event:i})}emitIonInput(i){const{value:o}=this,t=null==o?o:o.toString();this.ionInput.emit({value:t,event:i})}focusNext(i){var o;const{inputRefs:t,length:n}=this;i<n-1&&(null===(o=t[i+1])||void 0===o||o.focus())}focusPrevious(i){var o;const{inputRefs:t}=this;i>0&&(null===(o=t[i-1])||void 0===o||o.focus())}getFirstEmptyIndex(){var i;const{inputValues:o,length:t}=this;return null!==(i=Array.from({length:t},((i,t)=>o[t]||"")).findIndex((i=>!i||""===i)))&&void 0!==i?i:-1}getTabbableIndex(){const{length:i}=this,o=this.getFirstEmptyIndex();return-1===o?i-1:o}updateTabIndexes(){const{inputRefs:i,inputValues:o,length:t}=this;let n=-1;for(let i=0;i<t;i++)if(!o[i]||""===o[i]){n=i;break}i.forEach(((i,s)=>{const r=-1===n?s===t-1:n===s;i.tabIndex=r?0:-1,i.setAttribute("aria-hidden",o[s]&&""!==o[s]||r?"false":"true")}))}showSeparator(i){const{length:o}=this;return this.parsedSeparators.includes(i+1)&&i<o-1}render(){var i,o;const{autocapitalize:t,color:p,disabled:e,el:a,fill:u,hasFocus:c,inheritedAttributes:h,inputId:v,inputRefs:g,inputValues:m,length:f,readonly:b,shape:x,size:w}=this,k=d(this),y=this.getInputmode(),z=this.getTabbableIndex(),I=this.getPattern(),$=""!==(null===(o=null===(i=a.querySelector(".input-otp-description"))||void 0===i?void 0:i.textContent)||void 0===o?void 0:o.trim());return n(r,{key:"f15a29fb17b681ef55885ca36d3d5f899cbaca83",class:l(p,{[k]:!0,"has-focus":c,[`input-otp-size-${w}`]:!0,[`input-otp-shape-${x}`]:!0,[`input-otp-fill-${u}`]:!0,"input-otp-disabled":e,"input-otp-readonly":b})},n("div",Object.assign({key:"d7e1d4edd8aafcf2ed4313301287282e90fc7e82",role:"group","aria-label":"One-time password input",class:"input-otp-group"},h),Array.from({length:f}).map(((i,o)=>n(s,null,n("div",{class:"native-wrapper"},n("input",{class:"native-input",id:`${v}-${o}`,"aria-label":`Input ${o+1} of ${f}`,type:"text",autoCapitalize:t,inputmode:y,pattern:I,disabled:e,readOnly:b,tabIndex:o===z?0:-1,value:m[o]||"",autocomplete:"one-time-code",ref:i=>g[o]=i,onInput:this.onInput(o),onBlur:this.onBlur,onFocus:this.onFocus(o),onKeyDown:this.onKeyDown(o),onPaste:this.onPaste})),this.showSeparator(o)&&n("div",{class:"input-otp-separator"}))))),n("div",{key:"3724a3159d02860971879a906092f9965f5a7c47",class:{"input-otp-description":!0,"input-otp-description-hidden":!$}},n("slot",{key:"11baa2624926a08274508afe0833d9237a8dc35c"})))}get el(){return p(this)}static get watchers(){return{value:["valueChanged"],separators:["processSeparators"],length:["processSeparators"]}}};let c=0;u.style={ios:".sc-ion-input-otp-ios-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-ios{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-ios{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-ios{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-ios{display:none}.input-otp-separator.sc-ion-input-otp-ios{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-ios-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:8px}.input-otp-size-medium.sc-ion-input-otp-ios-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-ios-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios,.input-otp-size-large.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:12px}.input-otp-shape-round.sc-ion-input-otp-ios-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-ios-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-ios-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-ios-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-disabled.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-ios-h,.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-ios-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-ios-h{--border-width:0.55px}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-width:1px}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))))}",md:".sc-ion-input-otp-md-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-md{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-md{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-md{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-md{display:none}.input-otp-separator.sc-ion-input-otp-md{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-md-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:8px}.input-otp-size-medium.sc-ion-input-otp-md-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-md-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md,.input-otp-size-large.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:12px}.input-otp-shape-round.sc-ion-input-otp-md-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-md-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-md-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-md-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-md-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-disabled.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-md-h,.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-md-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-md-h{--border-width:1px}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-width:2px}.input-otp-fill-outline.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3))}"};export{u as ion_input_otp}
|
|
4
|
+
import{r as i,c as o,f as t,h as n,F as s,d as r,g as p}from"./p-K56Zjrdc.js";import{i as e}from"./p-RUyJri7q.js";import{i as a}from"./p-C53feagD.js";import{c as l}from"./p-DiVJyqlX.js";import{b as d}from"./p-BuiN7eei.js";const u=class{constructor(t){i(this,t),this.ionInput=o(this,"ionInput",7),this.ionChange=o(this,"ionChange",7),this.ionComplete=o(this,"ionComplete",7),this.ionBlur=o(this,"ionBlur",7),this.ionFocus=o(this,"ionFocus",7),this.inheritedAttributes={},this.inputRefs=[],this.inputId="ion-input-otp-"+c++,this.parsedSeparators=[],this.isKeyboardNavigation=!1,this.inputValues=[],this.hasFocus=!1,this.previousInputValues=[],this.autocapitalize="off",this.disabled=!1,this.fill="outline",this.length=4,this.readonly=!1,this.shape="round",this.size="medium",this.type="number",this.value="",this.onFocus=i=>o=>{var t;const{inputRefs:n}=this;this.hasFocus||(this.ionFocus.emit(o),this.focusedValue=this.value),this.hasFocus=!0;let s=i;if(!this.isKeyboardNavigation){const o=this.inputValues[i]?i:this.getFirstEmptyIndex();s=-1===o?this.length-1:o,null===(t=this.inputRefs[s])||void 0===t||t.focus()}n.forEach(((i,o)=>{i.tabIndex=o===s?0:-1})),this.isKeyboardNavigation=!1},this.onBlur=i=>{const{inputRefs:o}=this,t=i.relatedTarget;null!=t&&o.includes(t)||(this.hasFocus=!1,this.updateTabIndexes(),this.ionBlur.emit(i),this.focusedValue!==this.value&&this.emitIonChange(i))},this.onKeyDown=i=>o=>{const{length:t}=this,n=a(this.el),s=o.target;if(!(s.selectionStart!==s.selectionEnd||(o.metaKey||o.ctrlKey)&&["a","c","v","x","r","z","y"].includes(o.key.toLowerCase())))if("Backspace"===o.key)if(this.inputValues[i]){for(let o=i;o<t-1;o++)this.inputValues[o]=this.inputValues[o+1];this.inputValues[t-1]="";for(let i=0;i<t;i++)this.inputRefs[i].value=this.inputValues[i]||"";this.updateValue(o),o.preventDefault()}else!this.inputValues[i]&&i>0&&this.focusPrevious(i);else if("ArrowLeft"===o.key||"ArrowRight"===o.key){this.isKeyboardNavigation=!0,o.preventDefault();const s="ArrowLeft"===o.key;s&&n||!s&&!n?this.inputValues[i]&&i<t-1&&this.focusNext(i):this.focusPrevious(i)}else if("Tab"===o.key)return void(this.isKeyboardNavigation=!0)},this.onInput=i=>o=>{var t,n;const{length:s,validKeyPattern:r}=this,p=o.target,e=p.value,a=this.previousInputValues[i]||"";if(e.length-a.length>1){const i=e.split("").filter((i=>r.test(i))).slice(0,s);0===i.length&&requestAnimationFrame((()=>{this.inputRefs.forEach((i=>{i.value=""}))}));for(let o=0;o<s;o++)this.inputValues[o]=i[o]||"",this.inputRefs[o].value=i[o]||"";return this.updateValue(o),setTimeout((()=>{var o;null===(o=this.inputRefs[i.length<s?i.length:s-1])||void 0===o||o.focus()}),20),void(this.previousInputValues=[...this.inputValues])}if(e.length>0&&!r.test(e[e.length-1]))return p.value=this.inputValues[i]||"",void(this.previousInputValues=[...this.inputValues]);if(0===p.selectionStart&&p.selectionEnd===e.length||!this.inputValues[i])return this.inputValues[i]=e,p.value=e,this.updateValue(o),this.focusNext(i),void(this.previousInputValues=[...this.inputValues]);if(this.inputValues[i]&&""===this.inputValues[this.inputValues.length-1]&&2===e.length){let t=o.data;if(t||(t=e.split("").find(((i,o)=>i!==a[o]))||e[e.length-1]),!r.test(t))return p.value=this.inputValues[i]||"",void(this.previousInputValues=[...this.inputValues]);for(let o=this.inputValues.length-1;o>i;o--)this.inputValues[o]=this.inputValues[o-1],this.inputRefs[o].value=this.inputValues[o]||"";return this.inputValues[i]=t,this.inputRefs[i].value=t,this.updateValue(o),void(this.previousInputValues=[...this.inputValues])}const l=null!==(n=e[(null!==(t=p.selectionStart)&&void 0!==t?t:e.length)-1])&&void 0!==n?n:e[0];if(!r.test(l))return p.value=this.inputValues[i]||"",void(this.previousInputValues=[...this.inputValues]);this.inputValues[i]=l,p.value=l,this.updateValue(o),this.previousInputValues=[...this.inputValues]},this.onPaste=i=>{var o,t;const{inputRefs:n,length:s,validKeyPattern:r}=this;i.preventDefault();const p=null===(o=i.clipboardData)||void 0===o?void 0:o.getData("text");if(!p)return void this.emitIonInput(i);const e=p.split("").filter((i=>r.test(i))).slice(0,s);e.forEach(((i,o)=>{o<s&&(this.inputRefs[o].value=i,this.inputValues[o]=i)})),this.value=e.join(""),this.updateValue(i),null===(t=n[e.length<s?e.length:s-1])||void 0===t||t.focus()}}async setFocus(i){var o,t;if("number"==typeof i){const t=Math.max(0,Math.min(i,this.length-1));null===(o=this.inputRefs[t])||void 0===o||o.focus()}else{const i=this.getTabbableIndex();null===(t=this.inputRefs[i])||void 0===t||t.focus()}}valueChanged(){this.initializeValues(),this.updateTabIndexes()}processSeparators(){const{separators:i,length:o}=this;if(void 0===i)return void(this.parsedSeparators=[]);if("string"==typeof i&&"all"!==i&&!/^(\d+)(,\d+)*$/.test(i))return t(`[ion-input-otp] - Invalid separators format. Expected a comma-separated list of numbers, an array of numbers, or "all". Received: ${i}`,this.el),void(this.parsedSeparators=[]);let n;n="all"===i?Array.from({length:o-1},((i,o)=>o+1)):Array.isArray(i)?i:i.split(",").map((i=>parseInt(i,10))).filter((i=>!isNaN(i))),n.filter(((i,o)=>n.indexOf(i)!==o)).length>0&&t(`[ion-input-otp] - Duplicate separator positions are not allowed. Received: ${i}`,this.el);const s=n.filter((i=>i>o));s.length>0&&t(`[ion-input-otp] - The following separator positions are greater than the input length (${o}): ${s.join(", ")}. These separators will be ignored.`,this.el),this.parsedSeparators=n.filter((i=>i<=o))}componentWillLoad(){this.inheritedAttributes=e(this.el),this.processSeparators(),this.initializeValues()}componentDidLoad(){this.updateTabIndexes()}get validKeyPattern(){return new RegExp(`^${this.getPattern()}$`,"u")}getPattern(){const{pattern:i,type:o}=this;return i||("number"===o?"[\\p{N}]":"[\\p{L}\\p{N}]")}getInputmode(){const{inputmode:i}=this;return i||("number"==this.type?"numeric":"text")}initializeValues(){this.inputValues=Array(this.length).fill(""),null!=this.value&&0!==String(this.value).length&&(String(this.value).split("").slice(0,this.length).forEach(((i,o)=>{this.validKeyPattern.test(i)&&(this.inputValues[o]=i)})),this.value=this.inputValues.join(""),this.previousInputValues=[...this.inputValues])}updateValue(i){const{inputValues:o,length:t}=this,n=o.join("");this.value=n,this.emitIonInput(i),n.length===t&&this.ionComplete.emit({value:n})}emitIonChange(i){const{value:o}=this,t=null==o?o:o.toString();this.ionChange.emit({value:t,event:i})}emitIonInput(i){const{value:o}=this,t=null==o?o:o.toString();this.ionInput.emit({value:t,event:i})}focusNext(i){var o;const{inputRefs:t,length:n}=this;i<n-1&&(null===(o=t[i+1])||void 0===o||o.focus())}focusPrevious(i){var o;const{inputRefs:t}=this;i>0&&(null===(o=t[i-1])||void 0===o||o.focus())}getFirstEmptyIndex(){var i;const{inputValues:o,length:t}=this;return null!==(i=Array.from({length:t},((i,t)=>o[t]||"")).findIndex((i=>!i||""===i)))&&void 0!==i?i:-1}getTabbableIndex(){const{length:i}=this,o=this.getFirstEmptyIndex();return-1===o?i-1:o}updateTabIndexes(){const{inputRefs:i,inputValues:o,length:t}=this;let n=-1;for(let i=0;i<t;i++)if(!o[i]||""===o[i]){n=i;break}i.forEach(((i,s)=>{const r=-1===n?s===t-1:n===s;i.tabIndex=r?0:-1,i.setAttribute("aria-hidden",o[s]&&""!==o[s]||r?"false":"true")}))}showSeparator(i){const{length:o}=this;return this.parsedSeparators.includes(i+1)&&i<o-1}render(){var i,o;const{autocapitalize:t,color:p,disabled:e,el:a,fill:u,hasFocus:c,inheritedAttributes:h,inputId:v,inputRefs:g,inputValues:m,length:f,readonly:b,shape:x,size:w}=this,k=d(this),y=this.getInputmode(),z=this.getTabbableIndex(),I=this.getPattern(),$=""!==(null===(o=null===(i=a.querySelector(".input-otp-description"))||void 0===i?void 0:i.textContent)||void 0===o?void 0:o.trim());return n(r,{key:"f15a29fb17b681ef55885ca36d3d5f899cbaca83",class:l(p,{[k]:!0,"has-focus":c,[`input-otp-size-${w}`]:!0,[`input-otp-shape-${x}`]:!0,[`input-otp-fill-${u}`]:!0,"input-otp-disabled":e,"input-otp-readonly":b})},n("div",Object.assign({key:"d7e1d4edd8aafcf2ed4313301287282e90fc7e82",role:"group","aria-label":"One-time password input",class:"input-otp-group"},h),Array.from({length:f}).map(((i,o)=>n(s,null,n("div",{class:"native-wrapper"},n("input",{class:"native-input",id:`${v}-${o}`,"aria-label":`Input ${o+1} of ${f}`,type:"text",autoCapitalize:t,inputmode:y,pattern:I,disabled:e,readOnly:b,tabIndex:o===z?0:-1,value:m[o]||"",autocomplete:"one-time-code",ref:i=>g[o]=i,onInput:this.onInput(o),onBlur:this.onBlur,onFocus:this.onFocus(o),onKeyDown:this.onKeyDown(o),onPaste:this.onPaste})),this.showSeparator(o)&&n("div",{class:"input-otp-separator"}))))),n("div",{key:"3724a3159d02860971879a906092f9965f5a7c47",class:{"input-otp-description":!0,"input-otp-description-hidden":!$}},n("slot",{key:"11baa2624926a08274508afe0833d9237a8dc35c"})))}get el(){return p(this)}static get watchers(){return{value:["valueChanged"],separators:["processSeparators"],length:["processSeparators"]}}};let c=0;u.style={ios:".sc-ion-input-otp-ios-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-ios{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-ios{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-ios{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-ios{display:none}.input-otp-separator.sc-ion-input-otp-ios{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-ios-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:8px}.input-otp-size-medium.sc-ion-input-otp-ios-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-ios-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios,.input-otp-size-large.sc-ion-input-otp-ios-h .input-otp-group.sc-ion-input-otp-ios{gap:12px}.input-otp-shape-round.sc-ion-input-otp-ios-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-ios-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-ios-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-ios-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-disabled.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-ios-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-ios-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-ios-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-ios-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-ios-h,.ion-touched.ion-invalid.sc-ion-input-otp-ios-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-ios-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-ios-h{--border-width:0.55px}.has-focus.sc-ion-input-otp-ios-h .native-input.sc-ion-input-otp-ios:focus{--border-width:1px}.input-otp-fill-outline.sc-ion-input-otp-ios-h{--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))))}",md:".sc-ion-input-otp-md-h{--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--padding-top:16px;--padding-end:0;--padding-bottom:16px;--padding-start:0;--color:initial;--min-width:40px;--separator-width:8px;--separator-height:var(--separator-width);--separator-border-radius:999px;--separator-color:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;font-size:0.875rem}.input-otp-group.sc-ion-input-otp-md{-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.native-wrapper.sc-ion-input-otp-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--min-width)}.native-input.sc-ion-input-otp-md{border-radius:var(--border-radius);width:var(--width);min-width:inherit;height:var(--height);border-width:var(--border-width);border-style:solid;border-color:var(--border-color);background:var(--background);color:var(--color);font-size:inherit;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{caret-color:var(--highlight-color)}.input-otp-description.sc-ion-input-otp-md{color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem;line-height:1.25rem;text-align:center}.input-otp-description-hidden.sc-ion-input-otp-md{display:none}.input-otp-separator.sc-ion-input-otp-md{border-radius:var(--separator-border-radius);-ms-flex-negative:0;flex-shrink:0;width:var(--separator-width);height:var(--separator-height);background:var(--separator-color)}.input-otp-size-small.sc-ion-input-otp-md-h{--width:40px;--height:40px}.input-otp-size-small.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:8px}.input-otp-size-medium.sc-ion-input-otp-md-h{--width:48px;--height:48px}.input-otp-size-large.sc-ion-input-otp-md-h{--width:56px;--height:56px}.input-otp-size-medium.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md,.input-otp-size-large.sc-ion-input-otp-md-h .input-otp-group.sc-ion-input-otp-md{gap:12px}.input-otp-shape-round.sc-ion-input-otp-md-h{--border-radius:16px}.input-otp-shape-soft.sc-ion-input-otp-md-h{--border-radius:8px}.input-otp-shape-rectangular.sc-ion-input-otp-md-h{--border-radius:0}.input-otp-fill-outline.sc-ion-input-otp-md-h{--background:none}.input-otp-fill-solid.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-disabled.sc-ion-input-otp-md-h{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6))}.input-otp-fill-outline.input-otp-disabled.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-disabled.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:disabled{cursor:not-allowed}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-color:var(--highlight-color);outline:none}.input-otp-fill-outline.input-otp-readonly.sc-ion-input-otp-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2))}.input-otp-fill-solid.input-otp-disabled.sc-ion-input-otp-md-h,.input-otp-fill-solid.input-otp-readonly.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-otp-md-h{--highlight-color:var(--highlight-color-valid)}.has-focus.ion-valid.sc-ion-input-otp-md-h,.ion-touched.ion-invalid.sc-ion-input-otp-md-h{--border-color:var(--highlight-color)}.ion-color.sc-ion-input-otp-md-h{--highlight-color-focused:var(--ion-color-base)}.input-otp-fill-outline.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{border-color:rgba(var(--ion-color-base-rgb), 0.6)}.input-otp-fill-outline.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-invalid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-danger, #c5000f)}.input-otp-fill-outline.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-outline.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md,.input-otp-fill-solid.ion-color.has-focus.ion-valid.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:var(--ion-color-success, #2dd55b)}.input-otp-fill-outline.input-otp-disabled.ion-color.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md{border-color:rgba(var(--ion-color-base-rgb), 0.3)}.sc-ion-input-otp-md-h{--border-width:1px}.has-focus.sc-ion-input-otp-md-h .native-input.sc-ion-input-otp-md:focus{--border-width:2px}.input-otp-fill-outline.sc-ion-input-otp-md-h{--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3))}"};export{u as ion_input_otp}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as
|
|
4
|
+
import{r as e,h as s,d as a}from"./p-K56Zjrdc.js";const o=class{constructor(s){e(this,s)}render(){return s(a,{key:"db6876f2aee7afa1ea8bc147337670faa68fae1c"},s("slot",{key:"bc05714a973a5655668679033f5809a1da6db8cc"}))}};o.style=":host{scroll-snap-align:center;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%;min-height:1px;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none;}:host::-webkit-scrollbar{display:none}";export{o as ion_segment_content}
|