@aquera/nile-elements 0.0.128 → 0.0.130

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.
Files changed (33) hide show
  1. package/README.md +8 -0
  2. package/demo/index.html +87 -16
  3. package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
  4. package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
  5. package/dist/nile-dropdown/nile-dropdown.esm.js +3 -2
  6. package/dist/nile-select/nile-select.css.cjs.js +1 -1
  7. package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
  8. package/dist/nile-select/nile-select.css.esm.js +3 -3
  9. package/dist/nile-tour/index.cjs.js +1 -1
  10. package/dist/nile-tour/index.esm.js +1 -1
  11. package/dist/nile-tour/nile-tour.cjs.js +2 -2
  12. package/dist/nile-tour/nile-tour.cjs.js.map +1 -1
  13. package/dist/nile-tour/nile-tour.css.cjs.js +1 -1
  14. package/dist/nile-tour/nile-tour.css.cjs.js.map +1 -1
  15. package/dist/nile-tour/nile-tour.css.esm.js +49 -13
  16. package/dist/nile-tour/nile-tour.esm.js +7 -7
  17. package/dist/src/nile-dropdown/nile-dropdown.d.ts +2 -0
  18. package/dist/src/nile-dropdown/nile-dropdown.js +4 -0
  19. package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
  20. package/dist/src/nile-select/nile-select.css.js +3 -3
  21. package/dist/src/nile-select/nile-select.css.js.map +1 -1
  22. package/dist/src/nile-tour/nile-tour.css.js +49 -13
  23. package/dist/src/nile-tour/nile-tour.css.js.map +1 -1
  24. package/dist/src/nile-tour/nile-tour.d.ts +20 -14
  25. package/dist/src/nile-tour/nile-tour.js +95 -29
  26. package/dist/src/nile-tour/nile-tour.js.map +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +1 -1
  29. package/src/nile-dropdown/nile-dropdown.ts +4 -0
  30. package/src/nile-select/nile-select.css.ts +3 -3
  31. package/src/nile-tour/nile-tour.css.ts +49 -13
  32. package/src/nile-tour/nile-tour.ts +165 -102
  33. package/vscode-html-custom-data.json +40 -11
@@ -1,2 +1,2 @@
1
- System.register(["../index-c7ad3b47.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(_index001CjsJs){o=_index001CjsJs.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, #000);\n color: var(--nile-tour-text-color, #fff);\n\twidth: 300px;\n\tmax-width: 300px;\n }\n\n .introjs-arrow.bottom {\n border-top-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.top {\n border-bottom-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left {\n border-right-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.right {\n border-left-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left-bottom {\n border-right-color: var(--nile-tour-background-color, #000) !important;\n }\n\n .introjs-arrow.right-bottom {\n border-right-color: var(--nile-tour-background-color, #000) !important;\n }\n\n\n\n .introjs-button {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, #fff);\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: transparent;\n border-color: transparent;\n }\n\n .introjs-button:hover {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n }\n\n .introjs-button:focus {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n border: none;\n box-shadow: none;\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\tdisplay: none;\n }\n\n .introjs-bullets{\n\tdisplay: none;\n\n }\n\n .introjs-skipbutton {\n\tdisplay: none;\n\n }\n\n\n .introjs-prev-button {\n\tcolor: #C7CED4;\n }\n"]))));}};});
1
+ System.register(["../index-c7ad3b47.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(_index001CjsJs){o=_index001CjsJs.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, #000);\n color: var(--nile-tour-text-color, #fff);\n width: 300px;\n max-width: 300px;\n }\n\n .introjs-arrow.bottom {\n border-top-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.top {\n border-bottom-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left {\n border-right-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.right {\n border-left-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left-bottom {\n border-right-color: var(--nile-tour-background-color, #000) !important;\n }\n\n .introjs-arrow.right-bottom {\n border-left-color: var(--nile-tour-background-color, #000) !important;\n }\n\n .introjs-button {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, #fff);\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: transparent;\n border-color: transparent;\n }\n\n .introjs-button:hover {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n }\n\n .introjs-button:focus {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n border: none;\n box-shadow: none;\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 display: none;\n pointer-events: none;\n }\n\n .introjs-overlay {\n display: none;\n pointer-events: none;\n }\n\n .introjs-step-counter {\n margin-right: auto; /* Push buttons to the opposite side */\n font-size: 14px;\n color: #ffffff;\n padding: 0 10px;\n display: flex;\n align-items: center;\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; /* Repeats continuously */\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, #000);\n color: var(--nile-tour-text-color, #fff);\n\twidth: 300px;\n\tmax-width: 300px;\n }\n\n .introjs-arrow.bottom {\n border-top-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.top {\n border-bottom-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left {\n border-right-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.right {\n border-left-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left-bottom {\n border-right-color: var(--nile-tour-background-color, #000) !important;\n }\n\n .introjs-arrow.right-bottom {\n border-right-color: var(--nile-tour-background-color, #000) !important;\n }\n\n\n\n .introjs-button {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, #fff);\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: transparent;\n border-color: transparent;\n }\n\n .introjs-button:hover {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n }\n\n .introjs-button:focus {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n border: none;\n box-shadow: none;\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\tdisplay: none;\n }\n\n .introjs-bullets{\n\tdisplay: none;\n\n }\n\n .introjs-skipbutton {\n\tdisplay: none;\n\n }\n\n\n .introjs-prev-button {\n\tcolor: #C7CED4;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
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, #000);\n color: var(--nile-tour-text-color, #fff);\n width: 300px;\n max-width: 300px;\n }\n\n .introjs-arrow.bottom {\n border-top-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.top {\n border-bottom-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left {\n border-right-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.right {\n border-left-color: var(--nile-tour-background-color, #000);\n }\n\n .introjs-arrow.left-bottom {\n border-right-color: var(--nile-tour-background-color, #000) !important;\n }\n\n .introjs-arrow.right-bottom {\n border-left-color: var(--nile-tour-background-color, #000) !important;\n }\n\n .introjs-button {\n background: none;\n border: none;\n color: var(--nile-tour-text-color, #fff);\n font-size: 14px;\n padding: 0;\n cursor: pointer;\n text-shadow: none;\n background: transparent;\n border-color: transparent;\n }\n\n .introjs-button:hover {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n }\n\n .introjs-button:focus {\n outline: 0;\n text-decoration: none;\n border-color: transparent;\n background: transparent;\n color: white;\n border: none;\n box-shadow: none;\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 display: none;\n pointer-events: none;\n }\n\n .introjs-overlay {\n display: none;\n pointer-events: none;\n }\n\n .introjs-step-counter {\n margin-right: auto; /* Push buttons to the opposite side */\n font-size: 14px;\n color: #ffffff;\n padding: 0 10px;\n display: flex;\n align-items: center;\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; /* Repeats continuously */\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -5,8 +5,8 @@ import{i as o}from"../index-0a3007c5.esm.js";const r=o`
5
5
  .introjs-tooltip {
6
6
  background-color: var(--nile-tour-background-color, #000);
7
7
  color: var(--nile-tour-text-color, #fff);
8
- width: 300px;
9
- max-width: 300px;
8
+ width: 300px;
9
+ max-width: 300px;
10
10
  }
11
11
 
12
12
  .introjs-arrow.bottom {
@@ -30,11 +30,9 @@ import{i as o}from"../index-0a3007c5.esm.js";const r=o`
30
30
  }
31
31
 
32
32
  .introjs-arrow.right-bottom {
33
- border-right-color: var(--nile-tour-background-color, #000) !important;
33
+ border-left-color: var(--nile-tour-background-color, #000) !important;
34
34
  }
35
35
 
36
-
37
-
38
36
  .introjs-button {
39
37
  background: none;
40
38
  border: none;
@@ -72,22 +70,60 @@ import{i as o}from"../index-0a3007c5.esm.js";const r=o`
72
70
  gap: 10px;
73
71
  }
74
72
 
75
- .introjs-helperNumberLayer{
76
- display: none;
73
+ .introjs-helperNumberLayer {
74
+ display: none;
77
75
  }
78
76
 
79
- .introjs-bullets{
80
- display: none;
81
-
77
+ .introjs-bullets {
78
+ display: none;
82
79
  }
83
80
 
84
81
  .introjs-skipbutton {
85
- display: none;
82
+ display: none;
83
+ }
84
+
85
+ .introjs-prev-button {
86
+ color: #c7ced4;
87
+ }
86
88
 
89
+ .introjs-helperLayer {
90
+ display: none;
91
+ pointer-events: none;
87
92
  }
88
93
 
94
+ .introjs-overlay {
95
+ display: none;
96
+ pointer-events: none;
97
+ }
89
98
 
90
- .introjs-prev-button {
91
- color: #C7CED4;
99
+ .introjs-step-counter {
100
+ margin-right: auto; /* Push buttons to the opposite side */
101
+ font-size: 14px;
102
+ color: #ffffff;
103
+ padding: 0 10px;
104
+ display: flex;
105
+ align-items: center;
106
+ }
107
+
108
+ @keyframes shake {
109
+ 0% {
110
+ transform: translateX(0);
111
+ }
112
+ 25% {
113
+ transform: translateX(-5px);
114
+ }
115
+ 50% {
116
+ transform: translateX(5px);
117
+ }
118
+ 75% {
119
+ transform: translateX(-5px);
120
+ }
121
+ 100% {
122
+ transform: translateX(0);
123
+ }
124
+ }
125
+
126
+ .introjs-shake {
127
+ animation: shake 0.5s ease infinite; /* Repeats continuously */
92
128
  }
93
129
  `;export{r as s};
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"tslib";import{x as n}from"../index-0a3007c5.esm.js";import{customElement as i}from"lit/decorators.js";import{s as r}from"./nile-tour.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{n as e}from"../property-09139d3c.esm.js";import"lit";
1
+ import{__decorate as t}from"tslib";import{s as n,x as i}from"../index-0a3007c5.esm.js";import{customElement as r}from"lit/decorators.js";import{s as o}from"./nile-tour.css.esm.js";import{n as e}from"../property-09139d3c.esm.js";
2
2
  /*!
3
3
  * Intro.js v7.2.0
4
4
  * https://introjs.com
@@ -7,9 +7,9 @@ import{__decorate as t}from"tslib";import{x as n}from"../index-0a3007c5.esm.js";
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 f,d=(f={},function(t,n){return void 0===n&&(n="introjs-stamp"),f[n]=f[n]||0,void 0===t[n]&&(t[n]=f[n]++),t[n]}),h=new(function(){function t(){this.events_key="introjs_event"}return t.prototype._id=function(t,n,i){return t+d(n)+(i?"_".concat(d(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 x(t){var n=t.parentElement;return!(!n||"HTML"===n.nodeName)&&("fixed"===w(t,"position")||x(n))}function y(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}):x(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=y(n.element,t._targetElement),o=t._options.helperElementPadding;n.element instanceof Element&&x(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 L(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 S(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 A(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=y(i).height+10,a=y(i).width+20,u=n.getBoundingClientRect(),c="floating";if(u.bottom+s>e.height&&A(o,"bottom"),u.top-s<0&&A(o,"top"),u.right+a>e.width&&A(o,"right"),u.left-a<0&&A(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,f=[];"top"===c?(l="top-middle-aligned",f=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(l="bottom-middle-aligned",f=["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&&(A(r,"top-left-aligned"),A(r,"bottom-left-aligned")),(t<o||e-t<o)&&(A(r,"top-middle-aligned"),A(r,"bottom-middle-aligned")),t<n&&(A(r,"top-right-aligned"),A(r,"bottom-right-aligned")),r.length?r[0]:null}(u.left,a,e.width,f)||l}return c}(t._options.positionPrecedence,n.element,i,u)),s=y(n.element),e=y(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 f=0;S(s,f,e,i),i.style.bottom="".concat(s.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",o&&(l+=5),S(s,l,e,i)&&(i.style.right="",L(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",L(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",S(s,f=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),S(s,l,e,i)&&(i.style.right="",L(s,l,e,a,i)),i.style.top="".concat(s.height+20,"px");break;default:r.className="introjs-arrow top",L(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 T(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 R(t,n){return(t+1)/n*100}function O(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="&nbsp;",u.setAttribute("data-step-number",s.toString()),a.appendChild(u),r.appendChild(a)}return i.appendChild(r),i}function B(t,n,i){var r=t.querySelector(".introjs-progress .introjs-progressbar");if(r){var o=R(n,i);r.style.cssText="width:".concat(o,"%;"),r.setAttribute("aria-valuenow",o.toString())}}function z(t,n){return a(this,void 0,void 0,(function(){var i,r,o,e,s,c,l,f,d,h,b,x,y,k,L,S,A,z,D,F,M,V,_,H,Q=this;return u(this,(function(Z){switch(Z.label){case 0:return v(t._introChangeCallback)?[4,t._introChangeCallback.call(t,n.element)]:[3,2];case 1:Z.sent(),Z.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"),f=r.querySelector(".introjs-tooltiptext"),d=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)),f.innerHTML=n.intro||"",d.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),B(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,f)}),350)):(x=C("div",{className:o}),y=C("div",{className:"introjs-tooltipReferenceLayer"}),k=C("div",{className:"introjs-arrow"}),L=C("div",{className:"introjs-tooltip"}),S=C("div",{className:"introjs-tooltiptext"}),A=C("div",{className:"introjs-tooltip-header"}),z=C("h1",{className:"introjs-tooltip-title"}),D=C("div"),E(x,{"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,x),N(t,n,y),T(t._targetElement,x,!0),T(t._targetElement,y),S.innerHTML=n.intro,z.innerHTML=n.title,D.className="introjs-tooltipbuttons",!1===t._options.showButtons&&(D.style.display="none"),A.appendChild(z),L.appendChild(A),L.appendChild(S),t._options.dontShowAgain&&(F=C("div",{className:"introjs-dontShowAgain"}),(M=C("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(n){t.setDontShowAgain(n.target.checked)},(V=C("label",{htmlFor:"introjs-dontShowAgain"})).innerText=t._options.dontShowAgainLabel,F.appendChild(M),F.appendChild(V),L.appendChild(F)),L.appendChild(O(t,n)),L.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=R(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)),_=C("div"),!0===t._options.showStepNumbers&&(_.className="introjs-helperNumberLayer",_.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length),L.appendChild(_)),L.appendChild(k),y.appendChild(L),(e=C("a")).onclick=function(){return a(Q,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,G(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(Q,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return t._currentStep>0?[4,$(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(Q,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]}}))}))},A.appendChild(c),t._introItems.length>1&&D.appendChild(s),D.appendChild(e),L.appendChild(D),P(t,n,L,k),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,L)),(H=t._targetElement.querySelector(".introjs-disableInteraction"))&&H.parentNode&&H.parentNode.removeChild(H),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:Z.sent(),Z.label=4;case 4: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._currentStep=n-2,void 0===t._introItems?[3,2]:[4,G(t)];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}function F(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,G(t)];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}function G(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,z(t,i)];case 7:return o.sent(),[2,!0]}}))}))}function $(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,z(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,$(t)];case 3:return o.sent(),[3,16];case 4:return"ArrowRight"!==i&&39!==i?[3,6]:[4,G(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,$(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,G(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 V(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]=V(t[i]);return n}function _(t){var n=document.querySelector(".introjs-hints");return n?Array.from(n.querySelectorAll(t)):[]}function H(t,n){return a(this,void 0,void 0,(function(){var i;return u(this,(function(r){switch(r.label){case 0:return i=_('.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 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:n=_(".introjs-hint"),i=0,r=n,s.label=1;case 1:return i<r.length?(o=r[i],(e=o.getAttribute("data-step"))?[4,H(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 Z(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=_(".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=_('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&k(n,/introjs-hidehint/g)}function J(t){var n=_('.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"),x(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(f),f=window.setTimeout((function(){c()}),l)}),h.on(window,"scroll",t._hintsAutoRefreshFunction,t,!0)),[2]}var c,l,f}))}))}function U(t,n,i){if(void 0!==i){var r=y(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,f,d,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&&((f=C("a")).className=t._options.buttonClass,f.setAttribute("role","button"),f.innerHTML=t._options.hintButtonLabel,f.onclick=function(){return H(t,n)},s.appendChild(f)),a.className="introjs-arrow",e.appendChild(a),e.appendChild(s),d=i.getAttribute("data-step")||"",t._currentStep=parseInt(d,10),h=t._hintItems[t._currentStep],c.className="introjs-tooltipReferenceLayer introjs-hintReference",c.setAttribute("data-step",d),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,f,d;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=V(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],f=l.getAttribute("data-hint-animation"),d=t._options.hintAnimation,f&&(d="true"===f),t._hintItems.push({element:l,hint:l.getAttribute("data-hint")||"",hintPosition:l.getAttribute("data-hint-position")||t._options.hintPosition,hintAnimation:d,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=V(d=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 f=l[c];if((!t._options.group||f.getAttribute("data-intro-group")===t._options.group)&&"none"!==f.style.display){var d=parseInt(f.getAttribute("data-step")||"",10);u=t._options.disableInteraction,f.hasAttribute("data-disable-interaction")&&(u=!!f.getAttribute("data-disable-interaction")),d>0&&(r[d-1]={step:d,element:f,title:f.getAttribute("data-title")||"",intro:f.getAttribute("data-intro")||"",tooltipClass:f.getAttribute("data-tooltip-class")||void 0,highlightClass:f.getAttribute("data-highlight-class")||void 0,position:f.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:f.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u})}}for(var h=0,v=0,p=i;v<p.length;v++)if(f=p[v],(!t._options.group||f.getAttribute("data-intro-group")===t._options.group)&&null===f.getAttribute("data-step")){for(;void 0!==r[h];)h++;u=f.hasAttribute("data-disable-interaction")?!!f.getAttribute("data-disable-interaction"):t._options.disableInteraction,r[h]={element:f,title:f.getAttribute("data-title")||"",intro:f.getAttribute("data-intro")||"",step:h+1,tooltipClass:f.getAttribute("data-tooltip-class")||void 0,highlightClass:f.getAttribute("data-highlight-class")||void 0,position:f.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:f.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(O(t,n),i)}}(t,r),B(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",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"});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,G(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,D(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,F(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,G(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,$(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,H(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,Q(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,Z(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.removeHints=function(){return function(t){for(var n=0,i=_(".introjs-hint");n<i.length;n++){var r=i[n].getAttribute("data-step");r&&J(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 J(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[d(i,"introjs-instance")]=i,i};ct.version="7.2.0",ct.instances={};let lt=class extends o{static get styles(){return[r]}createRenderRoot(){return this}constructor(){super(),this.tourInstance=null,this.steps=[]}startTour(){const t=this.steps.map((t=>({element:document.querySelector(t.element),intro:t.content,title:t.title,position:t.position,beforeChange:t.beforeChange,afterChange:t.afterChange}))).filter((t=>null!==t.element));this.tourInstance=ct().setOptions({steps:t,nextLabel:"<button class='introjs-button introjs-next-button'>Next</button>",prevLabel:"<button class='introjs-button introjs-prev-button'>Prev</button>",showButtons:!0,showStepNumbers:!0}),this.tourInstance.onbeforechange((async t=>{const n=this.tourInstance?._currentStep??0,i=this.steps[n];if(i?.beforeChange){return!0===await i.beforeChange()}return!0})),this.tourInstance.onafterchange((t=>{const n=this.tourInstance?._currentStep??0,i=this.steps[n];i?.afterChange&&i.afterChange()})),this.tourInstance.start()}render(){return n`
11
- <style>
12
- ${r.cssText}
13
- </style>
14
- <slot></slot>
15
- `}};t([e({type:Array})],lt.prototype,"steps",void 0),lt=t([i("nile-tour")],lt);export{lt as N};
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 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=m(),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=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;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="&nbsp;",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 J(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,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"),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),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||"",m.style.display="block",P(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"}),S=C("div",{className:"introjs-tooltip"}),A=C("div",{className:"introjs-tooltiptext"}),L=C("div",{className:"introjs-tooltip-header"}),J=C("h1",{className:"introjs-tooltip-title"}),$=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")}),b(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,J.innerHTML=n.title,$.className="introjs-tooltipbuttons",!1===t._options.showButtons&&($.style.display="none"),L.appendChild(J),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&&$.appendChild(s),$.appendChild(e),S.appendChild($),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 $(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,J(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,J(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=[],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");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,$(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[o]}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}))).filter((t=>null!==t.element));this.tourInstance=ct().setOptions({steps:t,nextLabel:"<button class='introjs-button introjs-next-button'>Next</button>",prevLabel:"<button class='introjs-button introjs-prev-button'>Prev</button>",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()}shakeTooltip(){const t=document.querySelector(".introjs-tooltip");t&&(t.classList.add("introjs-shake"),setTimeout((()=>{t.classList.remove("introjs-shake")}),1500))}render(){return i`
11
+ <style>
12
+ ${o.cssText}
13
+ </style>
14
+ <slot></slot>
15
+ `}};t([e({type:Array})],lt.prototype,"steps",void 0),t([e({type:String})],lt.prototype,"stepsJson",void 0),t([e({type:Boolean})],lt.prototype,"showBackdrop",void 0),t([e({type:Boolean})],lt.prototype,"disableInteraction",void 0),lt=t([r("nile-tour")],lt);export{lt as N};
@@ -64,6 +64,8 @@ export declare class NileDropdown extends NileElement {
64
64
  noOpenOnClick: boolean;
65
65
  /** The distance in pixels from which to offset the panel along its trigger. */
66
66
  skidding: number;
67
+ /** Syncs the popup's width or height to that of the anchor element. */
68
+ sync: 'width' | 'height' | 'both';
67
69
  /**
68
70
  * Enable this option to prevent the panel from being clipped when the component is placed inside a container with
69
71
  * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.
@@ -322,6 +322,7 @@ let NileDropdown = class NileDropdown extends NileElement {
322
322
  distance=${this.distance}
323
323
  skidding=${this.skidding}
324
324
  strategy=${this.hoist ? 'fixed' : 'absolute'}
325
+ sync=${this.sync}
325
326
  flip
326
327
  shift
327
328
  auto-size="both"
@@ -386,6 +387,9 @@ __decorate([
386
387
  __decorate([
387
388
  property({ type: Number })
388
389
  ], NileDropdown.prototype, "skidding", void 0);
390
+ __decorate([
391
+ property()
392
+ ], NileDropdown.prototype, "sync", void 0);
389
393
  __decorate([
390
394
  property({ type: Boolean })
391
395
  ], NileDropdown.prototype, "hoist", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-dropdown.js","sourceRoot":"","sources":["../../../src/nile-dropdown/nile-dropdown.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAG,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAMnD,OAAO,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAAtC;;QAQL;;;WAGG;QACyC,SAAI,GAAG,KAAK,CAAC;QAEzD;;;WAGG;QAC0B,cAAS,GAYrB,cAAc,CAAC;QAEhC,wDAAwD;QACZ,aAAQ,GAAG,KAAK,CAAC;QAE7D;;;WAGG;QAC2E,qBAAgB,GAAG,KAAK,CAAC;QAQvG,mFAAmF;QACvD,aAAQ,GAAG,CAAC,CAAC;QAGZ,kBAAa,GAAG,KAAK,CAAC;QAEnD,+EAA+E;QACnD,aAAQ,GAAG,CAAC,CAAC;QAEzC;;;WAGG;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C,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;oDAkC7C;AA9VU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAsYxB;SAtYY,YAAY;AAwYzB,mBAAmB,CAAC,eAAe,EAAE;IACnC,SAAS,EAAE;QACT,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;QAC1B,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;KACzB;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE;CAC3C,CAAC,CAAC;AAEH,mBAAmB,CAAC,eAAe,EAAE;IACnC,SAAS,EAAE;QACT,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;QACxB,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;KAC3B;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE;CAC3C,CAAC,CAAC;AAEH,eAAe,YAAY,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 {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-dropdown.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\n\n/**\n * Nile icon component.\n *\n * @tag nile-dropdown\n * @summary Dropdowns expose additional content that \"drops down\" in a panel.\n * @dependency nile-popup\n *\n * @slot - The dropdown's main content.\n * @slot trigger - The dropdown's trigger, usually a `<nile-button>` element.\n *\n * @event nile-show - Emitted when the dropdown opens.\n * @event nile-after-show - Emitted after the dropdown opens and all animations are complete.\n * @event nile-hide - Emitted when the dropdown closes.\n * @event nile-after-hide - Emitted after the dropdown closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart trigger - The container that wraps the trigger.\n * @csspart panel - The panel that gets shown when the dropdown is open.\n *\n * @animation dropdown.show - The animation to use when showing the dropdown.\n * @animation dropdown.hide - The animation to use when hiding the dropdown.\n */\n@customElement('nile-dropdown')\nexport class NileDropdown extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @query('.dropdown') popup: NilePopup;\n @query('.dropdown__trigger') trigger: HTMLSlotElement;\n @query('.dropdown__panel') panel: HTMLSlotElement;\n\n\n /**\n * Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Disables the dropdown so the panel will not open. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\n * dropdowns that allow for multiple interactions.\n */\n @property({ attribute: 'stay-open-on-select', type: Boolean, reflect: true }) stayOpenOnSelect = false;\n\n /**\n * The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other\n * components that use a dropdown internally.\n */\n @property({ attribute: false }) containingElement?: HTMLElement;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @property({ type: Number }) distance = 0;\n\n\n @property({ type: Boolean }) noOpenOnClick = false;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n */\n @property({ type: Boolean }) hoist = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handlePanelSelect = this.handlePanelSelect.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n\n if (!this.containingElement) {\n this.containingElement = this;\n }\n this.emit('nile-init');\n }\n\n firstUpdated() {\n this.panel.hidden = !this.open;\n\n // If the dropdown is visible on init, update its position\n if (this.open) {\n this.addOpenListeners();\n this.popup.active = true;\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.hide();\n this.emit('nile-destroy');\n }\n\n focusOnTrigger() {\n const trigger = this.trigger.assignedElements({ flatten: true })[0] as HTMLElement | undefined;\n if (typeof trigger?.focus === 'function') {\n trigger.focus();\n }\n }\n\n getMenu() {\n return this.panel.assignedElements({ flatten: true }).find(el => el.tagName.toLowerCase() === 'nile-menu') as\n | NileMenu\n | undefined;\n }\n\n handleKeyDown(event: KeyboardEvent) {\n // Close when escape is pressed inside an open dropdown. We need to listen on the panel itself and stop propagation\n // in case any ancestors are also listening for this key.\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Close when escape or tab is pressed\n if (event.key === 'Escape' && this.open) {\n event.stopPropagation();\n this.focusOnTrigger();\n this.hide();\n return;\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement?.tagName.toLowerCase() === 'nile-menu-item') {\n event.preventDefault();\n this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside of the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.containingElement?.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (\n !this.containingElement ||\n activeElement?.closest(this.containingElement.tagName.toLowerCase()) !== this.containingElement\n ) {\n this.hide();\n }\n });\n }\n }\n\n handleDocumentMouseDown(event: MouseEvent) {\n // Close when clicking outside of the containing element\n const path = event.composedPath();\n if (this.containingElement && !path.includes(this.containingElement)) {\n this.hide();\n }\n }\n\n handlePanelSelect(event: any) {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === 'nile-menu') {\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerClick() {\n if(this.noOpenOnClick){\n return;\n }\n if (this.open) {\n this.hide();\n } else {\n this.show();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerKeyDown(event: KeyboardEvent) {\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n // if (['Enter'].includes(event.key)) {\n // event.preventDefault();\n // this.handleTriggerClick();\n // return;\n // }\n\n const menu = this.getMenu();\n\n if (menu) {\n const menuItems = menu.getAllItems();\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n this.show();\n }\n\n if (menuItems.length > 0) {\n // Focus on the first/last menu item after showing\n this.updateComplete.then(() => {\n if (event.key === 'ArrowDown' || event.key === 'Home') {\n menu.setCurrentItem(firstMenuItem);\n firstMenuItem.focus();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'End') {\n menu.setCurrentItem(lastMenuItem);\n lastMenuItem.focus();\n }\n });\n }\n }\n }\n }\n\n handleTriggerKeyUp(event: KeyboardEvent) {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n }\n\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <nile-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n updateAccessibleTrigger() {\n const assignedElements = this.trigger.assignedElements({ flatten: true }) as HTMLElement[];\n const accessibleTrigger = assignedElements.find(el => getTabbableBoundary(el).start);\n let target: HTMLElement;\n\n if (accessibleTrigger) {\n switch (accessibleTrigger.tagName.toLowerCase()) {\n // nile buttons have to update the internal button so it's announced correctly by screen readers\n case 'nile-button':\n case 'nile-icon-button':\n target = (accessibleTrigger as NileButton | NileIconButton).button;\n break;\n\n default:\n target = accessibleTrigger;\n }\n\n target.setAttribute('aria-haspopup', 'true');\n target.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n /** Shows the dropdown panel. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dropdown panel */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n */\n reposition() {\n this.popup.reposition();\n }\n\n addOpenListeners() {\n this.panel.addEventListener('nile-select', this.handlePanelSelect);\n this.panel.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n removeOpenListeners() {\n if (this.panel) {\n this.panel.removeEventListener('nile-select', this.handlePanelSelect);\n this.panel.removeEventListener('keydown', this.handleKeyDown);\n }\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.disabled) {\n this.open = false;\n return;\n }\n\n this.updateAccessibleTrigger();\n\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n\n await stopAnimations(this);\n this.panel.hidden = false;\n this.popup.active = true;\n const { keyframes, options } = getAnimation(this, 'dropdown.show', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n await stopAnimations(this);\n const { keyframes, options } = getAnimation(this, 'dropdown.hide', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n this.panel.hidden = true;\n this.popup.active = false;\n\n this.emit('nile-after-hide');\n }\n }\n\n render() {\n return html`\n <nile-popup\n part=\"base\"\n id=\"dropdown\"\n placement=${this.placement}\n distance=${this.distance}\n skidding=${this.skidding}\n strategy=${this.hoist ? 'fixed' : 'absolute'}\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': this.open\n })}\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=${this.handleTriggerClick}\n @keydown=${this.handleTriggerKeyDown}\n @keyup=${this.handleTriggerKeyUp}\n @slotchange=${this.handleTriggerSlotChange}\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-labelledby=\"dropdown\"\n ></slot>\n </nile-popup>\n `;\n }\n}\n\nsetDefaultAnimation('dropdown.show', {\n keyframes: [\n { opacity: 0, scale: 0.9 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nsetDefaultAnimation('dropdown.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.9 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nexport default NileDropdown;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dropdown': NileDropdown;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-dropdown.js","sourceRoot":"","sources":["../../../src/nile-dropdown/nile-dropdown.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAG,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MA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","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 {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-dropdown.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\n\n/**\n * Nile icon component.\n *\n * @tag nile-dropdown\n * @summary Dropdowns expose additional content that \"drops down\" in a panel.\n * @dependency nile-popup\n *\n * @slot - The dropdown's main content.\n * @slot trigger - The dropdown's trigger, usually a `<nile-button>` element.\n *\n * @event nile-show - Emitted when the dropdown opens.\n * @event nile-after-show - Emitted after the dropdown opens and all animations are complete.\n * @event nile-hide - Emitted when the dropdown closes.\n * @event nile-after-hide - Emitted after the dropdown closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart trigger - The container that wraps the trigger.\n * @csspart panel - The panel that gets shown when the dropdown is open.\n *\n * @animation dropdown.show - The animation to use when showing the dropdown.\n * @animation dropdown.hide - The animation to use when hiding the dropdown.\n */\n@customElement('nile-dropdown')\nexport class NileDropdown extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @query('.dropdown') popup: NilePopup;\n @query('.dropdown__trigger') trigger: HTMLSlotElement;\n @query('.dropdown__panel') panel: HTMLSlotElement;\n\n\n /**\n * Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Disables the dropdown so the panel will not open. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\n * dropdowns that allow for multiple interactions.\n */\n @property({ attribute: 'stay-open-on-select', type: Boolean, reflect: true }) stayOpenOnSelect = false;\n\n /**\n * The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other\n * components that use a dropdown internally.\n */\n @property({ attribute: false }) containingElement?: HTMLElement;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @property({ type: Number }) distance = 0;\n\n\n @property({ type: Boolean }) noOpenOnClick = false;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @property({ type: Number }) skidding = 0;\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n */\n @property({ type: Boolean }) hoist = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handlePanelSelect = this.handlePanelSelect.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n\n if (!this.containingElement) {\n this.containingElement = this;\n }\n this.emit('nile-init');\n }\n\n firstUpdated() {\n this.panel.hidden = !this.open;\n\n // If the dropdown is visible on init, update its position\n if (this.open) {\n this.addOpenListeners();\n this.popup.active = true;\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.hide();\n this.emit('nile-destroy');\n }\n\n focusOnTrigger() {\n const trigger = this.trigger.assignedElements({ flatten: true })[0] as HTMLElement | undefined;\n if (typeof trigger?.focus === 'function') {\n trigger.focus();\n }\n }\n\n getMenu() {\n return this.panel.assignedElements({ flatten: true }).find(el => el.tagName.toLowerCase() === 'nile-menu') as\n | NileMenu\n | undefined;\n }\n\n handleKeyDown(event: KeyboardEvent) {\n // Close when escape is pressed inside an open dropdown. We need to listen on the panel itself and stop propagation\n // in case any ancestors are also listening for this key.\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Close when escape or tab is pressed\n if (event.key === 'Escape' && this.open) {\n event.stopPropagation();\n this.focusOnTrigger();\n this.hide();\n return;\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement?.tagName.toLowerCase() === 'nile-menu-item') {\n event.preventDefault();\n this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside of the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.containingElement?.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (\n !this.containingElement ||\n activeElement?.closest(this.containingElement.tagName.toLowerCase()) !== this.containingElement\n ) {\n this.hide();\n }\n });\n }\n }\n\n handleDocumentMouseDown(event: MouseEvent) {\n // Close when clicking outside of the containing element\n const path = event.composedPath();\n if (this.containingElement && !path.includes(this.containingElement)) {\n this.hide();\n }\n }\n\n handlePanelSelect(event: any) {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === 'nile-menu') {\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerClick() {\n if(this.noOpenOnClick){\n return;\n }\n if (this.open) {\n this.hide();\n } else {\n this.show();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerKeyDown(event: KeyboardEvent) {\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n // if (['Enter'].includes(event.key)) {\n // event.preventDefault();\n // this.handleTriggerClick();\n // return;\n // }\n\n const menu = this.getMenu();\n\n if (menu) {\n const menuItems = menu.getAllItems();\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n this.show();\n }\n\n if (menuItems.length > 0) {\n // Focus on the first/last menu item after showing\n this.updateComplete.then(() => {\n if (event.key === 'ArrowDown' || event.key === 'Home') {\n menu.setCurrentItem(firstMenuItem);\n firstMenuItem.focus();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'End') {\n menu.setCurrentItem(lastMenuItem);\n lastMenuItem.focus();\n }\n });\n }\n }\n }\n }\n\n handleTriggerKeyUp(event: KeyboardEvent) {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n }\n\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <nile-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n updateAccessibleTrigger() {\n const assignedElements = this.trigger.assignedElements({ flatten: true }) as HTMLElement[];\n const accessibleTrigger = assignedElements.find(el => getTabbableBoundary(el).start);\n let target: HTMLElement;\n\n if (accessibleTrigger) {\n switch (accessibleTrigger.tagName.toLowerCase()) {\n // nile buttons have to update the internal button so it's announced correctly by screen readers\n case 'nile-button':\n case 'nile-icon-button':\n target = (accessibleTrigger as NileButton | NileIconButton).button;\n break;\n\n default:\n target = accessibleTrigger;\n }\n\n target.setAttribute('aria-haspopup', 'true');\n target.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n /** Shows the dropdown panel. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dropdown panel */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n */\n reposition() {\n this.popup.reposition();\n }\n\n addOpenListeners() {\n this.panel.addEventListener('nile-select', this.handlePanelSelect);\n this.panel.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n removeOpenListeners() {\n if (this.panel) {\n this.panel.removeEventListener('nile-select', this.handlePanelSelect);\n this.panel.removeEventListener('keydown', this.handleKeyDown);\n }\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.disabled) {\n this.open = false;\n return;\n }\n\n this.updateAccessibleTrigger();\n\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n\n await stopAnimations(this);\n this.panel.hidden = false;\n this.popup.active = true;\n const { keyframes, options } = getAnimation(this, 'dropdown.show', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n await stopAnimations(this);\n const { keyframes, options } = getAnimation(this, 'dropdown.hide', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n this.panel.hidden = true;\n this.popup.active = false;\n\n this.emit('nile-after-hide');\n }\n }\n\n render() {\n return html`\n <nile-popup\n part=\"base\"\n id=\"dropdown\"\n placement=${this.placement}\n distance=${this.distance}\n skidding=${this.skidding}\n strategy=${this.hoist ? 'fixed' : 'absolute'}\n sync=${this.sync}\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': this.open\n })}\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=${this.handleTriggerClick}\n @keydown=${this.handleTriggerKeyDown}\n @keyup=${this.handleTriggerKeyUp}\n @slotchange=${this.handleTriggerSlotChange}\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-labelledby=\"dropdown\"\n ></slot>\n </nile-popup>\n `;\n }\n}\n\nsetDefaultAnimation('dropdown.show', {\n keyframes: [\n { opacity: 0, scale: 0.9 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nsetDefaultAnimation('dropdown.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.9 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nexport default NileDropdown;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dropdown': NileDropdown;\n }\n}\n"]}
@@ -120,7 +120,7 @@ export const styles = css `
120
120
  font: inherit;
121
121
  border: none;
122
122
  background: none;
123
- color: #333333;
123
+ color: var(--nile-colors-dark-900);
124
124
  cursor: inherit;
125
125
  overflow: hidden;
126
126
  padding: 0;
@@ -134,7 +134,7 @@ export const styles = css `
134
134
  }
135
135
 
136
136
  .select:not(.select--disabled):hover .select__display-input {
137
- color: #333333;
137
+ color: var(--nile-colors-dark-900);
138
138
  }
139
139
 
140
140
  .select__display-input:focus {
@@ -205,7 +205,7 @@ export const styles = css `
205
205
  }
206
206
 
207
207
  .select--standard .select__combobox:hover {
208
- border: 1px solid #000;
208
+ border: 1px solid var(--nile-colors-dark-900);
209
209
  background: #fff;
210
210
  }
211
211
 
@@ -1 +1 @@
1
- {"version":3,"file":"nile-select.css.js","sourceRoot":"","sources":["../../../src/nile-select/nile-select.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6bxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,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 {css} from 'lit-element';\n\n/**\n * Select_2 CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: 6px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 14px;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: inherit;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: #666666;\n margin-top: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif);\n font-weight: 400;\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: #333333;\n cursor: inherit;\n overflow: hidden;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif);\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif);\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: #333333;\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: no-wrap;\n margin-inline-start: 0.5rem;\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: #005ea6;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n margin: 6px;\n }\n\n .select__tags-count-clearable {\n margin-right: 50px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: #ffffff;\n border: solid 1px #cccccc;\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid #000;\n background: #fff;\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: #f4f4f4;\n border-color: #cccccc;\n color: #999999;\n opacity: 0.5;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .select--error .select__combobox {\n border-color: #e5434d;\n }\n\n .select--success {\n border-color: #43e5c0;\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: #f4f4f4;\n color: #333333;\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: #f4f4f4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: 4px;\n font-size: 14px;\n padding: 12px;\n height: 40px;\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: 0;\n }\n\n .select--medium .select__tags {\n gap: 3px;\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: 2.5rem;\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: #005ea6;\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: #999999;\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: 0.25rem;\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 400;\n background: #ffffff;\n border: solid 1px #cccccc;\n border-radius: 0.25rem;\n padding-block: 0;\n padding-inline: 0;\n overflow: auto;\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n }\n\n .select__options__search-enabled {\n padding-top: 10px;\n }\n\n .select__options {\n font-size: 14px;\n color: rgb(133, 129, 129);\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: 0.25rem;\n }\n\n .select__listbox::slotted(small) {\n font-size: 0.875rem;\n font-weight: 600;\n color: #888888;\n padding-block: 0.25rem;\n padding-inline: 1rem;\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: 8px;\n background-color: white;\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: #fafafa;\n border: 1px solid #e5e9eb;\n display: flex;\n height: 15px;\n /* Auto layout */\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 8px 12px 16px;\n gap: 12px;\n justify-content: space-between;\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: 20px;\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: 10px;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible{\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: 12px;\n }\n \n .select__hide-default{\n display: none;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-select.css.js","sourceRoot":"","sources":["../../../src/nile-select/nile-select.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6bxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,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 {css} from 'lit-element';\n\n/**\n * Select_2 CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: 6px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 14px;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: inherit;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: #666666;\n margin-top: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif);\n font-weight: 400;\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: var(--nile-colors-dark-900);\n cursor: inherit;\n overflow: hidden;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif);\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif);\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: var(--nile-colors-dark-900);\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: no-wrap;\n margin-inline-start: 0.5rem;\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: #005ea6;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n margin: 6px;\n }\n\n .select__tags-count-clearable {\n margin-right: 50px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: #ffffff;\n border: solid 1px #cccccc;\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid var(--nile-colors-dark-900);\n background: #fff;\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: #f4f4f4;\n border-color: #cccccc;\n color: #999999;\n opacity: 0.5;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .select--error .select__combobox {\n border-color: #e5434d;\n }\n\n .select--success {\n border-color: #43e5c0;\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: #f4f4f4;\n color: #333333;\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: #f4f4f4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: 4px;\n font-size: 14px;\n padding: 12px;\n height: 40px;\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: 0;\n }\n\n .select--medium .select__tags {\n gap: 3px;\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: 2.5rem;\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: #005ea6;\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: #999999;\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: 0.25rem;\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 400;\n background: #ffffff;\n border: solid 1px #cccccc;\n border-radius: 0.25rem;\n padding-block: 0;\n padding-inline: 0;\n overflow: auto;\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n }\n\n .select__options__search-enabled {\n padding-top: 10px;\n }\n\n .select__options {\n font-size: 14px;\n color: rgb(133, 129, 129);\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: 0.25rem;\n }\n\n .select__listbox::slotted(small) {\n font-size: 0.875rem;\n font-weight: 600;\n color: #888888;\n padding-block: 0.25rem;\n padding-inline: 1rem;\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: 8px;\n background-color: white;\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: #fafafa;\n border: 1px solid #e5e9eb;\n display: flex;\n height: 15px;\n /* Auto layout */\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 8px 12px 16px;\n gap: 12px;\n justify-content: space-between;\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: 20px;\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: 10px;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible{\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: 12px;\n }\n \n .select__hide-default{\n display: none;\n }\n`;\n\nexport default [styles];\n"]}