@creaditor/newsletter-starterkit 1.0.49 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/380.creaditor.bundle.js +186 -0
- package/dist/380.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +5 -5
- package/dist/4569.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +1 -1
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/5813.creaditor.bundle.js +15 -6
- package/dist/5813.creaditor.bundle.js.gz +0 -0
- package/dist/8303.creaditor.bundle.js +57 -0
- package/dist/8303.creaditor.bundle.js.LICENSE.txt +10 -0
- package/dist/8303.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/8303.creaditor.bundle.js.gz +0 -0
- package/dist/8876.creaditor.bundle.js +25 -0
- package/dist/8876.creaditor.bundle.js.LICENSE.txt +32 -0
- package/dist/8876.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/8876.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +927 -677
- package/dist/creaditor.bundle.js.LICENSE.txt +0 -11
- package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[380],{70380(t,e,s){s.r(e),s.d(e,{default:()=>h});var i=s(59929),n=s(21421),a=s(91597);const o="֑-߿יִ-﷽ﹰ-ﻼ",l="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",c=new RegExp("^[^"+l+"]*["+o+"]"),u=new RegExp("^[^"+o+"]*["+l+"]");var r=s(86319);const p=(0,a.S)();class h extends i.WF{constructor(){super(),this.inputRef=(0,n._)(),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=r.M.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===function(t){const e=String(t||"");return c.test(e)?"rtl":u.test(e)?"ltr":"neutral"}(t)?"right":"")));const e=this.multiline?i.qy` <textarea
|
|
2
|
+
row=${this.row||4}
|
|
3
|
+
.disabled=${this.disabled}
|
|
4
|
+
dir="auto"
|
|
5
|
+
${(0,n.K)(this.inputRef)}
|
|
6
|
+
style="${this.inputStyle}"
|
|
7
|
+
.autofocus="${this.autofocus}"
|
|
8
|
+
.placeholder="${t}"
|
|
9
|
+
@input="${this.setValue}"
|
|
10
|
+
@change="${this.setValue}"
|
|
11
|
+
.min="${String(this.min)}"
|
|
12
|
+
.max="${String(this.max)}"
|
|
13
|
+
.step="${String(this.step)}"
|
|
14
|
+
.value="${String(this.value)}"
|
|
15
|
+
/>`:i.qy` <input
|
|
16
|
+
.disabled=${this.disabled}
|
|
17
|
+
dir="auto"
|
|
18
|
+
${(0,n.K)(this.inputRef)}
|
|
19
|
+
style="${this.inputStyle}"
|
|
20
|
+
.autofocus="${this.autofocus}"
|
|
21
|
+
.placeholder="${t}"
|
|
22
|
+
@input="${this.setValue}"
|
|
23
|
+
@change="${this.setValue}"
|
|
24
|
+
.min="${String(this.min)}"
|
|
25
|
+
.type="${this.type}"
|
|
26
|
+
.max="${String(this.max)}"
|
|
27
|
+
.step="${String(this.step)}"
|
|
28
|
+
.value="${String(this.value)}"
|
|
29
|
+
/>`;return i.qy`<form @submit=${this.onSubmit}>
|
|
30
|
+
${e}
|
|
31
|
+
${!this.icon||this.couchOnEmpty||this.successActive?null:i.qy`<cdtr-icon
|
|
32
|
+
color="#d9d9d9"
|
|
33
|
+
width=${20}
|
|
34
|
+
height=${20}
|
|
35
|
+
style="position: absolute;
|
|
36
|
+
transform: translateY(-50%);top:50%;z-index:1;
|
|
37
|
+
left: 10px;"
|
|
38
|
+
icon="${this.icon}"
|
|
39
|
+
></cdtr-icon>`}
|
|
40
|
+
${this.successActive?i.qy`<div class="success-overlay" aria-live="polite">
|
|
41
|
+
<cdtr-couch-mark></cdtr-couch-mark>
|
|
42
|
+
<span class="success-icon">✓</span>
|
|
43
|
+
</div>`:null}
|
|
44
|
+
${!this.couchOnEmpty||this.value||this.successActive?null:i.qy`<cdtr-couch-mark
|
|
45
|
+
style="position: absolute;
|
|
46
|
+
transform: translateY(-50%);
|
|
47
|
+
left: 0;"
|
|
48
|
+
></cdtr-couch-mark>`}
|
|
49
|
+
${"text"===this.type&&this.maxLength?i.qy`<span class="counter"
|
|
50
|
+
>${this.value.length}/${this.maxLength}</span
|
|
51
|
+
> `:null}
|
|
52
|
+
</form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const s=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(s),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};p.run(t,500)}}success(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null),this.successActive=!0;const e=Number(t);!Number.isFinite(e)||e<=0||(this._successTimeout=setTimeout(()=>{this.successActive=!1,this._successTimeout=null},e))}patch(t){this.value=t}}h.styles=i.AH`
|
|
53
|
+
:host {
|
|
54
|
+
display: inline-block;
|
|
55
|
+
--cdtr-input-height: 30px;
|
|
56
|
+
--cdtr-input-padding: 0.105rem 0.45rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
form {
|
|
60
|
+
position: relative;
|
|
61
|
+
}
|
|
62
|
+
.counter {
|
|
63
|
+
font-size: 10px;
|
|
64
|
+
}
|
|
65
|
+
input,
|
|
66
|
+
textarea {
|
|
67
|
+
height: var(--cdtr-input-height);
|
|
68
|
+
display: inline-block;
|
|
69
|
+
width: 100%;
|
|
70
|
+
padding: var(--cdtr-input-padding);
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
line-height: 1.5;
|
|
74
|
+
color: #212529;
|
|
75
|
+
background: #fff;
|
|
76
|
+
background-clip: padding-box;
|
|
77
|
+
border: 1px solid #ced4da;
|
|
78
|
+
-webkit-appearance: none;
|
|
79
|
+
-moz-appearance: none;
|
|
80
|
+
appearance: none;
|
|
81
|
+
border-radius: 0.25rem;
|
|
82
|
+
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
83
|
+
margin: 0;
|
|
84
|
+
font-family: var(--font-family);
|
|
85
|
+
border-color: var(--input-border-color);
|
|
86
|
+
outline: var(--input-border-color);
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
}
|
|
89
|
+
textarea {
|
|
90
|
+
height: auto;
|
|
91
|
+
resize: none;
|
|
92
|
+
}
|
|
93
|
+
input:disabled,
|
|
94
|
+
textrea:disabled,
|
|
95
|
+
textareap[readonly],
|
|
96
|
+
input[readonly] {
|
|
97
|
+
background-color: #e9ecef;
|
|
98
|
+
opacity: 0.5;
|
|
99
|
+
}
|
|
100
|
+
input:hover,
|
|
101
|
+
textarea:hover {
|
|
102
|
+
border-color: black;
|
|
103
|
+
}
|
|
104
|
+
input::placeholder,
|
|
105
|
+
textarea::placeholder {
|
|
106
|
+
font-family: var(--font-family);
|
|
107
|
+
}
|
|
108
|
+
input:focus,
|
|
109
|
+
textarea:focus {
|
|
110
|
+
border-color: var(--primary);
|
|
111
|
+
}
|
|
112
|
+
input[type="number"] {
|
|
113
|
+
padding-right: 0px;
|
|
114
|
+
padding-left: 4px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
input[type="number"] {
|
|
118
|
+
-moz-appearance: textfield;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.success-overlay {
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 50%;
|
|
124
|
+
left: 4px;
|
|
125
|
+
transform: translateY(-50%);
|
|
126
|
+
width: 28px;
|
|
127
|
+
height: 28px;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
z-index: 2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.success-overlay cdtr-couch-mark {
|
|
136
|
+
position: absolute;
|
|
137
|
+
top: 50%;
|
|
138
|
+
left: 50%;
|
|
139
|
+
transform: translate(-50%, -50%) scale(0.75);
|
|
140
|
+
opacity: 0.85;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.success-overlay .success-icon {
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: 50%;
|
|
146
|
+
left: 50%;
|
|
147
|
+
width: 20px;
|
|
148
|
+
height: 20px;
|
|
149
|
+
border-radius: 999px;
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
background: var(--primary);
|
|
154
|
+
color: #f6fff9;
|
|
155
|
+
font-size: 14px;
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
transform: translate(-50%, -50%) scale(0.85);
|
|
158
|
+
opacity: 0;
|
|
159
|
+
animation: successPop 0.32s ease-out forwards;
|
|
160
|
+
box-shadow: 0 0 6px rgba(79, 192, 111, 0.25);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@keyframes successPop {
|
|
164
|
+
0% {
|
|
165
|
+
transform: translate(-50%, -50%) scale(0.85);
|
|
166
|
+
opacity: 0;
|
|
167
|
+
}
|
|
168
|
+
50% {
|
|
169
|
+
transform: translate(-50%, -50%) scale(1.05);
|
|
170
|
+
opacity: 1;
|
|
171
|
+
}
|
|
172
|
+
100% {
|
|
173
|
+
transform: translate(-50%, -50%) scale(1);
|
|
174
|
+
opacity: 1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@keyframes successGlow {
|
|
179
|
+
0% {
|
|
180
|
+
box-shadow: 0 0 6px rgba(79, 192, 111, 0.25);
|
|
181
|
+
}
|
|
182
|
+
100% {
|
|
183
|
+
box-shadow: 0 0 10px rgba(79, 192, 111, 0.2);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
`,h.properties={value:{type:String,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},type:{type:String,reflect:!0},inputDir:{type:String},icon:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},autofocus:{type:Boolean,reflect:!0},fullWidth:{type:Boolean,reflect:!0},selectionStart:{type:Number},inputStyle:{type:String,reflect:!0},maxLength:{type:Number},couchOnEmpty:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},row:{type:Number},successActive:{type:Boolean}},customElements.get("cdtr-input")||customElements.define("cdtr-input",h)}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3095,4569
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[380,3095,4569],{73095(t,e,i){i.r(e),i.d(e,{default:()=>n});var s=i(59929),o=i(21421),r=i(69600);class n extends s.WF{constructor(){super(),this.contentRef=(0,o._)(),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(t){this.searchText=t.target.value;const e=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e)}render(){return s.qy`
|
|
2
2
|
<slot @click=${()=>this.toggle()} tabindex="0" name="trigger"></slot>
|
|
3
3
|
${this.opened?s.qy` <div
|
|
4
4
|
@mouseup=${this.onClickOutside}
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
transform: translate(-70%, -50%);
|
|
159
159
|
top: 50%;
|
|
160
160
|
}
|
|
161
|
-
`,customElements.get("cdtr-dropdown-item")||customElements.define("cdtr-dropdown-item",l),customElements.get("cdtr-dropdown-button")||customElements.define("cdtr-dropdown-button",a),customElements.get("cdtr-dropdown")||customElements.define("cdtr-dropdown",n)},
|
|
161
|
+
`,customElements.get("cdtr-dropdown-item")||customElements.define("cdtr-dropdown-item",l),customElements.get("cdtr-dropdown-button")||customElements.define("cdtr-dropdown-button",a),customElements.get("cdtr-dropdown")||customElements.define("cdtr-dropdown",n)},70380(t,e,i){i.r(e),i.d(e,{default:()=>p});var s=i(59929),o=i(21421),r=i(91597);const n="֑-߿יִ-﷽ﹰ-ﻼ",a="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",l=new RegExp("^[^"+a+"]*["+n+"]"),c=new RegExp("^[^"+n+"]*["+a+"]");var d=i(86319);const h=(0,r.S)();class p extends s.WF{constructor(){super(),this.inputRef=(0,o._)(),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=d.M.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===function(t){const e=String(t||"");return l.test(e)?"rtl":c.test(e)?"ltr":"neutral"}(t)?"right":"")));const e=this.multiline?s.qy` <textarea
|
|
162
162
|
row=${this.row||4}
|
|
163
163
|
.disabled=${this.disabled}
|
|
164
164
|
dir="auto"
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
${"text"===this.type&&this.maxLength?s.qy`<span class="counter"
|
|
210
210
|
>${this.value.length}/${this.maxLength}</span
|
|
211
211
|
> `:null}
|
|
212
|
-
</form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const i=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(i),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};
|
|
212
|
+
</form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const i=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(i),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};h.run(t,500)}}success(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null),this.successActive=!0;const e=Number(t);!Number.isFinite(e)||e<=0||(this._successTimeout=setTimeout(()=>{this.successActive=!1,this._successTimeout=null},e))}patch(t){this.value=t}}p.styles=s.AH`
|
|
213
213
|
:host {
|
|
214
214
|
display: inline-block;
|
|
215
215
|
--cdtr-input-height: 30px;
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
box-shadow: 0 0 10px rgba(79, 192, 111, 0.2);
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
`,
|
|
346
|
+
`,p.properties={value:{type:String,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},type:{type:String,reflect:!0},inputDir:{type:String},icon:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},autofocus:{type:Boolean,reflect:!0},fullWidth:{type:Boolean,reflect:!0},selectionStart:{type:Number},inputStyle:{type:String,reflect:!0},maxLength:{type:Number},couchOnEmpty:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},row:{type:Number},successActive:{type:Boolean}},customElements.get("cdtr-input")||customElements.define("cdtr-input",p)},64569(t,e,i){i.r(e),i.d(e,{LinkElement:()=>x});var s=i(59929),o=i(86319),r=i(88385);const n=s.AH`
|
|
347
347
|
:host {
|
|
348
348
|
--paper-radio-button-checked-color: var(--primary);
|
|
349
349
|
box-sizing: border-box;
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
margin-top: 0.75rem;
|
|
495
495
|
padding-left: 1rem;
|
|
496
496
|
}
|
|
497
|
-
`;var a=i(21421);i(73095),i(
|
|
497
|
+
`;var a=i(21421);i(73095),i(70380);const l="260px",c=[{type:"https:",text:"link"},{type:"http:",text:"link"},{type:"mailto:",text:"sendEmail"},{type:"tel:",text:"tel"},{type:"sms:",text:"sendSms"},{type:"whatsapp:",text:"sendWhatsapp"},{type:"anchor:",text:"anchor"}],d="cdtrAdd",h="cdtrRemove",p="cdtrAutomation",u=[d,h,p];function m(t,e){t=t.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function f(t,e){switch(t){case"anchor:":return function(t){const{url:e,anchors:i,href:o,protocol:r,onChangeLink:n,onBlur:a,onRequest:l}=t;return s.qy`
|
|
498
498
|
<cdtr-row alignItems="center" spacing="5">
|
|
499
499
|
<cdtr-dropdown
|
|
500
500
|
@change=${t=>{n({target:{value:"#"+t.target.value},anchor:!0}),a()}}
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,o){o.r(e),o.d(e,{NameAndSubjectPlugin:()=>u});var i=o(59929),s=o(49410);o(78533);function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1,r(),r(),r(),r();const n=r()?"http://localhost:8000/api/v1/prompt/subject":"https://agent.creaditor.ai/api/v1/prompt/subject",a=r()?"http://localhost:8000/api/v1/prompt/subtitle":"https://agent.creaditor.ai/api/v1/prompt/subtitle";var l=Object.defineProperty,p=(t,e,o,i)=>{for(var s,r=void 0,n=t.length-1;n>=0;n--)(s=t[n])&&(r=s(e,o,r)||r);return r&&l(e,o,r),r};typeof window<"u"&&!window.__polymerElementsLoaded&&(window.__polymerElementsLoaded=!0,(async()=>{try{const t=["paper-dropdown-menu","paper-item","paper-listbox"].filter(t=>customElements.get(t));if(t.length>0)return void console.warn(`Polymer elements already loaded: ${t.join(", ")}. Skipping imports to prevent conflicts.`);if(customElements.get("dom-module"))return void console.warn("dom-module already defined, skipping Polymer element imports to prevent conflicts");await Promise.all([Promise.all([o.e(59),o.e(5813),o.e(574)]).then(o.bind(o,50574)),o.e(898).then(o.bind(o,90898)),Promise.all([o.e(6216),o.e(7463)]).then(o.bind(o,97463))]),console.log("Polymer elements loaded successfully")}catch(t){console.warn("Failed to load Polymer elements:",t)}})().catch(console.error));const d="cdtr-name-and-subject-plugin",c=class extends i.WF{constructor(){super(...arguments),this.bgColor="#000",this.textColor="#000000",this.headerText="Details",this.nameLabel="Name",this.subjectLabel="Subject",this.subtitleLabel="Subtitle",this.saveButtonText="Save",this.subjectPlaceholder="Enter subject",this.mergeTags=[],this.name="",this.subject="",this.subtitle="",this.save=()=>{},this.isGeneratingSubject=!1,this.isGeneratingSubtitle=!1}getTextDirection(t){return/[\u0590-\u05FF]/.test(t)?"rtl":"ltr"}getPlaceholderStyle(){const t=this.getTextDirection(this.subjectPlaceholder);return`direction: ${t}; text-align: ${"rtl"===t?"right":"left"};`}handleSave(){"string"!=typeof this.subtitle&&(this.subtitle=""),"string"!=typeof this.subject&&(this.subject=""),this.dispatchEvent(new CustomEvent("save",{detail:{name:this.name,subject:this.subject,subtitle:this.subtitle}})),this.save(),setTimeout(()=>{var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.close()},200)}handleFieldClick(t){this.subject+=t.value,this.requestUpdate()}handleEmojiSelect(t){const e=t.detail.unicode;this.subject=this.subject+e,this.requestUpdate()}open(){var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.open()}focusInputs(t){var e;this.open();const o=null==(e=this.shadowRoot)?void 0:e.querySelectorAll("input");if(o)if(o.forEach(t=>t.classList.remove("shake")),t){const e=Array.from(o).find(e=>{var o;const i=e.previousElementSibling;return null==(o=null==i?void 0:i.textContent)?void 0:o.toLowerCase().includes(t.toLowerCase())});e&&(e.focus(),e.classList.add("shake"))}else o.forEach(t=>{t.focus(),t.classList.add("shake")})}handleGenerateSubject(){if(this.isGeneratingSubject)return;const t=this.subject||"";this.subject="",this.isGeneratingSubject=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>500){const t=Math.floor(250);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:"write my subject",context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subject:",t),t}})(t=>{this.subject+=t,this.requestUpdate()}).catch(()=>{this.subject=t}).finally(()=>{this.isGeneratingSubject=!1,this.requestUpdate()})}handleGenerateSubtitle(){if(this.isGeneratingSubtitle)return;const t=this.subtitle||"";this.subtitle="",this.isGeneratingSubtitle=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>1400){const t=Math.floor(700);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subtitle:",t),t}})(t=>{this.subtitle+=t,this.requestUpdate()}).catch(()=>{this.subtitle=t}).finally(()=>{this.isGeneratingSubtitle=!1,this.requestUpdate()})}render(){return i.qy`
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,o){o.r(e),o.d(e,{NameAndSubjectPlugin:()=>u});var i=o(59929),s=o(49410);o(78533);function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1,r(),r(),r(),r();const n=r()?"http://localhost:8000/api/v1/prompt/subject":"https://agent.creaditor.ai/api/v1/prompt/subject",a=r()?"http://localhost:8000/api/v1/prompt/subtitle":"https://agent.creaditor.ai/api/v1/prompt/subtitle";var l=Object.defineProperty,p=(t,e,o,i)=>{for(var s,r=void 0,n=t.length-1;n>=0;n--)(s=t[n])&&(r=s(e,o,r)||r);return r&&l(e,o,r),r};typeof window<"u"&&!window.__polymerElementsLoaded&&(window.__polymerElementsLoaded=!0,(async()=>{try{const t=["paper-dropdown-menu","paper-item","paper-listbox"].filter(t=>customElements.get(t));if(t.length>0)return void console.warn(`Polymer elements already loaded: ${t.join(", ")}. Skipping imports to prevent conflicts.`);if(customElements.get("dom-module"))return void console.warn("dom-module already defined, skipping Polymer element imports to prevent conflicts");await Promise.all([Promise.all([o.e(59),o.e(8876),o.e(5813),o.e(574)]).then(o.bind(o,50574)),o.e(898).then(o.bind(o,90898)),Promise.all([o.e(6216),o.e(7463)]).then(o.bind(o,97463))]),console.log("Polymer elements loaded successfully")}catch(t){console.warn("Failed to load Polymer elements:",t)}})().catch(console.error));const d="cdtr-name-and-subject-plugin",c=class extends i.WF{constructor(){super(...arguments),this.bgColor="#000",this.textColor="#000000",this.headerText="Details",this.nameLabel="Name",this.subjectLabel="Subject",this.subtitleLabel="Subtitle",this.saveButtonText="Save",this.subjectPlaceholder="Enter subject",this.mergeTags=[],this.name="",this.subject="",this.subtitle="",this.save=()=>{},this.isGeneratingSubject=!1,this.isGeneratingSubtitle=!1}getTextDirection(t){return/[\u0590-\u05FF]/.test(t)?"rtl":"ltr"}getPlaceholderStyle(){const t=this.getTextDirection(this.subjectPlaceholder);return`direction: ${t}; text-align: ${"rtl"===t?"right":"left"};`}handleSave(){"string"!=typeof this.subtitle&&(this.subtitle=""),"string"!=typeof this.subject&&(this.subject=""),this.dispatchEvent(new CustomEvent("save",{detail:{name:this.name,subject:this.subject,subtitle:this.subtitle}})),this.save(),setTimeout(()=>{var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.close()},200)}handleFieldClick(t){this.subject+=t.value,this.requestUpdate()}handleEmojiSelect(t){const e=t.detail.unicode;this.subject=this.subject+e,this.requestUpdate()}open(){var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.open()}focusInputs(t){var e;this.open();const o=null==(e=this.shadowRoot)?void 0:e.querySelectorAll("input");if(o)if(o.forEach(t=>t.classList.remove("shake")),t){const e=Array.from(o).find(e=>{var o;const i=e.previousElementSibling;return null==(o=null==i?void 0:i.textContent)?void 0:o.toLowerCase().includes(t.toLowerCase())});e&&(e.focus(),e.classList.add("shake"))}else o.forEach(t=>{t.focus(),t.classList.add("shake")})}handleGenerateSubject(){if(this.isGeneratingSubject)return;const t=this.subject||"";this.subject="",this.isGeneratingSubject=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>500){const t=Math.floor(250);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:"write my subject",context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subject:",t),t}})(t=>{this.subject+=t,this.requestUpdate()}).catch(()=>{this.subject=t}).finally(()=>{this.isGeneratingSubject=!1,this.requestUpdate()})}handleGenerateSubtitle(){if(this.isGeneratingSubtitle)return;const t=this.subtitle||"";this.subtitle="",this.isGeneratingSubtitle=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>1400){const t=Math.floor(700);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subtitle:",t),t}})(t=>{this.subtitle+=t,this.requestUpdate()}).catch(()=>{this.subtitle=t}).finally(()=>{this.isGeneratingSubtitle=!1,this.requestUpdate()})}render(){return i.qy`
|
|
2
2
|
<div class="subject-input">
|
|
3
3
|
<div class="subject-input-left">
|
|
4
4
|
<cdtr-popover width="400px">
|
|
Binary file
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
/*! For license information please see 5813.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5813],{
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5813],{77863(t,e,n){n.d(e,{o:()=>o});n(69130);var i=n(95586),a=n(47351);const o=(0,i.b)({_template:a.q`
|
|
3
|
+
<style>
|
|
4
|
+
:host {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
position: fixed;
|
|
7
|
+
clip: rect(0px,0px,0px,0px);
|
|
8
|
+
}
|
|
9
|
+
</style>
|
|
10
|
+
<div aria-live$="[[mode]]">[[_text]]</div>
|
|
11
|
+
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){o.instance||(o.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(t){this._text="",this.async(function(){this._text=t},this.timeout)},_onIronAnnounce:function(t){t.detail&&t.detail.text&&this.announce(t.detail.text)}});o.instance=null,o.requestAvailability=function(){o.instance||(o.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(o.instance):document.addEventListener("load",function(){document.body.appendChild(o.instance)})}},95813(t,e,n){n(69130);var i=n(77863),a=n(18811),o=n(95586),l=n(53874),p=n(47351);(0,o.b)({_template:p.q`
|
|
3
12
|
<style>
|
|
4
13
|
:host {
|
|
5
14
|
display: inline-block;
|
|
6
15
|
}
|
|
7
16
|
</style>
|
|
8
17
|
<slot id="content"></slot>
|
|
9
|
-
`,is:"iron-input",behaviors:[a.Q],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){i.o.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=(0,
|
|
18
|
+
`,is:"iron-input",behaviors:[a.Q],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){i.o.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=(0,l.tT)(this).observeNodes(function(t){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&((0,l.tT)(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var t;if(this.allowedPattern)t=new RegExp(this.allowedPattern);else if("number"===this.inputElement.type)t=/[0-9.,e-]/;return t},_bindValueChanged:function(t,e){e&&(void 0===t?e.value=null:t!==e.value&&(this.inputElement.value=t),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:t}))},_onInput:function(){this.allowedPattern&&!this._patternAlreadyChecked&&(this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput));this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(t){var e=8==t.keyCode||9==t.keyCode||13==t.keyCode||27==t.keyCode,n=19==t.keyCode||20==t.keyCode||45==t.keyCode||46==t.keyCode||144==t.keyCode||145==t.keyCode||t.keyCode>32&&t.keyCode<41||t.keyCode>111&&t.keyCode<124;return!(e||0==t.charCode&&n)},_onKeypress:function(t){if(this.allowedPattern||"number"===this.inputElement.type){var e=this._patternRegExp;if(e&&!(t.metaKey||t.ctrlKey||t.altKey)){this._patternAlreadyChecked=!0;var n=String.fromCharCode(t.charCode);this._isPrintable(t)&&!e.test(n)&&(t.preventDefault(),this._announceInvalidCharacter("Invalid character "+n+" not entered."))}}},_checkPatternValidity:function(){var t=this._patternRegExp;if(!t)return!0;for(var e=0;e<this.inputElement.value.length;e++)if(!t.test(this.inputElement.value[e]))return!1;return!0},validate:function(){if(!this.inputElement)return this.invalid=!1,!0;var t=this.inputElement.checkValidity();return t&&(this.required&&""===this.bindValue?t=!1:this.hasValidator()&&(t=a.Q.validate.call(this,this.bindValue))),this.invalid=!t,this.fire("iron-input-validate"),t},_announceInvalidCharacter:function(t){this.fire("iron-announce",{text:t})},_computeValue:function(t){return t}});n(66564);const r={attached:function(){this.fire("addon-attached")},update:function(t){}};(0,o.b)({_template:p.q`
|
|
10
19
|
<style>
|
|
11
20
|
:host {
|
|
12
21
|
display: inline-block;
|
|
@@ -26,7 +35,7 @@
|
|
|
26
35
|
</style>
|
|
27
36
|
|
|
28
37
|
<span>[[_charCounterStr]]</span>
|
|
29
|
-
`,is:"paper-input-char-counter",behaviors:[r],properties:{_charCounterStr:{type:String,value:"0"}},update:function(t){if(t.inputElement){t.value=t.value||"";var e=t.value.toString().length.toString();t.inputElement.hasAttribute("maxlength")&&(e+="/"+t.inputElement.getAttribute("maxlength")),this._charCounterStr=e}}});n(12479),n(45611);var s=n(10848);const u=
|
|
38
|
+
`,is:"paper-input-char-counter",behaviors:[r],properties:{_charCounterStr:{type:String,value:"0"}},update:function(t){if(t.inputElement){t.value=t.value||"";var e=t.value.toString().length.toString();t.inputElement.hasAttribute("maxlength")&&(e+="/"+t.inputElement.getAttribute("maxlength")),this._charCounterStr=e}}});n(12479),n(45611);var s=n(10848);const u=p.q`
|
|
30
39
|
<custom-style>
|
|
31
40
|
<style is="custom-style">
|
|
32
41
|
html {
|
|
@@ -50,7 +59,7 @@
|
|
|
50
59
|
}
|
|
51
60
|
</style>
|
|
52
61
|
</custom-style>
|
|
53
|
-
`;u.setAttribute("style","display: none;"),document.head.appendChild(u.content),(0,o.b)({_template:
|
|
62
|
+
`;u.setAttribute("style","display: none;"),document.head.appendChild(u.content),(0,o.b)({_template:p.q`
|
|
54
63
|
<style>
|
|
55
64
|
:host {
|
|
56
65
|
display: block;
|
|
@@ -301,7 +310,7 @@
|
|
|
301
310
|
<div class$="[[_computeAddOnContentClass(focused,invalid)]]">
|
|
302
311
|
<slot name="add-on"></slot>
|
|
303
312
|
</div>
|
|
304
|
-
`,is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return(0,s.I)(this.attrForValue)},get _inputElement(){return(0,
|
|
313
|
+
`,is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return(0,s.I)(this.attrForValue)},get _inputElement(){return(0,l.tT)(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0,this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(t){this._addons||(this._addons=[]);var e=t.target;-1===this._addons.indexOf(e)&&(this._addons.push(e),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(t){this._handleValueAndAutoValidate(t.target)},_onValueChanged:function(t){var e=t.target;this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,void 0===e.value||""===e.value)||this._handleValueAndAutoValidate(t.target)},_handleValue:function(t){var e=this._inputElementValue;e||0===e||"number"===t.type&&!t.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:t,value:e,invalid:this.invalid})},_handleValueAndAutoValidate:function(t){var e;this.autoValidate&&t&&(e=t.validate?t.validate(this._inputElementValue):t.checkValidity(),this.invalid=!e);this._handleValue(t)},_onIronInputValidate:function(t){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(t){for(var e,n=0;e=this._addons[n];n++)e.update(t)},_computeInputContentClass:function(t,e,n,i,a){var o="input-content";if(t)a&&(o+=" label-is-hidden"),i&&(o+=" is-invalid");else{var l=this.querySelector("label");e||a?(o+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",i?o+=" is-invalid":n&&(o+=" label-is-highlighted")):(l&&(this.$.labelAndInputContainer.style.position="relative"),i&&(o+=" is-invalid"))}return n&&(o+=" focused"),o},_computeUnderlineClass:function(t,e){var n="underline";return e?n+=" is-invalid":t&&(n+=" is-highlighted"),n},_computeAddOnContentClass:function(t,e){var n="add-on-content";return e?n+=" is-invalid":t&&(n+=" is-highlighted"),n}}),(0,o.b)({_template:p.q`
|
|
305
314
|
<style>
|
|
306
315
|
:host {
|
|
307
316
|
display: inline-block;
|
|
@@ -341,7 +350,7 @@
|
|
|
341
350
|
<div id="a11yWrapper">
|
|
342
351
|
<slot></slot>
|
|
343
352
|
</div>
|
|
344
|
-
`,is:"paper-input-error",behaviors:[r],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(t){this._setInvalid(t.invalid)}});var d=n(19911),c=(n(77976),n(35915)),h=n(90703),f=n(71226);const y={NextLabelID:1,NextAddonID:1,NextInputID:1},b={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""},_inputId:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$||(this.$={}),this.$.input||(this._generateInputId(),this.$.input=this.$$("#"+this._inputId)),this.$.input},get _focusableElement(){return this.inputElement},created:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),!f.Pu&&this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.inputElement.type)&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(t,e){return t=t?t+" "+e:e},_onAddonAttached:function(t){var e=(0,
|
|
353
|
+
`,is:"paper-input-error",behaviors:[r],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(t){this._setInvalid(t.invalid)}});var d=n(19911),c=(n(77976),n(35915)),h=n(90703),f=n(71226);const y={NextLabelID:1,NextAddonID:1,NextInputID:1},b={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""},_inputId:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$||(this.$={}),this.$.input||(this._generateInputId(),this.$.input=this.$$("#"+this._inputId)),this.$.input},get _focusableElement(){return this.inputElement},created:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),!f.Pu&&this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.inputElement.type)&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(t,e){return t=t?t+" "+e:e},_onAddonAttached:function(t){var e=(0,l.tT)(t).rootTarget;if(e.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,e.id);else{var n="paper-input-add-on-"+y.NextAddonID++;e.id=n,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,n)}},validate:function(){return this.inputElement.validate()},_focusBlurHandler:function(t){h.x._focusBlurHandler.call(this,t),this.focused&&!this._shiftTabPressed&&this._focusableElement&&this._focusableElement.focus()},_onShiftTabDown:function(t){var e=this.getAttribute("tabindex");this._shiftTabPressed=!0,this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",e),this._shiftTabPressed=!1},1)},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(t){try{var e=this.inputElement.selectionStart;this.value=t,this.inputElement.selectionStart=e,this.inputElement.selectionEnd=e}catch(e){this.value=t}},_computeAlwaysFloatLabel:function(t,e){return e||t},_updateAriaLabelledBy:function(){var t,e=(0,l.tT)(this.root).querySelector("label");e?(e.id?t=e.id:(t="paper-input-label-"+y.NextLabelID++,e.id=t),this._ariaLabelledBy=t):this._ariaLabelledBy=""},_generateInputId:function(){this._inputId&&""!==this._inputId||(this._inputId="input-"+y.NextInputID++)},_onChange:function(t){this.shadowRoot&&this.fire(t.type,{sourceEvent:t},{node:this,bubbles:t.bubbles,cancelable:t.cancelable})},_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var t=document.activeElement;t instanceof HTMLElement&&t!==document.body&&t!==document.documentElement||this._focusableElement.focus()}}},m=[h.x,c.D,b];(0,o.b)({is:"paper-input",_template:p.q`
|
|
345
354
|
<style>
|
|
346
355
|
:host {
|
|
347
356
|
display: block;
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*! For license information please see 8303.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8303],{77863(t,e,n){n.d(e,{o:()=>s});n(69130);var o=n(95586),i=n(47351);const s=(0,o.b)({_template:i.q`
|
|
3
|
+
<style>
|
|
4
|
+
:host {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
position: fixed;
|
|
7
|
+
clip: rect(0px,0px,0px,0px);
|
|
8
|
+
}
|
|
9
|
+
</style>
|
|
10
|
+
<div aria-live$="[[mode]]">[[_text]]</div>
|
|
11
|
+
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){s.instance||(s.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(t){this._text="",this.async(function(){this._text=t},this.timeout)},_onIronAnnounce:function(t){t.detail&&t.detail.text&&this.announce(t.detail.text)}});s.instance=null,s.requestAvailability=function(){s.instance||(s.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(s.instance):document.addEventListener("load",function(){document.body.appendChild(s.instance)})}},98303(t,e,n){n.r(e),n.d(e,{ToastProvider:()=>u});var o=n(59929),i=n(21421),s=n(77863),a=n(68876),r=n(95586),p=n(47351),l=n(69130),d=null;(0,r.b)({_template:p.q`
|
|
12
|
+
<style>
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
position: fixed;
|
|
16
|
+
background-color: var(--paper-toast-background-color, #323232);
|
|
17
|
+
color: var(--paper-toast-color, #f1f1f1);
|
|
18
|
+
min-height: 48px;
|
|
19
|
+
min-width: 288px;
|
|
20
|
+
padding: 16px 24px;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
margin: 12px;
|
|
25
|
+
font-size: 14px;
|
|
26
|
+
cursor: default;
|
|
27
|
+
-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
|
|
28
|
+
transition: transform 0.3s, opacity 0.3s;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
-webkit-transform: translateY(100px);
|
|
31
|
+
transform: translateY(100px);
|
|
32
|
+
@apply --paper-font-common-base;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host(.capsule) {
|
|
36
|
+
border-radius: 24px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host(.fit-bottom) {
|
|
40
|
+
width: 100%;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
border-radius: 0;
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(.paper-toast-open) {
|
|
47
|
+
opacity: 1;
|
|
48
|
+
-webkit-transform: translateY(0px);
|
|
49
|
+
transform: translateY(0px);
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
52
|
+
|
|
53
|
+
<span id="label">{{text}}</span>
|
|
54
|
+
<slot></slot>
|
|
55
|
+
`,is:"paper-toast",behaviors:[a.r],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){return l.C6._warn("`visible` is deprecated, use `opened` instead"),this.opened},get _canAutoClose(){return this.duration>0&&this.duration!==1/0},created:function(){this._autoClose=null,s.o.requestAvailability()},show:function(t){for(var e in"string"==typeof t&&(t={text:t}),t)0===e.indexOf("_")?l.C6._warn('The property "'+e+'" is private and was not set.'):e in this?this[e]=t[e]:l.C6._warn('The property "'+e+'" is not valid.');this.open()},hide:function(){this.close()},__onTransitionEnd:function(t){t&&t.target===this&&"opacity"===t.propertyName&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_openedChanged:function(){null!==this._autoClose&&(this.cancelAsync(this._autoClose),this._autoClose=null),this.opened?(d&&d!==this&&d.close(),d=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):d===this&&(d=null),a.N._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("paper-toast-open")},_renderClosed:function(){this.classList.remove("paper-toast-open")},_onFitIntoChanged:function(t){this.positionTarget=t}});class u extends o.WF{constructor(t){super(),this.toastRef=(0,i._)(),this.toastText="",this.global=!0;const e=t=>{let{text:e,timeout:n=3e3}=t;this.text=e,this.toastRef?.value?.open(),setTimeout(()=>{this.toastRef?.value?.close()},parseInt(n))};this.global&&(window.snackbar=e)}render(){return o.qy`
|
|
56
|
+
<paper-toast ${(0,i.K)(this.toastRef)}>${this.text}</paper-toast>
|
|
57
|
+
`}}u.properties={text:{type:String},global:{type:Boolean}},customElements.get("cdtr-toast-provider")||customElements.define("cdtr-toast-provider",u)}}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*! For license information please see 8876.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8876],{68876(t,e,i){i.d(e,{r:()=>k,N:()=>N});i(69130);var s=i(53874);let n;const o={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var t=(0,s.tT)(this).parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(t=t.host),t},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},get _isRTL(){return void 0===this._memoizedIsRTL&&(this._memoizedIsRTL="rtl"==window.getComputedStyle(this).direction),this._memoizedIsRTL},attached:function(){this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var t=window.getComputedStyle(this),e=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==t.top?"top":"auto"!==t.bottom?"bottom":null,horizontally:"auto"!==t.left?"left":"auto"!==t.right?"right":null},sizedBy:{height:"none"!==e.maxHeight,width:"none"!==e.maxWidth,minWidth:parseInt(e.minWidth,10)||0,minHeight:parseInt(e.minHeight,10)||0},margin:{top:parseInt(t.marginTop,10)||0,right:parseInt(t.marginRight,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0}}}},resetFit:function(){var t=this._fitInfo||{};for(var e in t.sizerInlineStyle)this.sizingTarget.style[e]=t.sizerInlineStyle[e];for(var e in t.inlineStyle)this.style[e]=t.inlineStyle[e];this._fitInfo=null},refit:function(){var t=this.sizingTarget.scrollLeft,e=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=t,this.sizingTarget.scrollTop=e},position:function(){if(!this.__shouldPosition)return;this._discoverInfo(),window.ShadyDOM&&window.ShadyDOM.flush(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var t=this.getBoundingClientRect(),e=this.__getNormalizedRect(this.positionTarget),i=this.__getNormalizedRect(this.fitInto);let s,o,r,a;this.expandSizingTargetForScrollbars&&(s=this.sizingTarget.offsetWidth,o=this.sizingTarget.offsetHeight,r=this.sizingTarget.clientWidth,a=this.sizingTarget.clientHeight);var l=this._fitInfo.margin,h={width:t.width+l.left+l.right,height:t.height+l.top+l.bottom},d=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,h,t,e,i),c=d.left+l.left,f=d.top+l.top,u=Math.min(i.right-l.right,c+t.width),_=Math.min(i.bottom-l.bottom,f+t.height);c=Math.max(i.left+l.left,Math.min(c,u-this._fitInfo.sizedBy.minWidth)),f=Math.max(i.top+l.top,Math.min(f,_-this._fitInfo.sizedBy.minHeight));const p=Math.max(u-c,this._fitInfo.sizedBy.minWidth),g=Math.max(_-f,this._fitInfo.sizedBy.minHeight);this.sizingTarget.style.maxWidth=p+"px",this.sizingTarget.style.maxHeight=g+"px";const v=c-t.left,y=f-t.top;if(this.style.left=`${v}px`,this.style.top=`${y}px`,this.expandSizingTargetForScrollbars){const t=this.sizingTarget.offsetHeight,e=t-this.sizingTarget.clientHeight-(o-a);if(e>0){const s=i.height-l.top-l.bottom,n=Math.min(s,g+e);this.sizingTarget.style.maxHeight=`${n}px`;const o=this.sizingTarget.offsetHeight,r=o-t;let a;"top"===d.verticalAlign?a=y:"middle"===d.verticalAlign?a=y-r/2:"bottom"===d.verticalAlign&&(a=y-r),a=Math.max(i.top+l.top,Math.min(a,i.bottom-l.bottom-o)),this.style.top=`${a}px`}const h=this.sizingTarget.offsetWidth,c=h-this.sizingTarget.clientWidth-(s-r);if(c>0){const t=(()=>{if(void 0!==n)return n;const t=document.createElement("div");Object.assign(t.style,{overflow:"auto",position:"fixed",left:"0px",top:"0px",maxWidth:"100px",maxHeight:"100px"});const e=document.createElement("div");return e.style.width="200px",e.style.height="200px",t.appendChild(e),document.body.appendChild(t),n=Math.abs(t.offsetWidth-100)>1?t.offsetWidth-t.clientWidth:0,document.body.removeChild(t),n})(),e=i.width-l.left-l.right,s=Math.min(e,p+c-t);this.sizingTarget.style.maxWidth=`${s}px`;const o=this.sizingTarget.offsetWidth+t,r=o-h;let a;"left"===d.horizontalAlign?a=v:"center"===d.horizontalAlign?a=v-r/2:"right"===d.horizontalAlign&&(a=v-r),a=Math.max(i.left+l.left,Math.min(a,i.right-l.right-o)),this.style.left=`${a}px`}}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var t=this._fitInfo;t.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),t.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var e=this.getBoundingClientRect();t.sizedBy.height||this.__sizeDimension(e,t.positionedBy.vertically,"top","bottom","Height"),t.sizedBy.width||this.__sizeDimension(e,t.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(t,e,i,s,n){this.__sizeDimension(t,e,i,s,n)},__sizeDimension:function(t,e,i,s,n){var o=this._fitInfo,r=this.__getNormalizedRect(this.fitInto),a="Width"===n?r.width:r.height,l=e===s,h=l?a-t[s]:t[i],d=o.margin[l?i:s],c="offset"+n,f=this[c]-this.sizingTarget[c];this.sizingTarget.style["max"+n]=a-d-h-f+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var t=this._fitInfo.positionedBy;if(!t.vertically||!t.horizontally){this.style.position="fixed",t.vertically||(this.style.top="0px"),t.horizontally||(this.style.left="0px");var e=this.getBoundingClientRect(),i=this.__getNormalizedRect(this.fitInto);if(!t.vertically){var s=i.top-e.top+(i.height-e.height)/2;this.style.top=s+"px"}if(!t.horizontally){var n=i.left-e.left+(i.width-e.width)/2;this.style.left=n+"px"}}}},__getNormalizedRect:function(t){return t===document.documentElement||t===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:t.getBoundingClientRect()},__getOffscreenArea:function(t,e,i){var s=Math.min(0,t.top)+Math.min(0,i.bottom-(t.top+e.height)),n=Math.min(0,t.left)+Math.min(0,i.right-(t.left+e.width));return Math.abs(s)*e.width+Math.abs(n)*e.height},__getPosition:function(t,e,i,s,n,o){var r,a=[{verticalAlign:"top",horizontalAlign:"left",top:n.top+this.verticalOffset,left:n.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:n.top+this.verticalOffset,left:n.right-i.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:n.bottom-i.height-this.verticalOffset,left:n.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:n.bottom-i.height-this.verticalOffset,left:n.right-i.width-this.horizontalOffset}];if(this.noOverlap){for(var l=0,h=a.length;l<h;l++){var d={};for(var c in a[l])d[c]=a[l][c];a.push(d)}a[0].top=a[1].top+=n.height,a[2].top=a[3].top-=n.height,a[4].left=a[6].left+=n.width,a[5].left=a[7].left-=n.width}e="auto"===e?null:e,(t="auto"===t?null:t)&&"center"!==t||(a.push({verticalAlign:"top",horizontalAlign:"center",top:n.top+this.verticalOffset+(this.noOverlap?n.height:0),left:n.left-s.width/2+n.width/2+this.horizontalOffset}),a.push({verticalAlign:"bottom",horizontalAlign:"center",top:n.bottom-i.height-this.verticalOffset-(this.noOverlap?n.height:0),left:n.left-s.width/2+n.width/2+this.horizontalOffset})),e&&"middle"!==e||(a.push({verticalAlign:"middle",horizontalAlign:"left",top:n.top-s.height/2+n.height/2+this.verticalOffset,left:n.left+this.horizontalOffset+(this.noOverlap?n.width:0)}),a.push({verticalAlign:"middle",horizontalAlign:"right",top:n.top-s.height/2+n.height/2+this.verticalOffset,left:n.right-i.width-this.horizontalOffset-(this.noOverlap?n.width:0)})),"middle"===e&&"center"===t&&a.push({verticalAlign:"middle",horizontalAlign:"center",top:n.top-s.height/2+n.height/2+this.verticalOffset,left:n.left-s.width/2+n.width/2+this.horizontalOffset});for(l=0;l<a.length;l++){var f=a[l],u=f.verticalAlign===e,_=f.horizontalAlign===t;if(!this.dynamicAlign&&!this.noOverlap&&u&&_){r=f;break}var p=(!e||u)&&(!t||_);if(this.dynamicAlign||p){if(f.offscreenArea=this.__getOffscreenArea(f,i,o),0===f.offscreenArea&&p){r=f;break}r=r||f;var g=f.offscreenArea-r.offscreenArea;(g<0||0===g&&(u||_))&&(r=f)}}return r}};var r=i(12822),a=new Set;const l={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(a.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(t){this.resizerShouldNotify(t)&&this._notifyDescendant(t)},this),this._fireResize())},assignParentResizable:function(t){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=t,t&&-1===t._interestedResizables.indexOf(this)&&(t._interestedResizables.push(this),t._subscribeIronResize(this))},stopResizeNotificationsFor:function(t){var e=this._interestedResizables.indexOf(t);e>-1&&(this._interestedResizables.splice(e,1),this._unsubscribeIronResize(t))},_subscribeIronResize:function(t){t.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(t){t.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(t){return!0},_onDescendantIronResize:function(t){this._notifyingDescendant?t.stopPropagation():r.sv||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(t){var e=(0,s.tT)(t).rootTarget;e!==this&&(e.assignParentResizable(this),this._notifyDescendant(e),t.stopPropagation())},_parentResizableChanged:function(t){t&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(t){this.isAttached&&(this._notifyingDescendant=!0,t.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var t=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function e(){document.removeEventListener("readystatechange",e),t()})}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach(function(t){t!==this&&t._findParent()},this):(a.forEach(function(t){t!==this&&t._findParent()},this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?a.delete(this):a.add(this)}};var h=Element.prototype,d=h.matches||h.matchesSelector||h.mozMatchesSelector||h.msMatchesSelector||h.oMatchesSelector||h.webkitMatchesSelector;const c=new class{getTabbableNodes(t){var e=[];return this._collectTabbableNodes(t,e)?this._sortByTabIndex(e):e}isFocusable(t){return d.call(t,"input, select, textarea, button, object")?d.call(t,":not([disabled])"):d.call(t,"a[href], area[href], iframe, [tabindex], [contentEditable]")}isTabbable(t){return this.isFocusable(t)&&d.call(t,':not([tabindex="-1"])')&&this._isVisible(t)}_normalizedTabIndex(t){if(this.isFocusable(t)){var e=t.getAttribute("tabindex")||0;return Number(e)}return-1}_collectTabbableNodes(t,e){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var i=t;if(!this._isVisible(i))return!1;var n,o=this._normalizedTabIndex(i),r=o>0;o>=0&&e.push(i),n="content"===i.localName||"slot"===i.localName?(0,s.tT)(i).getDistributedNodes():(0,s.tT)(i.root||i).children;for(var a=0;a<n.length;a++)r=this._collectTabbableNodes(n[a],e)||r;return r}_isVisible(t){var e=t.style;return"hidden"!==e.visibility&&"none"!==e.display&&("hidden"!==(e=window.getComputedStyle(t)).visibility&&"none"!==e.display)}_sortByTabIndex(t){var e=t.length;if(e<2)return t;var i=Math.ceil(e/2),s=this._sortByTabIndex(t.slice(0,i)),n=this._sortByTabIndex(t.slice(i));return this._mergeSortByTabIndex(s,n)}_mergeSortByTabIndex(t,e){for(var i=[];t.length>0&&e.length>0;)this._hasLowerTabOrder(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}_hasLowerTabOrder(t,e){var i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}};var f=i(95586),u=i(47351);(0,f.b)({_template:u.q`
|
|
3
|
+
<style>
|
|
4
|
+
:host {
|
|
5
|
+
position: fixed;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
background-color: var(--iron-overlay-backdrop-background-color, #000);
|
|
11
|
+
opacity: 0;
|
|
12
|
+
transition: opacity 0.2s;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
@apply --iron-overlay-backdrop;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(.opened) {
|
|
18
|
+
opacity: var(--iron-overlay-backdrop-opacity, 0.6);
|
|
19
|
+
pointer-events: auto;
|
|
20
|
+
@apply --iron-overlay-backdrop-opened;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
|
|
24
|
+
<slot></slot>
|
|
25
|
+
`,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&(0,s.tT)(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||(0,s.tT)(this.parentNode).removeChild(this)},_onTransitionend:function(t){t&&t.target===this&&this.complete()},_openedChanged:function(t){if(t)this.prepare();else{var e=window.getComputedStyle(this);"0s"!==e.transitionDuration&&0!=e.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var _=i(35915),p=i(15055);const g=new class{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,p.ch(document.documentElement,"tap",function(){}),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement}get deepActiveElement(){var t=document.activeElement;for(t&&t instanceof Element!=!1||(t=document.body);t.root&&(0,s.tT)(t.root).activeElement;)t=(0,s.tT)(t.root).activeElement;return t}_bringOverlayAtIndexToFront(t){var e=this._overlays[t];if(e){var i=this._overlays.length-1,s=this._overlays[i];if(s&&this._shouldBeBehindOverlay(e,s)&&i--,!(t>=i)){var n=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(e)<=n&&this._applyOverlayZ(e,n);t<i;)this._overlays[t]=this._overlays[t+1],t++;this._overlays[i]=e}}}addOrRemoveOverlay(t){t.opened?this.addOverlay(t):this.removeOverlay(t)}addOverlay(t){var e=this._overlays.indexOf(t);if(e>=0)return this._bringOverlayAtIndexToFront(e),void this.trackBackdrop();var i=this._overlays.length,s=this._overlays[i-1],n=Math.max(this._getZ(s),this._minimumZ),o=this._getZ(t);if(s&&this._shouldBeBehindOverlay(t,s)){this._applyOverlayZ(s,n),i--;var r=this._overlays[i-1];n=Math.max(this._getZ(r),this._minimumZ)}o<=n&&this._applyOverlayZ(t,n),this._overlays.splice(i,0,t),this.trackBackdrop()}removeOverlay(t){var e=this._overlays.indexOf(t);-1!==e&&(this._overlays.splice(e,1),this.trackBackdrop())}currentOverlay(){var t=this._overlays.length-1;return this._overlays[t]}currentOverlayZ(){return this._getZ(this.currentOverlay())}ensureMinimumZ(t){this._minimumZ=Math.max(this._minimumZ,t)}focusOverlay(){var t=this.currentOverlay();t&&t._applyFocus()}trackBackdrop(){var t=this._overlayWithBackdrop();(t||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(t)-1,this.backdropElement.opened=!!t,this.backdropElement.prepare())}getBackdrops(){for(var t=[],e=0;e<this._overlays.length;e++)this._overlays[e].withBackdrop&&t.push(this._overlays[e]);return t}backdropZ(){return this._getZ(this._overlayWithBackdrop())-1}_overlayWithBackdrop(){for(var t=this._overlays.length-1;t>=0;t--)if(this._overlays[t].withBackdrop)return this._overlays[t]}_getZ(t){var e=this._minimumZ;if(t){var i=Number(t.style.zIndex||window.getComputedStyle(t).zIndex);i==i&&(e=i)}return e}_setZ(t,e){t.style.zIndex=e}_applyOverlayZ(t,e){this._setZ(t,e+2)}_overlayInPath(t){t=t||[];for(var e=0;e<t.length;e++)if(t[e]._manager===this)return t[e]}_onCaptureClick(t){var e=this._overlays.length-1;if(-1!==e)for(var i,n=(0,s.tT)(t).path;(i=this._overlays[e])&&this._overlayInPath(n)!==i&&(i._onCaptureClick(t),i.allowClickThrough);)e--}_onCaptureFocus(t){var e=this.currentOverlay();e&&e._onCaptureFocus(t)}_onCaptureKeyDown(t){var e=this.currentOverlay();e&&(_.D.keyboardEventMatchesKeys(t,"esc")?e._onCaptureEsc(t):_.D.keyboardEventMatchesKeys(t,"tab")&&e._onCaptureTab(t))}_shouldBeBehindOverlay(t,e){return!t.alwaysOnTop&&e.alwaysOnTop}};var v,y,m={pageX:0,pageY:0},b=null,z=[],T=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"];function w(t){x.indexOf(t)>=0||(0===x.length&&function(){v=v||A.bind(void 0);for(var t=0,e=T.length;t<e;t++)document.addEventListener(T[t],v,{capture:!0,passive:!1})}(),x.push(t),y=x[x.length-1],R=[],C=[])}function O(t){var e=x.indexOf(t);-1!==e&&(x.splice(e,1),y=x[x.length-1],R=[],C=[],0===x.length&&function(){for(var t=0,e=T.length;t<e;t++)document.removeEventListener(T[t],v,{capture:!0,passive:!1})}())}const x=[];let R=null,C=null;function A(t){if(t.cancelable&&function(t){var e=(0,s.tT)(t).rootTarget;"touchmove"!==t.type&&b!==e&&(b=e,z=function(t){for(var e=[],i=t.indexOf(y),s=0;s<=i;s++)if(t[s].nodeType===Node.ELEMENT_NODE){var n=t[s],o=n.style;"scroll"!==o.overflow&&"auto"!==o.overflow&&(o=window.getComputedStyle(n)),"scroll"!==o.overflow&&"auto"!==o.overflow||e.push(n)}return e}((0,s.tT)(t).path));if(!z.length)return!0;if("touchstart"===t.type)return!1;var i=function(t){var e={deltaX:t.deltaX,deltaY:t.deltaY};if("deltaX"in t);else if("wheelDeltaX"in t&&"wheelDeltaY"in t)e.deltaX=-t.wheelDeltaX,e.deltaY=-t.wheelDeltaY;else if("wheelDelta"in t)e.deltaX=0,e.deltaY=-t.wheelDelta;else if("axis"in t)e.deltaX=1===t.axis?t.detail:0,e.deltaY=2===t.axis?t.detail:0;else if(t.targetTouches){var i=t.targetTouches[0];e.deltaX=m.pageX-i.pageX,e.deltaY=m.pageY-i.pageY}return e}(t);return!function(t,e,i){if(!e&&!i)return;for(var s=Math.abs(i)>=Math.abs(e),n=0;n<t.length;n++){var o=t[n];if(s?i<0?o.scrollTop>0:o.scrollTop<o.scrollHeight-o.clientHeight:e<0?o.scrollLeft>0:o.scrollLeft<o.scrollWidth-o.clientWidth)return o}}(z,i.deltaX,i.deltaY)}(t)&&t.preventDefault(),t.targetTouches){var e=t.targetTouches[0];m.pageX=e.pageX,m.pageY=e.pageY}}const N={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:g},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||(0,s.tT)(this).querySelector("[autofocus]")||this},get _focusableNodes(){return c.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=(0,s.tT)(this).observeNodes(this._onNodesChange)},detached:function(){for(var t in this._observer&&(0,s.tT)(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[t]&&cancelAnimationFrame(this.__rafs[t]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(t){this.fire("iron-overlay-canceled",t,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(t){t?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var t=this._manager.deepActiveElement;(t===document.body||E(this,t))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(t){this.noCancelOnOutsideClick||this.cancel(t)},_onCaptureFocus:function(t){if(this.withBackdrop){var e=(0,s.tT)(t).path;-1===e.indexOf(this)?(t.stopPropagation(),this._applyFocus()):this._focusedChild=e[0]}},_onCaptureEsc:function(t){this.noCancelOnEscKey||this.cancel(t)},_onCaptureTab:function(t){if(this.withBackdrop){this.__ensureFirstLastFocusables();var e=t.shiftKey,i=e?this.__firstFocusableNode:this.__lastFocusableNode,s=e?this.__lastFocusableNode:this.__firstFocusableNode,n=!1;if(i===s)n=!0;else{var o=this._manager.deepActiveElement;n=o===i||o===this}n&&(t.preventDefault(),this._focusedChild=s,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var t=this._focusableNodes;this.__firstFocusableNode=t[0],this.__lastFocusableNode=t[t.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(t,e){var i=this.__rafs;null!==i[t]&&cancelAnimationFrame(i[t]),i[t]=requestAnimationFrame(function(){i[t]=null,e.call(this)}.bind(this))},__updateScrollObservers:function(t,e,i){t&&e&&this.__isValidScrollAction(i)?("lock"===i&&(this.__saveScrollPosition(),w(this)),this.__addScrollListeners()):(O(this),this.__removeScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],r.sv)for(var t=this;t;)t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host&&this.__rootNodes.push(t),t=t.host||t.assignedSlot||t.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach(function(t){t.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach(function(t){t.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(t){return"lock"===t||"refit"===t||"cancel"===t},__onCaptureScroll:function(t){if(!(this.__isAnimating||(0,s.tT)(t).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(t)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},I=t=>t.assignedSlot||t.parentNode||t.host,E=(t,e)=>{for(let i=e;i;i=I(i))if(i===t)return!0;return!1},k=[o,l,N]}}]);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
@license
|
|
14
|
+
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
15
|
+
This code may only be used under the BSD style license found at
|
|
16
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
17
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
18
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
19
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
20
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
@license
|
|
25
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
26
|
+
This code may only be used under the BSD style license found at
|
|
27
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
28
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
29
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
30
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
31
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
32
|
+
*/
|
|
Binary file
|
|
Binary file
|