@aquera/nile-elements 0.1.18 → 0.1.19
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/README.md +3 -0
- package/demo/index.html +111 -16
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- package/dist/nile-tour/nile-tour.cjs.js +2 -2
- package/dist/nile-tour/nile-tour.cjs.js.map +1 -1
- package/dist/nile-tour/nile-tour.css.cjs.js +1 -1
- package/dist/nile-tour/nile-tour.css.cjs.js.map +1 -1
- package/dist/nile-tour/nile-tour.css.esm.js +33 -19
- package/dist/nile-tour/nile-tour.esm.js +11 -2
- package/dist/src/nile-code-editor/nile-code-editor.js +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-tour/nile-tour.css.js +31 -17
- package/dist/src/nile-tour/nile-tour.css.js.map +1 -1
- package/dist/src/nile-tour/nile-tour.d.ts +6 -29
- package/dist/src/nile-tour/nile-tour.js +70 -76
- package/dist/src/nile-tour/nile-tour.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-code-editor/nile-code-editor.ts +1 -1
- package/src/nile-tour/nile-tour.css.ts +31 -17
- package/src/nile-tour/nile-tour.ts +86 -95
- package/vscode-html-custom-data.json +1 -5
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../lit-element-38060f1a.cjs.js","../css-tag-399d5ef3.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,
|
1
|
+
System.register(["../lit-element-38060f1a.cjs.js","../css-tag-399d5ef3.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,r;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_litElement001CjsJs){},function(_cssTag002CjsJs){o=_cssTag002CjsJs.i;}],execute:function execute(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .introjs-tooltip {\n background-color: var(--nile-tour-background-color, #1978b8);\n color: var(--nile-tour-text-color, #fff);\n width: 300px;\n max-width: 300px;\n border-radius: 12px;\n border: 1px solid var(--Neutral-30, #1978b8);\n background: var(--White-Normal, #1978b8);\n /* border: 1px solid var(--Neutral-30, #C7CED4); */\n\n /* Elevation/Lifted */\n box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);\n }\n\n .introjs-tooltip-title {\n color: var(--nile-colors-white-base);\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 16px;\n letter-spacing: 0.2px;\n }\n\n .introjs-tooltip-header {\n padding-left: 18px;\n padding-right: 18px;\n padding-top: 18px;\n }\n\n .introjs-progress {\n display: none;\n }\n\n .introjs-tooltiptext {\n color: #c7ced4;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.2px;\n padding: 15px 18px;\n }\n\n .introjs-arrow {\n width: 15px;\n height: 20px;\n background-image: url('data:image/svg+xml,%3Csvg width=\"15\" height=\"20\" viewBox=\"0 0 15 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M1.13333 11.6C0.0666661 10.8 0.0666662 9.2 1.13333 8.4L11.8 0.400001C13.1185 -0.588854 15 0.351909 15 2L15 18C15 19.6481 13.1185 20.5889 11.8 19.6L1.13333 11.6Z\" fill=\"%231978B8\"/%3E%3C/svg%3E');\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center;\n position: absolute;\n border: none;\n content: none;\n }\n\n .introjs-arrow.top {\n top: -14.5px;\n transform: rotate(90deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.bottom {\n bottom: -14.5px;\n transform: rotate(270deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.left {\n left: -11.5px;\n transform: rotate(0);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.right {\n right: -12px;\n transform: rotate(180deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.left-bottom {\n transform: rotate(0);\n clip-path: inset(0px 1px 0px 0px);\n left: -13.5px;\n border-right-color: var(--nile-tour-background-color, var(--nile-colors-white-base)) !important;\n }\n\n .introjs-arrow.right-bottom {\n right: -12px;\n transform: rotate(180deg);\n clip-path: inset(0px 3px 0px 0px);\n border-left-color: var(--nile-tour-background-color, var(--nile-colors-white-base)) !important;\n }\n\n .introjs-arrow.top-middle {\n top: -14px;\n left: 50%;\n margin-left: -5px;\n transform: rotate(90deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-button {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, var(--nile-colors-white-base));\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: var(--Primary-Normal, #1978b8);\n border-color: transparent;\n display: flex;\n padding: 12px;\n align-items: center;\n gap: 12px;\n border-radius: 4px;\n font-weight: 500;\n }\n\n .introjs-button:hover {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, var(--nile-colors-white-base));\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: var(--Primary-Normal, #1978b8);\n border-color: transparent;\n display: flex;\n padding: 12px;\n align-items: center;\n gap: 12px;\n }\n\n .introjs-button:focus {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, var(--nile-colors-white-base));\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n box-shadow: none;\n background: var(--Primary-Normal, #1978b8);\n border-color: transparent;\n display: flex;\n padding: 12px;\n align-items: center;\n gap: 12px;\n }\n\n .introjs-tooltipbuttons {\n border-top: none;\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n }\n\n .introjs-helperNumberLayer {\n display: none;\n }\n\n .introjs-bullets {\n display: none;\n }\n\n .introjs-skipbutton {\n display: none;\n }\n\n .introjs-prev-button {\n color: #c7ced4;\n }\n\n .introjs-helperLayer {\n box-shadow: rgb(33 33 33 / 0%) 0px 0px 1px 2px,\n rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important;\n }\n\n .introjs-step-counter {\n margin-right: auto;\n font-size: 14px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n color: var(--Color-Text-Inverted-Secondary, rgba(255, 255, 255, 0.5));\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(-5px);\n }\n 50% {\n transform: translateX(5px);\n }\n 75% {\n transform: translateX(-5px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n .introjs-shake {\n animation: shake 0.5s ease infinite;\n }\n\n .introjs-close-btn {\n position: absolute;\n top: 15px;\n right: 10px;\n background: none;\n border: none;\n font-size: 16px;\n cursor: pointer;\n }\n\n a[disabled='true'] {\n display: none;\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-tour.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-tour.css.cjs.js","sources":["../../../src/nile-tour/nile-tour.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Tour CSS\n */\nexport const styles = css`\n :host {\n }\n\n .introjs-tooltip {\n background-color: var(--nile-tour-background-color, #
|
1
|
+
{"version":3,"file":"nile-tour.css.cjs.js","sources":["../../../src/nile-tour/nile-tour.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Tour CSS\n */\nexport const styles = css`\n :host {\n }\n\n .introjs-tooltip {\n background-color: var(--nile-tour-background-color, #1978b8);\n color: var(--nile-tour-text-color, #fff);\n width: 300px;\n max-width: 300px;\n border-radius: 12px;\n border: 1px solid var(--Neutral-30, #1978b8);\n background: var(--White-Normal, #1978b8);\n /* border: 1px solid var(--Neutral-30, #C7CED4); */\n\n /* Elevation/Lifted */\n box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);\n }\n\n .introjs-tooltip-title {\n color: var(--nile-colors-white-base);\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 16px;\n letter-spacing: 0.2px;\n }\n\n .introjs-tooltip-header {\n padding-left: 18px;\n padding-right: 18px;\n padding-top: 18px;\n }\n\n .introjs-progress {\n display: none;\n }\n\n .introjs-tooltiptext {\n color: #c7ced4;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.2px;\n padding: 15px 18px;\n }\n\n .introjs-arrow {\n width: 15px;\n height: 20px;\n background-image: url('data:image/svg+xml,%3Csvg width=\"15\" height=\"20\" viewBox=\"0 0 15 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M1.13333 11.6C0.0666661 10.8 0.0666662 9.2 1.13333 8.4L11.8 0.400001C13.1185 -0.588854 15 0.351909 15 2L15 18C15 19.6481 13.1185 20.5889 11.8 19.6L1.13333 11.6Z\" fill=\"%231978B8\"/%3E%3C/svg%3E');\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center;\n position: absolute;\n border: none;\n content: none;\n }\n\n .introjs-arrow.top {\n top: -14.5px;\n transform: rotate(90deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.bottom {\n bottom: -14.5px;\n transform: rotate(270deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.left {\n left: -11.5px;\n transform: rotate(0);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.right {\n right: -12px;\n transform: rotate(180deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-arrow.left-bottom {\n transform: rotate(0);\n clip-path: inset(0px 1px 0px 0px);\n left: -13.5px;\n border-right-color: var(--nile-tour-background-color, var(--nile-colors-white-base)) !important;\n }\n\n .introjs-arrow.right-bottom {\n right: -12px;\n transform: rotate(180deg);\n clip-path: inset(0px 3px 0px 0px);\n border-left-color: var(--nile-tour-background-color, var(--nile-colors-white-base)) !important;\n }\n\n .introjs-arrow.top-middle {\n top: -14px;\n left: 50%;\n margin-left: -5px;\n transform: rotate(90deg);\n clip-path: inset(0px 3px 0px 0px);\n }\n\n .introjs-button {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, var(--nile-colors-white-base));\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: var(--Primary-Normal, #1978b8);\n border-color: transparent;\n display: flex;\n padding: 12px;\n align-items: center;\n gap: 12px;\n border-radius: 4px;\n font-weight: 500;\n }\n\n .introjs-button:hover {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, var(--nile-colors-white-base));\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: var(--Primary-Normal, #1978b8);\n border-color: transparent;\n display: flex;\n padding: 12px;\n align-items: center;\n gap: 12px;\n }\n\n .introjs-button:focus {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, var(--nile-colors-white-base));\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n box-shadow: none;\n background: var(--Primary-Normal, #1978b8);\n border-color: transparent;\n display: flex;\n padding: 12px;\n align-items: center;\n gap: 12px;\n }\n\n .introjs-tooltipbuttons {\n border-top: none;\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n }\n\n .introjs-helperNumberLayer {\n display: none;\n }\n\n .introjs-bullets {\n display: none;\n }\n\n .introjs-skipbutton {\n display: none;\n }\n\n .introjs-prev-button {\n color: #c7ced4;\n }\n\n .introjs-helperLayer {\n box-shadow: rgb(33 33 33 / 0%) 0px 0px 1px 2px,\n rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important;\n }\n\n .introjs-step-counter {\n margin-right: auto;\n font-size: 14px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n color: var(--Color-Text-Inverted-Secondary, rgba(255, 255, 255, 0.5));\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(-5px);\n }\n 50% {\n transform: translateX(5px);\n }\n 75% {\n transform: translateX(-5px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n .introjs-shake {\n animation: shake 0.5s ease infinite;\n }\n\n .introjs-close-btn {\n position: absolute;\n top: 15px;\n right: 10px;\n background: none;\n border: none;\n font-size: 16px;\n cursor: pointer;\n }\n\n a[disabled='true'] {\n display: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"6bAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,15 +1,16 @@
|
|
1
|
-
import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.esm.js";const
|
1
|
+
import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.esm.js";const r=o`
|
2
2
|
:host {
|
3
3
|
}
|
4
4
|
|
5
5
|
.introjs-tooltip {
|
6
|
-
background-color: var(--nile-tour-background-color, #
|
7
|
-
color: var(--nile-tour-text-color,
|
6
|
+
background-color: var(--nile-tour-background-color, #1978b8);
|
7
|
+
color: var(--nile-tour-text-color, #fff);
|
8
8
|
width: 300px;
|
9
9
|
max-width: 300px;
|
10
|
-
border-radius:
|
11
|
-
border: 1px solid var(--Neutral-30, #
|
12
|
-
background: var(--White-Normal, #
|
10
|
+
border-radius: 12px;
|
11
|
+
border: 1px solid var(--Neutral-30, #1978b8);
|
12
|
+
background: var(--White-Normal, #1978b8);
|
13
|
+
/* border: 1px solid var(--Neutral-30, #C7CED4); */
|
13
14
|
|
14
15
|
/* Elevation/Lifted */
|
15
16
|
box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);
|
@@ -30,8 +31,12 @@ import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.es
|
|
30
31
|
padding-top: 18px;
|
31
32
|
}
|
32
33
|
|
34
|
+
.introjs-progress {
|
35
|
+
display: none;
|
36
|
+
}
|
37
|
+
|
33
38
|
.introjs-tooltiptext {
|
34
|
-
color:
|
39
|
+
color: #c7ced4;
|
35
40
|
font-size: 14px;
|
36
41
|
font-style: normal;
|
37
42
|
font-weight: 400;
|
@@ -106,7 +111,7 @@ import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.es
|
|
106
111
|
padding: 0;
|
107
112
|
cursor: pointer;
|
108
113
|
text-shadow: none;
|
109
|
-
background: var(--Primary-Normal, #
|
114
|
+
background: var(--Primary-Normal, #1978b8);
|
110
115
|
border-color: transparent;
|
111
116
|
display: flex;
|
112
117
|
padding: 12px;
|
@@ -124,7 +129,7 @@ import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.es
|
|
124
129
|
padding: 0;
|
125
130
|
cursor: pointer;
|
126
131
|
text-shadow: none;
|
127
|
-
background: var(--Primary-Normal, #
|
132
|
+
background: var(--Primary-Normal, #1978b8);
|
128
133
|
border-color: transparent;
|
129
134
|
display: flex;
|
130
135
|
padding: 12px;
|
@@ -141,7 +146,7 @@ import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.es
|
|
141
146
|
cursor: pointer;
|
142
147
|
text-shadow: none;
|
143
148
|
box-shadow: none;
|
144
|
-
background: var(--Primary-Normal, #
|
149
|
+
background: var(--Primary-Normal, #1978b8);
|
145
150
|
border-color: transparent;
|
146
151
|
display: flex;
|
147
152
|
padding: 12px;
|
@@ -173,13 +178,8 @@ import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.es
|
|
173
178
|
}
|
174
179
|
|
175
180
|
.introjs-helperLayer {
|
176
|
-
|
177
|
-
|
178
|
-
}
|
179
|
-
|
180
|
-
.introjs-overlay {
|
181
|
-
display: none;
|
182
|
-
pointer-events: none;
|
181
|
+
box-shadow: rgb(33 33 33 / 0%) 0px 0px 1px 2px,
|
182
|
+
rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important;
|
183
183
|
}
|
184
184
|
|
185
185
|
.introjs-step-counter {
|
@@ -188,7 +188,7 @@ import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.es
|
|
188
188
|
padding: 0 10px;
|
189
189
|
display: flex;
|
190
190
|
align-items: center;
|
191
|
-
color: var(--Color-Text-Inverted-Secondary, rgba(255, 255, 255, 0.
|
191
|
+
color: var(--Color-Text-Inverted-Secondary, rgba(255, 255, 255, 0.5));
|
192
192
|
font-style: normal;
|
193
193
|
font-weight: 500;
|
194
194
|
line-height: 14px;
|
@@ -216,4 +216,18 @@ import"../lit-element-68f4d117.esm.js";import{i as o}from"../css-tag-1f82a8d8.es
|
|
216
216
|
.introjs-shake {
|
217
217
|
animation: shake 0.5s ease infinite;
|
218
218
|
}
|
219
|
-
|
219
|
+
|
220
|
+
.introjs-close-btn {
|
221
|
+
position: absolute;
|
222
|
+
top: 15px;
|
223
|
+
right: 10px;
|
224
|
+
background: none;
|
225
|
+
border: none;
|
226
|
+
font-size: 16px;
|
227
|
+
cursor: pointer;
|
228
|
+
}
|
229
|
+
|
230
|
+
a[disabled='true'] {
|
231
|
+
display: none;
|
232
|
+
}
|
233
|
+
`;export{r as s};
|
@@ -7,9 +7,18 @@ import{__decorate as t}from"tslib";import{LitElement as n,html as i}from"lit";im
|
|
7
7
|
* https://introjs.com
|
8
8
|
*
|
9
9
|
* Date: Mon, 14 Aug 2023 19:47:14 GMT
|
10
|
-
*/function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,n,i,r){return new(i||(i=Promise))((function(o,e){function s(t){try{u(r.next(t))}catch(t){e(t)}}function a(t){try{u(r.throw(t))}catch(t){e(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof i?n:new i((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))}function u(t,n){var i,r,o,e,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function a(a){return function(u){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;e&&(e=0,a[0]&&(s=0)),s;)try{if(i=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(t,s)}catch(t){a=[6,t],r=0}finally{i=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function c(t,n,i){var r,o=((r={})[t]=n,r.path="/",r.expires=void 0,r);if(i){var e=new Date;e.setTime(e.getTime()+24*i*60*60*1e3),o.expires=e.toUTCString()}var s=[];for(var a in o)s.push("".concat(a,"=").concat(o[a]));return document.cookie=s.join("; "),l(t)}function l(t){return(n={},document.cookie.split(";").forEach((function(t){var i=t.split("="),r=i[0],o=i[1];n[r.trim()]=o})),n)[t];var n}"function"==typeof SuppressedError&&SuppressedError;var d,f=(d={},function(t,n){return void 0===n&&(n="introjs-stamp"),d[n]=d[n]||0,void 0===t[n]&&(t[n]=d[n]++),t[n]}),h=new(function(){function t(){this.events_key="introjs_event"}return t.prototype._id=function(t,n,i){return t+f(n)+(i?"_".concat(f(i)):"")},t.prototype.on=function(t,n,i,r,o){var e=this._id(n,i,r),s=function(n){return i(r||t,n||window.event)};"addEventListener"in t?t.addEventListener(n,s,o):"attachEvent"in t&&t.attachEvent("on".concat(n),s),t[this.events_key]=t[this.events_key]||{},t[this.events_key][e]=s},t.prototype.off=function(t,n,i,r,o){var e=this._id(n,i,r),s=t[this.events_key]&&t[this.events_key][e];s&&("removeEventListener"in t?t.removeEventListener(n,s,o):"detachEvent"in t&&t.detachEvent("on".concat(n),s),t[this.events_key][e]=null)},t}()),v=function(t){return"function"==typeof t};function p(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";i.match(n)||t.setAttribute("class","".concat(i," ").concat(n))}else if(void 0!==t.classList)for(var r=0,o=n.split(" ");r<o.length;r++){var e=o[r];t.classList.add(e)}else t.className.match(n)||(t.className+=" ".concat(n))}function w(t,n){var i="";return"currentStyle"in t?i=t.currentStyle[n]:document.defaultView&&document.defaultView.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,null).getPropertyValue(n)),i&&i.toLowerCase?i.toLowerCase():i}function m(t,n){if(t){var i=function(t){var n=window.getComputedStyle(t),i="absolute"===n.position,r=/(auto|scroll)/;if("fixed"===n.position)return document.body;for(var o=t;o=o.parentElement;)if(n=window.getComputedStyle(o),(!i||"static"!==n.position)&&r.test(n.overflow+n.overflowY+n.overflowX))return o;return document.body}(n);i!==document.body&&(i.scrollTop=n.offsetTop-i.offsetTop)}}function b(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function j(t,n,i,r,o){var e;if("off"!==n&&t&&(e="tooltip"===n?o.getBoundingClientRect():r.getBoundingClientRect(),!function(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom+80<=window.innerHeight&&n.right<=window.innerWidth}(r))){var s=b().height;e.bottom-(e.bottom-e.top)<0||r.clientHeight>s?window.scrollBy(0,e.top-(s/2-e.height/2)-i):window.scrollBy(0,e.top-(s/2-e.height/2)+i)}}function g(t){t.setAttribute("role","button"),t.tabIndex=0}function y(t){var n=t.parentElement;return!(!n||"HTML"===n.nodeName)&&("fixed"===w(t,"position")||y(n))}function x(t,n){var i=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||i.scrollTop,e=window.pageXOffset||r.scrollLeft||i.scrollLeft;n=n||i;var s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),u=w(n,"position"),c={width:s.width,height:s.height};return"body"!==n.tagName.toLowerCase()&&"relative"===u||"sticky"===u?Object.assign(c,{top:s.top-a.top,left:s.left-a.left}):y(t)?Object.assign(c,{top:s.top,left:s.left}):Object.assign(c,{top:s.top+o,left:s.left+e})}function k(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i.replace(n,"").replace(/^\s+|\s+$/g,""))}else t.className=t.className.replace(n,"").replace(/^\s+|\s+$/g,"")}function E(t,n){var i="";if(t.style.cssText&&(i+=t.style.cssText),"string"==typeof n)i+=n;else for(var r in n)i+="".concat(r,":").concat(n[r],";");t.style.cssText=i}function N(t,n,i){if(i&&n){var r=x(n.element,t._targetElement),o=t._options.helperElementPadding;n.element instanceof Element&&y(n.element)?p(i,"introjs-fixedTooltip"):k(i,"introjs-fixedTooltip"),"floating"===n.position&&(o=0),E(i,{width:"".concat(r.width+o,"px"),height:"".concat(r.height+o,"px"),top:"".concat(r.top-o/2,"px"),left:"".concat(r.left-o/2,"px")})}}function S(t,n,i,r,o){return t.left+n+i.width>r.width?(o.style.left="".concat(r.width-i.width-t.left,"px"),!1):(o.style.left="".concat(n,"px"),!0)}function A(t,n,i,r){return t.left+t.width-n-i.width<0?(r.style.left="".concat(-t.left,"px"),!1):(r.style.right="".concat(n,"px"),!0)}function L(t,n){t.includes(n)&&t.splice(t.indexOf(n),1)}function P(t,n,i,r,o){if(void 0===o&&(o=!1),n){var e,s,a,u,c="";i.style.top="",i.style.right="",i.style.bottom="",i.style.left="",i.style.marginLeft="",i.style.marginTop="",r.style.display="inherit",c="string"==typeof n.tooltipClass?n.tooltipClass:t._options.tooltipClass,i.className=["introjs-tooltip",c].filter(Boolean).join(" "),i.setAttribute("role","dialog"),"floating"!==(u=n.position)&&t._options.autoPosition&&(u=function(t,n,i,r){var o=t.slice(),e=b(),s=x(i).height+10,a=x(i).width+20,u=n.getBoundingClientRect(),c="floating";if(u.bottom+s>e.height&&L(o,"bottom"),u.top-s<0&&L(o,"top"),u.right+a>e.width&&L(o,"right"),u.left-a<0&&L(o,"left"),r&&(r=r.split("-")[0]),o.length&&(c=o[0],o.includes(r)&&(c=r)),"top"===c||"bottom"===c){var l=void 0,d=[];"top"===c?(l="top-middle-aligned",d=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(l="bottom-middle-aligned",d=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),c=function(t,n,i,r){var o=n/2,e=Math.min(i,window.screen.width);return e-t<n&&(L(r,"top-left-aligned"),L(r,"bottom-left-aligned")),(t<o||e-t<o)&&(L(r,"top-middle-aligned"),L(r,"bottom-middle-aligned")),t<n&&(L(r,"top-right-aligned"),L(r,"bottom-right-aligned")),r.length?r[0]:null}(u.left,a,e.width,d)||l}return c}(t._options.positionPrecedence,n.element,i,u)),s=x(n.element),e=x(i),a=b(),p(i,"introjs-".concat(u));var l=s.width/2-e.width/2;switch(u){case"top-right-aligned":r.className="introjs-arrow bottom-right";var d=0;A(s,d,e,i),i.style.bottom="".concat(s.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",o&&(l+=5),A(s,l,e,i)&&(i.style.right="",S(s,l,e,a,i)),i.style.bottom="".concat(s.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",S(s,o?0:15,e,a,i),i.style.bottom="".concat(s.height+20,"px");break;case"right":i.style.left="".concat(s.width+20,"px"),s.top+e.height>a.height?(r.className="introjs-arrow left-bottom",i.style.top="-".concat(e.height-s.height-20,"px")):r.className="introjs-arrow left";break;case"left":o||!0!==t._options.showStepNumbers||(i.style.top="15px"),s.top+e.height>a.height?(i.style.top="-".concat(e.height-s.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",i.style.right="".concat(s.width+20,"px");break;case"floating":r.style.display="none",i.style.left="50%",i.style.top="50%",i.style.marginLeft="-".concat(e.width/2,"px"),i.style.marginTop="-".concat(e.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",A(s,d=0,e,i),i.style.top="".concat(s.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",o&&(l+=5),A(s,l,e,i)&&(i.style.right="",S(s,l,e,a,i)),i.style.top="".concat(s.height+20,"px");break;default:r.className="introjs-arrow top",S(s,0,e,a,i),i.style.top="".concat(s.height+20,"px")}}}function I(){for(var t=0,n=Array.from(document.querySelectorAll(".introjs-showElement"));t<n.length;t++)k(n[t],/introjs-[a-zA-Z]+/g)}function C(t,n){var i=document.createElement(t);n=n||{};var r=/^(?:role|data-|aria-)/;for(var o in n){var e=n[o];"style"===o&&"function"!=typeof e?E(i,e):"string"==typeof e&&o.match(r)?i.setAttribute(o,e):i[o]=e}return i}function O(t,n,i){if(void 0===i&&(i=!1),i){var r=n.style.opacity||"1";E(n,{opacity:"0"}),window.setTimeout((function(){E(n,{opacity:r})}),10)}t.appendChild(n)}function T(t,n){return(t+1)/n*100}function B(t,n){var i=C("div",{className:"introjs-bullets"});!1===t._options.showBullets&&(i.style.display="none");var r=C("ul");r.setAttribute("role","tablist");for(var o=function(){var n=this.getAttribute("data-step-number");null!=n&&t.goToStep(parseInt(n,10))},e=0;e<t._introItems.length;e++){var s=t._introItems[e].step,a=C("li"),u=C("a");a.setAttribute("role","presentation"),u.setAttribute("role","tab"),u.onclick=o,e===n.step-1&&(u.className="active"),g(u),u.innerHTML=" ",u.setAttribute("data-step-number",s.toString()),a.appendChild(u),r.appendChild(a)}return i.appendChild(r),i}function R(t,n,i){var r=t.querySelector(".introjs-progress .introjs-progressbar");if(r){var o=T(n,i);r.style.cssText="width:".concat(o,"%;"),r.setAttribute("aria-valuenow",o.toString())}}function $(t,n){return a(this,void 0,void 0,(function(){var i,r,o,e,s,c,l,d,f,h,b,y,x,k,S,A,L,$,J,z,G,M,V,_,H=this;return u(this,(function(Q){switch(Q.label){case 0:return v(t._introChangeCallback)?[4,t._introChangeCallback.call(t,n.element)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return i=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),o="introjs-helperLayer","string"==typeof n.highlightClass&&(o+=" ".concat(n.highlightClass)),"string"==typeof t._options.highlightClass&&(o+=" ".concat(t._options.highlightClass)),null!==i&&null!==r?(l=r.querySelector(".introjs-helperNumberLayer"),d=r.querySelector(".introjs-tooltiptext"),f=r.querySelector(".introjs-tooltip-title"),h=r.querySelector(".introjs-arrow"),b=r.querySelector(".introjs-tooltip"),c=r.querySelector(".introjs-skipbutton"),s=r.querySelector(".introjs-prevbutton"),e=r.querySelector(".introjs-nextbutton"),i.className=o,b.style.opacity="0",b.style.display="none",m(t._options.scrollToElement,n.element),N(t,n,i),N(t,n,r),I(),t._lastShowElementTimer&&window.clearTimeout(t._lastShowElementTimer),t._lastShowElementTimer=window.setTimeout((function(){null!==l&&(l.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length)),d.innerHTML=n.intro||"",f.innerHTML=n.title||"",b.style.display="block",P(t,n,b,h),function(t,n,i){if(t){var r=n.querySelector(".introjs-bullets li > a.active"),o=n.querySelector('.introjs-bullets li > a[data-step-number="'.concat(i.step,'"]'));r&&o&&(r.className="",o.className="active")}}(t._options.showBullets,r,n),R(r,t._currentStep,t._introItems.length),b.style.opacity="1",(null!=e&&/introjs-donebutton/gi.test(e.className)||null!=e)&&e.focus(),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,d)}),350)):(y=C("div",{className:o}),x=C("div",{className:"introjs-tooltipReferenceLayer"}),k=C("div",{className:"introjs-arrow"}),S=C("div",{className:"introjs-tooltip"}),A=C("div",{className:"introjs-tooltiptext"}),L=C("div",{className:"introjs-tooltip-header"}),$=C("h1",{className:"introjs-tooltip-title"}),J=C("div"),E(y,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(t._options.overlayOpacity.toString(),") 0 0 0 5000px")}),m(t._options.scrollToElement,n.element),N(t,n,y),N(t,n,x),O(t._targetElement,y,!0),O(t._targetElement,x),A.innerHTML=n.intro,$.innerHTML=n.title,J.className="introjs-tooltipbuttons",!1===t._options.showButtons&&(J.style.display="none"),L.appendChild($),S.appendChild(L),S.appendChild(A),t._options.dontShowAgain&&(z=C("div",{className:"introjs-dontShowAgain"}),(G=C("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(n){t.setDontShowAgain(n.target.checked)},(M=C("label",{htmlFor:"introjs-dontShowAgain"})).innerText=t._options.dontShowAgainLabel,z.appendChild(G),z.appendChild(M),S.appendChild(z)),S.appendChild(B(t,n)),S.appendChild(function(t){var n=C("div");n.className="introjs-progress",!1===t._options.showProgress&&(n.style.display="none");var i=C("div",{className:"introjs-progressbar"});t._options.progressBarAdditionalClass&&(i.className+=" "+t._options.progressBarAdditionalClass);var r=T(t._currentStep,t._introItems.length);return i.setAttribute("role","progress"),i.setAttribute("aria-valuemin","0"),i.setAttribute("aria-valuemax","100"),i.setAttribute("aria-valuenow",r.toString()),i.style.cssText="width:".concat(r,"%;"),n.appendChild(i),n}(t)),V=C("div"),!0===t._options.showStepNumbers&&(V.className="introjs-helperNumberLayer",V.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length),S.appendChild(V)),S.appendChild(k),x.appendChild(S),(e=C("a")).onclick=function(){return a(H,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep?[3,2]:[4,D(t)];case 1:return n.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(e.className)?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"done")]:[3,4]:[3,6];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:n.sent(),n.label=6;case 6:return[2]}}))}))},g(e),e.innerHTML=t._options.nextLabel,(s=C("a")).onclick=function(){return a(H,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return t._currentStep>0?[4,F(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},g(s),s.innerHTML=t._options.prevLabel,g(c=C("a",{className:"introjs-skipbutton"})),c.innerHTML=t._options.skipLabel,c.onclick=function(){return a(H,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,2];case 1:n.sent(),n.label=2;case 2:return v(t._introSkipCallback)?[4,t._introSkipCallback.call(t,t._currentStep)]:[3,4];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return n.sent(),[2]}}))}))},L.appendChild(c),t._introItems.length>1&&J.appendChild(s),J.appendChild(e),S.appendChild(J),P(t,n,S,k),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,S)),(_=t._targetElement.querySelector(".introjs-disableInteraction"))&&_.parentNode&&_.parentNode.removeChild(_),n.disableInteraction&&function(t,n){var i=document.querySelector(".introjs-disableInteraction");null===i&&(i=C("div",{className:"introjs-disableInteraction"}),t._targetElement.appendChild(i)),N(t,n,i)}(t,n),0===t._currentStep&&t._introItems.length>1?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel),!0===t._options.hidePrev?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-hidden")),null!=e&&p(e,"introjs-fullbutton")):null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-disabled"))):t._introItems.length-1===t._currentStep||1===t._introItems.length?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),!0===t._options.hideNext?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-hidden")),null!=s&&p(s,"introjs-fullbutton")):null!=e&&(!0===t._options.nextToDone?(e.innerHTML=t._options.doneLabel,p(e,"".concat(t._options.buttonClass," introjs-nextbutton introjs-donebutton"))):e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-disabled"))):(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel)),null!=s&&s.setAttribute("role","button"),null!=e&&e.setAttribute("role","button"),null!=c&&c.setAttribute("role","button"),null!=e&&e.focus(),function(t){p(t,"introjs-showElement");var n=w(t,"position");"absolute"!==n&&"relative"!==n&&"sticky"!==n&&"fixed"!==n&&p(t,"introjs-relativePosition")}(n.element),v(t._introAfterChangeCallback)?[4,t._introAfterChangeCallback.call(t,n.element)]:[3,4];case 3:Q.sent(),Q.label=4;case 4:return[2]}}))}))}function J(t,n){return a(this,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return t._currentStep=n-2,void 0===t._introItems?[3,2]:[4,D(t)];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}function z(t,n){return a(this,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return t._currentStepNumber=n,void 0===t._introItems?[3,2]:[4,D(t)];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}function D(t){return a(this,void 0,void 0,(function(){var n,i,r;return u(this,(function(o){switch(o.label){case 0:if(t._direction="forward",void 0!==t._currentStepNumber)for(n=0;n<t._introItems.length;n++)t._introItems[n].step===t._currentStepNumber&&(t._currentStep=n-1,t._currentStepNumber=void 0);return-1===t._currentStep?t._currentStep=0:++t._currentStep,i=t._introItems[t._currentStep],r=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,i&&i.element,t._currentStep,t._direction)]:[3,2];case 1:r=o.sent(),o.label=2;case 2:return!1===r?(--t._currentStep,[2,!1]):t._introItems.length<=t._currentStep?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"end")]:[3,4]:[3,6];case 3:o.sent(),o.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return o.sent(),[2,!1];case 6:return[4,$(t,i)];case 7:return o.sent(),[2,!0]}}))}))}function F(t){return a(this,void 0,void 0,(function(){var n,i;return u(this,(function(r){switch(r.label){case 0:return t._direction="backward",t._currentStep<=0?[2,!1]:(--t._currentStep,n=t._introItems[t._currentStep],i=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,n&&n.element,t._currentStep,t._direction)]:[3,2]);case 1:i=r.sent(),r.label=2;case 2:return!1===i?(++t._currentStep,[2,!1]):[4,$(t,n)];case 3:return r.sent(),[2,!0]}}))}))}function G(t,n){return a(this,void 0,void 0,(function(){var i,r;return u(this,(function(o){switch(o.label){case 0:return null===(i=void 0===n.code?n.which:n.code)&&(i=null===n.charCode?n.keyCode:n.charCode),"Escape"!==i&&27!==i||!0!==t._options.exitOnEsc?[3,2]:[4,et(t,t._targetElement)];case 1:return o.sent(),[3,16];case 2:return"ArrowLeft"!==i&&37!==i?[3,4]:[4,F(t)];case 3:return o.sent(),[3,16];case 4:return"ArrowRight"!==i&&39!==i?[3,6]:[4,D(t)];case 5:return o.sent(),[3,16];case 6:return"Enter"!==i&&"NumpadEnter"!==i&&13!==i?[3,16]:(r=n.target||n.srcElement)&&r.className.match("introjs-prevbutton")?[4,F(t)]:[3,8];case 7:return o.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,10]:[3,12];case 9:o.sent(),o.label=10;case 10:return[4,et(t,t._targetElement)];case 11:return o.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,D(t)];case 14:o.sent(),o.label=15;case 15:n.preventDefault?n.preventDefault():n.returnValue=!1,o.label=16;case 16:return[2]}}))}))}function M(t){if(null===t||"object"!==s(t)||"nodeType"in t)return t;var n={};for(var i in t)"jQuery"in window&&t[i]instanceof window.jQuery?n[i]=t[i]:n[i]=M(t[i]);return n}function V(t){var n=document.querySelector(".introjs-hints");return n?Array.from(n.querySelectorAll(t)):[]}function _(t,n){return a(this,void 0,void 0,(function(){var i;return u(this,(function(r){switch(r.label){case 0:return i=V('.introjs-hint[data-step="'.concat(n,'"]'))[0],X(),i&&p(i,"introjs-hidehint"),v(t._hintCloseCallback)?[4,t._hintCloseCallback.call(t,n)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))}function H(t){return a(this,void 0,void 0,(function(){var n,i,r,o,e;return u(this,(function(s){switch(s.label){case 0:n=V(".introjs-hint"),i=0,r=n,s.label=1;case 1:return i<r.length?(o=r[i],(e=o.getAttribute("data-step"))?[4,_(t,parseInt(e,10))]:[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}}))}))}function Q(t){return a(this,void 0,void 0,(function(){var n,i,r,o,e;return u(this,(function(s){switch(s.label){case 0:if(!(n=V(".introjs-hint"))||!n.length)return[3,1];for(i=0,r=n;i<r.length;i++)o=r[i],(e=o.getAttribute("data-step"))&&Z(parseInt(e,10));return[3,3];case 1:return[4,Y(t,t._targetElement)];case 2:s.sent(),s.label=3;case 3:return[2]}}))}))}function Z(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&k(n,/introjs-hidehint/g)}function q(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&n.parentNode&&n.parentNode.removeChild(n)}function K(t){return a(this,void 0,void 0,(function(){var n,i,r,o,e,s,a;return u(this,(function(u){switch(u.label){case 0:for(null===(n=document.querySelector(".introjs-hints"))&&(n=C("div",{className:"introjs-hints"})),i=function(n){return function(i){var r=i||window.event;r&&r.stopPropagation&&r.stopPropagation(),r&&null!==r.cancelBubble&&(r.cancelBubble=!0),W(t,n)}},r=0;r<t._hintItems.length;r++){if(o=t._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];g(e=C("a",{className:"introjs-hint"})),e.onclick=i(r),o.hintAnimation||p(e,"introjs-hint-no-anim"),y(o.element)&&p(e,"introjs-fixedhint"),s=C("div",{className:"introjs-hint-dot"}),a=C("div",{className:"introjs-hint-pulse"}),e.appendChild(s),e.appendChild(a),e.setAttribute("data-step",r.toString()),o.hintTargetElement=o.element,o.element=e,U(o.hintPosition,e,o.hintTargetElement),n.appendChild(e)}return document.body.appendChild(n),v(t._hintsAddedCallback)?[4,t._hintsAddedCallback.call(t)]:[3,2];case 1:u.sent(),u.label=2;case 2:return t._options.hintAutoRefreshInterval>=0&&(t._hintsAutoRefreshFunction=(c=function(){return tt(t)},l=t._options.hintAutoRefreshInterval,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window.clearTimeout(d),d=window.setTimeout((function(){c()}),l)}),h.on(window,"scroll",t._hintsAutoRefreshFunction,t,!0)),[2]}var c,l,d}))}))}function U(t,n,i){if(void 0!==i){var r=x(i),o=20,e=20;switch(t){default:case"top-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top,"px");break;case"top-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top,"px");break;case"bottom-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"bottom-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"middle-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"bottom-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"top-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top,"px")}}}function W(t,n){return a(this,void 0,void 0,(function(){var i,r,o,e,s,a,c,l,d,f,h;return u(this,(function(u){switch(u.label){case 0:return i=document.querySelector('.introjs-hint[data-step="'.concat(n,'"]')),r=t._hintItems[n],v(t._hintClickCallback)?[4,t._hintClickCallback.call(t,i,r,n)]:[3,2];case 1:u.sent(),u.label=2;case 2:return void 0!==(o=X())&&parseInt(o,10)===n||(e=C("div",{className:"introjs-tooltip"}),s=C("div"),a=C("div"),c=C("div"),e.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},s.className="introjs-tooltiptext",(l=C("p")).innerHTML=r.hint||"",s.appendChild(l),t._options.hintShowButton&&((d=C("a")).className=t._options.buttonClass,d.setAttribute("role","button"),d.innerHTML=t._options.hintButtonLabel,d.onclick=function(){return _(t,n)},s.appendChild(d)),a.className="introjs-arrow",e.appendChild(a),e.appendChild(s),f=i.getAttribute("data-step")||"",t._currentStep=parseInt(f,10),h=t._hintItems[t._currentStep],c.className="introjs-tooltipReferenceLayer introjs-hintReference",c.setAttribute("data-step",f),N(t,h,c),c.appendChild(e),document.body.appendChild(c),P(t,h,e,a,!0)),[2]}}))}))}function X(){var t=document.querySelector(".introjs-hintReference");if(t&&t.parentNode){var n=t.getAttribute("data-step");if(!n)return;return t.parentNode.removeChild(t),n}}function Y(t,n){return a(this,void 0,void 0,(function(){var i,r,o,e,s,a,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(t._hintItems=[],t._options.hints&&t._options.hints.length>0)for(i=0,r=t._options.hints;i<r.length;i++)o=r[i],"string"==typeof(e=M(o)).element&&(e.element=document.querySelector(e.element)),e.hintPosition=e.hintPosition||t._options.hintPosition,e.hintAnimation=e.hintAnimation||t._options.hintAnimation,null!==e.element&&t._hintItems.push(e);else{if(!(s=Array.from(n.querySelectorAll("*[data-hint]")))||!s.length)return[2,!1];for(a=0,c=s;a<c.length;a++)l=c[a],d=l.getAttribute("data-hint-animation"),f=t._options.hintAnimation,d&&(f="true"===d),t._hintItems.push({element:l,hint:l.getAttribute("data-hint")||"",hintPosition:l.getAttribute("data-hint-position")||t._options.hintPosition,hintAnimation:f,tooltipClass:l.getAttribute("data-tooltip-class")||void 0,position:l.getAttribute("data-position")||t._options.tooltipPosition})}return[4,K(t)];case 1:return u.sent(),h.on(document,"click",X,t,!1),h.on(window,"resize",tt,t,!0),[2,!0]}}))}))}function tt(t){for(var n=0,i=t._hintItems;n<i.length;n++){var r=i[n],o=r.hintTargetElement;U(r.hintPosition,r.element,o)}}function nt(t,n){var i=Array.from(n.querySelectorAll("*[data-intro]")),r=[];if(t._options.steps&&t._options.steps.length)for(var o=0,e=t._options.steps;o<e.length;o++){var s=M(f=e[o]);if(s.step=r.length+1,s.title=s.title||"","string"==typeof s.element&&(s.element=document.querySelector(s.element)||void 0),void 0===s.element||null===s.element){var a=document.querySelector(".introjsFloatingElement");null===a&&(a=C("div",{className:"introjsFloatingElement"}),document.body.appendChild(a)),s.element=a,s.position="floating"}s.position=s.position||t._options.tooltipPosition,s.scrollTo=s.scrollTo||t._options.scrollTo,void 0===s.disableInteraction&&(s.disableInteraction=t._options.disableInteraction),null!==s.element&&r.push(s)}else{var u=void 0;if(i.length<1)return[];for(var c=0,l=i;c<l.length;c++){var d=l[c];if((!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&"none"!==d.style.display){var f=parseInt(d.getAttribute("data-step")||"",10);u=t._options.disableInteraction,d.hasAttribute("data-disable-interaction")&&(u=!!d.getAttribute("data-disable-interaction")),f>0&&(r[f-1]={step:f,element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u})}}for(var h=0,v=0,p=i;v<p.length;v++)if(d=p[v],(!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&null===d.getAttribute("data-step")){for(;void 0!==r[h];)h++;u=d.hasAttribute("data-disable-interaction")?!!d.getAttribute("data-disable-interaction"):t._options.disableInteraction,r[h]={element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",step:h+1,tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u}}}for(var w=[],m=0;m<r.length;m++)r[m]&&w.push(r[m]);return(r=w).sort((function(t,n){return t.step-n.step})),r}function it(t,n){var i=t._currentStep;if(null!=i&&-1!=i){var r=t._introItems[i],o=document.querySelector(".introjs-tooltipReferenceLayer"),e=document.querySelector(".introjs-helperLayer"),s=document.querySelector(".introjs-disableInteraction");N(t,r,e),N(t,r,o),N(t,r,s),n&&(t._introItems=nt(t,t._targetElement),function(t,n){if(t._options.showBullets){var i=document.querySelector(".introjs-bullets");i&&i.parentNode&&i.parentNode.replaceChild(B(t,n),i)}}(t,r),R(o,i,t._introItems.length));var a=document.querySelector(".introjs-arrow"),u=document.querySelector(".introjs-tooltip");return u&&a&&P(t,t._introItems[i],u,a),tt(t),t}}function rt(t){it(t)}function ot(t,n){if(void 0===n&&(n=!1),t&&t.parentElement){var i=t.parentElement;n?(E(t,{opacity:"0"}),window.setTimeout((function(){try{i.removeChild(t)}catch(t){}}),500)):i.removeChild(t)}}function et(t,n,i){return void 0===i&&(i=!1),a(this,void 0,void 0,(function(){var r,o,e,s;return u(this,(function(a){switch(a.label){case 0:return r=!0,void 0===t._introBeforeExitCallback?[3,2]:[4,t._introBeforeExitCallback.call(t,n)];case 1:r=a.sent(),a.label=2;case 2:if(!i&&!1===r)return[2];if((o=Array.from(n.querySelectorAll(".introjs-overlay")))&&o.length)for(e=0,s=o;e<s.length;e++)ot(s[e]);return ot(n.querySelector(".introjs-helperLayer"),!0),ot(n.querySelector(".introjs-tooltipReferenceLayer")),ot(n.querySelector(".introjs-disableInteraction")),ot(document.querySelector(".introjsFloatingElement")),I(),h.off(window,"keydown",G,t,!0),h.off(window,"resize",rt,t,!0),v(t._introExitCallback)?[4,t._introExitCallback.call(t)]:[3,4];case 3:a.sent(),a.label=4;case 4:return t._currentStep=-1,[2]}}))}))}function st(t,n){return a(this,void 0,void 0,(function(){var i;return u(this,(function(r){switch(r.label){case 0:return t.isActive()?v(t._introStartCallback)?[4,t._introStartCallback.call(t,n)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return 0===(i=nt(t,n)).length?[2,!1]:(t._introItems=i,function(t,n){var i=this,r=C("div",{className:"introjs-overlay"});E(r,{top:0,bottom:0,left:0,right:0,position:"fixed"}),n.appendChild(r),!0===t._options.exitOnOverlayClick&&(E(r,{cursor:"pointer"}),r.onclick=function(){return a(i,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return[4,et(t,n)];case 1:return i.sent(),[2]}}))}))})}(t,n),[4,D(t)]);case 3:r.sent(),n.addEventListener,t._options.keyboardNavigation&&h.on(window,"keydown",G,t,!0),h.on(window,"resize",rt,t,!0),r.label=4;case 4:return[2,!1]}}))}))}function at(t,n,i){return t[n]=i,t}var ut=function(){function t(t){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=t,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}return t.prototype.isActive=function(){return(!this._options.dontShowAgain||""===(t=l(this._options.dontShowAgainCookie))||"true"!==t)&&this._options.isActive;var t},t.prototype.clone=function(){return new t(this._targetElement)},t.prototype.setOption=function(t,n){return this._options=at(this._options,t,n),this},t.prototype.setOptions=function(t){return this._options=function(t,n){for(var i=0,r=Object.entries(n);i<r.length;i++){var o=r[i];t=at(t,o[0],o[1])}return t}(this._options,t),this},t.prototype.start=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,st(this,this._targetElement)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.goToStep=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,J(this,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addStep=function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},t.prototype.addSteps=function(t){if(!t.length)return this;for(var n=0;n<t.length;n++)this.addStep(t[n]);return this},t.prototype.goToStepNumber=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,z(this,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.nextStep=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,D(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.previousStep=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,F(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.currentStep=function(){return this._currentStep},t.prototype.exit=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,et(this,this._targetElement,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.refresh=function(t){return it(this,t),this},t.prototype.setDontShowAgain=function(t){return function(t,n){n?c(t._options.dontShowAgainCookie,"true",t._options.dontShowAgainCookieDays):c(t._options.dontShowAgainCookie,"",-1)}(this,t),this},t.prototype.onbeforechange=function(t){if(!v(t))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},t.prototype.onchange=function(t){if(!v(t))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},t.prototype.onafterchange=function(t){if(!v(t))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},t.prototype.oncomplete=function(t){if(!v(t))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},t.prototype.onhintsadded=function(t){if(!v(t))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},t.prototype.onhintclick=function(t){if(!v(t))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},t.prototype.onhintclose=function(t){if(!v(t))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},t.prototype.onstart=function(t){if(!v(t))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=t,this},t.prototype.onexit=function(t){if(!v(t))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},t.prototype.onskip=function(t){if(!v(t))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},t.prototype.onbeforeexit=function(t){if(!v(t))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},t.prototype.addHints=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,Y(this,this._targetElement)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.hideHint=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,_(this,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.hideHints=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,H(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.showHint=function(t){return Z(t),this},t.prototype.showHints=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,Q(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.removeHints=function(){return function(t){for(var n=0,i=V(".introjs-hint");n<i.length;n++){var r=i[n].getAttribute("data-step");r&&q(parseInt(r,10))}h.off(document,"click",X,t,!1),h.off(window,"resize",tt,t,!0),t._hintsAutoRefreshFunction&&h.off(window,"scroll",t._hintsAutoRefreshFunction,t,!0)}(this),this},t.prototype.removeHint=function(t){return q(t),this},t.prototype.showHintDialog=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,W(this,t)];case 1:return n.sent(),[2,this]}}))}))},t}(),ct=function t(n){var i;if("object"===s(n))i=new ut(n);else if("string"==typeof n){var r=document.querySelector(n);if(!r)throw new Error("There is no element with given selector.");i=new ut(r)}else i=new ut(document.body);return t.instances[f(i,"introjs-instance")]=i,i};ct.version="7.2.0",ct.instances={};let lt=class extends n{static get styles(){return[e]}createRenderRoot(){return this}constructor(){super(),this.tourInstance=null,this.steps=[],this.stepsJson="",this.showBackdrop=!1,this.disableInteraction=!1}updated(t){t.has("stepsJson")&&this.parseStepsJson(),super.updated(t)}parseStepsJson(){if(this.stepsJson)try{const t=JSON.parse(this.stepsJson);Array.isArray(t)?this.steps=t:console.error("Invalid JSON: Expected an array")}catch(t){console.error("Failed to parse stepsJson:",t)}}startTour(){console.log("start of tour");const t=this.steps.map((t=>({element:document.querySelector(`[data-tour="${t.element}"]`),intro:t.content,title:t.title,position:t.position,beforeChange:t.beforeChange,afterChange:t.afterChange})));this.tourInstance=ct().setOptions({steps:t,nextLabel:"Next",prevLabel:"Prev",overlayOpacity:0,disableInteraction:this.disableInteraction,showButtons:!0,showStepNumbers:!1,exitOnOverlayClick:!1}),this.tourInstance.onbeforechange((async t=>{const n=this.tourInstance?._currentStep??0,i=this.steps[n];if(i?.beforeChange){if(!await i.beforeChange())return this.shakeTooltip(),!1}return!0})),this.tourInstance.onafterchange((t=>{const n=this.tourInstance?._currentStep??0,i=this.steps[n];i?.afterChange&&i.afterChange()})),this.tourInstance.onchange((t=>{const n=this.tourInstance?._currentStep??0,i=this.steps.length,r=document.querySelector(".introjs-tooltip");if(r){const t=r.querySelector(".introjs-tooltipbuttons");if(t){let r=t.querySelector(".introjs-step-counter");r||(r=document.createElement("div"),r.className="introjs-step-counter",t.insertBefore(r,t.firstChild)),r.textContent=`${n+1} of ${i}`}}})),this.tourInstance.start().then((()=>{const t=this.tourInstance?._currentStep??0,n=this.steps.length,i=document.querySelector(".introjs-tooltip");if(i){const r=i.querySelector(".introjs-tooltipbuttons");if(r){let i=r.querySelector(".introjs-step-counter");i||(i=document.createElement("div"),i.className="introjs-step-counter",r.insertBefore(i,r.firstChild)),i.textContent=`${t+1} of ${n}`}}})).catch((t=>{console.error("Error starting the tour:",t)}))}shakeTooltip(){const t=document.querySelector(".introjs-tooltip");t&&(t.classList.add("introjs-shake"),setTimeout((()=>{t.classList.remove("introjs-shake")}),1500))}render(){return i`
|
10
|
+
*/function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,n,i,r){return new(i||(i=Promise))((function(o,e){function s(t){try{u(r.next(t))}catch(t){e(t)}}function a(t){try{u(r.throw(t))}catch(t){e(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof i?n:new i((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))}function u(t,n){var i,r,o,e,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function a(a){return function(u){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;e&&(e=0,a[0]&&(s=0)),s;)try{if(i=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(t,s)}catch(t){a=[6,t],r=0}finally{i=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function c(t,n,i){var r,o=((r={})[t]=n,r.path="/",r.expires=void 0,r);if(i){var e=new Date;e.setTime(e.getTime()+24*i*60*60*1e3),o.expires=e.toUTCString()}var s=[];for(var a in o)s.push("".concat(a,"=").concat(o[a]));return document.cookie=s.join("; "),l(t)}function l(t){return(n={},document.cookie.split(";").forEach((function(t){var i=t.split("="),r=i[0],o=i[1];n[r.trim()]=o})),n)[t];var n}"function"==typeof SuppressedError&&SuppressedError;var d,f=(d={},function(t,n){return void 0===n&&(n="introjs-stamp"),d[n]=d[n]||0,void 0===t[n]&&(t[n]=d[n]++),t[n]}),h=new(function(){function t(){this.events_key="introjs_event"}return t.prototype._id=function(t,n,i){return t+f(n)+(i?"_".concat(f(i)):"")},t.prototype.on=function(t,n,i,r,o){var e=this._id(n,i,r),s=function(n){return i(r||t,n||window.event)};"addEventListener"in t?t.addEventListener(n,s,o):"attachEvent"in t&&t.attachEvent("on".concat(n),s),t[this.events_key]=t[this.events_key]||{},t[this.events_key][e]=s},t.prototype.off=function(t,n,i,r,o){var e=this._id(n,i,r),s=t[this.events_key]&&t[this.events_key][e];s&&("removeEventListener"in t?t.removeEventListener(n,s,o):"detachEvent"in t&&t.detachEvent("on".concat(n),s),t[this.events_key][e]=null)},t}()),v=function(t){return"function"==typeof t};function p(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";i.match(n)||t.setAttribute("class","".concat(i," ").concat(n))}else if(void 0!==t.classList)for(var r=0,o=n.split(" ");r<o.length;r++){var e=o[r];t.classList.add(e)}else t.className.match(n)||(t.className+=" ".concat(n))}function w(t,n){var i="";return"currentStyle"in t?i=t.currentStyle[n]:document.defaultView&&document.defaultView.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,null).getPropertyValue(n)),i&&i.toLowerCase?i.toLowerCase():i}function b(t,n){if(t){var i=function(t){var n=window.getComputedStyle(t),i="absolute"===n.position,r=/(auto|scroll)/;if("fixed"===n.position)return document.body;for(var o=t;o=o.parentElement;)if(n=window.getComputedStyle(o),(!i||"static"!==n.position)&&r.test(n.overflow+n.overflowY+n.overflowX))return o;return document.body}(n);i!==document.body&&(i.scrollTop=n.offsetTop-i.offsetTop)}}function m(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function j(t,n,i,r,o){var e;if("off"!==n&&t&&(e="tooltip"===n?o.getBoundingClientRect():r.getBoundingClientRect(),!function(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom+80<=window.innerHeight&&n.right<=window.innerWidth}(r))){var s=m().height;e.bottom-(e.bottom-e.top)<0||r.clientHeight>s?window.scrollBy(0,e.top-(s/2-e.height/2)-i):window.scrollBy(0,e.top-(s/2-e.height/2)+i)}}function g(t){t.setAttribute("role","button"),t.tabIndex=0}function y(t){var n=t.parentElement;return!(!n||"HTML"===n.nodeName)&&("fixed"===w(t,"position")||y(n))}function x(t,n){var i=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||i.scrollTop,e=window.pageXOffset||r.scrollLeft||i.scrollLeft;n=n||i;var s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),u=w(n,"position"),c={width:s.width,height:s.height};return"body"!==n.tagName.toLowerCase()&&"relative"===u||"sticky"===u?Object.assign(c,{top:s.top-a.top,left:s.left-a.left}):y(t)?Object.assign(c,{top:s.top,left:s.left}):Object.assign(c,{top:s.top+o,left:s.left+e})}function k(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i.replace(n,"").replace(/^\s+|\s+$/g,""))}else t.className=t.className.replace(n,"").replace(/^\s+|\s+$/g,"")}function L(t,n){var i="";if(t.style.cssText&&(i+=t.style.cssText),"string"==typeof n)i+=n;else for(var r in n)i+="".concat(r,":").concat(n[r],";");t.style.cssText=i}function E(t,n,i){if(i&&n){var r=x(n.element,t._targetElement),o=t._options.helperElementPadding;n.element instanceof Element&&y(n.element)?p(i,"introjs-fixedTooltip"):k(i,"introjs-fixedTooltip"),"floating"===n.position&&(o=0),L(i,{width:"".concat(r.width+o,"px"),height:"".concat(r.height+o,"px"),top:"".concat(r.top-o/2,"px"),left:"".concat(r.left-o/2,"px")})}}function N(t,n,i,r,o){return t.left+n+i.width>r.width?(o.style.left="".concat(r.width-i.width-t.left,"px"),!1):(o.style.left="".concat(n,"px"),!0)}function P(t,n,i,r){return t.left+t.width-n-i.width<0?(r.style.left="".concat(-t.left,"px"),!1):(r.style.right="".concat(n,"px"),!0)}function S(t,n){t.includes(n)&&t.splice(t.indexOf(n),1)}function A(t,n,i,r,o){if(void 0===o&&(o=!1),n){var e,s,a,u,c="";i.style.top="",i.style.right="",i.style.bottom="",i.style.left="",i.style.marginLeft="",i.style.marginTop="",r.style.display="inherit",c="string"==typeof n.tooltipClass?n.tooltipClass:t._options.tooltipClass,i.className=["introjs-tooltip",c].filter(Boolean).join(" "),i.setAttribute("role","dialog"),"floating"!==(u=n.position)&&t._options.autoPosition&&(u=function(t,n,i,r){var o=t.slice(),e=m(),s=x(i).height+10,a=x(i).width+20,u=n.getBoundingClientRect(),c="floating";if(u.bottom+s>e.height&&S(o,"bottom"),u.top-s<0&&S(o,"top"),u.right+a>e.width&&S(o,"right"),u.left-a<0&&S(o,"left"),r&&(r=r.split("-")[0]),o.length&&(c=o[0],o.includes(r)&&(c=r)),"top"===c||"bottom"===c){var l=void 0,d=[];"top"===c?(l="top-middle-aligned",d=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(l="bottom-middle-aligned",d=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),c=function(t,n,i,r){var o=n/2,e=Math.min(i,window.screen.width);return e-t<n&&(S(r,"top-left-aligned"),S(r,"bottom-left-aligned")),(t<o||e-t<o)&&(S(r,"top-middle-aligned"),S(r,"bottom-middle-aligned")),t<n&&(S(r,"top-right-aligned"),S(r,"bottom-right-aligned")),r.length?r[0]:null}(u.left,a,e.width,d)||l}return c}(t._options.positionPrecedence,n.element,i,u)),s=x(n.element),e=x(i),a=m(),p(i,"introjs-".concat(u));var l=s.width/2-e.width/2;switch(u){case"top-right-aligned":r.className="introjs-arrow bottom-right";var d=0;P(s,d,e,i),i.style.bottom="".concat(s.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",o&&(l+=5),P(s,l,e,i)&&(i.style.right="",N(s,l,e,a,i)),i.style.bottom="".concat(s.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",N(s,o?0:15,e,a,i),i.style.bottom="".concat(s.height+20,"px");break;case"right":i.style.left="".concat(s.width+20,"px"),s.top+e.height>a.height?(r.className="introjs-arrow left-bottom",i.style.top="-".concat(e.height-s.height-20,"px")):r.className="introjs-arrow left";break;case"left":o||!0!==t._options.showStepNumbers||(i.style.top="15px"),s.top+e.height>a.height?(i.style.top="-".concat(e.height-s.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",i.style.right="".concat(s.width+20,"px");break;case"floating":r.style.display="none",i.style.left="50%",i.style.top="50%",i.style.marginLeft="-".concat(e.width/2,"px"),i.style.marginTop="-".concat(e.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",P(s,d=0,e,i),i.style.top="".concat(s.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",o&&(l+=5),P(s,l,e,i)&&(i.style.right="",N(s,l,e,a,i)),i.style.top="".concat(s.height+20,"px");break;default:r.className="introjs-arrow top",N(s,0,e,a,i),i.style.top="".concat(s.height+20,"px")}}}function I(){for(var t=0,n=Array.from(document.querySelectorAll(".introjs-showElement"));t<n.length;t++)k(n[t],/introjs-[a-zA-Z]+/g)}function C(t,n){var i=document.createElement(t);n=n||{};var r=/^(?:role|data-|aria-)/;for(var o in n){var e=n[o];"style"===o&&"function"!=typeof e?L(i,e):"string"==typeof e&&o.match(r)?i.setAttribute(o,e):i[o]=e}return i}function B(t,n,i){if(void 0===i&&(i=!1),i){var r=n.style.opacity||"1";L(n,{opacity:"0"}),window.setTimeout((function(){L(n,{opacity:r})}),10)}t.appendChild(n)}function O(t,n){return(t+1)/n*100}function T(t,n){var i=C("div",{className:"introjs-bullets"});!1===t._options.showBullets&&(i.style.display="none");var r=C("ul");r.setAttribute("role","tablist");for(var o=function(){var n=this.getAttribute("data-step-number");null!=n&&t.goToStep(parseInt(n,10))},e=0;e<t._introItems.length;e++){var s=t._introItems[e].step,a=C("li"),u=C("a");a.setAttribute("role","presentation"),u.setAttribute("role","tab"),u.onclick=o,e===n.step-1&&(u.className="active"),g(u),u.innerHTML=" ",u.setAttribute("data-step-number",s.toString()),a.appendChild(u),r.appendChild(a)}return i.appendChild(r),i}function R(t,n,i){var r=t.querySelector(".introjs-progress .introjs-progressbar");if(r){var o=O(n,i);r.style.cssText="width:".concat(o,"%;"),r.setAttribute("aria-valuenow",o.toString())}}function $(t,n){return a(this,void 0,void 0,(function(){var i,r,o,e,s,c,l,d,f,h,m,y,x,k,N,P,S,$,z,D,M,J,V,Z,_=this;return u(this,(function(H){switch(H.label){case 0:return v(t._introChangeCallback)?[4,t._introChangeCallback.call(t,n.element)]:[3,2];case 1:H.sent(),H.label=2;case 2:return i=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),o="introjs-helperLayer","string"==typeof n.highlightClass&&(o+=" ".concat(n.highlightClass)),"string"==typeof t._options.highlightClass&&(o+=" ".concat(t._options.highlightClass)),null!==i&&null!==r?(l=r.querySelector(".introjs-helperNumberLayer"),d=r.querySelector(".introjs-tooltiptext"),f=r.querySelector(".introjs-tooltip-title"),h=r.querySelector(".introjs-arrow"),m=r.querySelector(".introjs-tooltip"),c=r.querySelector(".introjs-skipbutton"),s=r.querySelector(".introjs-prevbutton"),e=r.querySelector(".introjs-nextbutton"),i.className=o,m.style.opacity="0",m.style.display="none",b(t._options.scrollToElement,n.element),E(t,n,i),E(t,n,r),I(),t._lastShowElementTimer&&window.clearTimeout(t._lastShowElementTimer),t._lastShowElementTimer=window.setTimeout((function(){null!==l&&(l.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length)),d.innerHTML=n.intro||"",f.innerHTML=n.title||"",m.style.display="block",A(t,n,m,h),function(t,n,i){if(t){var r=n.querySelector(".introjs-bullets li > a.active"),o=n.querySelector('.introjs-bullets li > a[data-step-number="'.concat(i.step,'"]'));r&&o&&(r.className="",o.className="active")}}(t._options.showBullets,r,n),R(r,t._currentStep,t._introItems.length),m.style.opacity="1",(null!=e&&/introjs-donebutton/gi.test(e.className)||null!=e)&&e.focus(),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,d)}),350)):(y=C("div",{className:o}),x=C("div",{className:"introjs-tooltipReferenceLayer"}),k=C("div",{className:"introjs-arrow"}),N=C("div",{className:"introjs-tooltip"}),P=C("div",{className:"introjs-tooltiptext"}),S=C("div",{className:"introjs-tooltip-header"}),$=C("h1",{className:"introjs-tooltip-title"}),z=C("div"),L(y,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(t._options.overlayOpacity.toString(),") 0 0 0 5000px")}),b(t._options.scrollToElement,n.element),E(t,n,y),E(t,n,x),B(t._targetElement,y,!0),B(t._targetElement,x),P.innerHTML=n.intro,$.innerHTML=n.title,z.className="introjs-tooltipbuttons",!1===t._options.showButtons&&(z.style.display="none"),S.appendChild($),N.appendChild(S),N.appendChild(P),t._options.dontShowAgain&&(D=C("div",{className:"introjs-dontShowAgain"}),(M=C("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(n){t.setDontShowAgain(n.target.checked)},(J=C("label",{htmlFor:"introjs-dontShowAgain"})).innerText=t._options.dontShowAgainLabel,D.appendChild(M),D.appendChild(J),N.appendChild(D)),N.appendChild(T(t,n)),N.appendChild(function(t){var n=C("div");n.className="introjs-progress",!1===t._options.showProgress&&(n.style.display="none");var i=C("div",{className:"introjs-progressbar"});t._options.progressBarAdditionalClass&&(i.className+=" "+t._options.progressBarAdditionalClass);var r=O(t._currentStep,t._introItems.length);return i.setAttribute("role","progress"),i.setAttribute("aria-valuemin","0"),i.setAttribute("aria-valuemax","100"),i.setAttribute("aria-valuenow",r.toString()),i.style.cssText="width:".concat(r,"%;"),n.appendChild(i),n}(t)),V=C("div"),!0===t._options.showStepNumbers&&(V.className="introjs-helperNumberLayer",V.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length),N.appendChild(V)),N.appendChild(k),x.appendChild(N),(e=C("a")).onclick=function(){return a(_,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep?[3,2]:[4,F(t)];case 1:return n.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(e.className)?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"done")]:[3,4]:[3,6];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:n.sent(),n.label=6;case 6:return[2]}}))}))},g(e),e.innerHTML=t._options.nextLabel,(s=C("a")).onclick=function(){return a(_,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return t._currentStep>0?[4,G(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},g(s),s.innerHTML=t._options.prevLabel,g(c=C("a",{className:"introjs-skipbutton"})),c.innerHTML=t._options.skipLabel,c.onclick=function(){return a(_,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,2];case 1:n.sent(),n.label=2;case 2:return v(t._introSkipCallback)?[4,t._introSkipCallback.call(t,t._currentStep)]:[3,4];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return n.sent(),[2]}}))}))},S.appendChild(c),t._introItems.length>1&&z.appendChild(s),z.appendChild(e),N.appendChild(z),A(t,n,N,k),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,N)),(Z=t._targetElement.querySelector(".introjs-disableInteraction"))&&Z.parentNode&&Z.parentNode.removeChild(Z),n.disableInteraction&&function(t,n){var i=document.querySelector(".introjs-disableInteraction");null===i&&(i=C("div",{className:"introjs-disableInteraction"}),t._targetElement.appendChild(i)),E(t,n,i)}(t,n),0===t._currentStep&&t._introItems.length>1?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel),!0===t._options.hidePrev?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-hidden")),null!=e&&p(e,"introjs-fullbutton")):null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-disabled"))):t._introItems.length-1===t._currentStep||1===t._introItems.length?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),!0===t._options.hideNext?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-hidden")),null!=s&&p(s,"introjs-fullbutton")):null!=e&&(!0===t._options.nextToDone?(e.innerHTML=t._options.doneLabel,p(e,"".concat(t._options.buttonClass," introjs-nextbutton introjs-donebutton"))):e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-disabled"))):(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel)),null!=s&&s.setAttribute("role","button"),null!=e&&e.setAttribute("role","button"),null!=c&&c.setAttribute("role","button"),null!=e&&e.focus(),function(t){p(t,"introjs-showElement");var n=w(t,"position");"absolute"!==n&&"relative"!==n&&"sticky"!==n&&"fixed"!==n&&p(t,"introjs-relativePosition")}(n.element),v(t._introAfterChangeCallback)?[4,t._introAfterChangeCallback.call(t,n.element)]:[3,4];case 3:H.sent(),H.label=4;case 4:return[2]}}))}))}function z(t,n){return a(this,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return t._currentStep=n-2,void 0===t._introItems?[3,2]:[4,F(t)];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}function D(t,n){return a(this,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return t._currentStepNumber=n,void 0===t._introItems?[3,2]:[4,F(t)];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}function F(t){return a(this,void 0,void 0,(function(){var n,i,r;return u(this,(function(o){switch(o.label){case 0:if(t._direction="forward",void 0!==t._currentStepNumber)for(n=0;n<t._introItems.length;n++)t._introItems[n].step===t._currentStepNumber&&(t._currentStep=n-1,t._currentStepNumber=void 0);return-1===t._currentStep?t._currentStep=0:++t._currentStep,i=t._introItems[t._currentStep],r=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,i&&i.element,t._currentStep,t._direction)]:[3,2];case 1:r=o.sent(),o.label=2;case 2:return!1===r?(--t._currentStep,[2,!1]):t._introItems.length<=t._currentStep?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"end")]:[3,4]:[3,6];case 3:o.sent(),o.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return o.sent(),[2,!1];case 6:return[4,$(t,i)];case 7:return o.sent(),[2,!0]}}))}))}function G(t){return a(this,void 0,void 0,(function(){var n,i;return u(this,(function(r){switch(r.label){case 0:return t._direction="backward",t._currentStep<=0?[2,!1]:(--t._currentStep,n=t._introItems[t._currentStep],i=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,n&&n.element,t._currentStep,t._direction)]:[3,2]);case 1:i=r.sent(),r.label=2;case 2:return!1===i?(++t._currentStep,[2,!1]):[4,$(t,n)];case 3:return r.sent(),[2,!0]}}))}))}function M(t,n){return a(this,void 0,void 0,(function(){var i,r;return u(this,(function(o){switch(o.label){case 0:return null===(i=void 0===n.code?n.which:n.code)&&(i=null===n.charCode?n.keyCode:n.charCode),"Escape"!==i&&27!==i||!0!==t._options.exitOnEsc?[3,2]:[4,et(t,t._targetElement)];case 1:return o.sent(),[3,16];case 2:return"ArrowLeft"!==i&&37!==i?[3,4]:[4,G(t)];case 3:return o.sent(),[3,16];case 4:return"ArrowRight"!==i&&39!==i?[3,6]:[4,F(t)];case 5:return o.sent(),[3,16];case 6:return"Enter"!==i&&"NumpadEnter"!==i&&13!==i?[3,16]:(r=n.target||n.srcElement)&&r.className.match("introjs-prevbutton")?[4,G(t)]:[3,8];case 7:return o.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,10]:[3,12];case 9:o.sent(),o.label=10;case 10:return[4,et(t,t._targetElement)];case 11:return o.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,F(t)];case 14:o.sent(),o.label=15;case 15:n.preventDefault?n.preventDefault():n.returnValue=!1,o.label=16;case 16:return[2]}}))}))}function J(t){if(null===t||"object"!==s(t)||"nodeType"in t)return t;var n={};for(var i in t)"jQuery"in window&&t[i]instanceof window.jQuery?n[i]=t[i]:n[i]=J(t[i]);return n}function V(t){var n=document.querySelector(".introjs-hints");return n?Array.from(n.querySelectorAll(t)):[]}function Z(t,n){return a(this,void 0,void 0,(function(){var i;return u(this,(function(r){switch(r.label){case 0:return i=V('.introjs-hint[data-step="'.concat(n,'"]'))[0],X(),i&&p(i,"introjs-hidehint"),v(t._hintCloseCallback)?[4,t._hintCloseCallback.call(t,n)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))}function _(t){return a(this,void 0,void 0,(function(){var n,i,r,o,e;return u(this,(function(s){switch(s.label){case 0:n=V(".introjs-hint"),i=0,r=n,s.label=1;case 1:return i<r.length?(o=r[i],(e=o.getAttribute("data-step"))?[4,Z(t,parseInt(e,10))]:[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}}))}))}function H(t){return a(this,void 0,void 0,(function(){var n,i,r,o,e;return u(this,(function(s){switch(s.label){case 0:if(!(n=V(".introjs-hint"))||!n.length)return[3,1];for(i=0,r=n;i<r.length;i++)o=r[i],(e=o.getAttribute("data-step"))&&Q(parseInt(e,10));return[3,3];case 1:return[4,Y(t,t._targetElement)];case 2:s.sent(),s.label=3;case 3:return[2]}}))}))}function Q(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&k(n,/introjs-hidehint/g)}function W(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&n.parentNode&&n.parentNode.removeChild(n)}function q(t){return a(this,void 0,void 0,(function(){var n,i,r,o,e,s,a;return u(this,(function(u){switch(u.label){case 0:for(null===(n=document.querySelector(".introjs-hints"))&&(n=C("div",{className:"introjs-hints"})),i=function(n){return function(i){var r=i||window.event;r&&r.stopPropagation&&r.stopPropagation(),r&&null!==r.cancelBubble&&(r.cancelBubble=!0),U(t,n)}},r=0;r<t._hintItems.length;r++){if(o=t._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];g(e=C("a",{className:"introjs-hint"})),e.onclick=i(r),o.hintAnimation||p(e,"introjs-hint-no-anim"),y(o.element)&&p(e,"introjs-fixedhint"),s=C("div",{className:"introjs-hint-dot"}),a=C("div",{className:"introjs-hint-pulse"}),e.appendChild(s),e.appendChild(a),e.setAttribute("data-step",r.toString()),o.hintTargetElement=o.element,o.element=e,K(o.hintPosition,e,o.hintTargetElement),n.appendChild(e)}return document.body.appendChild(n),v(t._hintsAddedCallback)?[4,t._hintsAddedCallback.call(t)]:[3,2];case 1:u.sent(),u.label=2;case 2:return t._options.hintAutoRefreshInterval>=0&&(t._hintsAutoRefreshFunction=(c=function(){return tt(t)},l=t._options.hintAutoRefreshInterval,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window.clearTimeout(d),d=window.setTimeout((function(){c()}),l)}),h.on(window,"scroll",t._hintsAutoRefreshFunction,t,!0)),[2]}var c,l,d}))}))}function K(t,n,i){if(void 0!==i){var r=x(i),o=20,e=20;switch(t){default:case"top-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top,"px");break;case"top-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top,"px");break;case"bottom-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"bottom-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"middle-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"bottom-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"top-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top,"px")}}}function U(t,n){return a(this,void 0,void 0,(function(){var i,r,o,e,s,a,c,l,d,f,h;return u(this,(function(u){switch(u.label){case 0:return i=document.querySelector('.introjs-hint[data-step="'.concat(n,'"]')),r=t._hintItems[n],v(t._hintClickCallback)?[4,t._hintClickCallback.call(t,i,r,n)]:[3,2];case 1:u.sent(),u.label=2;case 2:return void 0!==(o=X())&&parseInt(o,10)===n||(e=C("div",{className:"introjs-tooltip"}),s=C("div"),a=C("div"),c=C("div"),e.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},s.className="introjs-tooltiptext",(l=C("p")).innerHTML=r.hint||"",s.appendChild(l),t._options.hintShowButton&&((d=C("a")).className=t._options.buttonClass,d.setAttribute("role","button"),d.innerHTML=t._options.hintButtonLabel,d.onclick=function(){return Z(t,n)},s.appendChild(d)),a.className="introjs-arrow",e.appendChild(a),e.appendChild(s),f=i.getAttribute("data-step")||"",t._currentStep=parseInt(f,10),h=t._hintItems[t._currentStep],c.className="introjs-tooltipReferenceLayer introjs-hintReference",c.setAttribute("data-step",f),E(t,h,c),c.appendChild(e),document.body.appendChild(c),A(t,h,e,a,!0)),[2]}}))}))}function X(){var t=document.querySelector(".introjs-hintReference");if(t&&t.parentNode){var n=t.getAttribute("data-step");if(!n)return;return t.parentNode.removeChild(t),n}}function Y(t,n){return a(this,void 0,void 0,(function(){var i,r,o,e,s,a,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(t._hintItems=[],t._options.hints&&t._options.hints.length>0)for(i=0,r=t._options.hints;i<r.length;i++)o=r[i],"string"==typeof(e=J(o)).element&&(e.element=document.querySelector(e.element)),e.hintPosition=e.hintPosition||t._options.hintPosition,e.hintAnimation=e.hintAnimation||t._options.hintAnimation,null!==e.element&&t._hintItems.push(e);else{if(!(s=Array.from(n.querySelectorAll("*[data-hint]")))||!s.length)return[2,!1];for(a=0,c=s;a<c.length;a++)l=c[a],d=l.getAttribute("data-hint-animation"),f=t._options.hintAnimation,d&&(f="true"===d),t._hintItems.push({element:l,hint:l.getAttribute("data-hint")||"",hintPosition:l.getAttribute("data-hint-position")||t._options.hintPosition,hintAnimation:f,tooltipClass:l.getAttribute("data-tooltip-class")||void 0,position:l.getAttribute("data-position")||t._options.tooltipPosition})}return[4,q(t)];case 1:return u.sent(),h.on(document,"click",X,t,!1),h.on(window,"resize",tt,t,!0),[2,!0]}}))}))}function tt(t){for(var n=0,i=t._hintItems;n<i.length;n++){var r=i[n],o=r.hintTargetElement;K(r.hintPosition,r.element,o)}}function nt(t,n){var i=Array.from(n.querySelectorAll("*[data-intro]")),r=[];if(t._options.steps&&t._options.steps.length)for(var o=0,e=t._options.steps;o<e.length;o++){var s=J(f=e[o]);if(s.step=r.length+1,s.title=s.title||"","string"==typeof s.element&&(s.element=document.querySelector(s.element)||void 0),void 0===s.element||null===s.element){var a=document.querySelector(".introjsFloatingElement");null===a&&(a=C("div",{className:"introjsFloatingElement"}),document.body.appendChild(a)),s.element=a,s.position="floating"}s.position=s.position||t._options.tooltipPosition,s.scrollTo=s.scrollTo||t._options.scrollTo,void 0===s.disableInteraction&&(s.disableInteraction=t._options.disableInteraction),null!==s.element&&r.push(s)}else{var u=void 0;if(i.length<1)return[];for(var c=0,l=i;c<l.length;c++){var d=l[c];if((!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&"none"!==d.style.display){var f=parseInt(d.getAttribute("data-step")||"",10);u=t._options.disableInteraction,d.hasAttribute("data-disable-interaction")&&(u=!!d.getAttribute("data-disable-interaction")),f>0&&(r[f-1]={step:f,element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u})}}for(var h=0,v=0,p=i;v<p.length;v++)if(d=p[v],(!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&null===d.getAttribute("data-step")){for(;void 0!==r[h];)h++;u=d.hasAttribute("data-disable-interaction")?!!d.getAttribute("data-disable-interaction"):t._options.disableInteraction,r[h]={element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",step:h+1,tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u}}}for(var w=[],b=0;b<r.length;b++)r[b]&&w.push(r[b]);return(r=w).sort((function(t,n){return t.step-n.step})),r}function it(t,n){var i=t._currentStep;if(null!=i&&-1!=i){var r=t._introItems[i],o=document.querySelector(".introjs-tooltipReferenceLayer"),e=document.querySelector(".introjs-helperLayer"),s=document.querySelector(".introjs-disableInteraction");E(t,r,e),E(t,r,o),E(t,r,s),n&&(t._introItems=nt(t,t._targetElement),function(t,n){if(t._options.showBullets){var i=document.querySelector(".introjs-bullets");i&&i.parentNode&&i.parentNode.replaceChild(T(t,n),i)}}(t,r),R(o,i,t._introItems.length));var a=document.querySelector(".introjs-arrow"),u=document.querySelector(".introjs-tooltip");return u&&a&&A(t,t._introItems[i],u,a),tt(t),t}}function rt(t){it(t)}function ot(t,n){if(void 0===n&&(n=!1),t&&t.parentElement){var i=t.parentElement;n?(L(t,{opacity:"0"}),window.setTimeout((function(){try{i.removeChild(t)}catch(t){}}),500)):i.removeChild(t)}}function et(t,n,i){return void 0===i&&(i=!1),a(this,void 0,void 0,(function(){var r,o,e,s;return u(this,(function(a){switch(a.label){case 0:return r=!0,void 0===t._introBeforeExitCallback?[3,2]:[4,t._introBeforeExitCallback.call(t,n)];case 1:r=a.sent(),a.label=2;case 2:if(!i&&!1===r)return[2];if((o=Array.from(n.querySelectorAll(".introjs-overlay")))&&o.length)for(e=0,s=o;e<s.length;e++)ot(s[e]);return ot(n.querySelector(".introjs-helperLayer"),!0),ot(n.querySelector(".introjs-tooltipReferenceLayer")),ot(n.querySelector(".introjs-disableInteraction")),ot(document.querySelector(".introjsFloatingElement")),I(),h.off(window,"keydown",M,t,!0),h.off(window,"resize",rt,t,!0),v(t._introExitCallback)?[4,t._introExitCallback.call(t)]:[3,4];case 3:a.sent(),a.label=4;case 4:return t._currentStep=-1,[2]}}))}))}function st(t,n){return a(this,void 0,void 0,(function(){var i;return u(this,(function(r){switch(r.label){case 0:return t.isActive()?v(t._introStartCallback)?[4,t._introStartCallback.call(t,n)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return 0===(i=nt(t,n)).length?[2,!1]:(t._introItems=i,function(t,n){var i=this,r=C("div",{className:"introjs-overlay"});L(r,{top:0,bottom:0,left:0,right:0,position:"fixed"}),n.appendChild(r),!0===t._options.exitOnOverlayClick&&(L(r,{cursor:"pointer"}),r.onclick=function(){return a(i,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return[4,et(t,n)];case 1:return i.sent(),[2]}}))}))})}(t,n),[4,F(t)]);case 3:r.sent(),n.addEventListener,t._options.keyboardNavigation&&h.on(window,"keydown",M,t,!0),h.on(window,"resize",rt,t,!0),r.label=4;case 4:return[2,!1]}}))}))}function at(t,n,i){return t[n]=i,t}var ut=function(){function t(t){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=t,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}return t.prototype.isActive=function(){return(!this._options.dontShowAgain||""===(t=l(this._options.dontShowAgainCookie))||"true"!==t)&&this._options.isActive;var t},t.prototype.clone=function(){return new t(this._targetElement)},t.prototype.setOption=function(t,n){return this._options=at(this._options,t,n),this},t.prototype.setOptions=function(t){return this._options=function(t,n){for(var i=0,r=Object.entries(n);i<r.length;i++){var o=r[i];t=at(t,o[0],o[1])}return t}(this._options,t),this},t.prototype.start=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,st(this,this._targetElement)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.goToStep=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,z(this,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addStep=function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},t.prototype.addSteps=function(t){if(!t.length)return this;for(var n=0;n<t.length;n++)this.addStep(t[n]);return this},t.prototype.goToStepNumber=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,D(this,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.nextStep=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,F(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.previousStep=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,G(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.currentStep=function(){return this._currentStep},t.prototype.exit=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,et(this,this._targetElement,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.refresh=function(t){return it(this,t),this},t.prototype.setDontShowAgain=function(t){return function(t,n){n?c(t._options.dontShowAgainCookie,"true",t._options.dontShowAgainCookieDays):c(t._options.dontShowAgainCookie,"",-1)}(this,t),this},t.prototype.onbeforechange=function(t){if(!v(t))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},t.prototype.onchange=function(t){if(!v(t))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},t.prototype.onafterchange=function(t){if(!v(t))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},t.prototype.oncomplete=function(t){if(!v(t))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},t.prototype.onhintsadded=function(t){if(!v(t))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},t.prototype.onhintclick=function(t){if(!v(t))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},t.prototype.onhintclose=function(t){if(!v(t))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},t.prototype.onstart=function(t){if(!v(t))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=t,this},t.prototype.onexit=function(t){if(!v(t))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},t.prototype.onskip=function(t){if(!v(t))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},t.prototype.onbeforeexit=function(t){if(!v(t))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},t.prototype.addHints=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,Y(this,this._targetElement)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.hideHint=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,Z(this,t)];case 1:return n.sent(),[2,this]}}))}))},t.prototype.hideHints=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,_(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.showHint=function(t){return Q(t),this},t.prototype.showHints=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,H(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.removeHints=function(){return function(t){for(var n=0,i=V(".introjs-hint");n<i.length;n++){var r=i[n].getAttribute("data-step");r&&W(parseInt(r,10))}h.off(document,"click",X,t,!1),h.off(window,"resize",tt,t,!0),t._hintsAutoRefreshFunction&&h.off(window,"scroll",t._hintsAutoRefreshFunction,t,!0)}(this),this},t.prototype.removeHint=function(t){return W(t),this},t.prototype.showHintDialog=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,U(this,t)];case 1:return n.sent(),[2,this]}}))}))},t}(),ct=function t(n){var i;if("object"===s(n))i=new ut(n);else if("string"==typeof n){var r=document.querySelector(n);if(!r)throw new Error("There is no element with given selector.");i=new ut(r)}else i=new ut(document.body);return t.instances[f(i,"introjs-instance")]=i,i};ct.version="7.2.0",ct.instances={};let lt=class extends n{static get styles(){return[e]}createRenderRoot(){return this}constructor(){super(),this.tourInstance=null,this.stepsJson="",this.showBackdrop=!1,this.disableInteraction=!1}parseSteps(){return Array.isArray(this.stepsJson)?this.stepsJson:(console.error("Invalid stepsJson format"),[])}async getElementWhenNeeded(t){return{element:()=>document.querySelector(`[data-tour="${t.element}"]`),intro:t.content,title:t.title,position:t.position,beforeChange:t.beforeChange,afterChange:t.afterChange,disableNext:t.disableNext||!1,disablePrev:t.disablePrev||!1}}nextStep(){this.tourInstance?.nextStep()}async startTour(){const t=await Promise.all(this.parseSteps().map((t=>this.getElementWhenNeeded(t))));0!==t.length?(this.tourInstance=ct().setOptions({steps:t,disableInteraction:this.disableInteraction,nextLabel:"Next",prevLabel:"Prev",overlayOpacity:this.showBackdrop?.5:0,exitOnOverlayClick:!1,showProgress:!1,showButtons:!0}),this.tourInstance.onbeforechange((async n=>{const i=this.tourInstance?._currentStep??0,r=t[i];if(r&&"function"==typeof r.element){const t=r.element();t&&this.tourInstance&&this.tourInstance._introItems&&(this.tourInstance._introItems[i].element=t)}return!r.beforeChange||await r.beforeChange()})),this.tourInstance.onafterchange((n=>{const i=this.tourInstance?._currentStep??0,r=t[i];r?.afterChange&&r.afterChange();const o=document.querySelector(".introjs-nextbutton"),e=document.querySelector(".introjs-prevbutton");o&&o.setAttribute("disabled",r.disableNext?"true":"false"),e&&e.setAttribute("disabled",r.disablePrev?"true":"false")})),this.tourInstance.onchange((()=>{const n=this.tourInstance?._currentStep??0,i=t.length,r=document.querySelector(".introjs-tooltip");if(r){const t=r.querySelector(".introjs-tooltipbuttons");if(t){let r=t.querySelector(".introjs-step-counter");r||(r=document.createElement("div"),r.className="introjs-step-counter",t.insertBefore(r,t.firstChild)),r.textContent=`${n+1} of ${i}`}}})),this.tourInstance.start().then((()=>{const n=this.tourInstance?._currentStep??0,i=t.length,r=document.querySelector(".introjs-tooltip");if(r){const t=r.querySelector(".introjs-tooltipbuttons");if(t){let r=t.querySelector(".introjs-step-counter");r||(r=document.createElement("div"),r.className="introjs-step-counter",t.insertBefore(r,t.firstChild)),r.textContent=`${n+1} of ${i}`}const o=document.createElement("button");o.className="introjs-close-btn",o.innerHTML='\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5.33228 5.99996L0 11.3322L0.667759 12L6.00004 6.66772L11.3323 12L12.0001 11.3322L6.66779 5.99996L12 0.667759L11.3322 0L6.00004 5.3322L0.667842 5.96046e-08L8.40425e-05 0.667759L5.33228 5.99996Z" fill="white" fill-opacity="0.5"/>\n </svg>',o.onclick=()=>this.tourInstance?.exit(!0),r.appendChild(o)}})).catch((t=>{console.error("Error starting the tour:",t)}))):console.error("No valid steps found for the tour.")}render(){return i`
|
11
11
|
<style>
|
12
12
|
${e.cssText}
|
13
|
+
.introjs-close-btn {
|
14
|
+
position: absolute;
|
15
|
+
top: 5px;
|
16
|
+
right: 10px;
|
17
|
+
background: none;
|
18
|
+
border: none;
|
19
|
+
cursor: pointer;
|
20
|
+
padding: 0;
|
21
|
+
}
|
13
22
|
</style>
|
14
23
|
<slot></slot>
|
15
|
-
`}};t([r({type:
|
24
|
+
`}};t([r({type:String})],lt.prototype,"stepsJson",void 0),t([r({type:Boolean})],lt.prototype,"showBackdrop",void 0),t([r({type:Boolean})],lt.prototype,"disableInteraction",void 0),lt=t([o("nile-tour")],lt);export{lt as N};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-code-editor.js","sourceRoot":"","sources":["../../../src/nile-code-editor/nile-code-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,IAAI,GAIL,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,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AAC;AACV,CAAC;AAAA,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,WAAW,CAAC,IAAY;IAC/B,6CAA6C;IAC7C,MAAM,KAAK,GAAG,yFAAyF,CAAC;IACxG,oCAAoC;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAS,mBAAmB,CAAC,IAAY;IACvC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,gDAAgD;IAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValueMap,\n} from 'lit';\n\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-code-editor.css';\nimport { EditorView } from 'codemirror';\nimport { ViewUpdate, placeholder } from '@codemirror/view';\nimport { \n Compartment,\n EditorState,\n Extension\n} from '@codemirror/state';\nimport { StyleSpec } from 'style-mod';\nimport {\n syntaxHighlighting,\n defaultHighlightStyle,\n} from '@codemirror/language';\n\nimport { lineNumbers } from '@codemirror/view';\nimport {\n javascript,\n javascriptLanguage,\n} from '@codemirror/lang-javascript';\nimport { sql } from '@codemirror/lang-sql';\nimport { json } from '@codemirror/lang-json';\nimport { html as htmlLang } from '@codemirror/lang-html';\nimport { autocompletion,CompletionContext,CompletionResult } from '@codemirror/autocomplete';\nimport NileElement from '../internal/nile-element';\nimport { basicSetup } from './extensionSetup';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { Theme as DefaultTheme, CustomTheme } from './theme';\n\n// Choose the appropriate mode for your use case\n\n/**\n * Nile icon component.\n *\n * @tag nile-code-editor\n *\n */\n@customElement('nile-code-editor')\nexport class NileCodeEditor extends NileElement {\n \n @query('.code__editor__container') codeEditor: HTMLInputElement;\n\n @property({ type: String, reflect: true , attribute: true }) value = '';\n\n @property({ type: String, reflect: true , attribute: true }) expandIcon = \"expand-2\";\n\n @property({ type: String, reflect: true , attribute: true }) placeholder = \"\";\n\n @property({ type: Object, reflect: true , attribute: true }) customAutoCompletions: object | any = {};\n\n @property({ type: Array, reflect: true , attribute: true }) customCompletionsPaths: string[] = [];\n\n @property({ type: String, reflect: true , attribute: true}) language: 'javascript' | 'sql' | 'json' | 'html' = 'javascript';\n\n @property({ type: String, reflect: true , attribute: 'error-message' }) errorMessage: string = '';\n\n @property({ type: Boolean, reflect: true , attribute: 'error' }) error: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: 'noborder' }) noborder: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) multiline: boolean = false;\n \n @property({ type: Boolean, reflect: true , attribute: true }) allowVariableInCustomSuggestion: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbers: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: false }) disableSyntaxHighlighting: boolean = false;\n\n @property({ type: Object, attribute: false }) customThemeCSS: object | null = null;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbersMultiline: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) hasScroller: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) expandable: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true}) readonly: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true}) debounce: boolean = false;\n\n @property({ type: Number, reflect: true , attribute: true}) debounceTimeout: number = 200;\n\n public view: EditorView;\n public viewState:EditorState;\n private timeOut: any = null;\n\n // Compartments for initialiazing and switching extensions\n private lineNumbersComp = new Compartment();\n private restrictSingleLineComp = new Compartment();\n private readOnlyComp = new Compartment();\n private customCompletionComp = new Compartment();\n private placeholderComp = new Compartment();\n private defaultSyntaxHighlightingComp = new Compartment();\n private themeComp = new Compartment();\n\n /**\n * The styles for CodeEditor\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit('nile-init',undefined,false);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.view.destroy()\n this.emit('nile-destroy',undefined,false);\n }\n\n firstUpdated() {\n this.createNewView()\n this.emit('nile-after-init',{ \n codeMirrorInstance: this.view, \n createNewView: this.createNewView, \n insertAtCursor: this.insertBetweenCode \n }, false )\n }\n\n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{\n super.updated(changedProperties);\n if (changedProperties.has('value') && this.view.state.doc.toString()!=this.value) {\n // Editor has already been initialized, update its state\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('multiline')) {\n this.view.dispatch({\n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n this.restrictSingleLineComp.reconfigure(this.getSingleLineExtension())\n ],\n })\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('readonly')) {\n this.view.dispatch({ \n effects: [\n this.readOnlyComp.reconfigure(this.getReadOnlyExtension()),\n ]\n })\n }\n if (changedProperties.has('placeholder')) {\n this.view.dispatch({ \n effects: [\n this.placeholderComp.reconfigure(this.getPlaceholderExtension()),\n ]\n })\n }\n if (changedProperties.has('lineNumbers') || changedProperties.has('lineNumbersMultiline')) {\n this.view.dispatch({ \n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n ]\n })\n }\n if(changedProperties.has('customAutoCompletions') || changedProperties.has('customCompletionsPaths')){\n this.view.dispatch({ \n effects: [\n this.customCompletionComp.reconfigure(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }))\n ]\n })\n }\n if(changedProperties.has('disableSyntaxHighlighting')){\n this.view.dispatch({ \n effects: [\n this.defaultSyntaxHighlightingComp.reconfigure(this.getDefaultSyntaxHighlightingExtension())\n ]\n })\n }\n if(changedProperties.has('customThemeCSS')){\n this.view.dispatch({ \n effects: [\n this.themeComp.reconfigure(this.getCustomThemeExtension())\n ]\n })\n }\n }\n\n public render(): TemplateResult {\n const hasErrorMessage = !!this.errorMessage;\n const hasError = !!this.error;\n const noborder = !!this.noborder;\n const noScrollbar = !this.hasScroller\n return html`<div\n part=\"code-editor-base\"\n class=${classMap({\n 'code__editor__container': true,\n 'noborder': noborder,\n 'error': hasError || hasErrorMessage,\n 'code__editor__singleline': !this.multiline,\n 'no-scroller': noScrollbar\n })}\n >\n ${this.expandable\n ? html` \n <div @click=\"${(e: CustomEvent) => this.emit('nile-expand')}\" class=\"expand__icon__container\">\n <nile-icon\n name=\"${this.expandIcon}\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>\n </div>`\n : ''}\n </div>\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}`;\n }\n\n createNewView(emitEvent=true){\n if(this.view) this.view.destroy();\n this.createState()\n this.view = new EditorView({\n state: this.viewState,\n parent: this.codeEditor\n });\n\n if(emitEvent) this.emit('nile-after-update',{ createNewView: this.createNewView, codeMirrorInstance: this.view, }, false );\n }\n\n createState(){\n const lineNumbersExtension = this.lineNumbersComp.of(this.getLineNumbersExension());\n const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());\n const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())\n const placeholderExtension = this.placeholderComp.of(this.getPlaceholderExtension())\n const customThemeExtension=this.themeComp.of(this.getCustomThemeExtension());\n const defaultSyntaxHighlightingExtension = this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension());\n const language = this.getLanguageExtension()\n const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }));\n\n this.viewState = EditorState.create({\n doc: !this.multiline ? convertToSingleLine(this.value) : this.value,\n extensions: [\n basicSetup({\n highlightActiveLine: false,\n foldGutter: false,\n }),\n lineNumbersExtension,\n readOnlyExtension,\n restrictSingleLineExtension,\n customAutoCompletions,\n placeholderExtension,\n defaultSyntaxHighlightingExtension,\n autocompletion(),\n language,\n customThemeExtension,\n EditorView.updateListener.of((v: ViewUpdate) => {\n if (v.docChanged) {\n this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })\n }\n }),\n EditorView.domEventHandlers({\n focus: () => this.dispatchEvent(new Event('nile-focus')),\n blur: () => this.dispatchEvent(new Event('nile-blur')),\n }),\n ],\n });\n return this.viewState\n }\n /**\n * Custom autocomplete handler for code editor suggestions\n * @param context CompletionContext from CodeMirror\n * @returns CompletionResult with suggestions or null if no suggestions\n */\n customAutocomplete = (context: CompletionContext): CompletionResult | null => {\n // Getting the valid last line, last text from the code editor\n const text = context.state.doc.sliceString(0, context.pos);\n const lastWord = text.split('\\n').at(-1)?.split(' ').at(-1) || '';\n const [textBeforeCursor, baseTextAfterSeperation] = splitStringAtLastSeparator(lastWord);\n \n return this.getNestedSuggestions(context, textBeforeCursor, baseTextAfterSeperation) \n || this.getTopLevelSuggestions(context, textBeforeCursor);\n };\n\n /**\n * Gets nested property suggestions based on the current path\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @param baseTextAfterSeperation Text after the last separator (. or [)\n * @returns CompletionResult with nested suggestions or null\n */\n getNestedSuggestions(context: CompletionContext, textBeforeCursor: string, baseTextAfterSeperation: string) {\n // Return early if not a valid path or not ending with . or [\n if (!isValidPath(textBeforeCursor) || !['.', '['].includes(textBeforeCursor.at(-1)!)) {\n return null;\n }\n\n const path = parsePath(textBeforeCursor);\n if (!path) return null;\n\n const textAfterSeperation = baseTextAfterSeperation.replace(/[\"'\\[]/g, '');\n const isInString = textAfterSeperation !== baseTextAfterSeperation;\n const isBracket = textBeforeCursor.at(-1) === '[';\n\n // Return null if we're in a string after a dot\n if (textBeforeCursor.at(-1) === '.' && isInString) return null;\n\n // Get nested properties and filter by text after separation if it exists\n let resolved = resolveNestedProperties(this.customAutoCompletions, path);\n if (!resolved || typeof resolved !== 'object') return null;\n\n if (textAfterSeperation) {\n resolved = Object.fromEntries(\n Object.entries(resolved).filter(([key]) => \n key.toLowerCase().startsWith(textAfterSeperation.toLowerCase())\n )\n );\n }\n\n return {\n from: context.pos - textAfterSeperation.length,\n options: Object.keys(resolved).map(key => ({\n label: key,\n type: 'property',\n info: `Key of ${path[path.length - 1]}`,\n apply: !this.allowVariableInCustomSuggestion && (isBracket && !isInString) \n ? `'${key}'` \n : key,\n boost: 999\n }))\n };\n }\n\n /**\n * Gets top level suggestions based on custom completions and paths\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @returns CompletionResult with top level suggestions or null\n */\n getTopLevelSuggestions(context: CompletionContext,textBeforeCursor:string){\n const baseMatch: any = textBeforeCursor.match(/([a-zA-Z_$][\\w$]*)$/);\n if (!baseMatch) return null;\n \n const optionsList = Object.keys(this.customAutoCompletions).filter(key => \n Object.keys(this.customAutoCompletions[key]).length && \n key.toLowerCase().startsWith(textBeforeCursor.toLowerCase())\n );\n \n const options=optionsList.map((key) => ({\n label: key,\n type: 'property',\n apply: key,\n boost: 999\n }))\n if(this.customCompletionsPaths.length){\n this.customCompletionsPaths\n .filter(path=>path.toLocaleLowerCase().includes(textBeforeCursor.toLocaleLowerCase()))\n .map(path=>{\n options.push({\n label: ''+path,\n type: 'property',\n apply: ''+path,\n boost: 998\n })\n })\n }\n return {\n from: context.pos - baseMatch[1].length,\n options: options\n }\n }\n\n emitAfterTimeout(value:any){\n if(this.timeOut) clearTimeout(this.timeOut);\n this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)\n }\n \n public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {\n if (this.view) {\n this.view.dispatch({\n selection: { anchor: pos },\n });\n this.view.focus();\n }\n }\n\n public insertBetweenCode=(text: string) => {\n const transaction = this.view.state.changeByRange(range => {\n const { from, to } = range;\n return { changes: { from:from, to, insert: text }, range };\n });\n this.view.dispatch(transaction);\n }\n\n singleLineMultiLineToggle() {\n this.view.dispatch({\n changes: {\n from: 0,\n to: this.view.state.doc.length,\n insert: !this.multiline\n ? convertToSingleLine(this.value)\n : this.value,\n },\n });\n }\n\n //EXTENSION CONFIGURATIONS\n getLineNumbersExension() {\n return (!this.multiline && this.lineNumbers) || (this.multiline && this.lineNumbersMultiline) ? lineNumbers() : [];\n }\n \n getLanguageExtension():Extension{\n switch(this.language){\n case 'sql':\n return sql();\n case 'json':\n return json();\n case 'html':\n return htmlLang();\n default:\n return javascript(); \n }\n }\n\n getReadOnlyExtension() {\n return this.readonly ? EditorState.readOnly.of(true) : [];\n }\n\n getSingleLineExtension() {\n return !this.multiline ? EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n ) : [];\n }\n\n getPlaceholderExtension(){\n return this.placeholder ? placeholder(this.placeholder) : [];\n }\n \n getDefaultSyntaxHighlightingExtension(){\n return !this.disableSyntaxHighlighting ? syntaxHighlighting(defaultHighlightStyle, { fallback: true }):[]\n }\n\n getCustomThemeExtension(): Extension {\n if (this.customThemeCSS) {\n return EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec });\n }\n return EditorView.theme(DefaultTheme);\n }\n\n restrictSingleLine() {\n return EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n );\n }\n /* #endregion */\n}\n\nexport default NileCodeEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-code-editor': NileCodeEditor;\n }\n}\n\n/**\n * Parses a string path into an array of keys representing nested object access\n * @param text The path string to parse (e.g. \"foo.bar[0].baz\")\n * @returns Array of keys if valid path, null otherwise\n * @example\n * parsePath(\"foo.bar[0]\") // returns [\"foo\", \"bar\", \"0\"]\n * parsePath(\"invalid\") // returns null\n */\nfunction parsePath(text: string) {\n const regex = /([a-zA-Z_$][\\w$]*)(\\[(?:[^\\]]+)\\]|\\.[a-zA-Z_$][\\w$]*)*/g;\n const matches = [...text.matchAll(regex)];\n if (matches.length > 0) {\n const base = matches[0][1]; // The base object name\n const keys = [base];\n // Extract keys from dot or bracket notation\n const pathMatches = text.match(/\\[(.*?)\\]|\\.(\\w+)/g) || [];\n for (const match of pathMatches) {\n if (match.startsWith('[')) {\n keys.push(match.slice(1, -1).replace(/['\"]/g, '')); // Remove brackets and quotes\n } else if (match.startsWith('.')) {\n keys.push(match.slice(1));\n }\n }\n return keys;\n }\n return null;\n};\n\n/**\n * Splits a path string at the last separator (. or [)\n * @param input The path string to split\n * @returns Array containing [path up to last separator, remainder after separator]\n * @example\n * splitStringAtLastSeparator(\"foo.bar[0]\") // returns [\"foo.bar[\", \"0\"]\n */\nfunction splitStringAtLastSeparator(input:string) {\n const lastSeparatorIndex = Math.max(input.lastIndexOf('.'), input.lastIndexOf('['));\n if (lastSeparatorIndex === -1) return [input, ''];\n return [input.slice(0, lastSeparatorIndex + 1), input.slice(lastSeparatorIndex + 1)];\n}\n\n/**\n * Traverses an object using an array of keys to access nested properties\n * @param obj The object to traverse\n * @param keys Array of keys defining the path to the desired property\n * @returns The value at the specified path, or null if path is invalid\n * @example\n * resolveNestedProperties({foo: {bar: 123}}, [\"foo\", \"bar\"]) // returns 123\n */\nfunction resolveNestedProperties (obj:any, keys:any[]){\n return keys.reduce((acc, key) => {\n if (acc && typeof acc === 'object') {\n return acc[key];\n }\n return null;\n }, obj);\n};\n\n/**\n * Validates if a string represents a valid object path format\n * @param path The path string to validate\n * @returns Boolean indicating if path format is valid\n * @example\n * isValidPath(\"foo.bar[0]\") // returns true\n * isValidPath(\"foo..bar\") // returns false\n */\nfunction isValidPath(path: string) {\n // Regex to validate the format of the string\n const regex = /^([a-zA-Z_$][\\w$]*)(\\.[a-zA-Z_$][\\w$]*|\\[\\s*(['\"]?[a-zA-Z0-9_$]*['\"]?)\\s*\\])*([\\.\\[])?$/;\n // Test the string against the regex\n return regex.test(path);\n}\n\n/**\n * Converts multi-line code into a single line by removing line breaks and extra whitespace\n * @param code The code string to convert\n * @returns Single line version of the code\n * @example\n * convertToSingleLine(\"foo\\n bar\") // returns \"foo bar\"\n */\nfunction convertToSingleLine(code: string) {\n if (!code) return '';\n // Remove line breaks and unnecessary whitespace\n return code.replace(/\\s+/g, ' ').trim();\n}"]}
|
1
|
+
{"version":3,"file":"nile-code-editor.js","sourceRoot":"","sources":["../../../src/nile-code-editor/nile-code-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,IAAI,GAIL,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAqC,MAAM,0BAA0B,CAAC;AAC7F,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAA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AS,mBAAmB,CAAC,IAAY;IACvC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,gDAAgD;IAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValueMap,\n} from 'lit';\n\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-code-editor.css';\nimport { EditorView } from 'codemirror';\nimport { ViewUpdate, placeholder } from '@codemirror/view';\nimport { \n Compartment,\n EditorState,\n Extension\n} from '@codemirror/state';\nimport { StyleSpec } from 'style-mod';\nimport {\n syntaxHighlighting,\n defaultHighlightStyle,\n} from '@codemirror/language';\n\nimport { lineNumbers } from '@codemirror/view';\nimport {\n javascript,\n javascriptLanguage,\n} from '@codemirror/lang-javascript';\nimport { sql } from '@codemirror/lang-sql';\nimport { json } from '@codemirror/lang-json';\nimport { html as htmlLang } from '@codemirror/lang-html';\nimport { autocompletion,CompletionContext,CompletionResult } from '@codemirror/autocomplete';\nimport NileElement from '../internal/nile-element';\nimport { basicSetup } from './extensionSetup';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { Theme as DefaultTheme, CustomTheme } from './theme';\n\n// Choose the appropriate mode for your use case\n\n/**\n * Nile icon component.\n *\n * @tag nile-code-editor\n *\n */\n@customElement('nile-code-editor')\nexport class NileCodeEditor extends NileElement {\n \n @query('.code__editor__container') codeEditor: HTMLInputElement;\n\n @property({ type: String, reflect: true , attribute: true }) value = '';\n\n @property({ type: String, reflect: true , attribute: true }) expandIcon = \"expand-2\";\n\n @property({ type: String, reflect: true , attribute: true }) placeholder = \"\";\n\n @property({ type: Object, reflect: true , attribute: true }) customAutoCompletions: object | any = {};\n\n @property({ type: Array, reflect: true , attribute: true }) customCompletionsPaths: string[] = [];\n\n @property({ type: String, reflect: true , attribute: true}) language: 'javascript' | 'sql' | 'json' | 'html' = 'javascript';\n\n @property({ type: String, reflect: true , attribute: 'error-message' }) errorMessage: string = '';\n\n @property({ type: Boolean, reflect: true , attribute: 'error' }) error: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: 'noborder' }) noborder: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) multiline: boolean = false;\n \n @property({ type: Boolean, reflect: true , attribute: true }) allowVariableInCustomSuggestion: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbers: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: false }) disableSyntaxHighlighting: boolean = false;\n\n @property({ type: Object, attribute: false }) customThemeCSS: object | null = null;\n\n @property({ type: Boolean, reflect: true , attribute: true }) lineNumbersMultiline: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) hasScroller: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true }) expandable: boolean = true;\n\n @property({ type: Boolean, reflect: true , attribute: true}) readonly: boolean = false;\n\n @property({ type: Boolean, reflect: true , attribute: true}) debounce: boolean = false;\n\n @property({ type: Number, reflect: true , attribute: true}) debounceTimeout: number = 200;\n\n public view: EditorView;\n public viewState:EditorState;\n private timeOut: any = null;\n\n // Compartments for initialiazing and switching extensions\n private lineNumbersComp = new Compartment();\n private restrictSingleLineComp = new Compartment();\n private readOnlyComp = new Compartment();\n private customCompletionComp = new Compartment();\n private placeholderComp = new Compartment();\n private defaultSyntaxHighlightingComp = new Compartment();\n private themeComp = new Compartment();\n\n /**\n * The styles for CodeEditor\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit('nile-init',undefined,false);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.view.destroy()\n this.emit('nile-destroy',undefined,false);\n }\n\n firstUpdated() {\n this.createNewView()\n this.emit('nile-after-init',{ \n codeMirrorInstance: this.view, \n createNewView: this.createNewView, \n insertAtCursor: this.insertBetweenCode \n }, false )\n }\n\n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{\n super.updated(changedProperties);\n if (changedProperties.has('value') && this.view.state.doc.toString()!=this.value) {\n // Editor has already been initialized, update its state\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('multiline')) {\n this.view.dispatch({\n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n this.restrictSingleLineComp.reconfigure(this.getSingleLineExtension())\n ],\n })\n this.singleLineMultiLineToggle();\n }\n if (changedProperties.has('readonly')) {\n this.view.dispatch({ \n effects: [\n this.readOnlyComp.reconfigure(this.getReadOnlyExtension()),\n ]\n })\n }\n if (changedProperties.has('placeholder')) {\n this.view.dispatch({ \n effects: [\n this.placeholderComp.reconfigure(this.getPlaceholderExtension()),\n ]\n })\n }\n if (changedProperties.has('lineNumbers') || changedProperties.has('lineNumbersMultiline')) {\n this.view.dispatch({ \n effects: [\n this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),\n ]\n })\n }\n if(changedProperties.has('customAutoCompletions') || changedProperties.has('customCompletionsPaths')){\n this.view.dispatch({ \n effects: [\n this.customCompletionComp.reconfigure(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }))\n ]\n })\n }\n if(changedProperties.has('disableSyntaxHighlighting')){\n this.view.dispatch({ \n effects: [\n this.defaultSyntaxHighlightingComp.reconfigure(this.getDefaultSyntaxHighlightingExtension())\n ]\n })\n }\n if(changedProperties.has('customThemeCSS')){\n this.view.dispatch({ \n effects: [\n this.themeComp.reconfigure(this.getCustomThemeExtension())\n ]\n })\n }\n }\n\n public render(): TemplateResult {\n const hasErrorMessage = !!this.errorMessage;\n const hasError = !!this.error;\n const noborder = !!this.noborder;\n const noScrollbar = !this.hasScroller\n return html`<div\n part=\"code-editor-base\"\n class=${classMap({\n 'code__editor__container': true,\n 'noborder': noborder,\n 'error': hasError || hasErrorMessage,\n 'code__editor__singleline': !this.multiline,\n 'no-scroller': noScrollbar\n })}\n >\n ${this.expandable\n ? html` \n <div @click=\"${(e: CustomEvent) => this.emit('nile-expand')}\" class=\"expand__icon__container\">\n <nile-icon\n name=\"${this.expandIcon}\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>\n </div>`\n : ''}\n </div>\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}`;\n }\n\n createNewView(emitEvent=true){\n if(this.view) this.view.destroy();\n this.createState()\n this.view = new EditorView({\n state: this.viewState,\n parent: this.codeEditor\n });\n\n if(emitEvent) this.emit('nile-after-update',{ createNewView: this.createNewView, codeMirrorInstance: this.view, }, false );\n }\n\n createState(){\n const lineNumbersExtension = this.lineNumbersComp.of(this.getLineNumbersExension());\n const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());\n const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())\n const placeholderExtension = this.placeholderComp.of(this.getPlaceholderExtension())\n const customThemeExtension=this.themeComp.of(this.getCustomThemeExtension());\n const defaultSyntaxHighlightingExtension = this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension());\n const language = this.getLanguageExtension()\n const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({\n autocomplete: this.customAutocomplete\n }));\n\n this.viewState = EditorState.create({\n doc: !this.multiline ? convertToSingleLine(this.value) : this.value,\n extensions: [\n basicSetup({\n highlightActiveLine: false,\n foldGutter: true,\n }),\n lineNumbersExtension,\n readOnlyExtension,\n restrictSingleLineExtension,\n customAutoCompletions,\n placeholderExtension,\n defaultSyntaxHighlightingExtension,\n autocompletion(),\n language,\n customThemeExtension,\n EditorView.updateListener.of((v: ViewUpdate) => {\n if (v.docChanged) {\n this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })\n }\n }),\n EditorView.domEventHandlers({\n focus: () => this.dispatchEvent(new Event('nile-focus')),\n blur: () => this.dispatchEvent(new Event('nile-blur')),\n }),\n ],\n });\n return this.viewState\n }\n /**\n * Custom autocomplete handler for code editor suggestions\n * @param context CompletionContext from CodeMirror\n * @returns CompletionResult with suggestions or null if no suggestions\n */\n customAutocomplete = (context: CompletionContext): CompletionResult | null => {\n // Getting the valid last line, last text from the code editor\n const text = context.state.doc.sliceString(0, context.pos);\n const lastWord = text.split('\\n').at(-1)?.split(' ').at(-1) || '';\n const [textBeforeCursor, baseTextAfterSeperation] = splitStringAtLastSeparator(lastWord);\n \n return this.getNestedSuggestions(context, textBeforeCursor, baseTextAfterSeperation) \n || this.getTopLevelSuggestions(context, textBeforeCursor);\n };\n\n /**\n * Gets nested property suggestions based on the current path\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @param baseTextAfterSeperation Text after the last separator (. or [)\n * @returns CompletionResult with nested suggestions or null\n */\n getNestedSuggestions(context: CompletionContext, textBeforeCursor: string, baseTextAfterSeperation: string) {\n // Return early if not a valid path or not ending with . or [\n if (!isValidPath(textBeforeCursor) || !['.', '['].includes(textBeforeCursor.at(-1)!)) {\n return null;\n }\n\n const path = parsePath(textBeforeCursor);\n if (!path) return null;\n\n const textAfterSeperation = baseTextAfterSeperation.replace(/[\"'\\[]/g, '');\n const isInString = textAfterSeperation !== baseTextAfterSeperation;\n const isBracket = textBeforeCursor.at(-1) === '[';\n\n // Return null if we're in a string after a dot\n if (textBeforeCursor.at(-1) === '.' && isInString) return null;\n\n // Get nested properties and filter by text after separation if it exists\n let resolved = resolveNestedProperties(this.customAutoCompletions, path);\n if (!resolved || typeof resolved !== 'object') return null;\n\n if (textAfterSeperation) {\n resolved = Object.fromEntries(\n Object.entries(resolved).filter(([key]) => \n key.toLowerCase().startsWith(textAfterSeperation.toLowerCase())\n )\n );\n }\n\n return {\n from: context.pos - textAfterSeperation.length,\n options: Object.keys(resolved).map(key => ({\n label: key,\n type: 'property',\n info: `Key of ${path[path.length - 1]}`,\n apply: !this.allowVariableInCustomSuggestion && (isBracket && !isInString) \n ? `'${key}'` \n : key,\n boost: 999\n }))\n };\n }\n\n /**\n * Gets top level suggestions based on custom completions and paths\n * @param context CompletionContext from CodeMirror\n * @param textBeforeCursor Text before cursor position\n * @returns CompletionResult with top level suggestions or null\n */\n getTopLevelSuggestions(context: CompletionContext,textBeforeCursor:string){\n const baseMatch: any = textBeforeCursor.match(/([a-zA-Z_$][\\w$]*)$/);\n if (!baseMatch) return null;\n \n const optionsList = Object.keys(this.customAutoCompletions).filter(key => \n Object.keys(this.customAutoCompletions[key]).length && \n key.toLowerCase().startsWith(textBeforeCursor.toLowerCase())\n );\n \n const options=optionsList.map((key) => ({\n label: key,\n type: 'property',\n apply: key,\n boost: 999\n }))\n if(this.customCompletionsPaths.length){\n this.customCompletionsPaths\n .filter(path=>path.toLocaleLowerCase().includes(textBeforeCursor.toLocaleLowerCase()))\n .map(path=>{\n options.push({\n label: ''+path,\n type: 'property',\n apply: ''+path,\n boost: 998\n })\n })\n }\n return {\n from: context.pos - baseMatch[1].length,\n options: options\n }\n }\n\n emitAfterTimeout(value:any){\n if(this.timeOut) clearTimeout(this.timeOut);\n this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)\n }\n \n public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {\n if (this.view) {\n this.view.dispatch({\n selection: { anchor: pos },\n });\n this.view.focus();\n }\n }\n\n public insertBetweenCode=(text: string) => {\n const transaction = this.view.state.changeByRange(range => {\n const { from, to } = range;\n return { changes: { from:from, to, insert: text }, range };\n });\n this.view.dispatch(transaction);\n }\n\n singleLineMultiLineToggle() {\n this.view.dispatch({\n changes: {\n from: 0,\n to: this.view.state.doc.length,\n insert: !this.multiline\n ? convertToSingleLine(this.value)\n : this.value,\n },\n });\n }\n\n //EXTENSION CONFIGURATIONS\n getLineNumbersExension() {\n return (!this.multiline && this.lineNumbers) || (this.multiline && this.lineNumbersMultiline) ? lineNumbers() : [];\n }\n \n getLanguageExtension():Extension{\n switch(this.language){\n case 'sql':\n return sql();\n case 'json':\n return json();\n case 'html':\n return htmlLang();\n default:\n return javascript(); \n }\n }\n\n getReadOnlyExtension() {\n return this.readonly ? EditorState.readOnly.of(true) : [];\n }\n\n getSingleLineExtension() {\n return !this.multiline ? EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n ) : [];\n }\n\n getPlaceholderExtension(){\n return this.placeholder ? placeholder(this.placeholder) : [];\n }\n \n getDefaultSyntaxHighlightingExtension(){\n return !this.disableSyntaxHighlighting ? syntaxHighlighting(defaultHighlightStyle, { fallback: true }):[]\n }\n\n getCustomThemeExtension(): Extension {\n if (this.customThemeCSS) {\n return EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec });\n }\n return EditorView.theme(DefaultTheme);\n }\n\n restrictSingleLine() {\n return EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n );\n }\n /* #endregion */\n}\n\nexport default NileCodeEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-code-editor': NileCodeEditor;\n }\n}\n\n/**\n * Parses a string path into an array of keys representing nested object access\n * @param text The path string to parse (e.g. \"foo.bar[0].baz\")\n * @returns Array of keys if valid path, null otherwise\n * @example\n * parsePath(\"foo.bar[0]\") // returns [\"foo\", \"bar\", \"0\"]\n * parsePath(\"invalid\") // returns null\n */\nfunction parsePath(text: string) {\n const regex = /([a-zA-Z_$][\\w$]*)(\\[(?:[^\\]]+)\\]|\\.[a-zA-Z_$][\\w$]*)*/g;\n const matches = [...text.matchAll(regex)];\n if (matches.length > 0) {\n const base = matches[0][1]; // The base object name\n const keys = [base];\n // Extract keys from dot or bracket notation\n const pathMatches = text.match(/\\[(.*?)\\]|\\.(\\w+)/g) || [];\n for (const match of pathMatches) {\n if (match.startsWith('[')) {\n keys.push(match.slice(1, -1).replace(/['\"]/g, '')); // Remove brackets and quotes\n } else if (match.startsWith('.')) {\n keys.push(match.slice(1));\n }\n }\n return keys;\n }\n return null;\n};\n\n/**\n * Splits a path string at the last separator (. or [)\n * @param input The path string to split\n * @returns Array containing [path up to last separator, remainder after separator]\n * @example\n * splitStringAtLastSeparator(\"foo.bar[0]\") // returns [\"foo.bar[\", \"0\"]\n */\nfunction splitStringAtLastSeparator(input:string) {\n const lastSeparatorIndex = Math.max(input.lastIndexOf('.'), input.lastIndexOf('['));\n if (lastSeparatorIndex === -1) return [input, ''];\n return [input.slice(0, lastSeparatorIndex + 1), input.slice(lastSeparatorIndex + 1)];\n}\n\n/**\n * Traverses an object using an array of keys to access nested properties\n * @param obj The object to traverse\n * @param keys Array of keys defining the path to the desired property\n * @returns The value at the specified path, or null if path is invalid\n * @example\n * resolveNestedProperties({foo: {bar: 123}}, [\"foo\", \"bar\"]) // returns 123\n */\nfunction resolveNestedProperties (obj:any, keys:any[]){\n return keys.reduce((acc, key) => {\n if (acc && typeof acc === 'object') {\n return acc[key];\n }\n return null;\n }, obj);\n};\n\n/**\n * Validates if a string represents a valid object path format\n * @param path The path string to validate\n * @returns Boolean indicating if path format is valid\n * @example\n * isValidPath(\"foo.bar[0]\") // returns true\n * isValidPath(\"foo..bar\") // returns false\n */\nfunction isValidPath(path: string) {\n // Regex to validate the format of the string\n const regex = /^([a-zA-Z_$][\\w$]*)(\\.[a-zA-Z_$][\\w$]*|\\[\\s*(['\"]?[a-zA-Z0-9_$]*['\"]?)\\s*\\])*([\\.\\[])?$/;\n // Test the string against the regex\n return regex.test(path);\n}\n\n/**\n * Converts multi-line code into a single line by removing line breaks and extra whitespace\n * @param code The code string to convert\n * @returns Single line version of the code\n * @example\n * convertToSingleLine(\"foo\\n bar\") // returns \"foo bar\"\n */\nfunction convertToSingleLine(code: string) {\n if (!code) return '';\n // Remove line breaks and unnecessary whitespace\n return code.replace(/\\s+/g, ' ').trim();\n}"]}
|