1 line
40 KiB
Plaintext
1 line
40 KiB
Plaintext
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-range.entry.js"],"names":["rangeIosCss","rangeMdCss","Range","hostRef","ionChange","ionStyle","ionFocus","ionBlur","noUpdate","hasFocus","ratioA","ratioB","debounce","name","dualKnobs","min","max","pin","snaps","step","ticks","disabled","value","clampBounds","ensureValueInBounds","lower","upper","handleKeyboard","knob","isIncrease","updateValue","onBlur","emit","emitStyle","onFocus","updateRatio","gesture","enable","debounceChanged","disabledChanged","destroy","undefined","rangeSlider","createGesture","el","gestureName","gesturePriority","threshold","onStart","ev","onMove","onEnd","detail","rect","getBoundingClientRect","currentX","ratio","left","width","document","dir","pressedKnob","Math","abs","setFocus","update","valueToRatio","ratioToValue","getValue","valA","valB","shadowRoot","knobEl","querySelector","focus","ratioLower","ratioUpper","mode","barStart","barEnd","doc","isRTL","start","end","tickStyle","tick","barStyle","active","push","JSON","stringify","onFocusin","onFocusout","color","ref","rangeEl","map","style","role","part","renderKnob","pressed","knobStyle","onKeyDown","key","preventDefault","stopPropagation","tabindex","round","ios","md"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAKA,UAAMA,WAAW,GAAG,+6KAApB;AAEA,UAAMC,UAAU,GAAG,64NAAnB;;AAEA,UAAMC,KAAK;AACP,uBAAYC,OAAZ,EAAqB;AAAA;;AAAA;;AACjB,uEAAiB,IAAjB,EAAuBA,OAAvB;AACA,eAAKC,SAAL,GAAiB,6DAAY,IAAZ,EAAkB,WAAlB,EAA+B,CAA/B,CAAjB;AACA,eAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,UAAlB,EAA8B,CAA9B,CAAhB;AACA,eAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,U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iBK,QAAQ,GAAG,MAAH,GAAY,IAnBxI;AAmB8I,2BAAiBC;AAnB/J,SAAT,EAmBiLL,GAAG,IAAI,6DAAE,KAAF,EAAS;AAAE,mBAAO,WAAT;AAAsBiF,cAAI,EAAE,cAA5B;AAA4CC,cAAI,EAAE;AAAlD,SAAT,EAAoErC,IAAI,CAAC8C,KAAL,CAAWtF,KAAX,CAApE,CAnBxL,EAmBgR,6DAAE,KAAF,EAAS;AAAE,mBAAO,YAAT;AAAuB4E,cAAI,EAAE,cAA7B;AAA6CC,cAAI,EAAE;AAAnD,SAAT,CAnBhR,CAAR;AAoBH,OA3BD;;AA4BA,UAAMhC,YAAY,GAAG,SAAfA,YAAe,CAACX,KAAD,EAAQzC,GAAR,EAAaC,GAAb,EAAkBG,IAAlB,EAA2B;AAC5C,YAAIG,KAAK,GAAG,CAACN,GAAG,GAAGD,GAAP,IAAcyC,KAA1B;;AACA,YAAIrC,IAAI,GAAG,CAAX,EAAc;AACVG,eAAK,GAAGwC,IAAI,CAAC8C,KAAL,CAAWtF,KAAK,GAAGH,IAAnB,IAA2BA,IAA3B,GAAkCJ,GAA1C;AACH;;AACD,eAAO,+DAAMA,GAAN,EAAWO,KAAX,EAAkBN,GAAlB,CAAP;AACH,OAND;;AAOA,UAAMkD,YAAY,GAAG,SAAfA,YAAe,CAAC5C,KAAD,EAAQP,GAAR,EAAaC,GAAb,EAAqB;AACtC,eAAO,+DAAM,CAAN,EAAS,CAACM,KAAK,GAAGP,GAAT,KAAiBC,GAAG,GAAGD,GAAvB,CAAT,EAAsC,CAAtC,CAAP;AACH,OAFD;;AAGAb,WAAK,CAAC+F,KAAN,GAAc;AACVY,WAAG,EAAE7G,WADK;AAEV8G,UAAE,EAAE7G;AAFM,OAAd","file":"25-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-92848855.js';\nimport { b as getIonMode } from './ionic-global-23e7365a.js';\nimport { c as clamp, d as debounceEvent, a as renderHiddenInput } from './helpers-5c745fbd.js';\nimport { c as createColorClasses, h as hostContext } from './theme-5641d27f.js';\n\nconst rangeIosCss = \":host{--knob-handle-size:calc(var(--knob-size) * 2);display:-ms-flexbox;display:flex;position:relative;-ms-flex:3;flex:3;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.range-disabled){pointer-events:none}::slotted(ion-label){-ms-flex:initial;flex:initial}::slotted(ion-icon[slot]){font-size:24px}.range-slider{position:relative;-ms-flex:1;flex:1;width:100%;height:var(--height);contain:size layout style;cursor:-webkit-grab;cursor:grab;-ms-touch-action:pan-y;touch-action:pan-y}:host(.range-pressed) .range-slider{cursor:-webkit-grabbing;cursor:grabbing}.range-pin{position:absolute;background:var(--ion-color-base);color:var(--ion-color-contrast);text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box}.range-knob-handle{left:0;top:calc((var(--height) - var(--knob-handle-size)) / 2);margin-left:calc(0px - var(--knob-handle-size) / 2);position:absolute;width:var(--knob-handle-size);height:var(--knob-handle-size);text-align:center}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset;right:unset;right:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.range-knob-handle{margin-left:unset;-webkit-margin-start:calc(0px - var(--knob-handle-size) / 2);margin-inline-start:calc(0px - var(--knob-handle-size) / 2)}}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset}.range-knob-handle:active,.range-knob-handle:focus{outline:none}.range-bar{border-radius:var(--bar-border-radius);left:0;top:calc((var(--height) - var(--bar-height)) / 2);position:absolute;width:100%;height:var(--bar-height);background:var(--bar-background);pointer-events:none}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset;right:unset;right:0}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset}.range-knob{border-radius:var(--knob-border-radius);left:calc(50% - var(--knob-size) / 2);top:calc(50% - var(--knob-size) / 2);position:absolute;width:var(--knob-size);height:var(--knob-size);background:var(--knob-background);-webkit-box-shadow:var(--knob-box-shadow);box-shadow:var(--knob-box-shadow);z-index:2;pointer-events:none}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset;right:unset;right:calc(50% - var(--knob-size) / 2)}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset}:host(.range-pressed) .range-bar-active{will-change:left, right}:host(.in-item){width:100%}:host(.in-item) ::slotted(ion-label){-ms-flex-item-align:center;align-self:center}:host{--knob-border-radius:50%;--knob-background:#ffffff;--knob-box-shadow:0 3px 1px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.13), 0 0 0 1px rgba(0, 0, 0, 0.02);--knob-size:28px;--bar-height:2px;--bar-background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1);--bar-background-active:var(--ion-color-primary, #3880ff);--bar-border-radius:0;--height:42px;padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host(.ion-color) .range-bar-active,:host(.ion-color) .range-tick-active{background:var(--ion-color-base)}::slotted([slot=start]){margin-left:0;margin-right:16px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}}::slotted([slot=end]){margin-left:16px;margin-right:0;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}}:host(.range-has-pin){padding-top:20px}.range-bar-active{bottom:0;width:auto;background:var(--bar-background-active)}.range-tick{margin-left:-1px;border-radius:0;position:absolute;top:18px;width:2px;height:8px;background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1);pointer-events:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.range-tick{margin-left:unset;-webkit-margin-start:-1px;margin-inline-start:-1px}}.range-tick-active{background:var(--bar-background-active)}.range-pin{-webkit-transform:translate3d(0, 28px, 0) scale(0.01);transform:translate3d(0, 28px, 0) scale(0.01);padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;display:inline-block;position:relative;top:-20px;min-width:28px;-webkit-transition:-webkit-transform 120ms ease;transition:-webkit-transform 120ms ease;transition:transform 120ms ease;transition:transform 120ms ease, -webkit-transform 120ms ease;background:transparent;color:var(--ion-text-color, #000);font-size:12px;text-align:center}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.range-pin{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.range-knob-pressed .range-pin{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}:host(.range-disabled){opacity:0.5}\";\n\nconst rangeMdCss = \":host{--knob-handle-size:calc(var(--knob-size) * 2);display:-ms-flexbox;display:flex;position:relative;-ms-flex:3;flex:3;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.range-disabled){pointer-events:none}::slotted(ion-label){-ms-flex:initial;flex:initial}::slotted(ion-icon[slot]){font-size:24px}.range-slider{position:relative;-ms-flex:1;flex:1;width:100%;height:var(--height);contain:size layout style;cursor:-webkit-grab;cursor:grab;-ms-touch-action:pan-y;touch-action:pan-y}:host(.range-pressed) .range-slider{cursor:-webkit-grabbing;cursor:grabbing}.range-pin{position:absolute;background:var(--ion-color-base);color:var(--ion-color-contrast);text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box}.range-knob-handle{left:0;top:calc((var(--height) - var(--knob-handle-size)) / 2);margin-left:calc(0px - var(--knob-handle-size) / 2);position:absolute;width:var(--knob-handle-size);height:var(--knob-handle-size);text-align:center}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset;right:unset;right:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.range-knob-handle{margin-left:unset;-webkit-margin-start:calc(0px - var(--knob-handle-size) / 2);margin-inline-start:calc(0px - var(--knob-handle-size) / 2)}}[dir=rtl] .range-knob-handle,:host-context([dir=rtl]) .range-knob-handle{left:unset}.range-knob-handle:active,.range-knob-handle:focus{outline:none}.range-bar{border-radius:var(--bar-border-radius);left:0;top:calc((var(--height) - var(--bar-height)) / 2);position:absolute;width:100%;height:var(--bar-height);background:var(--bar-background);pointer-events:none}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset;right:unset;right:0}[dir=rtl] .range-bar,:host-context([dir=rtl]) .range-bar{left:unset}.range-knob{border-radius:var(--knob-border-radius);left:calc(50% - var(--knob-size) / 2);top:calc(50% - var(--knob-size) / 2);position:absolute;width:var(--knob-size);height:var(--knob-size);background:var(--knob-background);-webkit-box-shadow:var(--knob-box-shadow);box-shadow:var(--knob-box-shadow);z-index:2;pointer-events:none}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset;right:unset;right:calc(50% - var(--knob-size) / 2)}[dir=rtl] .range-knob,:host-context([dir=rtl]) .range-knob{left:unset}:host(.range-pressed) .range-bar-active{will-change:left, right}:host(.in-item){width:100%}:host(.in-item) ::slotted(ion-label){-ms-flex-item-align:center;align-self:center}:host{--knob-border-radius:50%;--knob-background:var(--bar-background-active);--knob-box-shadow:none;--knob-size:18px;--bar-height:2px;--bar-background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.26);--bar-background-active:var(--ion-color-primary, #3880ff);--bar-border-radius:0;--height:42px;--pin-background:var(--ion-color-primary, #3880ff);--pin-color:var(--ion-color-primary-contrast, #fff);padding-left:14px;padding-right:14px;padding-top:8px;padding-bottom:8px;font-size:12px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px}}:host(.ion-color) .range-bar{background:rgba(var(--ion-color-base-rgb), 0.26)}:host(.ion-color) .range-bar-active,:host(.ion-color) .range-knob,:host(.ion-color) .range-pin,:host(.ion-color) .range-pin::before,:host(.ion-color) .range-tick{background:var(--ion-color-base);color:var(--ion-color-contrast)}::slotted([slot=start]){margin-left:0;margin-right:14px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:14px;margin-inline-end:14px}}::slotted([slot=end]){margin-left:14px;margin-right:0;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:14px;margin-inline-start:14px;-webkit-margin-end:0;margin-inline-end:0}}:host(.range-has-pin){padding-top:28px}.range-bar-active{bottom:0;width:auto;background:var(--bar-background-active)}.range-knob{-webkit-transform:scale(0.67);transform:scale(0.67);-webkit-transition-duration:120ms;transition-duration:120ms;-webkit-transition-property:background-color, border, -webkit-transform;transition-property:background-color, border, -webkit-transform;transition-property:transform, background-color, border;transition-property:transform, background-color, border, -webkit-transform;-webkit-transition-timing-function:ease;transition-timing-function:ease;z-index:2}.range-tick{position:absolute;top:calc((var(--height) - var(--bar-height)) / 2);width:var(--bar-height);height:var(--bar-height);background:var(--bar-background-active);z-index:1;pointer-events:none}.range-tick-active{background:transparent}.range-pin{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:8px;border-radius:50%;-webkit-transform:translate3d(0, 0, 0) scale(0.01);transform:translate3d(0, 0, 0) scale(0.01);display:inline-block;position:relative;min-width:28px;height:28px;-webkit-transition:background 120ms ease, -webkit-transform 120ms ease;transition:background 120ms ease, -webkit-transform 120ms ease;transition:transform 120ms ease, background 120ms ease;transition:transform 120ms ease, background 120ms ease, -webkit-transform 120ms ease;background:var(--pin-background);color:var(--pin-color);text-align:center}.range-pin::before{left:50%;top:3px;margin-left:-13px;border-radius:50% 50% 50% 0;position:absolute;width:26px;height:26px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transition:background 120ms ease;transition:background 120ms ease;background:var(--pin-background);content:\\\"\\\";z-index:-1}[dir=rtl] .range-pin::before,:host-context([dir=rtl]) .range-pin::before{left:unset;right:unset;right:50%}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.range-pin::before{margin-left:unset;-webkit-margin-start:-13px;margin-inline-start:-13px}}[dir=rtl] .range-pin::before,:host-context([dir=rtl]) .range-pin::before{left:unset}.range-knob-pressed .range-pin{-webkit-transform:translate3d(0, -24px, 0) scale(1);transform:translate3d(0, -24px, 0) scale(1)}:host(:not(.range-has-pin)) .range-knob-pressed .range-knob{-webkit-transform:scale(1);transform:scale(1)}:host(.range-disabled) .range-bar-active,:host(.range-disabled) .range-bar,:host(.range-disabled) .range-tick{background-color:var(--ion-color-step-250, #bfbfbf)}:host(.range-disabled) .range-knob{-webkit-transform:scale(0.55);transform:scale(0.55);outline:5px solid #fff;background-color:var(--ion-color-step-250, #bfbfbf)}\";\n\nconst Range = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.noUpdate = false;\n this.hasFocus = false;\n this.ratioA = 0;\n this.ratioB = 0;\n /**\n * How long, in milliseconds, to wait to trigger the\n * `ionChange` event after each change in the range value.\n */\n this.debounce = 0;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = '';\n /**\n * Show two knobs.\n */\n this.dualKnobs = false;\n /**\n * Minimum integer value of the range.\n */\n this.min = 0;\n /**\n * Maximum integer value of the range.\n */\n this.max = 100;\n /**\n * If `true`, a pin with integer value is shown when the knob\n * is pressed.\n */\n this.pin = false;\n /**\n * If `true`, the knob snaps to tick marks evenly spaced based\n * on the step property value.\n */\n this.snaps = false;\n /**\n * Specifies the value granularity.\n */\n this.step = 1;\n /**\n * If `true`, tick marks are displayed based on the step value.\n * Only applies when `snaps` is `true`.\n */\n this.ticks = true;\n /**\n * If `true`, the user cannot interact with the range.\n */\n this.disabled = false;\n /**\n * the value of the range.\n */\n this.value = 0;\n this.clampBounds = (value) => {\n return clamp(this.min, value, this.max);\n };\n this.ensureValueInBounds = (value) => {\n if (this.dualKnobs) {\n return {\n lower: this.clampBounds(value.lower),\n upper: this.clampBounds(value.upper)\n };\n }\n else {\n return this.clampBounds(value);\n }\n };\n this.handleKeyboard = (knob, isIncrease) => {\n let step = this.step;\n step = step > 0 ? step : 1;\n step = step / (this.max - this.min);\n if (!isIncrease) {\n step *= -1;\n }\n if (knob === 'A') {\n this.ratioA = clamp(0, this.ratioA + step, 1);\n }\n else {\n this.ratioB = clamp(0, this.ratioB + step, 1);\n }\n this.updateValue();\n };\n this.onBlur = () => {\n if (this.hasFocus) {\n this.hasFocus = false;\n this.ionBlur.emit();\n this.emitStyle();\n }\n };\n this.onFocus = () => {\n if (!this.hasFocus) {\n this.hasFocus = true;\n this.ionFocus.emit();\n this.emitStyle();\n }\n };\n }\n debounceChanged() {\n this.ionChange = debounceEvent(this.ionChange, this.debounce);\n }\n minChanged() {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n }\n maxChanged() {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n }\n disabledChanged() {\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n this.emitStyle();\n }\n valueChanged(value) {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n value = this.ensureValueInBounds(value);\n this.ionChange.emit({ value });\n }\n connectedCallback() {\n this.updateRatio();\n this.debounceChanged();\n this.disabledChanged();\n }\n disconnectedCallback() {\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n }\n async componentDidLoad() {\n const rangeSlider = this.rangeSlider;\n if (rangeSlider) {\n this.gesture = (await import('./index-eea61379.js')).createGesture({\n el: rangeSlider,\n gestureName: 'range',\n gesturePriority: 100,\n threshold: 0,\n onStart: ev => this.onStart(ev),\n onMove: ev => this.onMove(ev),\n onEnd: ev => this.onEnd(ev),\n });\n this.gesture.enable(!this.disabled);\n }\n }\n getValue() {\n const value = this.value || 0;\n if (this.dualKnobs) {\n if (typeof value === 'object') {\n return value;\n }\n return {\n lower: 0,\n upper: value\n };\n }\n else {\n if (typeof value === 'object') {\n return value.upper;\n }\n return value;\n }\n }\n emitStyle() {\n this.ionStyle.emit({\n 'interactive': true,\n 'interactive-disabled': this.disabled\n });\n }\n onStart(detail) {\n const rect = this.rect = this.rangeSlider.getBoundingClientRect();\n const currentX = detail.currentX;\n // figure out which knob they started closer to\n let ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n this.pressedKnob =\n !this.dualKnobs ||\n Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio)\n ? 'A'\n : 'B';\n this.setFocus(this.pressedKnob);\n // update the active knob's position\n this.update(currentX);\n }\n onMove(detail) {\n this.update(detail.currentX);\n }\n onEnd(detail) {\n this.update(detail.currentX);\n this.pressedKnob = undefined;\n }\n update(currentX) {\n // figure out where the pointer is currently at\n // update the knob being interacted with\n const rect = this.rect;\n let ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n if (this.snaps) {\n // snaps the ratio to the current value\n ratio = valueToRatio(ratioToValue(ratio, this.min, this.max, this.step), this.min, this.max);\n }\n // update which knob is pressed\n if (this.pressedKnob === 'A') {\n this.ratioA = ratio;\n }\n else {\n this.ratioB = ratio;\n }\n // Update input value\n this.updateValue();\n }\n get valA() {\n return ratioToValue(this.ratioA, this.min, this.max, this.step);\n }\n get valB() {\n return ratioToValue(this.ratioB, this.min, this.max, this.step);\n }\n get ratioLower() {\n if (this.dualKnobs) {\n return Math.min(this.ratioA, this.ratioB);\n }\n return 0;\n }\n get ratioUpper() {\n if (this.dualKnobs) {\n return Math.max(this.ratioA, this.ratioB);\n }\n return this.ratioA;\n }\n updateRatio() {\n const value = this.getValue();\n const { min, max } = this;\n if (this.dualKnobs) {\n this.ratioA = valueToRatio(value.lower, min, max);\n this.ratioB = valueToRatio(value.upper, min, max);\n }\n else {\n this.ratioA = valueToRatio(value, min, max);\n }\n }\n updateValue() {\n this.noUpdate = true;\n const { valA, valB } = this;\n this.value = !this.dualKnobs\n ? valA\n : {\n lower: Math.min(valA, valB),\n upper: Math.max(valA, valB)\n };\n this.noUpdate = false;\n }\n setFocus(knob) {\n if (this.el.shadowRoot) {\n const knobEl = this.el.shadowRoot.querySelector(knob === 'A' ? '.range-knob-a' : '.range-knob-b');\n if (knobEl) {\n knobEl.focus();\n }\n }\n }\n render() {\n const { min, max, step, el, handleKeyboard, pressedKnob, disabled, pin, ratioLower, ratioUpper } = this;\n const mode = getIonMode(this);\n const barStart = `${ratioLower * 100}%`;\n const barEnd = `${100 - ratioUpper * 100}%`;\n const doc = document;\n const isRTL = doc.dir === 'rtl';\n const start = isRTL ? 'right' : 'left';\n const end = isRTL ? 'left' : 'right';\n const tickStyle = (tick) => {\n return {\n [start]: tick[start]\n };\n };\n const barStyle = {\n [start]: barStart,\n [end]: barEnd\n };\n const ticks = [];\n if (this.snaps && this.ticks) {\n for (let value = min; value <= max; value += step) {\n const ratio = valueToRatio(value, min, max);\n const tick = {\n ratio,\n active: ratio >= ratioLower && ratio <= ratioUpper,\n };\n tick[start] = `${ratio * 100}%`;\n ticks.push(tick);\n }\n }\n renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);\n return (h(Host, { onFocusin: this.onFocus, onFocusout: this.onBlur, class: createColorClasses(this.color, {\n [mode]: true,\n 'in-item': hostContext('ion-item', el),\n 'range-disabled': disabled,\n 'range-pressed': pressedKnob !== undefined,\n 'range-has-pin': pin\n }) }, h(\"slot\", { name: \"start\" }), h(\"div\", { class: \"range-slider\", ref: rangeEl => this.rangeSlider = rangeEl }, ticks.map(tick => (h(\"div\", { style: tickStyle(tick), role: \"presentation\", class: {\n 'range-tick': true,\n 'range-tick-active': tick.active\n }, part: tick.active ? 'tick-active' : 'tick' }))), h(\"div\", { class: \"range-bar\", role: \"presentation\", part: \"bar\" }), h(\"div\", { class: \"range-bar range-bar-active\", role: \"presentation\", style: barStyle, part: \"bar-active\" }), renderKnob(isRTL, {\n knob: 'A',\n pressed: pressedKnob === 'A',\n value: this.valA,\n ratio: this.ratioA,\n pin,\n disabled,\n handleKeyboard,\n min,\n max\n }), this.dualKnobs && renderKnob(isRTL, {\n knob: 'B',\n pressed: pressedKnob === 'B',\n value: this.valB,\n ratio: this.ratioB,\n pin,\n disabled,\n handleKeyboard,\n min,\n max\n })), h(\"slot\", { name: \"end\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"debounce\": [\"debounceChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"]\n }; }\n};\nconst renderKnob = (isRTL, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard }) => {\n const start = isRTL ? 'right' : 'left';\n const knobStyle = () => {\n const style = {};\n style[start] = `${ratio * 100}%`;\n return style;\n };\n return (h(\"div\", { onKeyDown: (ev) => {\n const key = ev.key;\n if (key === 'ArrowLeft' || key === 'ArrowDown') {\n handleKeyboard(knob, false);\n ev.preventDefault();\n ev.stopPropagation();\n }\n else if (key === 'ArrowRight' || key === 'ArrowUp') {\n handleKeyboard(knob, true);\n ev.preventDefault();\n ev.stopPropagation();\n }\n }, class: {\n 'range-knob-handle': true,\n 'range-knob-a': knob === 'A',\n 'range-knob-b': knob === 'B',\n 'range-knob-pressed': pressed,\n 'range-knob-min': value === min,\n 'range-knob-max': value === max\n }, style: knobStyle(), role: \"slider\", tabindex: disabled ? -1 : 0, \"aria-valuemin\": min, \"aria-valuemax\": max, \"aria-disabled\": disabled ? 'true' : null, \"aria-valuenow\": value }, pin && h(\"div\", { class: \"range-pin\", role: \"presentation\", part: \"pin\" }, Math.round(value)), h(\"div\", { class: \"range-knob\", role: \"presentation\", part: \"knob\" })));\n};\nconst ratioToValue = (ratio, min, max, step) => {\n let value = (max - min) * ratio;\n if (step > 0) {\n value = Math.round(value / step) * step + min;\n }\n return clamp(min, value, max);\n};\nconst valueToRatio = (value, min, max) => {\n return clamp(0, (value - min) / (max - min), 1);\n};\nRange.style = {\n ios: rangeIosCss,\n md: rangeMdCss\n};\n\nexport { Range as ion_range };\n"]} |