{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm-es5/theme-18cbe2cc.js","webpack:///./node_modules/@ionic/core/dist/esm-es5/watch-options-2af96011.js","webpack:///./node_modules/@ionic/core/dist/esm-es5/ion-radio_2-md.entry.js"],"names":["hostContext","selector","el","closest","createColorClasses","color","_a","length","undefined","getClassMap","classes","map","Array","isArray","split","filter","c","trim","forEach","SCHEME","openURL","url","ev","direction","router","this","test","document","querySelector","preventDefault","push","watchForOptions","containerEl","tagName","onChange","mutation","MutationObserver","mutationList","getSelectedOption","observe","childList","subtree","newOption","mut","i","addedNodes","findCheckedOption","nodeType","toUpperCase","from","querySelectorAll","find","o","checked","Radio","prototype","colorChanged","emitStyle","checkedChanged","isChecked","ionSelect","emit","value","disabledChanged","componentWillLoad","inputId","ionStyle","disabled","render","_b","mode","labelId","label","id","onClick","role","class","Object","assign","type","onFocus","onBlur","defineProperty","get","enumerable","configurable","hostRef","_this","radioButtonIds","name","ionFocus","ionBlur","ionDeselect","RadioGroup","class_1","valueChanged","updateRadios","ionChange","connectedCallback","radio","header","componentOnReady","sent","mutationO","then","disconnectedCallback","disconnect","radios","hasChecked","_i","radios_1","getRadios","Promise","all","r","onIonSelect","onSelect","onIonDeselect","allowEmptySelection","onDeselect","radioGroupIds","selectedRadio","target"],"mappings":"+FAAA,gJACIA,EAAc,SAAUC,EAAUC,GAClC,OAAgC,OAAzBA,EAAGC,QAAQF,CAAQ,CAC9B,EAIIG,EAAqB,SAAUC,GAC/B,IAAIC,EACJ,MAAyB,UAAjB,OAAOD,GAAqC,EAAfA,EAAME,SAAeD,EAAK,CACvD,YAAa,EACjB,GACG,aAAeD,GAAS,GAC3BC,GAAME,MACd,EAWIC,EAAc,SAAUC,GACxB,IAAIC,EAAM,GAEV,OAZgBH,UADSE,EAYZA,IAVGE,MAAMC,QAAQH,CAAO,EAAIA,EAAUA,EAAQI,MAAM,GAAG,GAE3DC,OAAO,SAAUC,GAAK,OAAY,MAALA,CAAW,CAAC,EACz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B7D,KAAKwC,QAAU,UAAYuD,CAAa,GACxC/F,KAAK8C,QAAU9C,KAAKwC,QAAU,OAI9BxC,KAAK6F,oBAAsB,GAI3B7F,KAAKgE,KAAOhE,KAAKwC,QACjBxC,KAAK2F,SAAW,SAAU9F,GAClBmG,EAAgBnG,EAAGoG,OACnBD,IACAlC,EAAMzB,MAAQ2D,EAAc3D,MAEpC,EACArC,KAAK8F,WAAa,SAAUjG,GACpBmG,EAAgBnG,EAAGoG,OACnBD,IACAA,EAAcpE,QAAU,GACxBkC,EAAMzB,MAAQtD,OAEtB,EACAiB,KAAKwE,UAAY,YAAYxE,KAAM,YAAa,CAAC,CACrD,CAgHJ,IAAI+F,EAAgB,C","file":"js/chunk-4c152a7f.b3734c32.js","sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nvar hostContext = function (selector, el) {\n return el.closest(selector) !== null;\n};\n/**\n * Create the mode and color classes for the component based on the classes passed in\n */\nvar createColorClasses = function (color) {\n var _a;\n return (typeof color === 'string' && color.length > 0) ? (_a = {\n 'ion-color': true\n },\n _a[\"ion-color-\" + color] = true,\n _a) : undefined;\n};\nvar getClassList = function (classes) {\n if (classes !== undefined) {\n var array = Array.isArray(classes) ? classes : classes.split(' ');\n return array\n .filter(function (c) { return c != null; })\n .map(function (c) { return c.trim(); })\n .filter(function (c) { return c !== ''; });\n }\n return [];\n};\nvar getClassMap = function (classes) {\n var map = {};\n getClassList(classes).forEach(function (c) { return map[c] = true; });\n return map;\n};\nvar SCHEME = /^[a-z][a-z0-9+\\-.]*:/;\nvar openURL = function (url, ev, direction) { return __awaiter(void 0, void 0, void 0, function () {\n var router;\n return __generator(this, function (_a) {\n if (url != null && url[0] !== '#' && !SCHEME.test(url)) {\n router = document.querySelector('ion-router');\n if (router) {\n if (ev != null) {\n ev.preventDefault();\n }\n return [2 /*return*/, router.push(url, direction)];\n }\n }\n return [2 /*return*/, false];\n });\n}); };\nexport { createColorClasses as c, getClassMap as g, hostContext as h, openURL as o };\n","var watchForOptions = function (containerEl, tagName, onChange) {\n var mutation = new MutationObserver(function (mutationList) {\n onChange(getSelectedOption(mutationList, tagName));\n });\n mutation.observe(containerEl, {\n childList: true,\n subtree: true\n });\n return mutation;\n};\nvar getSelectedOption = function (mutationList, tagName) {\n var newOption;\n mutationList.forEach(function (mut) {\n // tslint:disable-next-line: prefer-for-of\n for (var i = 0; i < mut.addedNodes.length; i++) {\n newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption;\n }\n });\n return newOption;\n};\nvar findCheckedOption = function (el, tagName) {\n if (el.nodeType !== 1) {\n return undefined;\n }\n var options = (el.tagName === tagName.toUpperCase())\n ? [el]\n : Array.from(el.querySelectorAll(tagName));\n return options.find(function (o) { return o.checked === true; });\n};\nexport { findCheckedOption as f, watchForOptions as w };\n","import { __awaiter, __generator } from \"tslib\";\nimport { r as registerInstance, d as createEvent, c as getIonMode, h, H as Host, e as getElement } from './core-feeeff0d.js';\nimport './config-3c7f3790.js';\nimport { f as findItemLabel } from './helpers-46f4a262.js';\nimport { c as createColorClasses, h as hostContext } from './theme-18cbe2cc.js';\nimport { f as findCheckedOption, w as watchForOptions } from './watch-options-2af96011.js';\nvar Radio = /** @class */ (function () {\n function Radio(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.inputId = \"ion-rb-\" + radioButtonIds++;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the user cannot interact with the radio.\n */\n this.disabled = false;\n /**\n * If `true`, the radio is selected.\n */\n this.checked = false;\n this.onFocus = function () {\n _this.ionFocus.emit();\n };\n this.onBlur = function () {\n _this.ionBlur.emit();\n };\n this.onClick = function () {\n if (_this.checked) {\n _this.ionDeselect.emit();\n }\n else {\n _this.checked = true;\n }\n };\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionSelect = createEvent(this, \"ionSelect\", 7);\n this.ionDeselect = createEvent(this, \"ionDeselect\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n }\n Radio.prototype.colorChanged = function () {\n this.emitStyle();\n };\n Radio.prototype.checkedChanged = function (isChecked) {\n if (isChecked) {\n this.ionSelect.emit({\n checked: true,\n value: this.value\n });\n }\n this.emitStyle();\n };\n Radio.prototype.disabledChanged = function () {\n this.emitStyle();\n };\n Radio.prototype.componentWillLoad = function () {\n if (this.value === undefined) {\n this.value = this.inputId;\n }\n this.emitStyle();\n };\n Radio.prototype.emitStyle = function () {\n this.ionStyle.emit({\n 'radio-checked': this.checked,\n 'interactive-disabled': this.disabled,\n });\n };\n Radio.prototype.render = function () {\n var _a;\n var _b = this, inputId = _b.inputId, disabled = _b.disabled, checked = _b.checked, color = _b.color, el = _b.el;\n var mode = getIonMode(this);\n var labelId = inputId + '-lbl';\n var label = findItemLabel(el);\n if (label) {\n label.id = labelId;\n }\n return (h(Host, { onClick: this.onClick, role: \"radio\", \"aria-disabled\": disabled ? 'true' : null, \"aria-checked\": \"\" + checked, \"aria-labelledby\": labelId, class: Object.assign(Object.assign({}, createColorClasses(color)), (_a = {}, _a[mode] = true, _a['in-item'] = hostContext('ion-item', el), _a['interactive'] = true, _a['radio-checked'] = checked, _a['radio-disabled'] = disabled, _a)) }, h(\"div\", { class: \"radio-icon\" }, h(\"div\", { class: \"radio-inner\" })), h(\"button\", { type: \"button\", onFocus: this.onFocus, onBlur: this.onBlur, disabled: disabled })));\n };\n Object.defineProperty(Radio.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Radio, \"watchers\", {\n get: function () {\n return {\n \"color\": [\"colorChanged\"],\n \"checked\": [\"checkedChanged\"],\n \"disabled\": [\"disabledChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Radio, \"style\", {\n get: function () { return \":host{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;contain:layout size style}.radio-icon,button{width:100%;height:100%}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}:host-context([dir=rtl]) button,[dir=rtl] button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--color:var(--ion-color-step-400,#999);--color-checked:var(--ion-color-primary,#3880ff);--border-width:2px;--border-style:solid;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:50%;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:50%;width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0,0,0);transform:scale3d(0,0,0);-webkit-transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}:host(.radio-disabled){opacity:.3}:host(.ion-focused) .radio-icon:after{border-radius:50%;left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint,#4c8dff);content:\\\"\\\";opacity:.2}:host-context([dir=rtl]).ion-focused .radio-icon:after,:host-context([dir=rtl]):host(.ion-focused) .radio-icon:after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}\"; },\n enumerable: true,\n configurable: true\n });\n return Radio;\n}());\nvar radioButtonIds = 0;\nvar RadioGroup = /** @class */ (function () {\n function class_1(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.inputId = \"ion-rg-\" + radioGroupIds++;\n this.labelId = this.inputId + \"-lbl\";\n /**\n * If `true`, the radios can be deselected.\n */\n this.allowEmptySelection = false;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n this.onSelect = function (ev) {\n var selectedRadio = ev.target;\n if (selectedRadio) {\n _this.value = selectedRadio.value;\n }\n };\n this.onDeselect = function (ev) {\n var selectedRadio = ev.target;\n if (selectedRadio) {\n selectedRadio.checked = false;\n _this.value = undefined;\n }\n };\n this.ionChange = createEvent(this, \"ionChange\", 7);\n }\n class_1.prototype.valueChanged = function (value) {\n this.updateRadios();\n this.ionChange.emit({ value: value });\n };\n class_1.prototype.connectedCallback = function () {\n return __awaiter(this, void 0, void 0, function () {\n var el, header, label, radio;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n el = this.el;\n header = el.querySelector('ion-list-header') || el.querySelector('ion-item-divider');\n if (header) {\n label = header.querySelector('ion-label');\n if (label) {\n this.labelId = label.id = this.name + '-lbl';\n }\n }\n if (!(this.value === undefined)) return [3 /*break*/, 2];\n radio = findCheckedOption(el, 'ion-radio');\n if (!(radio !== undefined)) return [3 /*break*/, 2];\n return [4 /*yield*/, radio.componentOnReady()];\n case 1:\n _a.sent();\n if (this.value === undefined) {\n this.value = radio.value;\n }\n _a.label = 2;\n case 2:\n this.mutationO = watchForOptions(el, 'ion-radio', function (newOption) {\n if (newOption !== undefined) {\n newOption.componentOnReady().then(function () {\n _this.value = newOption.value;\n });\n }\n else {\n _this.updateRadios();\n }\n });\n this.updateRadios();\n return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.disconnectedCallback = function () {\n if (this.mutationO) {\n this.mutationO.disconnect();\n this.mutationO = undefined;\n }\n };\n class_1.prototype.updateRadios = function () {\n return __awaiter(this, void 0, void 0, function () {\n var radios, value, hasChecked, _i, radios_1, radio;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.getRadios()];\n case 1:\n radios = _a.sent();\n value = this.value;\n hasChecked = false;\n // Walk the DOM in reverse order, since the last selected one wins!\n for (_i = 0, radios_1 = radios; _i < radios_1.length; _i++) {\n radio = radios_1[_i];\n if (!hasChecked && radio.value === value) {\n // correct value for this radio\n // but this radio isn't checked yet\n // and we haven't found a checked yet\n hasChecked = true;\n radio.checked = true;\n }\n else {\n // this radio doesn't have the correct value\n // or the radio group has been already checked\n radio.checked = false;\n }\n }\n // Reset value if\n if (!hasChecked) {\n this.value = undefined;\n }\n return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.getRadios = function () {\n return Promise.all(Array\n .from(this.el.querySelectorAll('ion-radio'))\n .map(function (r) { return r.componentOnReady(); }));\n };\n class_1.prototype.render = function () {\n return (h(Host, { role: \"radiogroup\", \"aria-labelledby\": this.labelId, onIonSelect: this.onSelect, onIonDeselect: this.allowEmptySelection ? this.onDeselect : undefined, class: getIonMode(this) }));\n };\n Object.defineProperty(class_1.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1, \"watchers\", {\n get: function () {\n return {\n \"value\": [\"valueChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n return class_1;\n}());\nvar radioGroupIds = 0;\nexport { Radio as ion_radio, RadioGroup as ion_radio_group };\n"],"sourceRoot":""}