@ionic/core 8.5.7-dev.11748630985.1e31c3ad → 8.5.7-dev.11748893401.12a337e4
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-input-otp.js +41 -36
- package/dist/cjs/ion-input-otp.cjs.entry.js +41 -36
- package/dist/collection/components/input-otp/input-otp.js +41 -36
- package/dist/docs.json +1 -1
- package/dist/esm/ion-input-otp.entry.js +41 -36
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-e493da57.entry.js +4 -0
- package/hydrate/index.js +41 -36
- package/hydrate/index.mjs +41 -36
- package/package.json +1 -1
- package/dist/ionic/p-b4cd2a9f.entry.js +0 -4
|
@@ -151,11 +151,13 @@ const InputOTP = /*@__PURE__*/ proxyCustomElement(class InputOTP extends HTMLEle
|
|
|
151
151
|
const { length } = this;
|
|
152
152
|
const rtl = isRTL(this.el);
|
|
153
153
|
const input = event.target;
|
|
154
|
-
|
|
154
|
+
// Meta shortcuts are used to copy, paste, and select text
|
|
155
|
+
// We don't want to handle these keys here
|
|
156
|
+
const metaShortcuts = ['a', 'c', 'v', 'x', 'r', 'z', 'y'];
|
|
155
157
|
const isTextSelection = input.selectionStart !== input.selectionEnd;
|
|
156
|
-
// Return if the key is
|
|
158
|
+
// Return if the key is a meta shortcut or the input value
|
|
157
159
|
// text is selected and let the onPaste / onInput handler manage it
|
|
158
|
-
if (
|
|
160
|
+
if (isTextSelection || ((event.metaKey || event.ctrlKey) && metaShortcuts.includes(event.key.toLowerCase()))) {
|
|
159
161
|
return;
|
|
160
162
|
}
|
|
161
163
|
if (event.key === 'Backspace') {
|
|
@@ -217,47 +219,50 @@ const InputOTP = /*@__PURE__*/ proxyCustomElement(class InputOTP extends HTMLEle
|
|
|
217
219
|
}
|
|
218
220
|
};
|
|
219
221
|
this.onInput = (index) => (event) => {
|
|
220
|
-
const { validKeyPattern } = this;
|
|
222
|
+
const { length, validKeyPattern } = this;
|
|
221
223
|
const value = event.target.value;
|
|
222
|
-
// If the value is longer than 1 character, it
|
|
223
|
-
//
|
|
224
|
+
// If the value is longer than 1 character (autofill), split it into
|
|
225
|
+
// characters and filter out invalid ones
|
|
224
226
|
if (value.length > 1) {
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
227
|
+
const validChars = value
|
|
228
|
+
.split('')
|
|
229
|
+
.filter((char) => validKeyPattern.test(char))
|
|
230
|
+
.slice(0, length);
|
|
231
|
+
// If there are no valid characters coming from the
|
|
232
|
+
// autofill, all input refs have to be cleared after the
|
|
233
|
+
// browser has finished the autofill behavior
|
|
234
|
+
if (validChars.length === 0) {
|
|
235
|
+
requestAnimationFrame(() => {
|
|
236
|
+
this.inputRefs.forEach((input) => {
|
|
237
|
+
input.value = '';
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
// Update the value of the input group and emit the input change event
|
|
242
|
+
this.value = validChars.join('');
|
|
233
243
|
this.updateValue(event);
|
|
244
|
+
// Focus the first empty input box or the last input box if all boxes
|
|
245
|
+
// are filled after a small delay to ensure the input boxes have been
|
|
246
|
+
// updated before moving the focus
|
|
247
|
+
setTimeout(() => {
|
|
248
|
+
var _a;
|
|
249
|
+
const nextIndex = validChars.length < length ? validChars.length : length - 1;
|
|
250
|
+
(_a = this.inputRefs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
251
|
+
}, 20);
|
|
234
252
|
return;
|
|
235
253
|
}
|
|
236
|
-
// Only allow input if it
|
|
237
|
-
if (value.length >
|
|
238
|
-
// Reset the input value if not valid
|
|
254
|
+
// Only allow input if it matches the pattern
|
|
255
|
+
if (value.length > 0 && !validKeyPattern.test(value)) {
|
|
239
256
|
this.inputRefs[index].value = '';
|
|
240
257
|
this.inputValues[index] = '';
|
|
241
258
|
return;
|
|
242
259
|
}
|
|
243
|
-
//
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
if (!this.inputValues[i] || this.inputValues[i] === '') {
|
|
247
|
-
targetIndex = i;
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
// Set the value at the target index
|
|
252
|
-
this.inputValues[targetIndex] = value;
|
|
253
|
-
// If the value was entered in a later box, clear the current box
|
|
254
|
-
if (targetIndex !== index) {
|
|
255
|
-
this.inputRefs[index].value = '';
|
|
256
|
-
}
|
|
260
|
+
// For single character input, fill the current box
|
|
261
|
+
this.inputValues[index] = value;
|
|
262
|
+
this.updateValue(event);
|
|
257
263
|
if (value.length > 0) {
|
|
258
|
-
this.focusNext(
|
|
264
|
+
this.focusNext(index);
|
|
259
265
|
}
|
|
260
|
-
this.updateValue(event);
|
|
261
266
|
};
|
|
262
267
|
/**
|
|
263
268
|
* Handles pasting text into the input OTP component.
|
|
@@ -560,7 +565,7 @@ const InputOTP = /*@__PURE__*/ proxyCustomElement(class InputOTP extends HTMLEle
|
|
|
560
565
|
const tabbableIndex = this.getTabbableIndex();
|
|
561
566
|
const pattern = this.getPattern();
|
|
562
567
|
const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
|
|
563
|
-
return (h(Host, { key: '
|
|
568
|
+
return (h(Host, { key: 'df8fca036cedea0812185a02e3b655d7d76285e0', class: createColorClasses(color, {
|
|
564
569
|
[mode]: true,
|
|
565
570
|
'has-focus': hasFocus,
|
|
566
571
|
[`input-otp-size-${size}`]: true,
|
|
@@ -568,10 +573,10 @@ const InputOTP = /*@__PURE__*/ proxyCustomElement(class InputOTP extends HTMLEle
|
|
|
568
573
|
[`input-otp-fill-${fill}`]: true,
|
|
569
574
|
'input-otp-disabled': disabled,
|
|
570
575
|
'input-otp-readonly': readonly,
|
|
571
|
-
}) }, h("div", Object.assign({ key: '
|
|
576
|
+
}) }, h("div", Object.assign({ key: '831be3f939cf037f0eb8d7e37e0afd4ef9a3c2c5', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '59e6608e7a78d0ae1fdf134dada94b58d6f57559', class: {
|
|
572
577
|
'input-otp-description': true,
|
|
573
578
|
'input-otp-description-hidden': !hasDescription,
|
|
574
|
-
} }, h("slot", { key: '
|
|
579
|
+
} }, h("slot", { key: 'b9a1cd3a89789f1d7c57e37f0bd82f63237fe39f' }))));
|
|
575
580
|
}
|
|
576
581
|
get el() { return this; }
|
|
577
582
|
static get watchers() { return {
|
|
@@ -152,11 +152,13 @@ const InputOTP = class {
|
|
|
152
152
|
const { length } = this;
|
|
153
153
|
const rtl = dir.isRTL(this.el);
|
|
154
154
|
const input = event.target;
|
|
155
|
-
|
|
155
|
+
// Meta shortcuts are used to copy, paste, and select text
|
|
156
|
+
// We don't want to handle these keys here
|
|
157
|
+
const metaShortcuts = ['a', 'c', 'v', 'x', 'r', 'z', 'y'];
|
|
156
158
|
const isTextSelection = input.selectionStart !== input.selectionEnd;
|
|
157
|
-
// Return if the key is
|
|
159
|
+
// Return if the key is a meta shortcut or the input value
|
|
158
160
|
// text is selected and let the onPaste / onInput handler manage it
|
|
159
|
-
if (
|
|
161
|
+
if (isTextSelection || ((event.metaKey || event.ctrlKey) && metaShortcuts.includes(event.key.toLowerCase()))) {
|
|
160
162
|
return;
|
|
161
163
|
}
|
|
162
164
|
if (event.key === 'Backspace') {
|
|
@@ -218,47 +220,50 @@ const InputOTP = class {
|
|
|
218
220
|
}
|
|
219
221
|
};
|
|
220
222
|
this.onInput = (index) => (event) => {
|
|
221
|
-
const { validKeyPattern } = this;
|
|
223
|
+
const { length, validKeyPattern } = this;
|
|
222
224
|
const value = event.target.value;
|
|
223
|
-
// If the value is longer than 1 character, it
|
|
224
|
-
//
|
|
225
|
+
// If the value is longer than 1 character (autofill), split it into
|
|
226
|
+
// characters and filter out invalid ones
|
|
225
227
|
if (value.length > 1) {
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
const validChars = value
|
|
229
|
+
.split('')
|
|
230
|
+
.filter((char) => validKeyPattern.test(char))
|
|
231
|
+
.slice(0, length);
|
|
232
|
+
// If there are no valid characters coming from the
|
|
233
|
+
// autofill, all input refs have to be cleared after the
|
|
234
|
+
// browser has finished the autofill behavior
|
|
235
|
+
if (validChars.length === 0) {
|
|
236
|
+
requestAnimationFrame(() => {
|
|
237
|
+
this.inputRefs.forEach((input) => {
|
|
238
|
+
input.value = '';
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
// Update the value of the input group and emit the input change event
|
|
243
|
+
this.value = validChars.join('');
|
|
234
244
|
this.updateValue(event);
|
|
245
|
+
// Focus the first empty input box or the last input box if all boxes
|
|
246
|
+
// are filled after a small delay to ensure the input boxes have been
|
|
247
|
+
// updated before moving the focus
|
|
248
|
+
setTimeout(() => {
|
|
249
|
+
var _a;
|
|
250
|
+
const nextIndex = validChars.length < length ? validChars.length : length - 1;
|
|
251
|
+
(_a = this.inputRefs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
252
|
+
}, 20);
|
|
235
253
|
return;
|
|
236
254
|
}
|
|
237
|
-
// Only allow input if it
|
|
238
|
-
if (value.length >
|
|
239
|
-
// Reset the input value if not valid
|
|
255
|
+
// Only allow input if it matches the pattern
|
|
256
|
+
if (value.length > 0 && !validKeyPattern.test(value)) {
|
|
240
257
|
this.inputRefs[index].value = '';
|
|
241
258
|
this.inputValues[index] = '';
|
|
242
259
|
return;
|
|
243
260
|
}
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
if (!this.inputValues[i] || this.inputValues[i] === '') {
|
|
248
|
-
targetIndex = i;
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
// Set the value at the target index
|
|
253
|
-
this.inputValues[targetIndex] = value;
|
|
254
|
-
// If the value was entered in a later box, clear the current box
|
|
255
|
-
if (targetIndex !== index) {
|
|
256
|
-
this.inputRefs[index].value = '';
|
|
257
|
-
}
|
|
261
|
+
// For single character input, fill the current box
|
|
262
|
+
this.inputValues[index] = value;
|
|
263
|
+
this.updateValue(event);
|
|
258
264
|
if (value.length > 0) {
|
|
259
|
-
this.focusNext(
|
|
265
|
+
this.focusNext(index);
|
|
260
266
|
}
|
|
261
|
-
this.updateValue(event);
|
|
262
267
|
};
|
|
263
268
|
/**
|
|
264
269
|
* Handles pasting text into the input OTP component.
|
|
@@ -561,7 +566,7 @@ const InputOTP = class {
|
|
|
561
566
|
const tabbableIndex = this.getTabbableIndex();
|
|
562
567
|
const pattern = this.getPattern();
|
|
563
568
|
const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
|
|
564
|
-
return (index.h(index.Host, { key: '
|
|
569
|
+
return (index.h(index.Host, { key: 'df8fca036cedea0812185a02e3b655d7d76285e0', class: theme.createColorClasses(color, {
|
|
565
570
|
[mode]: true,
|
|
566
571
|
'has-focus': hasFocus,
|
|
567
572
|
[`input-otp-size-${size}`]: true,
|
|
@@ -569,10 +574,10 @@ const InputOTP = class {
|
|
|
569
574
|
[`input-otp-fill-${fill}`]: true,
|
|
570
575
|
'input-otp-disabled': disabled,
|
|
571
576
|
'input-otp-readonly': readonly,
|
|
572
|
-
}) }, index.h("div", Object.assign({ key: '
|
|
577
|
+
}) }, index.h("div", Object.assign({ key: '831be3f939cf037f0eb8d7e37e0afd4ef9a3c2c5', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index$1) => (index.h(index.Fragment, null, index.h("div", { class: "native-wrapper" }, index.h("input", { class: "native-input", id: `${inputId}-${index$1}`, "aria-label": `Input ${index$1 + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index$1 === tabbableIndex ? 0 : -1, value: inputValues[index$1] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index$1] = el), onInput: this.onInput(index$1), onBlur: this.onBlur, onFocus: this.onFocus(index$1), onKeyDown: this.onKeyDown(index$1), onPaste: this.onPaste })), this.showSeparator(index$1) && index.h("div", { class: "input-otp-separator" }))))), index.h("div", { key: '59e6608e7a78d0ae1fdf134dada94b58d6f57559', class: {
|
|
573
578
|
'input-otp-description': true,
|
|
574
579
|
'input-otp-description-hidden': !hasDescription,
|
|
575
|
-
} }, index.h("slot", { key: '
|
|
580
|
+
} }, index.h("slot", { key: 'b9a1cd3a89789f1d7c57e37f0bd82f63237fe39f' }))));
|
|
576
581
|
}
|
|
577
582
|
get el() { return index.getElement(this); }
|
|
578
583
|
static get watchers() { return {
|
|
@@ -139,11 +139,13 @@ export class InputOTP {
|
|
|
139
139
|
const { length } = this;
|
|
140
140
|
const rtl = isRTL(this.el);
|
|
141
141
|
const input = event.target;
|
|
142
|
-
|
|
142
|
+
// Meta shortcuts are used to copy, paste, and select text
|
|
143
|
+
// We don't want to handle these keys here
|
|
144
|
+
const metaShortcuts = ['a', 'c', 'v', 'x', 'r', 'z', 'y'];
|
|
143
145
|
const isTextSelection = input.selectionStart !== input.selectionEnd;
|
|
144
|
-
// Return if the key is
|
|
146
|
+
// Return if the key is a meta shortcut or the input value
|
|
145
147
|
// text is selected and let the onPaste / onInput handler manage it
|
|
146
|
-
if (
|
|
148
|
+
if (isTextSelection || ((event.metaKey || event.ctrlKey) && metaShortcuts.includes(event.key.toLowerCase()))) {
|
|
147
149
|
return;
|
|
148
150
|
}
|
|
149
151
|
if (event.key === 'Backspace') {
|
|
@@ -205,47 +207,50 @@ export class InputOTP {
|
|
|
205
207
|
}
|
|
206
208
|
};
|
|
207
209
|
this.onInput = (index) => (event) => {
|
|
208
|
-
const { validKeyPattern } = this;
|
|
210
|
+
const { length, validKeyPattern } = this;
|
|
209
211
|
const value = event.target.value;
|
|
210
|
-
// If the value is longer than 1 character, it
|
|
211
|
-
//
|
|
212
|
+
// If the value is longer than 1 character (autofill), split it into
|
|
213
|
+
// characters and filter out invalid ones
|
|
212
214
|
if (value.length > 1) {
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
215
|
+
const validChars = value
|
|
216
|
+
.split('')
|
|
217
|
+
.filter((char) => validKeyPattern.test(char))
|
|
218
|
+
.slice(0, length);
|
|
219
|
+
// If there are no valid characters coming from the
|
|
220
|
+
// autofill, all input refs have to be cleared after the
|
|
221
|
+
// browser has finished the autofill behavior
|
|
222
|
+
if (validChars.length === 0) {
|
|
223
|
+
requestAnimationFrame(() => {
|
|
224
|
+
this.inputRefs.forEach((input) => {
|
|
225
|
+
input.value = '';
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
// Update the value of the input group and emit the input change event
|
|
230
|
+
this.value = validChars.join('');
|
|
221
231
|
this.updateValue(event);
|
|
232
|
+
// Focus the first empty input box or the last input box if all boxes
|
|
233
|
+
// are filled after a small delay to ensure the input boxes have been
|
|
234
|
+
// updated before moving the focus
|
|
235
|
+
setTimeout(() => {
|
|
236
|
+
var _a;
|
|
237
|
+
const nextIndex = validChars.length < length ? validChars.length : length - 1;
|
|
238
|
+
(_a = this.inputRefs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
239
|
+
}, 20);
|
|
222
240
|
return;
|
|
223
241
|
}
|
|
224
|
-
// Only allow input if it
|
|
225
|
-
if (value.length >
|
|
226
|
-
// Reset the input value if not valid
|
|
242
|
+
// Only allow input if it matches the pattern
|
|
243
|
+
if (value.length > 0 && !validKeyPattern.test(value)) {
|
|
227
244
|
this.inputRefs[index].value = '';
|
|
228
245
|
this.inputValues[index] = '';
|
|
229
246
|
return;
|
|
230
247
|
}
|
|
231
|
-
//
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if (!this.inputValues[i] || this.inputValues[i] === '') {
|
|
235
|
-
targetIndex = i;
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
// Set the value at the target index
|
|
240
|
-
this.inputValues[targetIndex] = value;
|
|
241
|
-
// If the value was entered in a later box, clear the current box
|
|
242
|
-
if (targetIndex !== index) {
|
|
243
|
-
this.inputRefs[index].value = '';
|
|
244
|
-
}
|
|
248
|
+
// For single character input, fill the current box
|
|
249
|
+
this.inputValues[index] = value;
|
|
250
|
+
this.updateValue(event);
|
|
245
251
|
if (value.length > 0) {
|
|
246
|
-
this.focusNext(
|
|
252
|
+
this.focusNext(index);
|
|
247
253
|
}
|
|
248
|
-
this.updateValue(event);
|
|
249
254
|
};
|
|
250
255
|
/**
|
|
251
256
|
* Handles pasting text into the input OTP component.
|
|
@@ -548,7 +553,7 @@ export class InputOTP {
|
|
|
548
553
|
const tabbableIndex = this.getTabbableIndex();
|
|
549
554
|
const pattern = this.getPattern();
|
|
550
555
|
const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
|
|
551
|
-
return (h(Host, { key: '
|
|
556
|
+
return (h(Host, { key: 'df8fca036cedea0812185a02e3b655d7d76285e0', class: createColorClasses(color, {
|
|
552
557
|
[mode]: true,
|
|
553
558
|
'has-focus': hasFocus,
|
|
554
559
|
[`input-otp-size-${size}`]: true,
|
|
@@ -556,10 +561,10 @@ export class InputOTP {
|
|
|
556
561
|
[`input-otp-fill-${fill}`]: true,
|
|
557
562
|
'input-otp-disabled': disabled,
|
|
558
563
|
'input-otp-readonly': readonly,
|
|
559
|
-
}) }, h("div", Object.assign({ key: '
|
|
564
|
+
}) }, h("div", Object.assign({ key: '831be3f939cf037f0eb8d7e37e0afd4ef9a3c2c5', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '59e6608e7a78d0ae1fdf134dada94b58d6f57559', class: {
|
|
560
565
|
'input-otp-description': true,
|
|
561
566
|
'input-otp-description-hidden': !hasDescription,
|
|
562
|
-
} }, h("slot", { key: '
|
|
567
|
+
} }, h("slot", { key: 'b9a1cd3a89789f1d7c57e37f0bd82f63237fe39f' }))));
|
|
563
568
|
}
|
|
564
569
|
static get is() { return "ion-input-otp"; }
|
|
565
570
|
static get encapsulation() { return "scoped"; }
|
package/dist/docs.json
CHANGED
|
@@ -150,11 +150,13 @@ const InputOTP = class {
|
|
|
150
150
|
const { length } = this;
|
|
151
151
|
const rtl = isRTL(this.el);
|
|
152
152
|
const input = event.target;
|
|
153
|
-
|
|
153
|
+
// Meta shortcuts are used to copy, paste, and select text
|
|
154
|
+
// We don't want to handle these keys here
|
|
155
|
+
const metaShortcuts = ['a', 'c', 'v', 'x', 'r', 'z', 'y'];
|
|
154
156
|
const isTextSelection = input.selectionStart !== input.selectionEnd;
|
|
155
|
-
// Return if the key is
|
|
157
|
+
// Return if the key is a meta shortcut or the input value
|
|
156
158
|
// text is selected and let the onPaste / onInput handler manage it
|
|
157
|
-
if (
|
|
159
|
+
if (isTextSelection || ((event.metaKey || event.ctrlKey) && metaShortcuts.includes(event.key.toLowerCase()))) {
|
|
158
160
|
return;
|
|
159
161
|
}
|
|
160
162
|
if (event.key === 'Backspace') {
|
|
@@ -216,47 +218,50 @@ const InputOTP = class {
|
|
|
216
218
|
}
|
|
217
219
|
};
|
|
218
220
|
this.onInput = (index) => (event) => {
|
|
219
|
-
const { validKeyPattern } = this;
|
|
221
|
+
const { length, validKeyPattern } = this;
|
|
220
222
|
const value = event.target.value;
|
|
221
|
-
// If the value is longer than 1 character, it
|
|
222
|
-
//
|
|
223
|
+
// If the value is longer than 1 character (autofill), split it into
|
|
224
|
+
// characters and filter out invalid ones
|
|
223
225
|
if (value.length > 1) {
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
226
|
+
const validChars = value
|
|
227
|
+
.split('')
|
|
228
|
+
.filter((char) => validKeyPattern.test(char))
|
|
229
|
+
.slice(0, length);
|
|
230
|
+
// If there are no valid characters coming from the
|
|
231
|
+
// autofill, all input refs have to be cleared after the
|
|
232
|
+
// browser has finished the autofill behavior
|
|
233
|
+
if (validChars.length === 0) {
|
|
234
|
+
requestAnimationFrame(() => {
|
|
235
|
+
this.inputRefs.forEach((input) => {
|
|
236
|
+
input.value = '';
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
// Update the value of the input group and emit the input change event
|
|
241
|
+
this.value = validChars.join('');
|
|
232
242
|
this.updateValue(event);
|
|
243
|
+
// Focus the first empty input box or the last input box if all boxes
|
|
244
|
+
// are filled after a small delay to ensure the input boxes have been
|
|
245
|
+
// updated before moving the focus
|
|
246
|
+
setTimeout(() => {
|
|
247
|
+
var _a;
|
|
248
|
+
const nextIndex = validChars.length < length ? validChars.length : length - 1;
|
|
249
|
+
(_a = this.inputRefs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
250
|
+
}, 20);
|
|
233
251
|
return;
|
|
234
252
|
}
|
|
235
|
-
// Only allow input if it
|
|
236
|
-
if (value.length >
|
|
237
|
-
// Reset the input value if not valid
|
|
253
|
+
// Only allow input if it matches the pattern
|
|
254
|
+
if (value.length > 0 && !validKeyPattern.test(value)) {
|
|
238
255
|
this.inputRefs[index].value = '';
|
|
239
256
|
this.inputValues[index] = '';
|
|
240
257
|
return;
|
|
241
258
|
}
|
|
242
|
-
//
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
if (!this.inputValues[i] || this.inputValues[i] === '') {
|
|
246
|
-
targetIndex = i;
|
|
247
|
-
break;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
// Set the value at the target index
|
|
251
|
-
this.inputValues[targetIndex] = value;
|
|
252
|
-
// If the value was entered in a later box, clear the current box
|
|
253
|
-
if (targetIndex !== index) {
|
|
254
|
-
this.inputRefs[index].value = '';
|
|
255
|
-
}
|
|
259
|
+
// For single character input, fill the current box
|
|
260
|
+
this.inputValues[index] = value;
|
|
261
|
+
this.updateValue(event);
|
|
256
262
|
if (value.length > 0) {
|
|
257
|
-
this.focusNext(
|
|
263
|
+
this.focusNext(index);
|
|
258
264
|
}
|
|
259
|
-
this.updateValue(event);
|
|
260
265
|
};
|
|
261
266
|
/**
|
|
262
267
|
* Handles pasting text into the input OTP component.
|
|
@@ -559,7 +564,7 @@ const InputOTP = class {
|
|
|
559
564
|
const tabbableIndex = this.getTabbableIndex();
|
|
560
565
|
const pattern = this.getPattern();
|
|
561
566
|
const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
|
|
562
|
-
return (h(Host, { key: '
|
|
567
|
+
return (h(Host, { key: 'df8fca036cedea0812185a02e3b655d7d76285e0', class: createColorClasses(color, {
|
|
563
568
|
[mode]: true,
|
|
564
569
|
'has-focus': hasFocus,
|
|
565
570
|
[`input-otp-size-${size}`]: true,
|
|
@@ -567,10 +572,10 @@ const InputOTP = class {
|
|
|
567
572
|
[`input-otp-fill-${fill}`]: true,
|
|
568
573
|
'input-otp-disabled': disabled,
|
|
569
574
|
'input-otp-readonly': readonly,
|
|
570
|
-
}) }, h("div", Object.assign({ key: '
|
|
575
|
+
}) }, h("div", Object.assign({ key: '831be3f939cf037f0eb8d7e37e0afd4ef9a3c2c5', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: '59e6608e7a78d0ae1fdf134dada94b58d6f57559', class: {
|
|
571
576
|
'input-otp-description': true,
|
|
572
577
|
'input-otp-description-hidden': !hasDescription,
|
|
573
|
-
} }, h("slot", { key: '
|
|
578
|
+
} }, h("slot", { key: 'b9a1cd3a89789f1d7c57e37f0bd82f63237fe39f' }))));
|
|
574
579
|
}
|
|
575
580
|
get el() { return getElement(this); }
|
|
576
581
|
static get watchers() { return {
|
package/dist/ionic/ionic.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,H as t,b as o}from"./p-3GtB1kQI.js";export{s as setNonce}from"./p-3GtB1kQI.js";import{g as n}from"./p-wsLGfiE0.js";import"./p-B7Khsp7D.js";import"./p-CEo1SqXS.js";var a=e=>{const t=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return t.call(this,e);const o=t.call(this,!1),n=this.childNodes;if(e)for(let e=0;e<n.length;e++)2!==n[e].nodeType&&o.appendChild(n[e].cloneNode(!0));return o}};(()=>{a(t.prototype);const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((async e=>(await n(),o(JSON.parse('[["p-cde545fa",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]],{"type":["typeChanged"],"disabled":["disabledChanged"],"side":["sideChanged"],"swipeGesture":["swipeGestureChanged"]}],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-f35cb090",[[33,"ion-input-password-toggle",{"color":[513],"showIcon":[1,"show-icon"],"hideIcon":[1,"hide-icon"],"type":[1025]},null,{"type":["onTypeChange"]}]]],["p-e83ead65",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]},null,{"activated":["activatedChanged"]}],[1,"ion-fab-list",{"activated":[4],"side":[1]},null,{"activated":["activatedChanged"]}]]],["p-5756b724",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]},null,{"disabled":["disabledChanged"]}]]],["p-3ca63859",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16,"router-animation"]}]]],["p-29186993",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"color":[513],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"positionAnchor":[1,"position-anchor"],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16,"html-attributes"],"swipeGesture":[1,"swipe-gesture"],"isOpen":[4,"is-open"],"trigger":[1],"revealContentToScreenReader":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"swipeGesture":["swipeGestureChanged"],"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-b18a4590",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"target":[1]}],[32,"ion-card-content"],[33,"ion-card-header",{"color":[513],"translucent":[4]}],[33,"ion-card-subtitle",{"color":[513]}],[33,"ion-card-title",{"color":[513]}]]],["p-fb714eec",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]},null,{"disabled":["disabledChanged"]}]]],["p-c1b0e3b6",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]},null,{"value":["valueChanged"]}],[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]],{"value":["valueChanged"],"disabled":["disabledChanged"],"readonly":["readonlyChanged"]}]]],["p-ed36aee8",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]},null,{"threshold":["thresholdChanged"],"disabled":["disabledChanged"]}]]],["p-43f012a4",[[33,"ion-reorder",null,[[2,"click","onClick"]]],[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]},null,{"disabled":["disabledChanged"]}]]],["p-8d7afec5",[[33,"ion-segment-button",{"contentId":[513,"content-id"],"disabled":[1028],"layout":[1],"type":[1],"value":[8],"checked":[32],"setFocus":[64]},null,{"value":["valueChanged"]}],[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1032],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[16,"ionSegmentViewScroll","handleSegmentViewScroll"],[0,"keydown","onKeyDown"]],{"color":["colorChanged"],"swipeGesture":["swipeGestureChanged"],"value":["valueChanged"],"disabled":["disabledChanged"]}]]],["p-98f759e4",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-d7a74bde",[[38,"ion-input",{"color":[513],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearInputIcon":[1,"clear-input-icon"],"clearOnEdit":[4,"clear-on-edit"],"counter":[4],"counterFormatter":[16,"counter-formatter"],"debounce":[2],"disabled":[516],"enterkeyhint":[1],"errorText":[1,"error-text"],"fill":[1],"inputmode":[1],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"shape":[1],"spellcheck":[4],"step":[1],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"type":["onTypeChange"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-9262223a",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]},null,{"lang":["onLangChanged"],"dir":["onDirChanged"],"debounce":["debounceChanged"],"value":["valueChanged"],"showCancelButton":["showCancelButtonChanged"]}]]],["p-da105dce",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"activated":[32]},null,{"disabled":["disabledChanged"]}]]],["p-8c496d65",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16,"root-params"],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64],"getLength":[64]},null,{"swipeGesture":["swipeGestureChanged"],"root":["rootChanged"]}],[0,"ion-nav-link",{"component":[1],"componentProps":[16,"component-props"],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"]}]]],["p-e5495b3b",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]},null,{"active":["changeActive"]}],[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-d4742f5c",[[38,"ion-textarea",{"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"fill":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[514],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"counter":[4],"counterFormatter":[16,"counter-formatter"],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"shape":[1],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-1e9ea564",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-05427be9",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-a20a15cc",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"]}],[33,"ion-breadcrumbs",{"color":[513],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]],{"maxItems":["maxItemsChanged"],"itemsBeforeCollapse":["maxItemsChanged"],"itemsAfterCollapse":["maxItemsChanged"]}]]],["p-2c6931ed",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]},null,{"selectedTab":["selectedTabChanged"]}]]],["p-920540c6",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-f331dda5",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16,"component-props"],"beforeLeave":[16,"before-leave"],"beforeEnter":[16,"before-enter"]},null,{"url":["onUpdate"],"component":["onUpdate"],"componentProps":["onComponentProps"]}],[0,"ion-route-redirect",{"from":[1],"to":[1]},null,{"from":["propDidChange"],"to":["propDidChange"]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"target":[1]}]]],["p-eec040ff",[[33,"ion-avatar"],[33,"ion-badge",{"color":[513]}],[1,"ion-thumbnail"]]],["p-9c7d7711",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["p-592db4a8",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]},null,{"src":["srcChanged"]}]]],["p-b4cd2a9f",[[38,"ion-input-otp",{"autocapitalize":[1],"color":[513],"disabled":[516],"fill":[1],"inputmode":[1],"length":[2],"pattern":[1],"readonly":[516],"separators":[1],"shape":[1],"size":[1],"type":[1],"value":[1032],"inputValues":[32],"hasFocus":[32],"setFocus":[64]},null,{"value":["valueChanged"],"separators":["processSeparators"],"length":["processSeparators"]}]]],["p-0bc3d6d0",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-99cc16fb",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"label":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16,"pin-formatter"],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"labelPlacement":[1,"label-placement"],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]},null,{"debounce":["debounceChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"],"activeBarStart":["activeBarStartChanged"],"disabled":["disabledChanged"],"value":["valueChanged"]}]]],["p-bf6b00ab",[[1,"ion-segment-content"]]],["p-691fa8c7",[[33,"ion-segment-view",{"disabled":[4],"isManualScroll":[32],"setContent":[64]},[[1,"scroll","handleScroll"],[1,"touchstart","handleScrollStart"],[1,"touchend","handleTouchEnd"]]]]],["p-2517fcdf",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32],"isVisible":[64]},null,{"visible":["visibleChanged"],"disabled":["updateState"],"when":["updateState"]}]]],["p-1fe35f29",[[1,"ion-text",{"color":[513]}]]],["p-14d26301",[[34,"ion-select-modal",{"header":[1],"multiple":[4],"options":[16]}]]],["p-e2d9c488",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"formatOptions":[16,"format-options"],"readonly":[4],"isDateEnabled":[16,"is-date-enabled"],"showAdjacentDays":[4,"show-adjacent-days"],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16,"title-selected-dates-formatter"],"multiple":[4],"highlightedDates":[16,"highlighted-dates"],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isTimePopoverOpen":[32],"forceRenderDate":[32],"confirm":[64],"reset":[64],"cancel":[64]},null,{"formatOptions":["formatOptionsChanged"],"disabled":["disabledChanged"],"min":["minChanged"],"max":["maxChanged"],"presentation":["presentationChanged"],"yearValues":["yearValuesChanged"],"monthValues":["monthValuesChanged"],"dayValues":["dayValuesChanged"],"hourValues":["hourValuesChanged"],"minuteValues":["minuteValuesChanged"],"value":["valueChanged"]}],[34,"ion-picker-legacy",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}],[32,"ion-picker-legacy-column",{"col":[16]},null,{"col":["colChanged"]}]]],["p-fd156864",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-6bd192d8",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]],{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"],"buttons":["buttonsChanged"],"inputs":["inputsChanged"]}]]],["p-a22fe54d",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"breakpoints":[16],"expandToScroll":[4,"expand-to-scroll"],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16,"component-props"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"presentingElement":[16,"presenting-element"],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"focusTrap":[4,"focus-trap"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-1da92348",[[33,"ion-picker",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]],["p-0bcd3299",[[1,"ion-picker-column",{"disabled":[4],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"ariaLabel":[32],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64],"setFocus":[64]},null,{"aria-label":["ariaLabelChanged"],"value":["valueChange"]}]]],["p-bc84650a",[[33,"ion-picker-column-option",{"disabled":[4],"value":[8],"color":[513],"ariaLabel":[32]},null,{"aria-label":["onAriaLabelChange"]}]]],["p-7a6c96ca",[[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"component":[1],"componentProps":[16,"component-props"],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"focusTrap":[4,"focus-trap"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"trigger":["onTriggerChange"],"triggerAction":["onTriggerChange"],"isOpen":["onIsOpenChange"]}]]],["p-3fa87259",[[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"setFocus":[64]}]]],["p-2e42fa68",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[32,"ion-item-group"],[33,"ion-note",{"color":[513]}],[1,"ion-skeleton-text",{"animated":[4]}],[38,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]},null,{"color":["colorChanged"],"position":["positionChanged"]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[33,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[516],"download":[1],"href":[1],"rel":[1],"lines":[1],"routerAnimation":[16,"router-animation"],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"multipleInputs":[32],"focusable":[32]},[[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]],{"button":["buttonChanged"]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}]]],["p-b9fc80d5",[[0,"ion-app",{"setFocus":[64]}],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16,"swipe-handler"],"commit":[64],"setRouteId":[64],"getRouteId":[64]},null,{"swipeHandler":["swipeHandlerChanged"]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"fixedSlotPlacement":[1,"fixed-slot-placement"],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[9,"resize","onResize"]]],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[33,"ion-title",{"color":[513],"size":[1]},null,{"size":["sizeChanged"]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[38,"ion-buttons",{"collapse":[4]}]]],["p-2438054c",[[33,"ion-select",{"cancelText":[1,"cancel-text"],"color":[513],"compareWith":[1,"compare-with"],"disabled":[4],"fill":[1],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"interface":[1],"interfaceOptions":[8,"interface-options"],"justify":[1],"label":[1],"labelPlacement":[1,"label-placement"],"multiple":[4],"name":[1],"okText":[1,"ok-text"],"placeholder":[1],"selectedText":[1,"selected-text"],"toggleIcon":[1,"toggle-icon"],"expandedIcon":[1,"expanded-icon"],"shape":[1],"value":[1032],"required":[4],"isExpanded":[32],"hasFocus":[32],"open":[64]},null,{"disabled":["styleChanged"],"isExpanded":["styleChanged"],"placeholder":["styleChanged"],"value":["styleChanged"]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]}]]],["p-96d912f5",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["p-250c972f",[[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]},null,{"value":["valueChanged"]}],[36,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"compareWith":[1,"compare-with"],"name":[1],"value":[1032],"helperText":[1,"helper-text"],"errorText":[1,"error-text"],"setFocus":[64]},[[4,"keydown","onKeydown"]],{"value":["valueChanged"]}]]],["p-ff88b250",[[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-ee504ce4",[[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1],"isCircle":[32]},null,{"disabled":["disabledChanged"]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"],"ios":["loadIcon"],"md":["loadIcon"]}]]]]'),e))));
|
|
4
|
+
import{p as e,H as t,b as o}from"./p-3GtB1kQI.js";export{s as setNonce}from"./p-3GtB1kQI.js";import{g as n}from"./p-wsLGfiE0.js";import"./p-B7Khsp7D.js";import"./p-CEo1SqXS.js";var a=e=>{const t=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return t.call(this,e);const o=t.call(this,!1),n=this.childNodes;if(e)for(let e=0;e<n.length;e++)2!==n[e].nodeType&&o.appendChild(n[e].cloneNode(!0));return o}};(()=>{a(t.prototype);const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((async e=>(await n(),o(JSON.parse('[["p-cde545fa",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]],{"type":["typeChanged"],"disabled":["disabledChanged"],"side":["sideChanged"],"swipeGesture":["swipeGestureChanged"]}],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-f35cb090",[[33,"ion-input-password-toggle",{"color":[513],"showIcon":[1,"show-icon"],"hideIcon":[1,"hide-icon"],"type":[1025]},null,{"type":["onTypeChange"]}]]],["p-e83ead65",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]},null,{"activated":["activatedChanged"]}],[1,"ion-fab-list",{"activated":[4],"side":[1]},null,{"activated":["activatedChanged"]}]]],["p-5756b724",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]},null,{"disabled":["disabledChanged"]}]]],["p-3ca63859",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16,"router-animation"]}]]],["p-29186993",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"color":[513],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"positionAnchor":[1,"position-anchor"],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16,"html-attributes"],"swipeGesture":[1,"swipe-gesture"],"isOpen":[4,"is-open"],"trigger":[1],"revealContentToScreenReader":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"swipeGesture":["swipeGestureChanged"],"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-b18a4590",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"target":[1]}],[32,"ion-card-content"],[33,"ion-card-header",{"color":[513],"translucent":[4]}],[33,"ion-card-subtitle",{"color":[513]}],[33,"ion-card-title",{"color":[513]}]]],["p-fb714eec",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]},null,{"disabled":["disabledChanged"]}]]],["p-c1b0e3b6",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]},null,{"value":["valueChanged"]}],[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]],{"value":["valueChanged"],"disabled":["disabledChanged"],"readonly":["readonlyChanged"]}]]],["p-ed36aee8",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]},null,{"threshold":["thresholdChanged"],"disabled":["disabledChanged"]}]]],["p-43f012a4",[[33,"ion-reorder",null,[[2,"click","onClick"]]],[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]},null,{"disabled":["disabledChanged"]}]]],["p-8d7afec5",[[33,"ion-segment-button",{"contentId":[513,"content-id"],"disabled":[1028],"layout":[1],"type":[1],"value":[8],"checked":[32],"setFocus":[64]},null,{"value":["valueChanged"]}],[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1032],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[16,"ionSegmentViewScroll","handleSegmentViewScroll"],[0,"keydown","onKeyDown"]],{"color":["colorChanged"],"swipeGesture":["swipeGestureChanged"],"value":["valueChanged"],"disabled":["disabledChanged"]}]]],["p-98f759e4",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-d7a74bde",[[38,"ion-input",{"color":[513],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearInputIcon":[1,"clear-input-icon"],"clearOnEdit":[4,"clear-on-edit"],"counter":[4],"counterFormatter":[16,"counter-formatter"],"debounce":[2],"disabled":[516],"enterkeyhint":[1],"errorText":[1,"error-text"],"fill":[1],"inputmode":[1],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"shape":[1],"spellcheck":[4],"step":[1],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"type":["onTypeChange"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-9262223a",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]},null,{"lang":["onLangChanged"],"dir":["onDirChanged"],"debounce":["debounceChanged"],"value":["valueChanged"],"showCancelButton":["showCancelButtonChanged"]}]]],["p-da105dce",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"activated":[32]},null,{"disabled":["disabledChanged"]}]]],["p-8c496d65",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16,"root-params"],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64],"getLength":[64]},null,{"swipeGesture":["swipeGestureChanged"],"root":["rootChanged"]}],[0,"ion-nav-link",{"component":[1],"componentProps":[16,"component-props"],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"]}]]],["p-e5495b3b",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]},null,{"active":["changeActive"]}],[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-d4742f5c",[[38,"ion-textarea",{"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"fill":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[514],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"counter":[4],"counterFormatter":[16,"counter-formatter"],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"shape":[1],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-1e9ea564",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-05427be9",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-a20a15cc",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"]}],[33,"ion-breadcrumbs",{"color":[513],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]],{"maxItems":["maxItemsChanged"],"itemsBeforeCollapse":["maxItemsChanged"],"itemsAfterCollapse":["maxItemsChanged"]}]]],["p-2c6931ed",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]},null,{"selectedTab":["selectedTabChanged"]}]]],["p-920540c6",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-f331dda5",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16,"component-props"],"beforeLeave":[16,"before-leave"],"beforeEnter":[16,"before-enter"]},null,{"url":["onUpdate"],"component":["onUpdate"],"componentProps":["onComponentProps"]}],[0,"ion-route-redirect",{"from":[1],"to":[1]},null,{"from":["propDidChange"],"to":["propDidChange"]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"target":[1]}]]],["p-eec040ff",[[33,"ion-avatar"],[33,"ion-badge",{"color":[513]}],[1,"ion-thumbnail"]]],["p-9c7d7711",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["p-592db4a8",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]},null,{"src":["srcChanged"]}]]],["p-e493da57",[[38,"ion-input-otp",{"autocapitalize":[1],"color":[513],"disabled":[516],"fill":[1],"inputmode":[1],"length":[2],"pattern":[1],"readonly":[516],"separators":[1],"shape":[1],"size":[1],"type":[1],"value":[1032],"inputValues":[32],"hasFocus":[32],"setFocus":[64]},null,{"value":["valueChanged"],"separators":["processSeparators"],"length":["processSeparators"]}]]],["p-0bc3d6d0",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-99cc16fb",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"label":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16,"pin-formatter"],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"labelPlacement":[1,"label-placement"],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]},null,{"debounce":["debounceChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"],"activeBarStart":["activeBarStartChanged"],"disabled":["disabledChanged"],"value":["valueChanged"]}]]],["p-bf6b00ab",[[1,"ion-segment-content"]]],["p-691fa8c7",[[33,"ion-segment-view",{"disabled":[4],"isManualScroll":[32],"setContent":[64]},[[1,"scroll","handleScroll"],[1,"touchstart","handleScrollStart"],[1,"touchend","handleTouchEnd"]]]]],["p-2517fcdf",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32],"isVisible":[64]},null,{"visible":["visibleChanged"],"disabled":["updateState"],"when":["updateState"]}]]],["p-1fe35f29",[[1,"ion-text",{"color":[513]}]]],["p-14d26301",[[34,"ion-select-modal",{"header":[1],"multiple":[4],"options":[16]}]]],["p-e2d9c488",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"formatOptions":[16,"format-options"],"readonly":[4],"isDateEnabled":[16,"is-date-enabled"],"showAdjacentDays":[4,"show-adjacent-days"],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16,"title-selected-dates-formatter"],"multiple":[4],"highlightedDates":[16,"highlighted-dates"],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isTimePopoverOpen":[32],"forceRenderDate":[32],"confirm":[64],"reset":[64],"cancel":[64]},null,{"formatOptions":["formatOptionsChanged"],"disabled":["disabledChanged"],"min":["minChanged"],"max":["maxChanged"],"presentation":["presentationChanged"],"yearValues":["yearValuesChanged"],"monthValues":["monthValuesChanged"],"dayValues":["dayValuesChanged"],"hourValues":["hourValuesChanged"],"minuteValues":["minuteValuesChanged"],"value":["valueChanged"]}],[34,"ion-picker-legacy",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}],[32,"ion-picker-legacy-column",{"col":[16]},null,{"col":["colChanged"]}]]],["p-fd156864",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-6bd192d8",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]],{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"],"buttons":["buttonsChanged"],"inputs":["inputsChanged"]}]]],["p-a22fe54d",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"breakpoints":[16],"expandToScroll":[4,"expand-to-scroll"],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16,"component-props"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"presentingElement":[16,"presenting-element"],"htmlAttributes":[16,"html-attributes"],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"focusTrap":[4,"focus-trap"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-1da92348",[[33,"ion-picker",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]],["p-0bcd3299",[[1,"ion-picker-column",{"disabled":[4],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"ariaLabel":[32],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64],"setFocus":[64]},null,{"aria-label":["ariaLabelChanged"],"value":["valueChange"]}]]],["p-bc84650a",[[33,"ion-picker-column-option",{"disabled":[4],"value":[8],"color":[513],"ariaLabel":[32]},null,{"aria-label":["onAriaLabelChange"]}]]],["p-7a6c96ca",[[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16,"enter-animation"],"leaveAnimation":[16,"leave-animation"],"component":[1],"componentProps":[16,"component-props"],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16,"html-attributes"],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"focusTrap":[4,"focus-trap"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"trigger":["onTriggerChange"],"triggerAction":["onTriggerChange"],"isOpen":["onIsOpenChange"]}]]],["p-3fa87259",[[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"setFocus":[64]}]]],["p-2e42fa68",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[32,"ion-item-group"],[33,"ion-note",{"color":[513]}],[1,"ion-skeleton-text",{"animated":[4]}],[38,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]},null,{"color":["colorChanged"],"position":["positionChanged"]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[33,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[516],"download":[1],"href":[1],"rel":[1],"lines":[1],"routerAnimation":[16,"router-animation"],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"multipleInputs":[32],"focusable":[32]},[[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]],{"button":["buttonChanged"]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}]]],["p-b9fc80d5",[[0,"ion-app",{"setFocus":[64]}],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16,"swipe-handler"],"commit":[64],"setRouteId":[64],"getRouteId":[64]},null,{"swipeHandler":["swipeHandlerChanged"]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"fixedSlotPlacement":[1,"fixed-slot-placement"],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[9,"resize","onResize"]]],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[33,"ion-title",{"color":[513],"size":[1]},null,{"size":["sizeChanged"]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[38,"ion-buttons",{"collapse":[4]}]]],["p-2438054c",[[33,"ion-select",{"cancelText":[1,"cancel-text"],"color":[513],"compareWith":[1,"compare-with"],"disabled":[4],"fill":[1],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"interface":[1],"interfaceOptions":[8,"interface-options"],"justify":[1],"label":[1],"labelPlacement":[1,"label-placement"],"multiple":[4],"name":[1],"okText":[1,"ok-text"],"placeholder":[1],"selectedText":[1,"selected-text"],"toggleIcon":[1,"toggle-icon"],"expandedIcon":[1,"expanded-icon"],"shape":[1],"value":[1032],"required":[4],"isExpanded":[32],"hasFocus":[32],"open":[64]},null,{"disabled":["styleChanged"],"isExpanded":["styleChanged"],"placeholder":["styleChanged"],"value":["styleChanged"]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]}]]],["p-96d912f5",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["p-250c972f",[[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]},null,{"value":["valueChanged"]}],[36,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"compareWith":[1,"compare-with"],"name":[1],"value":[1032],"helperText":[1,"helper-text"],"errorText":[1,"error-text"],"setFocus":[64]},[[4,"keydown","onKeydown"]],{"value":["valueChanged"]}]]],["p-ff88b250",[[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-ee504ce4",[[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16,"router-animation"],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1],"isCircle":[32]},null,{"disabled":["disabledChanged"]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"],"ios":["loadIcon"],"md":["loadIcon"]}]]]]'),e))));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as i,c as o,h as t,F as n,d as p,g as r}from"./p-3GtB1kQI.js";import{i as s}from"./p-CG4wBMWx.js";import{p as e}from"./p-CEo1SqXS.js";import{i as a}from"./p-C53feagD.js";import{c as l}from"./p-DiVJyqlX.js";import{b as d}from"./p-B7Khsp7D.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.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 p=i;if(!this.isKeyboardNavigation){const o=this.inputValues[i]?i:this.getFirstEmptyIndex();p=-1===o?this.length-1:o,null===(t=this.inputRefs[p])||void 0===t||t.focus()}n.forEach(((i,o)=>{i.tabIndex=o===p?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),p=o.target;if(!(p.selectionStart!==p.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 p="ArrowLeft"===o.key;p&&n||!p&&!n?this.inputValues[i]&&i<t-1&&this.focusNext(i):this.focusPrevious(i)}else if("Tab"===o.key)return void(this.isKeyboardNavigation=!0);if(this.inputValues[i]&&this.validKeyPattern.test(o.key)){if(!this.inputValues[t-1])for(let o=t-1;o>i;o--)this.inputValues[o]=this.inputValues[o-1],this.inputRefs[o].value=this.inputValues[o]||"";this.inputValues[i]=o.key,this.inputRefs[i].value=o.key,this.updateValue(o),o.preventDefault()}}},this.onInput=i=>o=>{const{length:t,validKeyPattern:n}=this,p=o.target.value;if(p.length>1){const i=p.split("").filter((i=>n.test(i))).slice(0,t);return 0===i.length&&requestAnimationFrame((()=>{this.inputRefs.forEach((i=>{i.value=""}))})),this.value=i.join(""),this.updateValue(o),void setTimeout((()=>{var o;null===(o=this.inputRefs[i.length<t?i.length:t-1])||void 0===o||o.focus()}),20)}if(p.length>0&&!n.test(p))return this.inputRefs[i].value="",void(this.inputValues[i]="");this.inputValues[i]=p,this.updateValue(o),p.length>0&&this.focusNext(i)},this.onPaste=i=>{var o,t,n;const{inputRefs:p,length:r,validKeyPattern:s}=this;i.preventDefault();const e=null===(o=i.clipboardData)||void 0===o?void 0:o.getData("text");if(!e)return void this.emitIonInput(i);const a=e.split("").filter((i=>s.test(i))).slice(0,r);a.forEach(((i,o)=>{o<r&&(this.inputRefs[o].value=i,this.inputValues[o]=i)})),this.value=a.join(""),this.updateValue(i);const l=a.length;l<r?null===(t=p[l])||void 0===t||t.focus():null===(n=p[r-1])||void 0===n||n.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 e(`[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 t;t="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))),t.filter(((i,o)=>t.indexOf(i)!==o)).length>0&&e(`[ion-input-otp] - Duplicate separator positions are not allowed. Received: ${i}`,this.el);const n=t.filter((i=>i>o));n.length>0&&e(`[ion-input-otp] - The following separator positions are greater than the input length (${o}): ${n.join(", ")}. These separators will be ignored.`,this.el),this.parsedSeparators=t.filter((i=>i<=o))}componentWillLoad(){this.inheritedAttributes=s(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(""))}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,p)=>{const r=-1===n?p===t-1:n===p;i.tabIndex=r?0:-1,i.setAttribute("aria-hidden",o[p]&&""!==o[p]||r?"false":"true")}))}showSeparator(i){const{length:o}=this;return this.parsedSeparators.includes(i+1)&&i<o-1}render(){var i,o;const{autocapitalize:r,color:s,disabled:e,el:a,fill:u,hasFocus:c,inheritedAttributes:h,inputId:g,inputRefs:v,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 t(p,{key:"df8fca036cedea0812185a02e3b655d7d76285e0",class:l(s,{[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})},t("div",Object.assign({key:"831be3f939cf037f0eb8d7e37e0afd4ef9a3c2c5",role:"group","aria-label":"One-time password input",class:"input-otp-group"},h),Array.from({length:f}).map(((i,o)=>t(n,null,t("div",{class:"native-wrapper"},t("input",{class:"native-input",id:`${g}-${o}`,"aria-label":`Input ${o+1} of ${f}`,type:"text",autoCapitalize:r,inputmode:y,maxLength:1,pattern:I,disabled:e,readOnly:b,tabIndex:o===z?0:-1,value:m[o]||"",autocomplete:"one-time-code",ref:i=>v[o]=i,onInput:this.onInput(o),onBlur:this.onBlur,onFocus:this.onFocus(o),onKeyDown:this.onKeyDown(o),onPaste:this.onPaste})),this.showSeparator(o)&&t("div",{class:"input-otp-separator"}))))),t("div",{key:"59e6608e7a78d0ae1fdf134dada94b58d6f57559",class:{"input-otp-description":!0,"input-otp-description-hidden":!$}},t("slot",{key:"b9a1cd3a89789f1d7c57e37f0bd82f63237fe39f"})))}get el(){return r(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}
|
package/hydrate/index.js
CHANGED
|
@@ -17081,11 +17081,13 @@ class InputOTP {
|
|
|
17081
17081
|
const { length } = this;
|
|
17082
17082
|
const rtl = isRTL$1(this.el);
|
|
17083
17083
|
const input = event.target;
|
|
17084
|
-
|
|
17084
|
+
// Meta shortcuts are used to copy, paste, and select text
|
|
17085
|
+
// We don't want to handle these keys here
|
|
17086
|
+
const metaShortcuts = ['a', 'c', 'v', 'x', 'r', 'z', 'y'];
|
|
17085
17087
|
const isTextSelection = input.selectionStart !== input.selectionEnd;
|
|
17086
|
-
// Return if the key is
|
|
17088
|
+
// Return if the key is a meta shortcut or the input value
|
|
17087
17089
|
// text is selected and let the onPaste / onInput handler manage it
|
|
17088
|
-
if (
|
|
17090
|
+
if (isTextSelection || ((event.metaKey || event.ctrlKey) && metaShortcuts.includes(event.key.toLowerCase()))) {
|
|
17089
17091
|
return;
|
|
17090
17092
|
}
|
|
17091
17093
|
if (event.key === 'Backspace') {
|
|
@@ -17147,47 +17149,50 @@ class InputOTP {
|
|
|
17147
17149
|
}
|
|
17148
17150
|
};
|
|
17149
17151
|
this.onInput = (index) => (event) => {
|
|
17150
|
-
const { validKeyPattern } = this;
|
|
17152
|
+
const { length, validKeyPattern } = this;
|
|
17151
17153
|
const value = event.target.value;
|
|
17152
|
-
// If the value is longer than 1 character, it
|
|
17153
|
-
//
|
|
17154
|
+
// If the value is longer than 1 character (autofill), split it into
|
|
17155
|
+
// characters and filter out invalid ones
|
|
17154
17156
|
if (value.length > 1) {
|
|
17155
|
-
const
|
|
17156
|
-
|
|
17157
|
-
|
|
17158
|
-
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17162
|
-
|
|
17157
|
+
const validChars = value
|
|
17158
|
+
.split('')
|
|
17159
|
+
.filter((char) => validKeyPattern.test(char))
|
|
17160
|
+
.slice(0, length);
|
|
17161
|
+
// If there are no valid characters coming from the
|
|
17162
|
+
// autofill, all input refs have to be cleared after the
|
|
17163
|
+
// browser has finished the autofill behavior
|
|
17164
|
+
if (validChars.length === 0) {
|
|
17165
|
+
requestAnimationFrame(() => {
|
|
17166
|
+
this.inputRefs.forEach((input) => {
|
|
17167
|
+
input.value = '';
|
|
17168
|
+
});
|
|
17169
|
+
});
|
|
17170
|
+
}
|
|
17171
|
+
// Update the value of the input group and emit the input change event
|
|
17172
|
+
this.value = validChars.join('');
|
|
17163
17173
|
this.updateValue(event);
|
|
17174
|
+
// Focus the first empty input box or the last input box if all boxes
|
|
17175
|
+
// are filled after a small delay to ensure the input boxes have been
|
|
17176
|
+
// updated before moving the focus
|
|
17177
|
+
setTimeout(() => {
|
|
17178
|
+
var _a;
|
|
17179
|
+
const nextIndex = validChars.length < length ? validChars.length : length - 1;
|
|
17180
|
+
(_a = this.inputRefs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
17181
|
+
}, 20);
|
|
17164
17182
|
return;
|
|
17165
17183
|
}
|
|
17166
|
-
// Only allow input if it
|
|
17167
|
-
if (value.length >
|
|
17168
|
-
// Reset the input value if not valid
|
|
17184
|
+
// Only allow input if it matches the pattern
|
|
17185
|
+
if (value.length > 0 && !validKeyPattern.test(value)) {
|
|
17169
17186
|
this.inputRefs[index].value = '';
|
|
17170
17187
|
this.inputValues[index] = '';
|
|
17171
17188
|
return;
|
|
17172
17189
|
}
|
|
17173
|
-
//
|
|
17174
|
-
|
|
17175
|
-
|
|
17176
|
-
if (!this.inputValues[i] || this.inputValues[i] === '') {
|
|
17177
|
-
targetIndex = i;
|
|
17178
|
-
break;
|
|
17179
|
-
}
|
|
17180
|
-
}
|
|
17181
|
-
// Set the value at the target index
|
|
17182
|
-
this.inputValues[targetIndex] = value;
|
|
17183
|
-
// If the value was entered in a later box, clear the current box
|
|
17184
|
-
if (targetIndex !== index) {
|
|
17185
|
-
this.inputRefs[index].value = '';
|
|
17186
|
-
}
|
|
17190
|
+
// For single character input, fill the current box
|
|
17191
|
+
this.inputValues[index] = value;
|
|
17192
|
+
this.updateValue(event);
|
|
17187
17193
|
if (value.length > 0) {
|
|
17188
|
-
this.focusNext(
|
|
17194
|
+
this.focusNext(index);
|
|
17189
17195
|
}
|
|
17190
|
-
this.updateValue(event);
|
|
17191
17196
|
};
|
|
17192
17197
|
/**
|
|
17193
17198
|
* Handles pasting text into the input OTP component.
|
|
@@ -17490,7 +17495,7 @@ class InputOTP {
|
|
|
17490
17495
|
const tabbableIndex = this.getTabbableIndex();
|
|
17491
17496
|
const pattern = this.getPattern();
|
|
17492
17497
|
const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
|
|
17493
|
-
return (hAsync(Host, { key: '
|
|
17498
|
+
return (hAsync(Host, { key: 'df8fca036cedea0812185a02e3b655d7d76285e0', class: createColorClasses$1(color, {
|
|
17494
17499
|
[mode]: true,
|
|
17495
17500
|
'has-focus': hasFocus,
|
|
17496
17501
|
[`input-otp-size-${size}`]: true,
|
|
@@ -17498,10 +17503,10 @@ class InputOTP {
|
|
|
17498
17503
|
[`input-otp-fill-${fill}`]: true,
|
|
17499
17504
|
'input-otp-disabled': disabled,
|
|
17500
17505
|
'input-otp-readonly': readonly,
|
|
17501
|
-
}) }, hAsync("div", Object.assign({ key: '
|
|
17506
|
+
}) }, hAsync("div", Object.assign({ key: '831be3f939cf037f0eb8d7e37e0afd4ef9a3c2c5', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (hAsync(Fragment, null, hAsync("div", { class: "native-wrapper" }, hAsync("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && hAsync("div", { class: "input-otp-separator" }))))), hAsync("div", { key: '59e6608e7a78d0ae1fdf134dada94b58d6f57559', class: {
|
|
17502
17507
|
'input-otp-description': true,
|
|
17503
17508
|
'input-otp-description-hidden': !hasDescription,
|
|
17504
|
-
} }, hAsync("slot", { key: '
|
|
17509
|
+
} }, hAsync("slot", { key: 'b9a1cd3a89789f1d7c57e37f0bd82f63237fe39f' }))));
|
|
17505
17510
|
}
|
|
17506
17511
|
get el() { return getElement(this); }
|
|
17507
17512
|
static get watchers() { return {
|
package/hydrate/index.mjs
CHANGED
|
@@ -17079,11 +17079,13 @@ class InputOTP {
|
|
|
17079
17079
|
const { length } = this;
|
|
17080
17080
|
const rtl = isRTL$1(this.el);
|
|
17081
17081
|
const input = event.target;
|
|
17082
|
-
|
|
17082
|
+
// Meta shortcuts are used to copy, paste, and select text
|
|
17083
|
+
// We don't want to handle these keys here
|
|
17084
|
+
const metaShortcuts = ['a', 'c', 'v', 'x', 'r', 'z', 'y'];
|
|
17083
17085
|
const isTextSelection = input.selectionStart !== input.selectionEnd;
|
|
17084
|
-
// Return if the key is
|
|
17086
|
+
// Return if the key is a meta shortcut or the input value
|
|
17085
17087
|
// text is selected and let the onPaste / onInput handler manage it
|
|
17086
|
-
if (
|
|
17088
|
+
if (isTextSelection || ((event.metaKey || event.ctrlKey) && metaShortcuts.includes(event.key.toLowerCase()))) {
|
|
17087
17089
|
return;
|
|
17088
17090
|
}
|
|
17089
17091
|
if (event.key === 'Backspace') {
|
|
@@ -17145,47 +17147,50 @@ class InputOTP {
|
|
|
17145
17147
|
}
|
|
17146
17148
|
};
|
|
17147
17149
|
this.onInput = (index) => (event) => {
|
|
17148
|
-
const { validKeyPattern } = this;
|
|
17150
|
+
const { length, validKeyPattern } = this;
|
|
17149
17151
|
const value = event.target.value;
|
|
17150
|
-
// If the value is longer than 1 character, it
|
|
17151
|
-
//
|
|
17152
|
+
// If the value is longer than 1 character (autofill), split it into
|
|
17153
|
+
// characters and filter out invalid ones
|
|
17152
17154
|
if (value.length > 1) {
|
|
17153
|
-
const
|
|
17154
|
-
|
|
17155
|
-
|
|
17156
|
-
|
|
17157
|
-
|
|
17158
|
-
|
|
17159
|
-
|
|
17160
|
-
|
|
17155
|
+
const validChars = value
|
|
17156
|
+
.split('')
|
|
17157
|
+
.filter((char) => validKeyPattern.test(char))
|
|
17158
|
+
.slice(0, length);
|
|
17159
|
+
// If there are no valid characters coming from the
|
|
17160
|
+
// autofill, all input refs have to be cleared after the
|
|
17161
|
+
// browser has finished the autofill behavior
|
|
17162
|
+
if (validChars.length === 0) {
|
|
17163
|
+
requestAnimationFrame(() => {
|
|
17164
|
+
this.inputRefs.forEach((input) => {
|
|
17165
|
+
input.value = '';
|
|
17166
|
+
});
|
|
17167
|
+
});
|
|
17168
|
+
}
|
|
17169
|
+
// Update the value of the input group and emit the input change event
|
|
17170
|
+
this.value = validChars.join('');
|
|
17161
17171
|
this.updateValue(event);
|
|
17172
|
+
// Focus the first empty input box or the last input box if all boxes
|
|
17173
|
+
// are filled after a small delay to ensure the input boxes have been
|
|
17174
|
+
// updated before moving the focus
|
|
17175
|
+
setTimeout(() => {
|
|
17176
|
+
var _a;
|
|
17177
|
+
const nextIndex = validChars.length < length ? validChars.length : length - 1;
|
|
17178
|
+
(_a = this.inputRefs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
17179
|
+
}, 20);
|
|
17162
17180
|
return;
|
|
17163
17181
|
}
|
|
17164
|
-
// Only allow input if it
|
|
17165
|
-
if (value.length >
|
|
17166
|
-
// Reset the input value if not valid
|
|
17182
|
+
// Only allow input if it matches the pattern
|
|
17183
|
+
if (value.length > 0 && !validKeyPattern.test(value)) {
|
|
17167
17184
|
this.inputRefs[index].value = '';
|
|
17168
17185
|
this.inputValues[index] = '';
|
|
17169
17186
|
return;
|
|
17170
17187
|
}
|
|
17171
|
-
//
|
|
17172
|
-
|
|
17173
|
-
|
|
17174
|
-
if (!this.inputValues[i] || this.inputValues[i] === '') {
|
|
17175
|
-
targetIndex = i;
|
|
17176
|
-
break;
|
|
17177
|
-
}
|
|
17178
|
-
}
|
|
17179
|
-
// Set the value at the target index
|
|
17180
|
-
this.inputValues[targetIndex] = value;
|
|
17181
|
-
// If the value was entered in a later box, clear the current box
|
|
17182
|
-
if (targetIndex !== index) {
|
|
17183
|
-
this.inputRefs[index].value = '';
|
|
17184
|
-
}
|
|
17188
|
+
// For single character input, fill the current box
|
|
17189
|
+
this.inputValues[index] = value;
|
|
17190
|
+
this.updateValue(event);
|
|
17185
17191
|
if (value.length > 0) {
|
|
17186
|
-
this.focusNext(
|
|
17192
|
+
this.focusNext(index);
|
|
17187
17193
|
}
|
|
17188
|
-
this.updateValue(event);
|
|
17189
17194
|
};
|
|
17190
17195
|
/**
|
|
17191
17196
|
* Handles pasting text into the input OTP component.
|
|
@@ -17488,7 +17493,7 @@ class InputOTP {
|
|
|
17488
17493
|
const tabbableIndex = this.getTabbableIndex();
|
|
17489
17494
|
const pattern = this.getPattern();
|
|
17490
17495
|
const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
|
|
17491
|
-
return (hAsync(Host, { key: '
|
|
17496
|
+
return (hAsync(Host, { key: 'df8fca036cedea0812185a02e3b655d7d76285e0', class: createColorClasses$1(color, {
|
|
17492
17497
|
[mode]: true,
|
|
17493
17498
|
'has-focus': hasFocus,
|
|
17494
17499
|
[`input-otp-size-${size}`]: true,
|
|
@@ -17496,10 +17501,10 @@ class InputOTP {
|
|
|
17496
17501
|
[`input-otp-fill-${fill}`]: true,
|
|
17497
17502
|
'input-otp-disabled': disabled,
|
|
17498
17503
|
'input-otp-readonly': readonly,
|
|
17499
|
-
}) }, hAsync("div", Object.assign({ key: '
|
|
17504
|
+
}) }, hAsync("div", Object.assign({ key: '831be3f939cf037f0eb8d7e37e0afd4ef9a3c2c5', role: "group", "aria-label": "One-time password input", class: "input-otp-group" }, inheritedAttributes), Array.from({ length }).map((_, index) => (hAsync(Fragment, null, hAsync("div", { class: "native-wrapper" }, hAsync("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, maxLength: 1, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && hAsync("div", { class: "input-otp-separator" }))))), hAsync("div", { key: '59e6608e7a78d0ae1fdf134dada94b58d6f57559', class: {
|
|
17500
17505
|
'input-otp-description': true,
|
|
17501
17506
|
'input-otp-description-hidden': !hasDescription,
|
|
17502
|
-
} }, hAsync("slot", { key: '
|
|
17507
|
+
} }, hAsync("slot", { key: 'b9a1cd3a89789f1d7c57e37f0bd82f63237fe39f' }))));
|
|
17503
17508
|
}
|
|
17504
17509
|
get el() { return getElement(this); }
|
|
17505
17510
|
static get watchers() { return {
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as i,c as o,h as t,F as n,d as p,g as r}from"./p-3GtB1kQI.js";import{i as s}from"./p-CG4wBMWx.js";import{p as e}from"./p-CEo1SqXS.js";import{i as a}from"./p-C53feagD.js";import{c as l}from"./p-DiVJyqlX.js";import{b as d}from"./p-B7Khsp7D.js";const c=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-"+u++,this.parsedSeparators=[],this.isKeyboardNavigation=!1,this.inputValues=[],this.hasFocus=!1,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 p=i;if(!this.isKeyboardNavigation){const o=this.inputValues[i]?i:this.getFirstEmptyIndex();p=-1===o?this.length-1:o,null===(t=this.inputRefs[p])||void 0===t||t.focus()}n.forEach(((i,o)=>{i.tabIndex=o===p?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),p=o.target;if((!o.metaKey&&!o.ctrlKey||"v"!==o.key.toLowerCase())&&p.selectionStart===p.selectionEnd){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 p="ArrowLeft"===o.key;p&&n||!p&&!n?this.inputValues[i]&&i<t-1&&this.focusNext(i):this.focusPrevious(i)}else if("Tab"===o.key)return void(this.isKeyboardNavigation=!0);if(this.inputValues[i]&&this.validKeyPattern.test(o.key)){if(!this.inputValues[t-1])for(let o=t-1;o>i;o--)this.inputValues[o]=this.inputValues[o-1],this.inputRefs[o].value=this.inputValues[o]||"";this.inputValues[i]=o.key,this.inputRefs[i].value=o.key,this.updateValue(o),o.preventDefault()}}},this.onInput=i=>o=>{const{validKeyPattern:t}=this,n=o.target.value;if(n.length>1){const i=n.split("").slice(0,this.length);return i.forEach(((i,o)=>{this.validKeyPattern.test(i)&&(this.inputRefs[o].value=i,this.inputValues[o]=i)})),this.value=i.join(""),void this.updateValue(o)}if(n.length>1||n.length>0&&!t.test(n))return this.inputRefs[i].value="",void(this.inputValues[i]="");let p=i;for(let o=0;o<i;o++)if(!this.inputValues[o]||""===this.inputValues[o]){p=o;break}this.inputValues[p]=n,p!==i&&(this.inputRefs[i].value=""),n.length>0&&this.focusNext(p),this.updateValue(o)},this.onPaste=i=>{var o,t,n;const{inputRefs:p,length:r,validKeyPattern:s}=this;i.preventDefault();const e=null===(o=i.clipboardData)||void 0===o?void 0:o.getData("text");if(!e)return void this.emitIonInput(i);const a=e.split("").filter((i=>s.test(i))).slice(0,r);a.forEach(((i,o)=>{o<r&&(this.inputRefs[o].value=i,this.inputValues[o]=i)})),this.value=a.join(""),this.updateValue(i);const l=a.length;l<r?null===(t=p[l])||void 0===t||t.focus():null===(n=p[r-1])||void 0===n||n.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 e(`[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 t;t="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))),t.filter(((i,o)=>t.indexOf(i)!==o)).length>0&&e(`[ion-input-otp] - Duplicate separator positions are not allowed. Received: ${i}`,this.el);const n=t.filter((i=>i>o));n.length>0&&e(`[ion-input-otp] - The following separator positions are greater than the input length (${o}): ${n.join(", ")}. These separators will be ignored.`,this.el),this.parsedSeparators=t.filter((i=>i<=o))}componentWillLoad(){this.inheritedAttributes=s(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(""))}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,p)=>{const r=-1===n?p===t-1:n===p;i.tabIndex=r?0:-1,i.setAttribute("aria-hidden",o[p]&&""!==o[p]||r?"false":"true")}))}showSeparator(i){const{length:o}=this;return this.parsedSeparators.includes(i+1)&&i<o-1}render(){var i,o;const{autocapitalize:r,color:s,disabled:e,el:a,fill:c,hasFocus:u,inheritedAttributes:h,inputId:g,inputRefs:v,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 t(p,{key:"855c5f20dcd893a3f7c2e9766f70585c5d563061",class:l(s,{[k]:!0,"has-focus":u,[`input-otp-size-${w}`]:!0,[`input-otp-shape-${x}`]:!0,[`input-otp-fill-${c}`]:!0,"input-otp-disabled":e,"input-otp-readonly":b})},t("div",Object.assign({key:"ed94b672ec5a65cc0a5f3e297859b3f7dfd4bdd8",role:"group","aria-label":"One-time password input",class:"input-otp-group"},h),Array.from({length:f}).map(((i,o)=>t(n,null,t("div",{class:"native-wrapper"},t("input",{class:"native-input",id:`${g}-${o}`,"aria-label":`Input ${o+1} of ${f}`,type:"text",autoCapitalize:r,inputmode:y,maxLength:1,pattern:I,disabled:e,readOnly:b,tabIndex:o===z?0:-1,value:m[o]||"",autocomplete:"one-time-code",ref:i=>v[o]=i,onInput:this.onInput(o),onBlur:this.onBlur,onFocus:this.onFocus(o),onKeyDown:this.onKeyDown(o),onPaste:this.onPaste})),this.showSeparator(o)&&t("div",{class:"input-otp-separator"}))))),t("div",{key:"a6f973cd35e4422b686ce98a5059cabffca3ef94",class:{"input-otp-description":!0,"input-otp-description-hidden":!$}},t("slot",{key:"cb6e540faa67f541580aa7302417bf3aba93c49b"})))}get el(){return r(this)}static get watchers(){return{value:["valueChanged"],separators:["processSeparators"],length:["processSeparators"]}}};let u=0;c.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{c as ion_input_otp}
|