{"version":3,"sources":["webpack:///./node_modules/@ionic/vue/node_modules/@ionic/core/dist/esm-es5/ion-item-option_3-md.entry.js","webpack:///./node_modules/@ionic/vue/node_modules/@ionic/core/dist/esm-es5/theme-18cbe2cc.js"],"names":["openSlidingItem","ItemOption","hostRef","this","disabled","expandable","type","onClick","ev","el","target","closest","preventDefault","prototype","render","_a","_b","href","TagType","undefined","mode","attrs","download","class","Object","assign","color","name","defineProperty","get","enumerable","configurable","ItemOptions","class_1","side","ionSwipe","fireSwipeEvent","emit","isEnd","SWIPE_MARGIN","ELASTIC_FACTOR","ItemSliding","class_2","item","openAmount","initialOpenAmount","optsWidthRightSide","optsWidthLeftSide","sides","optsDirty","state","ionDrag","disabledChanged","gesture","setDisabled","connectedCallback","_this","label","querySelector","updateOptions","sent","createGesture","gestureName","gesturePriority","threshold","canStart","onStart","onMove","onEnd","disconnectedCallback","destroy","leftOptions","rightOptions","getOpenAmount","Promise","resolve","getSlidingRatio","getSlidingRatioSync","open","optionsToOpen","isStartOpen","isEndOpen","getOptions","closeOpened","requestAnimationFrame","calculateOptsWidth","width","setOpenAmount","close","options","i","option","querySelectorAll","length","componentOnReady","selected","tmr","clearTimeout","style","transition","optsWidth","deltaX","Math","max","min","console","warn","velocity","velocityX","restingPoint","isResetDirection","isMovingFast","abs","isOnCloseZone","swipeShouldReset","display","offsetWidth","isFinal","setTimeout","transform","amount","ratio","isOnResetZone","hostContext","selector","createColorClasses","getClassList","classes","array","Array","isArray","split","filter","c","map","trim","getClassMap","forEach","SCHEME","openURL","url","direction","router","test","document","push"],"mappings":"gHAAA,6JAoGIA,EApGJ,4DAKIC,EAA4B,WAC5B,SAASA,EAAWC,GAChB,eAAiBC,KAAMD,GAIvBC,KAAKC,UAAW,EAIhBD,KAAKE,YAAa,EAIlBF,KAAKG,KAAO,SACZH,KAAKI,QAAU,SAAUC,GACrB,IAAIC,EAAKD,EAAGE,OAAOC,QAAQ,mBACvBF,GACAD,EAAGI,kBA4Bf,OAxBAX,EA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C,cAAc,IAElBP,OAAOI,eAAec,EAAS,QAAS,CACpCb,IAAK,WAAc,MAAO,u/CAC1BC,YAAY,EACZC,cAAc,IAEXW,EA7XqB,GA+X5BwE,EAAmB,SAAUJ,EAAkBC,EAAcW,GAe7D,OAASX,GAAgBW,GAAmBZ,GAAoBC,I,oCCnfpE,wJACIY,EAAc,SAAUC,EAAUnH,GAClC,OAAgC,OAAzBA,EAAGE,QAAQiH,IAKlBC,EAAqB,SAAUnG,GAC/B,IAAIX,EACJ,MAAyB,kBAAVW,GAAsBA,EAAMmE,OAAS,GAAM9E,EAAK,CACvD,aAAa,GAEjBA,EAAG,aAAeW,IAAS,EAC3BX,QAAMI,GAEV2G,EAAe,SAAUC,GACzB,QAAgB5G,IAAZ4G,EAAuB,CACvB,IAAIC,EAAQC,MAAMC,QAAQH,GAAWA,EAAUA,EAAQI,MAAM,KAC7D,OAAOH,EACFI,QAAO,SAAUC,GAAK,OAAY,MAALA,KAC7BC,KAAI,SAAUD,GAAK,OAAOA,EAAEE,UAC5BH,QAAO,SAAUC,GAAK,MAAa,KAANA,KAEtC,MAAO,IAEPG,EAAc,SAAUT,GACxB,IAAIO,EAAM,GAEV,OADAR,EAAaC,GAASU,SAAQ,SAAUJ,GAAK,OAAOC,EAAID,IAAK,KACtDC,GAEPI,EAAS,uBACTC,EAAU,SAAUC,EAAKpI,EAAIqI,GAAa,OAAO,oBAAU,OAAQ,OAAQ,GAAQ,WACnF,IAAIC,EACJ,OAAO,eAAY3I,MAAM,SAAUY,GAC/B,OAAW,MAAP6H,GAA0B,MAAXA,EAAI,KAAeF,EAAOK,KAAKH,KAC9CE,EAASE,SAAStF,cAAc,cAC5BoF,IACU,MAANtI,GACAA,EAAGI,iBAEA,CAAC,EAAckI,EAAOG,KAAKL,EAAKC,KAGxC,CAAC,GAAc","file":"js/chunk-658c23da.c4793ed7.js","sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nimport { r as registerInstance, c as getIonMode, h, H as Host, e as getElement, d as createEvent } from './core-feeeff0d.js';\nimport './config-3c7f3790.js';\nimport { i as isEndSide } from './helpers-46f4a262.js';\nimport { c as createColorClasses } from './theme-18cbe2cc.js';\nvar ItemOption = /** @class */ (function () {\n function ItemOption(hostRef) {\n registerInstance(this, hostRef);\n /**\n * If `true`, the user cannot interact with the item option.\n */\n this.disabled = false;\n /**\n * If `true`, the option will expand to take up the available width and cover any other options.\n */\n this.expandable = false;\n /**\n * The type of the button.\n */\n this.type = 'button';\n this.onClick = function (ev) {\n var el = ev.target.closest('ion-item-option');\n if (el) {\n ev.preventDefault();\n }\n };\n }\n ItemOption.prototype.render = function () {\n var _a;\n var _b = this, disabled = _b.disabled, expandable = _b.expandable, href = _b.href;\n var TagType = href === undefined ? 'button' : 'a';\n var mode = getIonMode(this);\n var attrs = (TagType === 'button')\n ? { type: this.type }\n : {\n download: this.download,\n href: this.href,\n target: this.target\n };\n return (h(Host, { onClick: this.onClick, class: Object.assign(Object.assign({}, createColorClasses(this.color)), (_a = {}, _a[mode] = true, _a['item-option-disabled'] = disabled, _a['item-option-expandable'] = expandable, _a['ion-activatable'] = true, _a)) }, h(TagType, Object.assign({}, attrs, { class: \"button-native\", disabled: disabled }), h(\"span\", { class: \"button-inner\" }, h(\"slot\", { name: \"top\" }), h(\"div\", { class: \"horizontal-wrapper\" }, h(\"slot\", { name: \"start\" }), h(\"slot\", { name: \"icon-only\" }), h(\"slot\", null), h(\"slot\", { name: \"end\" })), h(\"slot\", { name: \"bottom\" })), mode === 'md' && h(\"ion-ripple-effect\", null))));\n };\n Object.defineProperty(ItemOption.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ItemOption, \"style\", {\n get: function () { return \":host{--background:var(--ion-color-primary,#3880ff);--color:var(--ion-color-primary-contrast,#fff);background:var(--background);color:var(--color);font-family:var(--ion-font-family,inherit)}:host(.in-list.item-options-end:last-child){padding-right:calc(.7em + var(--ion-safe-area-right))}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-list.item-options-end:last-child){padding-right:unset;-webkit-padding-end:calc(.7em + var(--ion-safe-area-right));padding-inline-end:calc(.7em + var(--ion-safe-area-right))}}:host(.in-list.item-options-start:first-child){padding-left:calc(.7em + var(--ion-safe-area-left))}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-list.item-options-start:first-child){padding-left:unset;-webkit-padding-start:calc(.7em + var(--ion-safe-area-left));padding-inline-start:calc(.7em + var(--ion-safe-area-left))}}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.button-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:.7em;padding-right:.7em;padding-top:0;padding-bottom:0;display:inline-block;position:relative;width:100%;height:100%;border:0;outline:none;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:.7em;padding-inline-start:.7em;-webkit-padding-end:.7em;padding-inline-end:.7em}}.button-inner{-ms-flex-flow:column nowrap;flex-flow:column nowrap;height:100%}.button-inner,.horizontal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%}.horizontal-wrapper{-ms-flex-flow:row nowrap;flex-flow:row nowrap}::slotted(*){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]){margin-left:0;margin-right:5px;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:5px;margin-inline-end:5px}}::slotted([slot=end]){margin-left:5px;margin-right:0;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:0;margin-inline-end:0}}::slotted([slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:10px;margin-right:10px;margin-top:0;margin-bottom:0;min-width:.9em;font-size:1.8em}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=icon-only]){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}:host(.item-option-expandable){-ms-flex-negative:0;flex-shrink:0;-webkit-transition-duration:0;transition-duration:0;-webkit-transition-property:none;transition-property:none;-webkit-transition-timing-function:cubic-bezier(.65,.05,.36,1);transition-timing-function:cubic-bezier(.65,.05,.36,1)}:host(.item-option-disabled){pointer-events:none}:host(.item-option-disabled) .button-native{cursor:default;opacity:.5;pointer-events:none}:host{font-size:14px;font-weight:500;text-transform:uppercase}\"; },\n enumerable: true,\n configurable: true\n });\n return ItemOption;\n}());\nvar ItemOptions = /** @class */ (function () {\n function class_1(hostRef) {\n registerInstance(this, hostRef);\n /**\n * The side the option button should be on. Possible values: `\"start\"` and `\"end\"`. If you have multiple `ion-item-options`, a side must be provided for each.\n *\n */\n this.side = 'end';\n this.ionSwipe = createEvent(this, \"ionSwipe\", 7);\n }\n /** @internal */\n class_1.prototype.fireSwipeEvent = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.ionSwipe.emit({\n side: this.side\n });\n return [2 /*return*/];\n });\n });\n };\n class_1.prototype.render = function () {\n var _a;\n var mode = getIonMode(this);\n var isEnd = isEndSide(this.side);\n return (h(Host, { class: (_a = {},\n _a[mode] = true,\n // Used internally for styling\n _a[\"item-options-\" + mode] = true,\n _a['item-options-start'] = !isEnd,\n _a['item-options-end'] = isEnd,\n _a) }));\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, \"style\", {\n get: function () { return \"ion-item-options{top:0;right:0;-ms-flex-pack:end;justify-content:flex-end;display:none;position:absolute;height:100%;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}:host-context([dir=rtl]) ion-item-options,[dir=rtl] ion-item-options{-ms-flex-pack:start;justify-content:flex-start}:host-context([dir=rtl]) ion-item-options:not(.item-options-end),[dir=rtl] ion-item-options:not(.item-options-end){right:auto;left:0;-ms-flex-pack:end;justify-content:flex-end}.item-options-start{right:auto;left:0;-ms-flex-pack:start;justify-content:flex-start}:host-context([dir=rtl]) .item-options-start,[dir=rtl] .item-options-start{-ms-flex-pack:end;justify-content:flex-end}.item-options-start ion-item-option:first-child{padding-right:var(--ion-safe-area-left)}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.item-options-start ion-item-option:first-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-left);padding-inline-end:var(--ion-safe-area-left)}}.item-options-end ion-item-option:last-child{padding-right:var(--ion-safe-area-right)}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.item-options-end ion-item-option:last-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}:host-context([dir=rtl]) .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end),[dir=rtl] .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end){width:100%;visibility:visible}.item-sliding-active-slide ion-item-options{display:-ms-flexbox;display:flex;visibility:hidden}.item-sliding-active-slide.item-sliding-active-options-end ion-item-options:not(.item-options-start),.item-sliding-active-slide.item-sliding-active-options-start .item-options-start{width:100%;visibility:visible}.item-options-md{border-bottom-style:solid;border-bottom-color:var(--ion-item-border-color,var(--ion-border-color,var(--ion-color-step-150,rgba(0,0,0,.13))))}.item-options-md,.list-md-lines-none .item-options-md{border-bottom-width:0}.list-md-lines-full .item-options-md,.list-md-lines-inset .item-options-md.item-options-end{border-bottom-width:1px}\"; },\n enumerable: true,\n configurable: true\n });\n return class_1;\n}());\nvar SWIPE_MARGIN = 30;\nvar ELASTIC_FACTOR = 0.55;\nvar openSlidingItem;\nvar ItemSliding = /** @class */ (function () {\n function class_2(hostRef) {\n registerInstance(this, hostRef);\n this.item = null;\n this.openAmount = 0;\n this.initialOpenAmount = 0;\n this.optsWidthRightSide = 0;\n this.optsWidthLeftSide = 0;\n this.sides = 0 /* None */;\n this.optsDirty = true;\n this.state = 2 /* Disabled */;\n /**\n * If `true`, the user cannot interact with the sliding item.\n */\n this.disabled = false;\n this.ionDrag = createEvent(this, \"ionDrag\", 7);\n }\n class_2.prototype.disabledChanged = function () {\n if (this.gesture) {\n this.gesture.setDisabled(this.disabled);\n }\n };\n class_2.prototype.connectedCallback = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n this.item = this.el.querySelector('ion-item');\n return [4 /*yield*/, this.updateOptions()];\n case 1:\n _b.sent();\n _a = this;\n return [4 /*yield*/, import('./index-624eea58.js')];\n case 2:\n _a.gesture = (_b.sent()).createGesture({\n el: this.el,\n gestureName: 'item-swipe',\n gesturePriority: 100,\n threshold: 5,\n canStart: function () { return _this.canStart(); },\n onStart: function () { return _this.onStart(); },\n onMove: function (ev) { return _this.onMove(ev); },\n onEnd: function (ev) { return _this.onEnd(ev); },\n });\n this.disabledChanged();\n return [2 /*return*/];\n }\n });\n });\n };\n class_2.prototype.disconnectedCallback = function () {\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n this.item = null;\n this.leftOptions = this.rightOptions = undefined;\n if (openSlidingItem === this.el) {\n openSlidingItem = undefined;\n }\n };\n /**\n * Get the amount the item is open in pixels.\n */\n class_2.prototype.getOpenAmount = function () {\n return Promise.resolve(this.openAmount);\n };\n /**\n * Get the ratio of the open amount of the item compared to the width of the options.\n * If the number returned is positive, then the options on the right side are open.\n * If the number returned is negative, then the options on the left side are open.\n * If the absolute value of the number is greater than 1, the item is open more than\n * the width of the options.\n */\n class_2.prototype.getSlidingRatio = function () {\n return Promise.resolve(this.getSlidingRatioSync());\n };\n /**\n * Open the sliding item.\n *\n * @param side The side of the options to open. If a side is not provided, it will open the first set of options it finds within the item.\n */\n class_2.prototype.open = function (side) {\n return __awaiter(this, void 0, void 0, function () {\n var optionsToOpen, isStartOpen, isEndOpen;\n var _this = this;\n return __generator(this, function (_a) {\n if (this.item === null) {\n return [2 /*return*/];\n }\n optionsToOpen = this.getOptions(side);\n if (!optionsToOpen) {\n return [2 /*return*/];\n }\n /**\n * If side is not set, we need to infer the side\n * so we know which direction to move the options\n */\n if (side === undefined) {\n side = (optionsToOpen === this.leftOptions) ? 'start' : 'end';\n }\n // In RTL we want to switch the sides\n side = isEndSide(side) ? 'end' : 'start';\n isStartOpen = this.openAmount < 0;\n isEndOpen = this.openAmount > 0;\n /**\n * If a side is open and a user tries to\n * re-open the same side, we should not do anything\n */\n if (isStartOpen && optionsToOpen === this.leftOptions) {\n return [2 /*return*/];\n }\n if (isEndOpen && optionsToOpen === this.rightOptions) {\n return [2 /*return*/];\n }\n this.closeOpened();\n this.state = 4 /* Enabled */;\n requestAnimationFrame(function () {\n _this.calculateOptsWidth();\n var width = (side === 'end') ? _this.optsWidthRightSide : -_this.optsWidthLeftSide;\n openSlidingItem = _this.el;\n _this.setOpenAmount(width, false);\n _this.state = (side === 'end') ? 8 /* End */ : 16 /* Start */;\n });\n return [2 /*return*/];\n });\n });\n };\n /**\n * Close the sliding item. Items can also be closed from the [List](../../list/List).\n */\n class_2.prototype.close = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.setOpenAmount(0, true);\n return [2 /*return*/];\n });\n });\n };\n /**\n * Close all of the sliding items in the list. Items can also be closed from the [List](../../list/List).\n */\n class_2.prototype.closeOpened = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (openSlidingItem !== undefined) {\n openSlidingItem.close();\n openSlidingItem = undefined;\n return [2 /*return*/, true];\n }\n return [2 /*return*/, false];\n });\n });\n };\n /**\n * Given an optional side, return the ion-item-options element.\n *\n * @param side This side of the options to get. If a side is not provided it will\n * return the first one available.\n */\n class_2.prototype.getOptions = function (side) {\n if (side === undefined) {\n return this.leftOptions || this.rightOptions;\n }\n else if (side === 'start') {\n return this.leftOptions;\n }\n else {\n return this.rightOptions;\n }\n };\n class_2.prototype.updateOptions = function () {\n return __awaiter(this, void 0, void 0, function () {\n var options, sides, i, option, side;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n options = this.el.querySelectorAll('ion-item-options');\n sides = 0;\n // Reset left and right options in case they were removed\n this.leftOptions = this.rightOptions = undefined;\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < options.length)) return [3 /*break*/, 4];\n return [4 /*yield*/, options.item(i).componentOnReady()];\n case 2:\n option = _a.sent();\n side = isEndSide(option.side) ? 'end' : 'start';\n if (side === 'start') {\n this.leftOptions = option;\n sides |= 1 /* Start */;\n }\n else {\n this.rightOptions = option;\n sides |= 2 /* End */;\n }\n _a.label = 3;\n case 3:\n i++;\n return [3 /*break*/, 1];\n case 4:\n this.optsDirty = true;\n this.sides = sides;\n return [2 /*return*/];\n }\n });\n });\n };\n class_2.prototype.canStart = function () {\n var selected = openSlidingItem;\n if (selected && selected !== this.el) {\n this.closeOpened();\n return false;\n }\n return !!(this.rightOptions || this.leftOptions);\n };\n class_2.prototype.onStart = function () {\n openSlidingItem = this.el;\n if (this.tmr !== undefined) {\n clearTimeout(this.tmr);\n this.tmr = undefined;\n }\n if (this.openAmount === 0) {\n this.optsDirty = true;\n this.state = 4 /* Enabled */;\n }\n this.initialOpenAmount = this.openAmount;\n if (this.item) {\n this.item.style.transition = 'none';\n }\n };\n class_2.prototype.onMove = function (gesture) {\n if (this.optsDirty) {\n this.calculateOptsWidth();\n }\n var openAmount = this.initialOpenAmount - gesture.deltaX;\n switch (this.sides) {\n case 2 /* End */:\n openAmount = Math.max(0, openAmount);\n break;\n case 1 /* Start */:\n openAmount = Math.min(0, openAmount);\n break;\n case 3 /* Both */: break;\n case 0 /* None */: return;\n default:\n console.warn('invalid ItemSideFlags value', this.sides);\n break;\n }\n var optsWidth;\n if (openAmount > this.optsWidthRightSide) {\n optsWidth = this.optsWidthRightSide;\n openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;\n }\n else if (openAmount < -this.optsWidthLeftSide) {\n optsWidth = -this.optsWidthLeftSide;\n openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;\n }\n this.setOpenAmount(openAmount, false);\n };\n class_2.prototype.onEnd = function (gesture) {\n var velocity = gesture.velocityX;\n var restingPoint = (this.openAmount > 0)\n ? this.optsWidthRightSide\n : -this.optsWidthLeftSide;\n // Check if the drag didn't clear the buttons mid-point\n // and we aren't moving fast enough to swipe open\n var isResetDirection = (this.openAmount > 0) === !(velocity < 0);\n var isMovingFast = Math.abs(velocity) > 0.3;\n var isOnCloseZone = Math.abs(this.openAmount) < Math.abs(restingPoint / 2);\n if (swipeShouldReset(isResetDirection, isMovingFast, isOnCloseZone)) {\n restingPoint = 0;\n }\n var state = this.state;\n this.setOpenAmount(restingPoint, true);\n if ((state & 32 /* SwipeEnd */) !== 0 && this.rightOptions) {\n this.rightOptions.fireSwipeEvent();\n }\n else if ((state & 64 /* SwipeStart */) !== 0 && this.leftOptions) {\n this.leftOptions.fireSwipeEvent();\n }\n };\n class_2.prototype.calculateOptsWidth = function () {\n this.optsWidthRightSide = 0;\n if (this.rightOptions) {\n this.rightOptions.style.display = 'flex';\n this.optsWidthRightSide = this.rightOptions.offsetWidth;\n this.rightOptions.style.display = '';\n }\n this.optsWidthLeftSide = 0;\n if (this.leftOptions) {\n this.leftOptions.style.display = 'flex';\n this.optsWidthLeftSide = this.leftOptions.offsetWidth;\n this.leftOptions.style.display = '';\n }\n this.optsDirty = false;\n };\n class_2.prototype.setOpenAmount = function (openAmount, isFinal) {\n var _this = this;\n if (this.tmr !== undefined) {\n clearTimeout(this.tmr);\n this.tmr = undefined;\n }\n if (!this.item) {\n return;\n }\n var style = this.item.style;\n this.openAmount = openAmount;\n if (isFinal) {\n style.transition = '';\n }\n if (openAmount > 0) {\n this.state = (openAmount >= (this.optsWidthRightSide + SWIPE_MARGIN))\n ? 8 /* End */ | 32 /* SwipeEnd */\n : 8 /* End */;\n }\n else if (openAmount < 0) {\n this.state = (openAmount <= (-this.optsWidthLeftSide - SWIPE_MARGIN))\n ? 16 /* Start */ | 64 /* SwipeStart */\n : 16 /* Start */;\n }\n else {\n this.tmr = setTimeout(function () {\n _this.state = 2 /* Disabled */;\n _this.tmr = undefined;\n }, 600);\n openSlidingItem = undefined;\n style.transform = '';\n return;\n }\n style.transform = \"translate3d(\" + -openAmount + \"px,0,0)\";\n this.ionDrag.emit({\n amount: openAmount,\n ratio: this.getSlidingRatioSync()\n });\n };\n class_2.prototype.getSlidingRatioSync = function () {\n if (this.openAmount > 0) {\n return this.openAmount / this.optsWidthRightSide;\n }\n else if (this.openAmount < 0) {\n return this.openAmount / this.optsWidthLeftSide;\n }\n else {\n return 0;\n }\n };\n class_2.prototype.render = function () {\n var _a;\n var mode = getIonMode(this);\n return (h(Host, { class: (_a = {},\n _a[mode] = true,\n _a['item-sliding-active-slide'] = (this.state !== 2 /* Disabled */),\n _a['item-sliding-active-options-end'] = (this.state & 8 /* End */) !== 0,\n _a['item-sliding-active-options-start'] = (this.state & 16 /* Start */) !== 0,\n _a['item-sliding-active-swipe-end'] = (this.state & 32 /* SwipeEnd */) !== 0,\n _a['item-sliding-active-swipe-start'] = (this.state & 64 /* SwipeStart */) !== 0,\n _a) }));\n };\n Object.defineProperty(class_2.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_2, \"watchers\", {\n get: function () {\n return {\n \"disabled\": [\"disabledChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_2, \"style\", {\n get: function () { return \"ion-item-sliding{display:block;position:relative;width:100%;overflow:hidden}ion-item-sliding,ion-item-sliding .item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.item-sliding-active-slide .item{position:relative;-webkit-transition:-webkit-transform .5s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1),-webkit-transform .5s cubic-bezier(.36,.66,.04,1);opacity:1;z-index:2;pointer-events:none;will-change:transform}.item-sliding-active-swipe-end .item-options-end .item-option-expandable{padding-left:100%;-ms-flex-order:1;order:1;-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:padding-left;transition-property:padding-left}:host-context([dir=rtl]) .item-sliding-active-swipe-end .item-options-end .item-option-expandable,[dir=rtl] .item-sliding-active-swipe-end .item-options-end .item-option-expandable{-ms-flex-order:-1;order:-1}.item-sliding-active-swipe-start .item-options-start .item-option-expandable{padding-right:100%;-ms-flex-order:-1;order:-1;-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:padding-right;transition-property:padding-right}:host-context([dir=rtl]) .item-sliding-active-swipe-start .item-options-start .item-option-expandable,[dir=rtl] .item-sliding-active-swipe-start .item-options-start .item-option-expandable{-ms-flex-order:1;order:1}\"; },\n enumerable: true,\n configurable: true\n });\n return class_2;\n}());\nvar swipeShouldReset = function (isResetDirection, isMovingFast, isOnResetZone) {\n // The logic required to know when the sliding item should close (openAmount=0)\n // depends on three booleans (isResetDirection, isMovingFast, isOnResetZone)\n // and it ended up being too complicated to be written manually without errors\n // so the truth table is attached below: (0=false, 1=true)\n // isResetDirection | isMovingFast | isOnResetZone || shouldClose\n // 0 | 0 | 0 || 0\n // 0 | 0 | 1 || 1\n // 0 | 1 | 0 || 0\n // 0 | 1 | 1 || 0\n // 1 | 0 | 0 || 0\n // 1 | 0 | 1 || 1\n // 1 | 1 | 0 || 1\n // 1 | 1 | 1 || 1\n // The resulting expression was generated by resolving the K-map (Karnaugh map):\n return (!isMovingFast && isOnResetZone) || (isResetDirection && isMovingFast);\n};\nexport { ItemOption as ion_item_option, ItemOptions as ion_item_options, ItemSliding as ion_item_sliding };\n","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"],"sourceRoot":""}