1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"ast":null,"code":"import _asyncToGenerator from \"D:/MobileDev/WRB/WrenchBoard2023a/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n\n/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { c as componentOnReady } from './helpers-4d272360.js';\n\nconst attachComponent = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (delegate, container, component, cssClasses, componentProps, inline) {\n var _a;\n\n if (delegate) {\n return delegate.attachViewToDom(container, component, componentProps, cssClasses);\n }\n\n if (!inline && typeof component !== 'string' && !(component instanceof HTMLElement)) {\n throw new Error('framework delegate is missing');\n }\n\n const el = typeof component === 'string' ? (_a = container.ownerDocument) === null || _a === void 0 ? void 0 : _a.createElement(component) : component;\n\n if (cssClasses) {\n cssClasses.forEach(c => el.classList.add(c));\n }\n\n if (componentProps) {\n Object.assign(el, componentProps);\n }\n\n container.appendChild(el);\n yield new Promise(resolve => componentOnReady(el, resolve));\n return el;\n });\n\n return function attachComponent(_x, _x2, _x3, _x4, _x5, _x6) {\n return _ref.apply(this, arguments);\n };\n}();\n\nconst detachComponent = (delegate, element) => {\n if (element) {\n if (delegate) {\n const container = element.parentElement;\n return delegate.removeViewFromDom(container, element);\n }\n\n element.remove();\n }\n\n return Promise.resolve();\n};\n\nconst CoreDelegate = () => {\n let BaseComponent;\n let Reference;\n\n const attachViewToDom = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(function* (parentElement, userComponent, userComponentProps = {}, cssClasses = []) {\n var _a, _b;\n\n BaseComponent = parentElement;\n /**\n * If passing in a component via the `component` props\n * we need to append it inside of our overlay component.\n */\n\n if (userComponent) {\n /**\n * If passing in the tag name, create\n * the element otherwise just get a reference\n * to the component.\n */\n const el = typeof userComponent === 'string' ? (_a = BaseComponent.ownerDocument) === null || _a === void 0 ? void 0 : _a.createElement(userComponent) : userComponent;\n /**\n * Add any css classes passed in\n * via the cssClasses prop on the overlay.\n */\n\n cssClasses.forEach(c => el.classList.add(c));\n /**\n * Add any props passed in\n * via the componentProps prop on the overlay.\n */\n\n Object.assign(el, userComponentProps);\n /**\n * Finally, append the component\n * inside of the overlay component.\n */\n\n BaseComponent.appendChild(el);\n yield new Promise(resolve => componentOnReady(el, resolve));\n } else if (BaseComponent.children.length > 0) {\n // If there is no component, then we need to create a new parent\n // element to apply the css classes to.\n const el = (_b = BaseComponent.ownerDocument) === null || _b === void 0 ? void 0 : _b.createElement('div');\n cssClasses.forEach(c => el.classList.add(c)); // Move each child from the original template to the new parent element.\n\n el.append(...BaseComponent.children); // Append the new parent element to the original parent element.\n\n BaseComponent.appendChild(el);\n }\n /**\n * Get the root of the app and\n * add the overlay there.\n */\n\n\n const app = document.querySelector('ion-app') || document.body;\n /**\n * Create a placeholder comment so that\n * we can return this component to where\n * it was previously.\n */\n\n Reference = document.createComment('ionic teleport');\n BaseComponent.parentNode.insertBefore(Reference, BaseComponent);\n app.appendChild(BaseComponent);\n return BaseComponent;\n });\n\n return function attachViewToDom(_x7, _x8) {\n return _ref2.apply(this, arguments);\n };\n }();\n\n const removeViewFromDom = () => {\n /**\n * Return component to where it was previously in the DOM.\n */\n if (BaseComponent && Reference) {\n Reference.parentNode.insertBefore(BaseComponent, Reference);\n Reference.remove();\n }\n\n return Promise.resolve();\n };\n\n return {\n attachViewToDom,\n removeViewFromDom\n };\n};\n\nexport { CoreDelegate as C, attachComponent as a, detachComponent as d };","map":{"version":3,"names":["c","componentOnReady","attachComponent","delegate","container","component","cssClasses","componentProps","inline","_a","attachViewToDom","HTMLElement","Error","el","ownerDocument","createElement","forEach","classList","add","Object","assign","appendChild","Promise","resolve","detachComponent","element","parentElement","removeViewFromDom","remove","CoreDelegate","BaseComponent","Reference","userComponent","userComponentProps","_b","children","length","append","app","document","querySelector","body","createComment","parentNode","insertBefore","C","a","d"],"sources":["D:/MobileDev/WRB/WrenchBoard2023a/node_modules/@ionic/core/dist/esm/framework-delegate-ce4f806c.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { c as componentOnReady } from './helpers-4d272360.js';\n\nconst attachComponent = async (delegate, container, component, cssClasses, componentProps, inline) => {\n var _a;\n if (delegate) {\n return delegate.attachViewToDom(container, component, componentProps, cssClasses);\n }\n if (!inline && typeof component !== 'string' && !(component instanceof HTMLElement)) {\n throw new Error('framework delegate is missing');\n }\n const el = typeof component === 'string' ? (_a = container.ownerDocument) === null || _a === void 0 ? void 0 : _a.createElement(component) : component;\n if (cssClasses) {\n cssClasses.forEach((c) => el.classList.add(c));\n }\n if (componentProps) {\n Object.assign(el, componentProps);\n }\n container.appendChild(el);\n await new Promise((resolve) => componentOnReady(el, resolve));\n return el;\n};\nconst detachComponent = (delegate, element) => {\n if (element) {\n if (delegate) {\n const container = element.parentElement;\n return delegate.removeViewFromDom(container, element);\n }\n element.remove();\n }\n return Promise.resolve();\n};\nconst CoreDelegate = () => {\n let BaseComponent;\n let Reference;\n const attachViewToDom = async (parentElement, userComponent, userComponentProps = {}, cssClasses = []) => {\n var _a, _b;\n BaseComponent = parentElement;\n /**\n * If passing in a component via the `component` props\n * we need to append it inside of our overlay component.\n */\n if (userComponent) {\n /**\n * If passing in the tag name, create\n * the element otherwise just get a reference\n * to the component.\n */\n const el = typeof userComponent === 'string' ? (_a = BaseComponent.ownerDocument) === null || _a === void 0 ? void 0 : _a.createElement(userComponent) : userComponent;\n /**\n * Add any css classes passed in\n * via the cssClasses prop on the overlay.\n */\n cssClasses.forEach((c) => el.classList.add(c));\n /**\n * Add any props passed in\n * via the componentProps prop on the overlay.\n */\n Object.assign(el, userComponentProps);\n /**\n * Finally, append the component\n * inside of the overlay component.\n */\n BaseComponent.appendChild(el);\n await new Promise((resolve) => componentOnReady(el, resolve));\n }\n else if (BaseComponent.children.length > 0) {\n // If there is no component, then we need to create a new parent\n // element to apply the css classes to.\n const el = (_b = BaseComponent.ownerDocument) === null || _b === void 0 ? void 0 : _b.createElement('div');\n cssClasses.forEach((c) => el.classList.add(c));\n // Move each child from the original template to the new parent element.\n el.append(...BaseComponent.children);\n // Append the new parent element to the original parent element.\n BaseComponent.appendChild(el);\n }\n /**\n * Get the root of the app and\n * add the overlay there.\n */\n const app = document.querySelector('ion-app') || document.body;\n /**\n * Create a placeholder comment so that\n * we can return this component to where\n * it was previously.\n */\n Reference = document.createComment('ionic teleport');\n BaseComponent.parentNode.insertBefore(Reference, BaseComponent);\n app.appendChild(BaseComponent);\n return BaseComponent;\n };\n const removeViewFromDom = () => {\n /**\n * Return component to where it was previously in the DOM.\n */\n if (BaseComponent && Reference) {\n Reference.parentNode.insertBefore(BaseComponent, Reference);\n Reference.remove();\n }\n return Promise.resolve();\n };\n return { attachViewToDom, removeViewFromDom };\n};\n\nexport { CoreDelegate as C, attachComponent as a, detachComponent as d };\n"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,CAAC,IAAIC,gBAAd,QAAsC,uBAAtC;;AAEA,MAAMC,eAAe;EAAA,6BAAG,WAAOC,QAAP,EAAiBC,SAAjB,EAA4BC,SAA5B,EAAuCC,UAAvC,EAAmDC,cAAnD,EAAmEC,MAAnE,EAA8E;IACpG,IAAIC,EAAJ;;IACA,IAAIN,QAAJ,EAAc;MACZ,OAAOA,QAAQ,CAACO,eAAT,CAAyBN,SAAzB,EAAoCC,SAApC,EAA+CE,cAA/C,EAA+DD,UAA/D,CAAP;IACD;;IACD,IAAI,CAACE,MAAD,IAAW,OAAOH,SAAP,KAAqB,QAAhC,IAA4C,EAAEA,SAAS,YAAYM,WAAvB,CAAhD,EAAqF;MACnF,MAAM,IAAIC,KAAJ,CAAU,+BAAV,CAAN;IACD;;IACD,MAAMC,EAAE,GAAG,OAAOR,SAAP,KAAqB,QAArB,GAAgC,CAACI,EAAE,GAAGL,SAAS,CAACU,aAAhB,MAAmC,IAAnC,IAA2CL,EAAE,KAAK,KAAK,CAAvD,GAA2D,KAAK,CAAhE,GAAoEA,EAAE,CAACM,aAAH,CAAiBV,SAAjB,CAApG,GAAkIA,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