@qbix/q 1.1.0 → 1.1.1
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/Metrics.min.js +10 -1
- package/dist/Q.js +3798 -502
- package/dist/Q.min.js +460 -373
- package/dist/Q.minimal.js +89 -0
- package/dist/Q.minimal.min.js +125 -123
- package/package.json +1 -1
package/dist/Q.min.js
CHANGED
|
@@ -6,380 +6,467 @@ if (typeof window !== "undefined") {
|
|
|
6
6
|
} else if (typeof global !== "undefined") {
|
|
7
7
|
$jscomp.global = global;
|
|
8
8
|
}
|
|
9
|
-
$jscomp
|
|
10
|
-
$jscomp.
|
|
11
|
-
$jscomp.
|
|
12
|
-
$jscomp.
|
|
13
|
-
$jscomp.polyfill(
|
|
14
|
-
|
|
15
|
-
function(){
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$jscomp.
|
|
22
|
-
$jscomp.
|
|
23
|
-
$jscomp.polyfill("String.prototype.
|
|
24
|
-
$jscomp.polyfill("
|
|
25
|
-
$jscomp.
|
|
26
|
-
$jscomp.polyfill("
|
|
27
|
-
$jscomp.
|
|
28
|
-
$jscomp.polyfill("Array.prototype.
|
|
29
|
-
$jscomp.polyfill("
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
c){var
|
|
44
|
-
a.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
a.Visual.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
c)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
b.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
function(b)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
a.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
c
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
a.
|
|
149
|
-
this.
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
a.Event
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
e
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
d.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
var
|
|
180
|
-
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
g
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
a.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
(
|
|
203
|
-
a.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
function(
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
e
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
var
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
e
|
|
227
|
-
a.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
a.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
b){
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
"
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
d.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
g
|
|
9
|
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(k,r,a){k!=Array.prototype&&k!=Object.prototype&&(k[r]=a.value)};$jscomp.getGlobal=function(k){return"undefined"!=typeof window&&window===k?k:"undefined"!=typeof global&&null!=global?global:k};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
|
|
10
|
+
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var k=0;return function(r){return $jscomp.SYMBOL_PREFIX+(r||"")+k++}}();
|
|
11
|
+
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var k=$jscomp.global.Symbol.iterator;k||(k=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[k]&&$jscomp.defineProperty(Array.prototype,k,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(k){var r=0;return $jscomp.iteratorPrototype(function(){return r<k.length?{done:!1,value:k[r++]}:{done:!0}})};
|
|
12
|
+
$jscomp.iteratorPrototype=function(k){$jscomp.initSymbolIterator();k={next:k};k[$jscomp.global.Symbol.iterator]=function(){return this};return k};$jscomp.makeIterator=function(k){$jscomp.initSymbolIterator();$jscomp.initSymbol();$jscomp.initSymbolIterator();var r=k[Symbol.iterator];return r?r.call(k):$jscomp.arrayIterator(k)};
|
|
13
|
+
$jscomp.polyfill=function(k,r,a,z){if(r){a=$jscomp.global;k=k.split(".");for(z=0;z<k.length-1;z++){var v=k[z];v in a||(a[v]={});a=a[v]}k=k[k.length-1];z=a[k];r=r(z);r!=z&&null!=r&&$jscomp.defineProperty(a,k,{configurable:!0,writable:!0,value:r})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
|
14
|
+
$jscomp.polyfill("Promise",function(k){function r(){this.batch_=null}function a(a){return a instanceof v?a:new v(function(k,r){k(a)})}if(k&&!$jscomp.FORCE_POLYFILL_PROMISE)return k;r.prototype.asyncExecute=function(a){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(a);return this};r.prototype.asyncExecuteBatch_=function(){var a=this;this.asyncExecuteFunction(function(){a.executeBatch_()})};var z=$jscomp.global.setTimeout;r.prototype.asyncExecuteFunction=function(a){z(a,
|
|
15
|
+
0)};r.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var a=this.batch_;this.batch_=[];for(var k=0;k<a.length;++k){var r=a[k];delete a[k];try{r()}catch(B){this.asyncThrow_(B)}}}this.batch_=null};r.prototype.asyncThrow_=function(a){this.asyncExecuteFunction(function(){throw a;})};var v=function(a){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var k=this.createResolveAndReject_();try{a(k.resolve,k.reject)}catch(da){k.reject(da)}};v.prototype.createResolveAndReject_=
|
|
16
|
+
function(){function a(a){return function(v){r||(r=!0,a.call(k,v))}}var k=this,r=!1;return{resolve:a(this.resolveTo_),reject:a(this.reject_)}};v.prototype.resolveTo_=function(a){if(a===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof v)this.settleSameAsPromise_(a);else{a:switch(typeof a){case "object":var k=null!=a;break a;case "function":k=!0;break a;default:k=!1}k?this.resolveToNonPromiseObj_(a):this.fulfill_(a)}};v.prototype.resolveToNonPromiseObj_=function(a){var k=
|
|
17
|
+
void 0;try{k=a.then}catch(da){this.reject_(da);return}"function"==typeof k?this.settleSameAsThenable_(k,a):this.fulfill_(a)};v.prototype.reject_=function(a){this.settle_(2,a)};v.prototype.fulfill_=function(a){this.settle_(1,a)};v.prototype.settle_=function(a,k){if(0!=this.state_)throw Error("Cannot settle("+a+", "+k|"): Promise already settled in state"+this.state_);this.state_=a;this.result_=k;this.executeOnSettledCallbacks_()};v.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a=
|
|
18
|
+
this.onSettledCallbacks_,k=0;k<a.length;++k)a[k].call(),a[k]=null;this.onSettledCallbacks_=null}};var A=new r;v.prototype.settleSameAsPromise_=function(a){var k=this.createResolveAndReject_();a.callWhenSettled_(k.resolve,k.reject)};v.prototype.settleSameAsThenable_=function(a,k){var r=this.createResolveAndReject_();try{a.call(k,r.resolve,r.reject)}catch(B){r.reject(B)}};v.prototype.then=function(a,k){function r(a,k){return"function"==typeof a?function(k){try{z(a(k))}catch(ma){J(ma)}}:k}var z,J,A=
|
|
19
|
+
new v(function(a,k){z=a;J=k});this.callWhenSettled_(r(a,z),r(k,J));return A};v.prototype.catch=function(a){return this.then(void 0,a)};v.prototype.callWhenSettled_=function(a,k){function r(){switch(v.state_){case 1:a(v.result_);break;case 2:k(v.result_);break;default:throw Error("Unexpected state: "+v.state_);}}var v=this;null==this.onSettledCallbacks_?A.asyncExecute(r):this.onSettledCallbacks_.push(function(){A.asyncExecute(r)})};v.resolve=a;v.reject=function(a){return new v(function(k,r){r(a)})};
|
|
20
|
+
v.race=function(k){return new v(function(r,v){for(var z=$jscomp.makeIterator(k),A=z.next();!A.done;A=z.next())a(A.value).callWhenSettled_(r,v)})};v.all=function(k){var r=$jscomp.makeIterator(k),z=r.next();return z.done?a([]):new v(function(k,v){function A(a){return function(r){B[a]=r;J--;0==J&&k(B)}}var B=[],J=0;do B.push(void 0),J++,a(z.value).callWhenSettled_(A(B.length-1),v),z=r.next();while(!z.done)})};return v},"es6","es3");
|
|
21
|
+
$jscomp.executeAsyncGenerator=function(k){function r(a){return k.next(a)}function a(a){return k.throw(a)}return new Promise(function(z,v){function A(k){k.done?z(k.value):Promise.resolve(k.value).then(r,a).then(A,v)}A(k.next())})};$jscomp.arrayFromIterator=function(k){for(var r,a=[];!(r=k.next()).done;)a.push(r.value);return a};$jscomp.arrayFromIterable=function(k){return k instanceof Array?k:$jscomp.arrayFromIterator($jscomp.makeIterator(k))};
|
|
22
|
+
$jscomp.checkStringArgs=function(k,r,a){if(null==k)throw new TypeError("The 'this' value for String.prototype."+a+" must not be null or undefined");if(r instanceof RegExp)throw new TypeError("First argument to String.prototype."+a+" must not be a regular expression");return k+""};
|
|
23
|
+
$jscomp.polyfill("String.prototype.startsWith",function(k){return k?k:function(k,a){var r=$jscomp.checkStringArgs(this,k,"startsWith");k+="";var v=r.length,A=k.length;a=Math.max(0,Math.min(a|0,r.length));for(var J=0;J<A&&a<v;)if(r[a++]!=k[J++])return!1;return J>=A}},"es6","es3");$jscomp.owns=function(k,r){return Object.prototype.hasOwnProperty.call(k,r)};
|
|
24
|
+
$jscomp.polyfill("Object.assign",function(k){return k?k:function(k,a){for(var r=1;r<arguments.length;r++){var v=arguments[r];if(v)for(var A in v)$jscomp.owns(v,A)&&(k[A]=v[A])}return k}},"es6","es3");
|
|
25
|
+
$jscomp.polyfill("Array.from",function(k){return k?k:function(k,a,z){$jscomp.initSymbolIterator();a=null!=a?a:function(a){return a};var r=[],A=k[Symbol.iterator];if("function"==typeof A)for(k=A.call(k);!(A=k.next()).done;)r.push(a.call(z,A.value));else{A=k.length;for(var J=0;J<A;J++)r.push(a.call(z,k[J]))}return r}},"es6","es3");
|
|
26
|
+
$jscomp.polyfill("String.prototype.repeat",function(k){return k?k:function(k){var a=$jscomp.checkStringArgs(this,null,"repeat");if(0>k||1342177279<k)throw new RangeError("Invalid count value");k|=0;for(var r="";k;)if(k&1&&(r+=a),k>>>=1)a+=a;return r}},"es6","es3");$jscomp.stringPadding=function(k,r){k=void 0!==k?String(k):" ";return 0<r&&k?k.repeat(Math.ceil(r/k.length)).substring(0,r):""};
|
|
27
|
+
$jscomp.polyfill("String.prototype.padStart",function(k){return k?k:function(k,a){var r=$jscomp.checkStringArgs(this,null,"padStart");return $jscomp.stringPadding(a,k-r.length)+r}},"es8","es3");$jscomp.iteratorFromArray=function(k,r){$jscomp.initSymbolIterator();k instanceof String&&(k+="");var a=0,z={next:function(){if(a<k.length){var v=a++;return{value:r(v,k[v]),done:!1}}z.next=function(){return{done:!0,value:void 0}};return z.next()}};z[Symbol.iterator]=function(){return z};return z};
|
|
28
|
+
$jscomp.polyfill("Array.prototype.keys",function(k){return k?k:function(){return $jscomp.iteratorFromArray(this,function(k){return k})}},"es6","es3");$jscomp.findInternal=function(k,r,a){k instanceof String&&(k=String(k));for(var z=k.length,v=0;v<z;v++){var A=k[v];if(r.call(a,A,v,k))return{i:v,v:A}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(k){return k?k:function(k,a){return $jscomp.findInternal(this,k,a).v}},"es6","es3");
|
|
29
|
+
$jscomp.polyfill("Number.isFinite",function(k){return k?k:function(k){return"number"!==typeof k?!1:!isNaN(k)&&Infinity!==k&&-Infinity!==k}},"es6","es3");$jscomp.polyfill("Number.isInteger",function(k){return k?k:function(k){return Number.isFinite(k)?k===Math.floor(k):!1}},"es6","es3");$jscomp.polyfill("Object.is",function(k){return k?k:function(k,a){return k===a?0!==k||1/k===1/a:k!==k&&a!==a}},"es6","es3");
|
|
30
|
+
$jscomp.polyfill("Array.prototype.includes",function(k){return k?k:function(k,a){var r=this;r instanceof String&&(r=String(r));var v=r.length;for(a=a||0;a<v;a++)if(r[a]==k||Object.is(r[a],k))return!0;return!1}},"es7","es3");$jscomp.polyfill("String.prototype.includes",function(k){return k?k:function(k,a){return-1!==$jscomp.checkStringArgs(this,k,"includes").indexOf(k,a||0)}},"es6","es3");
|
|
31
|
+
$jscomp.polyfill("Array.prototype.values",function(k){return k?k:function(){return $jscomp.iteratorFromArray(this,function(k,a){return a})}},"es8","es3");$jscomp.polyfill("Array.prototype.fill",function(k){return k?k:function(k,a,z){var r=this.length||0;0>a&&(a=Math.max(0,r+a));if(null==z||z>r)z=r;z=Number(z);0>z&&(z=Math.max(0,r+z));for(a=Number(a||0);a<z;a++)this[a]=k;return this}},"es6","es3");
|
|
32
|
+
$jscomp.polyfill("Math.imul",function(k){return k?k:function(k,a){k=Number(k);a=Number(a);var r=k&65535,v=a&65535;return r*v+((k>>>16&65535)*v+r*(a>>>16&65535)<<16>>>0)|0}},"es6","es3");$jscomp.polyfill("String.prototype.endsWith",function(k){return k?k:function(k,a){var r=$jscomp.checkStringArgs(this,k,"endsWith");k+="";void 0===a&&(a=r.length);a=Math.max(0,Math.min(a|0,r.length));for(var v=k.length;0<v&&0<a;)if(r[--a]!=k[--v])return!1;return 0>=v}},"es6","es3");
|
|
33
|
+
var module$temp$24_185_22_50_source={},$jscompDefaultExport$$module$temp$24_185_22_50_source=function(k,r){function a(){}function z(){return!1}function v(a){return"px"==a.substring(a.length-2)?parseFloat(a):0}function A(b,c,d){var e,f=0;if(null===d)return k;d=d||p;if(!b.length)return d;for(;d&&(e=b[f++])!==k;)try{"*"===e&&(e=a.firstKey(d)),d=d[e]!==k?d[e]:c?d[e]={}:k}catch(g){if(c)throw new a.Error("Q.setObject cannot set property of "+typeof d+" "+JSON.stringify(d));}return d}function J(b){return["id:"===
|
|
34
|
+
b.substring(0,3)?b:a.normalize.memoized(b)]}function Va(b,c,d,e,f,g){for(var h=a.Tool.calculateId(b.id),m=b.className.split(" "),l=[],n=0,u=m.length;n<u;++n){var q=m[n];g=g||a.activate.whitelist;"Q_tool"===q||"_tool"!==q.slice(-5)||g&&!g[q]||l.push(a.normalize.memoized(q.substring(0,q.length-5)))}var t=new a.Pipe(l,function(a){for(var b=0,d=l.length;b<d;++b)c.apply(null,a[l[b]])});a.each(l,function(c,g){function l(b){var c={};a.Tool.onMissingConstructor.handle(M,g,c);c.toolName&&(m=M[g]=a.Tool.defined(c.toolName),
|
|
35
|
+
a.Tool.onLoadedConstructor(c.toolName).add(function(b,c){M[g]=c;a.Tool.onLoadedConstructor(g).handle.call(a.Tool,g,c)},g));"function"===typeof m||!b&&("string"===typeof m||a.isPlainObject(m)&&m.js)||(m=M[g]=function(){T("Missing tool constructor for "+g)},a.Tool.onLoadedConstructor(g).handle.call(a.Tool,g,m))}var m=M[g];m===k&&l(!1);e&&(a.setObject([h,e],!0,Ja),e!==h&&a.setObject([e,h],!0,ua));if(d){var n=h+" "+g;d.firstToolId||(d.firstToolId=n);0>d.waitingForTools.indexOf(n)&&d.waitingForTools.push(n)}f&&
|
|
36
|
+
f.placeholder&&da(b,g);if("function"===typeof m)return t.fill(g)(b,m,g,n);if(m!==k){"string"===typeof m&&(m="js"===m.split(".").pop()?{js:m}:{html:m});if(!a.isPlainObject(m))throw new a.Error("Q.Tool.loadScript: toolConstructor cannot be "+a.typeOf(m));if(!m.js&&!m.html)throw new a.Error("Q.Tool.loadScript: missing tool constructor file");c=a.pipe();var u=[];m.js&&(u.push("js"),a.addScript(m.js,c.fill("js")));m.html&&(u.push("html"),a.request.once(m.html,c.fill("html"),{extend:!1,parse:!1}));if(m.css){var q=
|
|
37
|
+
a.Tool.names[g];q=q&&q.split("/")[0]||"";u.push("css");a.addStylesheet(m.css,null,c.fill("css"),{slotName:q})}q=a.normalize.memoized(g);if(q=a.Text.addedFor("Q.Tool.define",q,m))u.push("text"),a.Text.get(q,c.fill("text"));c.add(u,1,function(c){if(c.html&&!c.html[0]&&c.html[1]&&"function"!==typeof M[g]){var d=document.createElement("div");d.innerHTML=c.html[1];var e=d.getElementsByTagName("script");a.each(e,function(){eval(this.innerHTML)});e=d.getElementsByTagName("style");a.each(e,function(){document.head.appendChild(this)});
|
|
38
|
+
$a(d)}m=M[g];"function"!==typeof m&&l(!0);t.fill(g)(b,m,g,n,c)}).run()}})}function da(b,c){function d(a,c){b.Q_insertedPlaceholderHTML=!0;b.innerHTML=c}var e=ab[c];if(!e||b.Q_insertedPlaceholderHTML||a.getObject(["Q","tools",c],b)&&!b.innerHTML)return!1;e.html?d(null,e.html):e.template&&(a.isPlainObject(e.template)?a.Template.render(e.template.name,e.template.fields,d):a.Template.render(e.template,d));return!0}function B(a,c,d){return a.documentStorage?!0===d?a.special[c]:a.data[c]:(a=(a.localStorage?
|
|
39
|
+
p.localStorage:a.sessionStorage?p.sessionStorage:null).getItem(a.name+(!0===d?"\t":"\t\t")+c))?JSON.parse(a):k}function P(b,c,d,e){if(b.documentStorage)!0===e?b.special[c]=d:b.data[c]=d;else{if(b.localStorage&&a.Frames&&!a.Frames.isMain())return!1;var f=b.localStorage?p.localStorage:b.sessionStorage?p.sessionStorage:null;c=b.name+(!0===e?"\t":"\t\t")+c;try{var g=JSON.stringify(d);f.setItem(c,g)}catch(h){if(!e&&"TypeError"!==h.name)for(d=0;10>d;++d)try{b.removeEarliest()&&f.setItem(c,g);break}catch(m){}}}}
|
|
40
|
+
function Ya(b,c,d){if(!c)return!1;for(var e=1,f=c.length;e<f;++e){var g="index:"+a.Cache.key(c.slice(0,e)),h=B(b,g,!0)||{};d in h&&(delete h[d],P(b,g,h,!0))}return!0}function Wa(b,c,d){if(b.documentStorage)!0===d?delete b.special[c]:delete b.data[c];else{if(b.localStorage&&a.Frames&&!a.Frames.isMain())return!1;(b.localStorage?p.localStorage:b.sessionStorage?p.sessionStorage:null).removeItem(b.name+(!0===d?"\t":"\t\t")+c)}}function Xa(a,c){var b;if(c.prev){if(b=B(a,c.prev))b.next=c.next,P(a,c.prev,
|
|
41
|
+
b)}else a.earliest(c.next);if(c.next){if(b=B(a,c.next))b.prev=c.prev,P(a,c.next,b)}else a.latest(c.prev)}function Ha(a,c,d){c.onsuccess=function(b){d&&d.call(a,null,b.target.result)};c.onerror=function(b){d&&d.call(a,b)}}function ma(){var b=this;a.each(a.addEventListener.hooks,function(){var a=this[0];(a===p||a===document||a instanceof Element&&a!==b.target&&a.contains(b.target))&&this[1]===b.type&&this[2].apply(a,[b])});var c=ma.previous;c?c.apply(b,arguments):b.cancelBubble=!0}function bb(a){if(!navigator.serviceWorker||
|
|
42
|
+
!navigator.serviceWorker.controller)try{var b=sessionStorage.getItem("Q.cookieJar");if(b){var d=JSON.parse(b);b=[];for(var e in d)if(d.hasOwnProperty(e)){var f=d[e];null!==f&&""!==f&&b.push(e+"="+f)}if(b.length)try{a.setRequestHeader("Cookie-JS",b.join("; "))}catch(g){console.warn("Q.request: setRequestHeader Cookie-JS failed:",g)}}}catch(g){}}function cb(b){a.handle(a.ServiceWorker.onUpdateFound,a.ServiceWorker,[b.target,b])}function vb(){if(!a.ServiceWorker.isSupported||a.ServiceWorker.skipCaching)return!1;
|
|
43
|
+
a.ServiceWorker.start(function(a,c){var b=[];c=document.querySelectorAll("script[data-src]");var e=document.querySelectorAll("style[data-href]");[c,e].forEach(function(a){a.forEach(function(a){var c=a.innerText,d=a.getAttribute("data-path-prefix");d&&"@import ;@import \";@import ';url(;url(\";url('".split(";").forEach(function(a){c=c.split(a+d).join(a)});b.push({url:a.getAttribute("data-src")||a.getAttribute("data-href"),content:c,headers:{"Content-Type":a.getAttribute("type")}})})});b.length&&a&&
|
|
44
|
+
a.postMessage&&a.postMessage({type:"Q.Cache.put",items:b})},{update:!0})}function K(){var b=a.baseUrl(),c=location.hash.queryField("url"),d=null;c===k&&(c=p.location.href.split("#")[0].substring(b.length+1));K.ignore?K.ignore=!1:c!=K.currentUrl&&c!==K.currentUrlTail&&(a.handle(-1==c.indexOf(b)?b+"/"+c:c),d=!0);K.currentUrl=c.split("#")[0];K.currentUrlTail=K.currentUrl.substring(b.length+1);return d}function wb(){var b=a.baseUrl(),c=p.location.href.split("#")[0],d=null;if(a.info.url!==c){var e=c.substring(b.length+
|
|
45
|
+
1);e!=K.currentUrlTail&&(a.handle(0===c.indexOf(b)?c:b+"/"+c,{ignoreHistory:!0,quiet:!0,unloadedUrl:K.currentUrl,handleException:function(){location.reload()}}),K.currentUrlTail=e,K.currentUrl=c,d=!0);return d}}function va(b,c,d){if(!d.lazyload&&b instanceof Element){var e=b.getAttribute("data-q-lazyload");if("waiting"===e||"removed"===e)return!1}var f=ea[ea.length-1],g=new a.Event;g.toolElement=b;ea.push(g);var h=a.Tool.calculateId(b.id);wa.push(h);Va(b,function(b,e,n,u,k){function m(){var e=a.Tool.onLoadedConstructor(n);
|
|
46
|
+
e.addOnce(function(){for(var f=a.Tool.constructors[n].required||[],m=0;m<f.length;++m)e=e.and(a.Tool.onLoadedConstructor(f[m]));e.addOnce(function(){var e=new xa[n](b,c),f=a.getObject(["Q","tools",n],b);d.tool=f;a.setObject([h,n],f,d.tools);u&&(u===d.firstToolId&&(d.firstTool=f),d.pipe.fill(u)(),d.internal&&d.internal.progress&&d.internal.progress(d));f&&(g.handle.call(f,c,e),g.removeAllHandlers())})})}xa[n]||(xa[n]=function(b,c){var d=a.Tool.beingActivated,f=a.getObject(["Q","tools",n],b);if(this.activating||
|
|
47
|
+
this.activated||f)return f=f||this,va.alreadyActivated;if(d&&d.element===b&&d.name===n)return f=d,va.alreadyActivated;this.initialized=this.activated=this.activating=!1;try{this.options=a.extend({},a.Tool.options.levels,e.options);if(c){f={};for(var g in c)"#"!==g[0]&&(f[g]=c[g]);a.extend(this.options,a.Tool.options.levels,f)}this.name=n;this.constructor=e;a.Tool.call(this,b,c);this.state=a.copy(this.options,e.stateKeys);e.text&&(this.text=e.text);a.Tool.beingActivated=this;var h=a.normalize.memoized(this.name);
|
|
48
|
+
V[""]&&V[""].handle.call(this,this.options);V[h]&&V[h].handle.call(this,this.options);V["id:"+this.id]&&V["id:"+this.id].handle.call(this,this.options);var m=[this.options];a.each(e.require,function(c,d){c=a.Tool.from(b,d);if(!c)throw new a.Exception("Q.Tool.define: "+e.toolName+" requires "+d+" to have been activated on the same element.");m.push(c)});e.apply(this,m);this.activating=!1;this.activated=!0;W[""]&&W[""].handle.call(this,this.options);W[h]&&W[h].handle.call(this,this.options);W["id:"+
|
|
49
|
+
this.id]&&W["id:"+this.id].handle.call(this,this.options);a.Tool.beingActivated=d}catch(tb){debugger;console.warn(tb);a.Tool.beingActivated=d}this.activating=!1;this.activated=!0},a.mixin(e,a.Tool),a.mixin(xa[n],e));if(!d.canceled)if(f){k=h+" "+n;for(var l=2;f.keys.includes(k);)k+="_"+l++;f.add(m,k)}else m()},d,null,{placeholder:!0},d.whitelist)}function xb(b,c,d){function e(){var b=this,c=a.normalize.memoized(b.name),d=ua[b.id];b.initialized||d||(b.initialized=!0,a.handle(b.Q&&b.Q.onInit,b,[b.options]),
|
|
50
|
+
X[""]&&X[""].handle.call(b,b.options),X[c]&&X[c].handle.call(b,b.options),X["id:"+this.id]&&X["id:"+this.id].handle.call(b,b.options),setTimeout(function(){var c=Ja[b.id],d;for(d in c){if(!a.Tool.active[d])return;c=!0;var f=ua[d],g;for(g in f){f=a.Tool.active[g];if(!f){c=!1;break}for(var m in f){var h=f[m];if(!h||!h.initialized){c=!1;break}}}if(c){delete ua[d];for(var l in a.Tool.active[d])e.call(a.Tool.active[d][l])}}delete Ja[b.id]},0))}if(!d.lazyload&&b instanceof Element&&(c=b.getAttribute("data-q-lazyload"),
|
|
51
|
+
"waiting"===c||"removed"===c))return!1;var f=ea[ea.length-1];ea.pop();var g=wa.pop();c=a.Tool.beingActivated;Va(b,function(a,b,c){f.add(e,g+" "+c)},null,wa[wa.length-1]||c&&c.id,{},d.whitelist)}function $a(b){var c=a.Template.collection,d=a.Template.info,e=[];a.each(b.getElementsByTagName("template"),function(){var b=this,g=this.id||this.getAttribute("data-name"),h=this.getAttribute("data-type")||"handlebars",m=a.normalize.memoized(g);c[m]=this.innerHTML.decodeHTML().trim();d[m]={type:h};a.each(["partials",
|
|
52
|
+
"helpers","text"],function(a,c){(a=(a=b.getAttribute("data-"+c))&&JSON.parse(a))&&(d[m][c]=a)});e.unshift(b)});a.each(e,function(){a.removeElement(this)})}function Y(a,c,d){a.off(c,d);a.on(c,d);Ka.push(function(){a.off(c,d)})}function db(){var b=!1,c=document.createElement("div"),d=window.CSS||null;d&&d.supports("padding-top: env(safe-area-inset-top)")?(c.style.paddingTop="env(safe-area-inset-top)",b=!0):d&&d.supports("padding-top: constant(safe-area-inset-top)")&&(c.style.paddingTop="constant(safe-area-inset-top)",
|
|
53
|
+
b=!0);d&&d.supports("padding-bottom: env(safe-area-inset-bottom)")?(c.style.paddingBottom="env(safe-area-inset-bottom)",b=!0):d&&d.supports("padding-bottom: constant(safe-area-inset-bottom)")&&(c.style.paddingBottom="constant(safe-area-inset-bottom)",b=!0);b&&(document.body.appendChild(c),b=parseInt(c.computedStyle("padding-top"))+parseInt(c.computedStyle("padding-bottom")),document.body.removeChild(c),40<b&&(a.info.hasNotch=!0));a.info.hasNotch=!1}function fa(b){if(!a.isEmpty(a.Visual.preventRubberBand.suspend))return!1;
|
|
54
|
+
var c=b.target,d,e=null;do if(c.computedStyle){var f=c.computedStyle().overflow,g=c.scrollWidth-Math.min(c.offsetWidth,a.Visual.windowWidth()),h=c.scrollHeight,m=c.scrollTop,l=c.scrollLeft;"HTML"===c.tagName&&(h=Math.max(h,document.body.scrollHeight),m=Math.max(m,document.body.scrollTop),l=Math.max(l,document.body.scrollLeft));h-=Math.min(c.offsetHeight,a.Visual.windowHeight());if(((f=0>["hidden","visible"].indexOf(f))||"HTML"===c.tagName)&&0<h&&a.Pointer.movement){if("horizontal"!=fa.options.direction&&
|
|
55
|
+
1==a.Visual.movement.positions.length&&(d=a.Pointer.movement.positions[0])&&(g=a.Pointer.getY(b)-a.Visual.scrollTop(),g>d.y&&0==m||g<d.y&&m>=h))continue;e=c;break}if(!e&&(f||"HTML"===c.tagName)&&0<g){if("vertical"!=fa.options.direction&&1==a.Pointer.movement.positions.length&&(d=a.Pointer.movement.positions[0])&&(m=a.Pointer.getX(b)-a.Visual.scrollLeft(),m>d.x&&0==l||m<d.x&&l>=g))continue;e=c;break}}while(c=c.parentElement);e||a.Pointer.preventDefault(b)}function ya(b){var c=ya.options.blur;if(c.blur){var d=
|
|
56
|
+
a.Pointer.target(b);if((b=document.activeElement)&&"function"===typeof b.blur&&b!==d)if(0<=c.blur.indexOf(d.tagName.toUpperCase())||c.blurContentEditable&&d.getAttribute("contenteditable")){var e=function(){d.focus();a.removeEventListener(p,"click",e)};a.addEventListener(p,"click",e)}else b.blur()}}function La(b,c){var d=window,e=document;b=e.documentElement;var f=e.getElementsByTagName("body")[0];e=d.innerWidth||b.clientWidth||f&&f.clientWidth;f=d.innerHeight||b.clientHeight||f&&f.clientHeight;(d=
|
|
57
|
+
d.matchMedia)&&d("(orientation: landscape)").matches||e>f?(b.removeClass("Q_verticalOrientation").addClass("Q_horizontalOrientation"),a.info&&(a.info.isVertical=!1)):(b.removeClass("Q_horizontalOrientation").addClass("Q_verticalOrientation"),a.info&&(a.info.isVertical=!0));c||setTimeout(function(){La(null,!0)},500)}function za(b){if(a.info.isTouchscreen&&za.options.milliseconds){var c=a.Visual.windowWidth(),d=a.Visual.windowHeight();setInterval(function(){var b=document.activeElement;if(!(b&&0<=["INPUT",
|
|
58
|
+
"TEXTAREA","SELECT"].indexOf(b.tagName.toUpperCase()))){b=a.Visual.windowWidth();var f=a.Visual.windowHeight();c===b&&d===f||a.layout();c=b;d=f}},za.options.milliseconds)}}function Ma(b){a.Pointer.startedWhileRecentlyScrolled=!1;a.removeEventListener(b.target,a.Pointer.end,Ma);a.Pointer.stopCancelingClicksOnScroll(b.target)}function Aa(b){if("event"===a.typeOf(b).toLowerCase()&&["input","select"].includes(a.getObject("target.tagName",b).toLowerCase())||a.Pointer.latest.touches.length)return!1;a.Visual.recentlyScrolled=
|
|
59
|
+
!0;setTimeout(yb,100);a.Pointer.cancelClick(!0,null,{comingFromScroll:!0},a.Pointer.movedTooMuchForClickLastTime||a.Pointer.startedWhileRecentlyScrolled?0:300)}function eb(b,c){c=a.instanceOf(c,Element)&&!c.contains(b.target);if(!1!==b.timeout&&b.dontStopBeforeShown||c)return b;b.audio&&b.audio.pause();clearTimeout(b.timeout);b.timeout=null;var d=parseFloat(b.style.opacity);a.Animation.play(function(a,c){b.style.opacity=d*(1-c);b.tooltip&&(b.tooltip.style.opacity=d*(1-c))},b.hide.duration,b.hide.ease).onComplete.set(function(){b.parentElement&&
|
|
60
|
+
(b.parentElement.removeChild(b),b.tooltip&&b.tooltip.parentElement.removeChild(b.tooltip))});b.hintOptions&&b.hintOptions.onHide&&(c=b.hintOptions,a.handle(c.onHide,b,[b.targets,c]));return null}function Na(){if(!a.info||!a.info.isTouchscreen)return!1;var b,c,d=!1;setInterval(function(){var e=document.activeElement,f=Na.options.prevent;e&&0<=f.indexOf(e.tagName.toUpperCase())&&(d=!0);if(d)return!1;c=a.Visual.scrollTop();b=a.Visual.scrollLeft()},300);a.addEventListener(document.body,a.Pointer.focusin,
|
|
61
|
+
function(){d=!0});a.addEventListener(document.body,a.Pointer.focusout,function(){d=!1;c!==k&&window.scrollTo(b,c)});return!0}function fb(b){clearTimeout(Oa);var c=a.Visual.getX(b)-a.Visual.scrollLeft(),d=a.Visual.getY(b)-a.Visual.scrollTop();if(c&&d&&!a.Pointer.canceledClick&&(b.button||!b.touches||b.touches.length)){var e=a.Pointer.options.cancelClickDistance;R&&(R.x&&Math.abs(R.x-c)>e||R.y&&Math.abs(R.y-d)>e)&&!1!==a.Pointer.cancelClick(!0,b,{fromX:R.x,fromY:R.y,toX:c,toY:d,comingFromPointerMovement:!0})&&
|
|
62
|
+
(R=!1,a.Pointer.movedTooMuchForClickLastTime=!0);b=a.milliseconds();a.Pointer.movement.times.push(b);if(ha&&na){Ba={x:c-ha.x,y:d-ha.y};e=b-na;var f={x:Ba.x/e,y:Ba.y/e};a.Pointer.movement.velocities.push(f);null!=oa&&a.Pointer.movement.accelerations.push({x:(f.x-oa.x)/e,y:(f.y-oa.y)/e});oa=f;var g=a.Pointer.movement.times;e=a.Pointer.movement.velocities;for(var h=0,m=0,l=b,n=g.length-1;1<=n;--n){var u=g[n];if(u<b-100)break;var k=e[n-1];h+=k.x*(l-u);m+=k.y*(l-u);l=u}g=b-l;a.Pointer.movement.movingAverageVelocity=
|
|
63
|
+
g?{x:h/g,y:m/g}:a.Pointer.movement.velocities[e.length-1];Oa=setTimeout(function(){var b={x:0,y:0},c=a.milliseconds(),d=c-na,e=a.Pointer.movement;e.times.push(c);e.velocities.push(b);e.movingAverageVelocity=b;e.accelerations.push({x:-f.x/d,y:-f.y/d})},a.Pointer.movement.timeout)}na=b;ha={x:c,y:d};a.Pointer.movement.positions.push(ha)}}function Pa(b){a.Pointer.canceledClick&&b.preventDefault();a.removeEventListener(window,a.Pointer.click,Pa)}function zb(){a.Visual.blurring=!0;setTimeout(function(){a.Visual.blurring=
|
|
64
|
+
!1},500)}function Q(){}function Ab(){var b=p.Handlebars;b.prepareArgs=function(b){b=Array.prototype.slice.call(b,0);var c=b.pop();b.shift();var e=a.isEmpty(c.hash)?{}:a.copy(c.hash);a.each(b,function(a,b){e[a]=b});return a.extend(e,this)};b.helpers.call||b.registerHelper("call",function(c){if(!c)return"{{call missing method name}}";var d=b.prepareArgs.call(this,arguments),e=c.split("."),f=e.slice(0,-1),g=0,h=[];do h.push(d[g]);while(d[++g]);d=a.getObject(e,this);if("function"===typeof d)return d.apply(a.getObject(f,
|
|
65
|
+
this),h);d=a.getObject(e);return"function"===typeof d?d.apply(a.getObject(f),h):"{{call "+c+" not found}}"});b.helpers.ifEquals||b.registerHelper("ifEquals",function(a,b,e){return a==b?e.fn(this):e.inverse(this)});b.helpers.getObject||b.registerHelper("getObject",function(){var b=Array.prototype.slice.call(arguments),d=b.pop().data.root;a.each(b,function(a,c){if("object"===typeof c)d=c;else if("string"===typeof c||"number"===typeof c)d||console.warn("Handlebars getObject helper: ",b),d=d[c]});return d});
|
|
66
|
+
b.helpers.tool||(b.registerHelper("idPrefix",function(){var b=a.Tool.beingActivated;return b?b.prefix:""}),b.registerHelper("join",function(){var a=Array.prototype.slice.call(arguments,0,-1),b=arguments[arguments.length-1];if(Array.isArray(a[0])&&"function"===typeof b.fn){var e=a[1]||"";return a[0].map(function(a){return b.fn(a)}).join(e)}return a.join("")}),b.registerHelper("tool",function(b,d,e,f,g){if(!b)return"{{tool missing name}}";a.isPlainObject(f)&&(g=f,f=!1);a.isPlainObject(e)&&(g=e,e=k);
|
|
67
|
+
a.isPlainObject(d)&&(g=d,d=k);e=e||"div";var c=a.Tool.beingActivated;c=c?c.prefix:"";var m={};g=g&&g.hash;var l;if(g)for(var n in g)"class"===n?l=g[n]:a.isInteger(n)||a.setObject(n,g[n],m,"-");this&&this[b]&&a.extend(m,this[b]);if("string"===typeof d||"number"===typeof d)d=b.split("/").join("_")+(""!==d?"-"+d:""),this&&this["id:"+d]&&a.extend(m,this["id:"+d]);l={"class":l};f&&(l["data-Q-retain"]=!0);return a.Tool.prepareHTML(e,b,m,d,c,l)}));b.helpers.url||b.registerHelper("toUrl",function(b){a.isPlainObject(b)&&
|
|
68
|
+
(b=a.getObject("data.root.toUrl",b));return b?a.url(b):"{{url missing}}"});b.helpers.toCapitalized||b.registerHelper("toCapitalized",function(b){a.isPlainObject(b)&&(b=a.getObject("data.root.toCapitalized",b));return(b||"").toCapitalized()});b.helpers.json||b.registerHelper("json",function(a){return"object"==typeof a?JSON.stringify(a):a});b.helpers.interpolate||b.registerHelper("interpolate",function(a){if(!a||2>arguments.length)return"";var c=b.prepareArgs.call(this,arguments);return a.interpolate(c)});
|
|
69
|
+
b.helpers.option||b.registerHelper("option",function(a,d,e){e=a==e?' selected="selected"':"";return new b.SafeString('<option value="'+a.encodeHTML()+'"'+e+">"+d+"</option>")});b.helpers.replace||b.registerHelper("replace",function(a,b,e){return e.fn(this).replace(a,b)})}function gb(b,c,d){if(!b)return!1;var e=a.getObject(c,b);e&&a.handle(e,b,d);b=b.children("",1);for(var f in b)for(var g in b[f])gb(b[f][g],c,d)}var p=this,w=a.jQuery=p.jQuery||p.$;try{$jscomp.initSymbol(),$jscomp.initSymbol(),Symbol=
|
|
70
|
+
Symbol||{},$jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.initSymbol(),$jscomp.initSymbolIterator(),Symbol.iterator=Symbol.iterator||"nonexistent symbol"}catch(b){}var hb=!1,Qa=navigator.onLine,Z=null,ib=null;if(!window.$){var L=function(a){this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]};if(!window.jQuery){var Ca={each:function(a){for(var b=0;b<this.length;b++)a.call(this[b],b,this[b]);return this},html:function(a){return a===k?this[0]&&this[0].innerHTML:this.each(function(){this.innerHTML=
|
|
71
|
+
a})},text:function(a){return a===k?this[0]&&this[0].textContent:this.each(function(){this.textContent=a})},val:function(a){if(this[0]){var b=this[0];if(a===k)return b.value;b.value!==k&&this.each(function(){this.value=a});return this}},append:function(a){return this.each(function(){var b=this;a instanceof L?a.each(function(){b.appendChild(this)}):a instanceof Element?b.appendChild(a):"string"===typeof a&&b.insertAdjacentHTML("beforeend",a)})},prepend:function(a){return this.each(function(){var b=
|
|
72
|
+
this;a instanceof L?a.each(function(){b.insertBefore(this,b.firstChild)}):a instanceof Element?b.insertBefore(a,b.firstChild):"string"===typeof a&&b.insertAdjacentHTML("afterbegin",a)})},appendTo:function(a){var b=this;if(a instanceof L)a.each(function(){for(var a=0;a<b.length;a++)this.appendChild(b[a])});else if(a instanceof Element)for(var d=0;d<b.length;d++)a.appendChild(b[d]);else"string"===typeof a&&w(a).append(this);return this},prependTo:function(a){var b=this;if(a instanceof L)a.each(function(){for(var a=
|
|
73
|
+
0;a<b.length;a++)this.insertBefore(b[a],this.firstChild)});else if(a instanceof Element)for(var d=0;d<b.length;d++)a.insertBefore(b[d],a.firstChild);else"string"===typeof a&&w(a).prepend(this);return this},parents:function(a){var b=[];this.each(function(){for(var a=this.parentElement;a;a=a.parentElement)0>b.indexOf(a)&&b.push(a)});b=new L(b);return a?b.filter(a):b},parent:function(a){var b=[];this.each(function(){var a=this.parentElement;a&&0>b.indexOf(a)&&b.push(a)});b=new L(b);return a?b.filter(a):
|
|
74
|
+
b},children:function(a){var b=[];this.each(function(){for(var a=0;a<this.children.length;a++)b.push(this.children[a])});b=new L(b);return a?b.filter(a):b},filter:function(a){var b=[];this.each(function(){this.matches(a)&&b.push(this)});return new L(b)},eq:function(a){return new L([this[a]])},addClass:function(a){return this.each(function(){this.classList.add(a)})},removeClass:function(a){return this.each(function(){this.classList.remove(a)})},hasClass:function(a){return this[0]?this[0].classList.contains(a):
|
|
75
|
+
!1},attr:function(a,c){if("object"===typeof a&&a){for(var b in a)this.each(function(){this.setAttribute(b,a[b])});return this}return c===k?this[0]&&this[0].getAttribute(a):this.each(function(){this.setAttribute(a,c)})},css:function(a,c){if("object"===typeof a&&a){for(var b in a)this.each(function(){this.style[b]=a[b]});return this}return c===k?this[0]&&getComputedStyle(this[0])[a]:this.each(function(){this.style[a]=c})},scrollTop:function(a){return this[0]?a===k?this[0].scrollTop:this.each(function(){this.scrollTop=
|
|
76
|
+
a}):0},on:function(a,c){return this.each(function(){this.addEventListener(a,c)})},off:function(a,c){return this.each(function(){this.removeEventListener(a,c)})},trigger:function(a){return this.each(function(){this.dispatchEvent(new Event(a))})},hide:function(){return this.each(function(){this.style.display="none"})},show:function(){return this.each(function(){this.style.display="show"})},toggle:function(a){return this.each(function(){this.style.display=a===k?"none"===this.style.display?"":"none":
|
|
77
|
+
a?"":"none"})},empty:function(){return this.each(function(){this.innerHTML=""})},remove:function(){return this.each(function(){this.remove()})},find:function(a){return new L(this[0]?this[0].querySelectorAll(a):[])},closest:function(a){return new L(this[0]?[this[0].closest(a)]:[])},height:function(){return this[0]?this[0].offsetHeight:0},width:function(){return this[0]?this[0].offsetWidth:0},outerHeight:function(){if(!this[0])return 0;var a=getComputedStyle(this[0]);return this[0].offsetHeight+parseFloat(a.marginTop||
|
|
78
|
+
0)+parseFloat(a.marginBottom||0)},outerWidth:function(){if(!this[0])return 0;var a=getComputedStyle(this[0]);return this[0].offsetWidth+parseFloat(a.marginLeft||0)+parseFloat(a.marginRight||0)},data:function(a,c){if(this[0]){this[0].__data||(this[0].__data={});if(c===k)return this[0].__data[a];this.each(function(){this.__data[a]=c});return this}},is:function(a){return this[0]?":visible"===a?null!==this[0].offsetParent:this[0].matches(a):!1},ready:function(a){if(this[0]===document||this[0]===window)"complete"===
|
|
79
|
+
document.readyState||"interactive"===document.readyState?setTimeout(a,0):document.addEventListener("DOMContentLoaded",a);return this}};["click","focus","blur","change","submit"].forEach(function(a){Ca[a]=function(b){return b?this.on(a,b):this.trigger(a)}});L.prototype=Ca;window.$=window.jQuery=function(b){if("function"===typeof b)return w(document).ready(b);if("string"===typeof b&&b.trim().startsWith("<")){b=b.trim();var c=b.match(/^<([a-z0-9-]+)/i);if(c){c=c[1];b=b.match(/<[^>]+>/);var d={};(b?b[0]:
|
|
80
|
+
"").replace(/([a-zA-Z_:][-a-zA-Z0-9_:.]*)="([^"]*)"/g,function(a,b,c){d[b]=c});return new L([a.element?a.element(c,d):Object.assign(document.createElement(c),d)])}c=document.createElement("div");c.innerHTML=b;return new L(Array.from(c.children))}return"string"===typeof b?new L(document.querySelectorAll(b)):b instanceof Element||b===window||b===document?new L([b]):b&&b.length?new L(b):new L([])};window.$.fn=Ca;Ca.constructor=L}}a.plugins={};a.text={Q:{request:{error:"Error {{status}} during request",
|
|
81
|
+
canceled:"Request canceled",500:"Internal server error",404:"Not found: {{url}}",0:"Request interrupted"},words:{tap:"tap",click:"click",yes:"yes",no:"no",Tap:"Tap",Click:"Click",Yes:"Yes",No:"No",OK:"OK",Alert:"Alert",Confirm:"Confirm",Prompt:"Prompt"},months:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"},durations:{second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",
|
|
82
|
+
day:"day",days:"days",week:"week",weeks:"weeks",month:"month",months:"months",year:"year",years:"years",decade:"decade",decades:"decades",century:"century",centuries:"centuries"},browser:{insecureContext:"You need to browse in a secure context for this to work"},audio:{allowMicrophoneAccess:"Please allow access to your microphone",record:"Record",recording:"Recording",remains:"remains",maximum:"maximum",playing:"Playing",recorded:"Recorded",clip:"clip",orupload:"Or Upload",usethis:"Use This",discard:"Discard",
|
|
83
|
+
encoding:"Encoding"},alert:{title:"Alert"},confirm:{title:"Confirm",ok:"Yes",cancel:"No"},prompt:{title:"Prompt",ok:"Done"},tabs:{more:"more",Menu:"Menu"},scan:{QR:"Scan QR codes"},input:{Placeholder:"Start typing..."}}};a.image={sizes:{},maxStretch:{},defaultSize:{}};a.assert=function(b,c){if(!b)throw new a.Error(c);};a.Promise=p.Promise;a.Error=Error;Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__?a.__proto__:a.constructor&&a.constructor.prototype?a.constructor.prototype:
|
|
84
|
+
k});JSON.isValid=function(a){try{JSON.parse(a)}catch(c){return!1}return!0};Array.prototype.toHex||Object.defineProperty(Array.prototype,"toHex",{enumerable:!1,value:function(){return this.map(function(a){return a.toString(16).padStart(2,"0")}).join("")}});var C=String.prototype;C.toCapitalized=function(){return this.replace(/(\S+)(\s*)/g,function(a,c,d){return c.charAt(0).toLocaleUpperCase()+c.slice(1)+d})};C.isUrl=function(){return!!this.matchTypes("url",{requireScheme:!0}).length};C.isIPAddress=
|
|
85
|
+
function(){return!!this.match(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)};C.encodeHTML=function(b){var c={"&":"&","<":"<",">":">",'"':""","'":"'","\n":"<br>"};b&&(c=a.take(c,b));return this.replaceAllPlaceholders(c)};C.decodeHTML=function(){var a=document.createElement("textarea");a.innerHTML=this;return 0===a.childNodes.length?"":a.childNodes[0].nodeValue};C.interpolate=function(b){if(a.isArrayLike(b)){for(var c=this,d=0>this.indexOf("{{0}}")?
|
|
86
|
+
1:0,e=0,f=b.length;e<f;++e)c=c.replace("{{"+(e+d)+"}}",b[e]);return c}return this.replace(/\{\{([^{}]*)\}\}/g,function(c,d){var e=a.getObject(d,b);"function"===a.typeOf(e)&&(d=a.getObject(d.split(".").slice(0,-1),b),e=e.apply(d));return"string"===typeof e||"number"===typeof e?e:c})};C.replaceAllPlaceholders=function(a){var b=this,d=Object.keys(a);d.sort(function(a,b){return b.length-a.length});for(var e=0;e<d.length;e++){var f=d[e],g=String(a[f]);b=b.split(f).join(g)}return b};C.queryField=function(b,
|
|
87
|
+
c){for(var d=this,e=["#!","#","?","!"],f="",g=0;g<e.length;++g){var h=e[g];if(this.startsWith(h)){f=h;d=this.substring(h.length);break}}g=a.parseQueryString(d||"");e={};for(var m in g){var l=g[m];h=m.split(/\[|\]/).filter(Boolean);for(var n=e,u=0;u<h.length;u++){var q=h[u];u===h.length-1?n[q]=l:(q in n||(n[q]={}),n=n[q])}}if(!b){b=[];for(var t in e)null!=e[t]&&""!==e[t]||b.push(t);return b}if(a.isArrayLike(b)){t={};for(f=0;f<b.length;++f)t[b[f]]=e[b[f]];return t}if(a.isPlainObject(b)){t=d;for(var x in b)t=
|
|
88
|
+
t.queryField(x,b[x]);return t}if(c===k){h=b.split(/\[|\]/).filter(Boolean);n=e;for(b=0;b<h.length;b++){if(null==n)return k;n=n[h[b]]}return n}if(null===c){b=new RegExp(b);for(t in g)b.test(t)&&delete g[t];return f+a.queryString(g)}g[b]=c;return f+a.queryString(g)};C.asc2hex=function(){for(var a=[],c=0,d=this.length;c<d;c++){var e=Number(this.charCodeAt(c)).toString(16);a.push(e)}return a.join("")};C.hashCode=function(){var a=5381;if(!this.length)return a;for(var c=0;c<this.length;c++){var d=this.charCodeAt(c);
|
|
89
|
+
a%=16777216;a=((a<<5)-a)*d+d;a&=4294967295}return Math.abs(a)};C.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")};C.parseUrl=function(a){for(var b="source scheme authority userInfo user pass host port relative path directory file query fragment".split(" "),d=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(this),e={},f=14;f--;)d[f]&&(e[b[f]]=d[f]);if(a)return e[a.replace("PHP_URL_",
|
|
90
|
+
"").toLowerCase()];delete e.source;return e};C.sameDomain=function(a,c){var b=this.parseUrl();a=a.parseUrl();var e=b.host===a.host&&b.user===a.user&&b.pass===a.pass&&b.port===a.port;return c&&c.compareScheme?e&&b.scheme===a.scheme:e};C.startsWith||(C.startsWith=function(a){return null==a||this.length<a.length?!1:this.substring(0,a.length)===a});C.endsWith||(C.endsWith=function(a){return null==a||this.length<a.length?!1:this.substring(this.length-a.length)===a});C.splitId=function(a,c){a=a||3;c=c||
|
|
91
|
+
"/";for(var b=[],e=0,f=this.length;e<f;)b.push(this.slice(e,e+=a));return b.join(c)};C.matchTypes=function(b,c){var d=this;"string"===typeof b&&(b=[b]);"object"===a.typeOf(b)&&(c=b,b=null);a.isArrayLike(b)||(b=Object.keys(C.matchTypes.adapters));var e={};a.each(b,function(a,b){C.matchTypes.adapters[b]&&(e[b]=C.matchTypes.adapters[b].call(d,c))});return 1===b.length?e[Object.keys(e)[0]]:e};C.matchTypes.adapters={url:function(a){var b=[],d=/file:\/\/\/[^\s]+/gi,e=a&&a.requireScheme?/\bhttps?:\/\/[^\s]+/gi:
|
|
92
|
+
/\b(?:https?:\/\/)?(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[a-z0-9\-]+(?:\.[a-z0-9\-]+)*\.[a-z]{2,})(:\d{1,5})?(\/[^\s]*)?/gi;a&&a.excludeLocalFiles||(a=this.match(d))&&b.push.apply(b,[].concat($jscomp.arrayFromIterable(a)));if(e=this.match(e))for(e=$jscomp.makeIterator(e),a=e.next();!a.done;a=e.next())a=a.value,a=a.replace(/[.,!?)\]]+$/,""),b.push(a);return b},email:function(){return this.match(/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b/g)||[]},phone:function(){return this.match(/\+?\d{1,3}[-.\s]?\(?\d{2,5}\)?[-.\s]?\d{2,5}[-.\s]?\d{2,6}/g)||
|
|
93
|
+
[]},twitter:function(){return this.match(/(?<!\w)@([a-zA-Z0-9_]{1,15})\b/g)||[]},qbixUserId:function(){return this.match(/@[a-z]{8}@/g)||[]}};C.deobfuscate=function(a){a=a||" ";for(var b=Math.floor(this.length/2),d=a.length,e="",f=0;f<b;++f){var g=f%d,h=this.charCodeAt(2*f+1);"1"==this.charAt(2*f)&&(h=-h);e+=String.fromCharCode(a.charCodeAt(g)+h)}return e};C.hexToDecimal=function(){var a="0x"==this.substring(0,2)?this:"0x"+this;return p.BigInt(a).toString()};C.decimalToHex=function(){for(var a=this.split(""),
|
|
94
|
+
c=[],d=[],e,f;a.length;)for(f=1*a.shift(),e=0;f||e<c.length;e++)f+=10*(c[e]||0),c[e]=f%16,f=(f-c[e])/16;for(;c.length;)d.push(c.pop().toString(16));return d.join("")};var jb=Function.prototype;jb.bind||(jb.bind=function(a){var b=this;(a=a||p)||(a=p);if(1>=arguments.length)return function(){return b.apply(a,arguments)};var d=Array.prototype.slice.call(arguments,1);return function(){return b.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});Date.now||(Date.now=function(){return(new Date).getTime()});
|
|
95
|
+
Date.fromDateTime=function(a,c){c=c||0;a=new Date(a.replace(/-/g,"/"));(c=(new Date).getTimezoneOffset()-c)&&(a=new Date(a.getTime()-6E4*c));return a};Date.fromTimestamp=function(a){if(isNaN(a))return null;a=parseFloat(a);return new Date(1E10>a?1E3*a:a)};Date.from=function(a){return a instanceof Date?a:Date.fromTimestamp(a)||new Date(a)};Date.prototype.toDateTime=function(a){return this.getFullYear()+"-"+("0"+(this.getMonth()+1)).slice(-2)+"-"+("0"+this.getDate()).slice(-2)+(a?"":" "+("0"+this.getHours()).slice(-2)+
|
|
96
|
+
":"+("0"+this.getMinutes()).slice(-2)+":"+("0"+this.getSeconds()).slice(-2))};if(p.Element){document.getElementsByClassName||(document.getElementsByClassName=function(a){return Array.prototype.slice.call(this.querySelectorAll("."+a))});var F=Element.prototype;F.Q||(F.Q=function(a){return k});F.contains||(F.contains=function(a){if(!a)return!1;for(;a;){if(a==this)return!0;a=a.parentElement}return!1});F.computedStyle=function(a,c){c=p.getComputedStyle?p.getComputedStyle(this,c):this.currentStyle;var b=
|
|
97
|
+
{},e;for(e in c){var f=p.getComputedStyle?e:e.replace(/-(\w)/gi,function(a,b){return b.toUpperCase()});b[f]=c[e]}return a?b[a.replace(/-(\w)/gi,function(a,b){return b.toUpperCase()})]:b};F.copyComputedStyle=function(a){a=a.computedStyle();for(var b in a)if("string"==typeof b&&"cssText"!=b&&!/\d/.test(b))try{if(this.style[b]=a[b],"font"==b&&(this.style.fontSize=a.fontSize),"backgroundRepeatX"==b||"backgroundRepeatY"==b)this.style.backgroundRepeat=a.backgroundRepeat}catch(d){}return this};F.cssDimensions=
|
|
98
|
+
function(){var b=this.cloneNode();b.style.display="none";this.parentElement.appendChild(b);var c=a.copy(b.computedStyle());this.parentElement.removeChild(b);return{width:c.width,height:c.height}};F.scrollingParent=function(a,c,d){var b=this,f=this;if(f.Q_scrollingParent)return f.Q_scrollingParent;for(;d||(b=b.parentElement);)if(d=!1,"function"===typeof b.computedStyle){var g=b.computedStyle();if((g="vertical"===c?g.overflowY||b.style.overflowY:"horizontal"===c?g.overflowX||b.style.overflowX:g.overflow||
|
|
99
|
+
b.style.overflow||g.overflowY||b.style.overflowY||g.overflowX||b.style.overflowX)&&"hidden"!==g&&(b===document.documentElement||"visible"!==g)&&(!a||b.clientHeight<b.scrollHeight))return f.Q_scrollingParent=b,setTimeout(function(){delete f.Q_scrollingParent},1E3),b}f.Q_scrollingParent=b||null;setTimeout(function(){delete f.Q_scrollingParent},1E3);return b||null};F.adjustScrolling=function(){var a=this.style["-webkit-overflow-scrolling"],c=this;c.style["-webkit-overflow-scrolling"]="auto"===a?"touch":
|
|
100
|
+
"auto";setTimeout(function(){c.style["-webkit-overflow-scrolling"]=a},0);return this};F.preventSelections=function(b,c){a.addEventListener(this,"selectstart",z);this.preventSelectionsInfo=this.preventSelectionsInfo||{style:this.style["-moz-user-select"]||this.style["-webkit-user-select"]||this.style["-ms-user-select"]||this.style["user-select"],callout:this.style["-webkit-user-callout"],unselectable:this.unselectable};this.unselectable="on";this.style[a.info.browser.prefix+"user-select"]=this.style["user-select"]=
|
|
101
|
+
"none";c&&(this.style[a.info.browser.prefix+"user-callout"]=this.style["user-select"]="none");b&&a.each(this.children||this.childNodes,function(){this.preventSelections&&0>["INPUT","TEXTAREA"].indexOf(this.tagName.toUpperCase())&&this.hasClass&&!this.hasClass("Q_selectable")&&this.preventSelections(b)})};F.restoreSelections=function(b){var c=this.preventSelectionsInfo;c&&(this.style["-moz-user-select"]=this.style["-webkit-user-select"]=this.style["-ms-user-select"]=this.style["user-select"]=c.style||
|
|
102
|
+
"text",this.style["-webkit-user-callout"]=c.callout,this.unselectable=c.unselectable,delete this.preventSelectionsInfo);a.removeEventListener(this,"selectstart",z);b&&a.each(this.children||this.childNodes,function(){this.restoreSelections&&0<=["INPUT","TEXTAREA"].indexOf(this.tagName.toUpperCase())&&this.restoreSelections(b)})};F.isBefore=function(b,c){var d=!0,e=this;if(!(c instanceof Element))for(var f=this;f;){f=f.parentNode;for(var g=b;g;)if(g=g.parentNode,f===g){c=g;break}if(c)break}a.find(c,
|
|
103
|
+
null,function(a){if(a===b)return d=!1;if(a===e)return!1});return d};F.hasClass=function(a){return this.classList?this.classList.contains(a):(new RegExp("(^| )"+a+"( |$)","gi")).test(this.className)};F.removeClass=function(a){this.classList?this.classList.remove(a):this.className=this.className.replace(new RegExp("(^| )"+a.split(" ").join("|")+"( |$)","gi")," ");return this};F.addClass=function(b,c){"string"!==a.typeOf(b)&&(b="");b=b.split(" ");for(var d=b.length,e=0;e<d;++e){var f=b[e];f&&(c?(this.hasClass(f)&&
|
|
104
|
+
this.removeClass(f),this.className=f+" "+this.className):this.hasClass(f)||(this.className+=" "+f))}return this};F.setClassIf=function(a,c,d){a?(c&&this.addClass(c),d&&this.removeClass(d)):(d&&this.addClass(d),c&&this.removeClass(c));return this};F.innerText=function(){return this.textContent||this.innerText};F.isOverflowed=function(){return this.offsetWidth<this.scrollWidth||this.offsetHeight<this.scrollHeight};F.isVisible=function(){return 0<this.offsetWidth||0<this.offsetHeight};F.remainingWidth=
|
|
105
|
+
function(b,c){var d=this,e=this.parentElement;if(!e)return null;var f=this.getBoundingClientRect(),g=e.getBoundingClientRect(),h=g.right-g.left;g=e.computedStyle();h-=v(g.paddingLeft)+v(g.paddingRight)+v(g.borderLeftWidth)+v(g.borderRightWidth);a.each(e.children,function(){if(this!==d&&this.isVisible()){var a=this.getBoundingClientRect();if(!(f.top>=a.bottom||f.bottom<=a.top)){var b=this.computedStyle();h-=a.right-a.left+v(b.marginLeft)+v(b.marginRight)}}});c&&(c=this.computedStyle(),h-=v(c.marginLeft)+
|
|
106
|
+
v(c.marginRight));return b?h:Math.floor(h-.01)};F.forEachTool=function(b,c,d){var e=this;"string"!==typeof b&&(c=b,b="");a.each(e.getElementsByClassName("Q_tool"),function(){var d=a.Tool.from(this,b);d&&a.handle(c,d)});a.Tool.onActivate(b).set(function(){try{e.contains(this.element)&&a.handle(c,this)}catch(f){console.warn(f)}},d)};a.elementById=function(a){return a?a.isConnected?a:(a.id?document.getElementById(a.id):null)||null:null};F.getElementsByClassName||(F.getElementsByClassName=document.getElementsByClassName)}(function(){if(0<
|
|
107
|
+
navigator.appVersion.indexOf("MSIE 8")){var a=Array.prototype.slice;Array.prototype.slice=function(){if(this instanceof Array)return a.apply(this,arguments);for(var b=[],d=2<=arguments.length?arguments[1]:this.length,e=1<=arguments.length?arguments[0]:0;e<d;e++)b.push(this[e]);return b}}})();p.requestAnimationFrame||(p.requestAnimationFrame=p.webkitRequestAnimationFrame||p.mozRequestAnimationFrame||p.oRequestAnimationFrame||p.msRequestAnimationFrame||function(b){return setTimeout(function(){b(a.milliseconds())},
|
|
108
|
+
1E3/a.Animation.fps)},p.cancelAnimationFrame=p.webkitCancelAnimationFrame||p.mozCancelAnimationFrame||p.oCancelAnimationFrame||p.msCancelAnimationFrame||function(a){clearTimeout(a)});a.milliseconds=function(b){var c=Date.now();return b?c:c-a.milliseconds.start};a.milliseconds.start=Date.now();a.timeInLocale=function(b,c){var d=new Date;b=b.split(":");Date.prototype.setHours.apply(d,b);c=a.getObject("locale",c)||navigator.language;var e={hour:"2-digit"};1<b.length&&(e.minute="2-digit");2<b.length&&
|
|
109
|
+
(e.second="2-digit");return d.toLocaleTimeString(c,e).replace(/^0+/,"")};a.objectWithPrototype=function(a){function b(){}if(!a)return{};b.prototype=a;return new b};a.typeOf=function(b){var c=typeof b,d,e;"function"!==c||b instanceof Function||(c="object");if("object"===c){if(null===b)return"null";c=Object.prototype.toString.apply(b);if(b instanceof p.Element)return"Element";if(b instanceof Array||b.constructor&&"Array"===b.constructor.name||"[object Array]"===c)c="array";else if("[object Window]"===
|
|
110
|
+
c)c="window";else{if("undefined"!=typeof b.typename)return b.typename;if(b.constructor&&a.typeOf.treatAsObject[b.constructor.name])return"object";$jscomp.initSymbol();$jscomp.initSymbolIterator();return"function"===b[Symbol.iterator]||"number"==typeof(e=b.length)&&0==e%1&&0<e&&e-1 in b?"array":"undefined"!=typeof b.constructor&&"undefined"!=typeof b.constructor.name?"Object"==b.constructor.name||""==b.constructor.name?"object":b.constructor.name:"[object "===(d=Object.prototype.toString.apply(b)).substring(0,
|
|
111
|
+
8)?d.substring(8,d.length-1).toLowerCase():"object"}}return c};a.typeOf.treatAsObject=a.typeOf.treatAsObject={CSSStyleDeclaration:!0,NamedNodeMap:!0,MediaList:!0,StyleSheet:!0,StyleSheetList:!0,MimeTypeArray:!0,PluginArray:!0};a.handle=function(b,c,d,e){try{if(!b)return 0;c||(c=p);d||(d=[]);var f=0,g=0,h;b===location&&(b=location.href);switch(a.typeOf(b)){case "function":var m=b.apply(c,d);return!1===m?!1:1;case "array":for(f=0;f<b.length;++f){m=a.handle(b[f],c,d);if(!1===m)return!1;g+=m}return g;
|
|
112
|
+
case "Q.Event":return b.handle.apply(c,d);case "object":for(h in b){m=a.handle(b[h],c,d);if(!1===m)return!1;g+=m}return g;case "string":var l=a.extend({},a.handle.options,e);if(!(b.isUrl()||"#"==b[0]||l.target&&"_self"!==l.target.toLowerCase())){var n=a.getObject(b,c)||a.getObject(b);return a.handle(n,c,d)}if(l.dontReload&&a.info&&a.info.url===b)return 0;var u=null;"function"===typeof arguments[1]?(u=arguments[1],l=a.handle.options):arguments[1]&&arguments[3]===k?(l=a.extend({},a.handle.options,arguments[1]),
|
|
113
|
+
"function"===typeof arguments[2]&&(u=arguments[2])):(l=a.extend({},a.handle.options,e),l.callback&&(u=l.callback));var q=a.baseUrl(),t=b.sameDomain(q);if("#"===b[0])p.location.hash=b;else if(!l.loadUsingAjax||!t||l.target&&!0!==l.target&&"_self"!==l.target)if("object"===a.typeOf(l.fields)){f="POST";if(l.method)switch(l.method.toUpperCase()){case "GET":case "POST":f=l.method;break;default:f="POST"}a.formPost(b,l.fields,f,{onLoad:l.callback,target:l.target})}else a.info&&b===q&&(b+="/"),l.target&&!0!==
|
|
114
|
+
l.target&&"_self"!==l.target?p.open(b,l.target):p.location.href==b?p.location.reload(!0):p.location=b;else 0===b.search(q)?a.loadUrl(b,a.extend({loadExtras:"session",ignoreHistory:!1,onActivate:function(){u&&u()}},l)).then(function(a){},function(a){if(l&&l.handleException)return l.handleException(a)}):l.externalLoader?l.externalLoader.apply(this,arguments):p.location=b;a.handle.onUrl.handle(b,l);return 1;default:return 0}}catch(x){if(e&&e.handleException)return e.handleException(x);throw x;}};a.handle.options=
|
|
115
|
+
{loadUsingAjax:!0,externalLoader:null,dontReload:!1};setTimeout(function(){a.handle.onUrl=new a.Event(function(){var b=document.getElementsByClassName("Q_error_message");a.each(b,function(){a.removeElement(this,!0)});a.Visual.stopHints()},"Q")});a.each=function(b,c,d,e,f){function g(a,b){return a>b?1:a<b?-1:0}function h(a,c){return b[a][x]>b[c][x]?1:b[a][x]<b[c][x]?-1:0}function m(a,b){return Number(a)-Number(b)}function l(a,c){return Number(b[a][x])-Number(b[c][x])}var n;if("string"===typeof c&&
|
|
116
|
+
a.isArrayLike(d)){var u=d;d=e}switch(n=a.typeOf(b)){default:var q=Array.prototype.slice.call(b,0);if("0"in b&&!("0"in q))for(q=[],e=0;f=b[e];++e)q.push(f);var t=q.length;if(!q||!t||!c)break;if(d&&!1===d.ascending)for(e=t-1;0<=e;--e){if(f=a.handle(c,q[e],u||[e,q[e],q]),!1===f)return!1}else for(e=0;e<t;++e)if(f=a.handle(c,q[e],u||[e,q[e]],q),!1===f)return!1;break;case "object":case "function":if(!b||!c)break;if(d&&("ascending"in d||"sort"in d)){q=[];for(t in b)(!d.hasOwnProperty||a.has(b,t))&&b.hasOwnProperty&&
|
|
117
|
+
b.hasOwnProperty(t)&&q.push(d.numeric?Number(t):t);var x=d.sort;e=typeof x;q.sort("function"===e?x:"string"===e?d.numeric?l:h:d.numeric?m:g);if(!1===d.ascending)for(e=q.length-1;0<=e;--e){if(d=q[e],f=a.handle(c,b[d],u||[d,b[d],b]),!1===f)return!1}else for(e=0;e<q.length;++e)if(d=q[e],f=a.handle(c,b[d],u||[d,b[d],b]),!1===f)return!1}else for(t in b)if(b.hasOwnProperty&&b.hasOwnProperty(t)&&(f=a.handle(c,b[t],u||[t,b[t],b]),!1===f))return!1;break;case "string":if(!b||!c)break;if(d&&!1===d.ascending)for(e=
|
|
118
|
+
0;e<b.length;++e){if(q=b.charAt(e),f=a.handle(c,q,u||[e,q,b]),!1===f)return!1}else for(e=b.length-1;0<=e;--e)if(q=b.charAt(e),f=a.handle(c,q,u||[e,q,b]),!1===f)return!1;break;case "number":n=0;t=b;"number"===typeof c&&(n=b,t=c,"number"===typeof d?(q=d,c=e,d=f):(c=d,d=e));if(!c)break;q===k&&(q=n<=t?1:-1);if(!q||0>(t-n)*q)return 0;if(n<=t)for(e=n;e<=t;e+=q){f=a.handle(c,this,u||[e],b);if(!1===f)return!1;if(0>q)return 0}else for(e=n;e>=t;e+=q){f=a.handle(c,this,u||[e],b);if(!1===f)return!1;if(0<q)return 0}break;
|
|
119
|
+
case "boolean":if(!1===b)break;throw new a.Error("Q.each: does not support iterating a "+n);case "null":case "undefined":}};a.first=function(b,c){c=a.firstKey(b,c);return null!=c?b[c]:k};a.firstKey=function(b,c){if(!b)return k;switch(typeof b){case "array":for(c=0;c<b.length;++c)if(b[c]!==k)return c;break;case "object":for(var d in b)if(b.hasOwnProperty(d)&&b[d]!==k&&(d||!c||!c.nonEmptyKey))return d;break;case "string":return 0;default:throw new a.Error("Q.first: container has to be an array, object or string");
|
|
120
|
+
}return k};a.largestSize=function(b,c,d){if("string"===typeof b){if(!a.image.sizes[b]){if(d&&d.dontThrow)return null;throw new a.Exception("Q.largestSize: Q.image.sizes missing "+b);}b=a.image.sizes[b]}var e,f=0,g=0;a.isArrayLike(b)||(b=Object.keys(b));d=d&&d.minimumDimensions?d.minimumDimensions.split("x"):null;if(0<=b.indexOf("x")&&!d)return"x";for(var h=0;h<b.length;++h)if(e=b[h]){var m=e.split("x");if(0!=m.length){e=parseInt(m[0]||m[1]);var l=parseInt(m[1]||m[0]);if(c&&(l>g||l==g&&e>=f&&2==m.length)||
|
|
121
|
+
!c&&(e>f||e==f&&l>=g&&2==m.length)){f=e;g=l;var n=h}if(d&&e>=d[0]&&e>=d[1])return b[n]}}return n!==k?b[n]:0<=b.indexOf("x")?"x":null};a.diff=function(b,c){if(!b||!c)return b;var d=arguments,e=arguments.length,f=arguments[e-1];"function"!==typeof f&&(f=function(a,b,c,d,e){return a===b&&(e?c==d:!0)},++e);var g=a.isArrayLike(b),h=g?[]:{};a.each(b,function(b,c){for(var m=!1,l=1;l<e-1;++l){var k=a.isPlainObject(d[l]);a.each(d[l],function(a,d){if(f(c,d,b,a,k,l))return m=!0,!1});if(m)return}g?h.push(c):
|
|
122
|
+
h[b]=c});return h};a.isEmpty=function(b){if(!b)return!0;var c;var d=a.typeOf(b);if("array"===d)return 0===b.length;if("object"===d){for(c in b)if(d=b[c],d!==k)return!1;return!0}return!1};a.isInteger=function(a,c){return c?Number.isInteger(a):0<a?Math.floor(a)==a:Math.ceil(a)==a};a.isArrayLike=function(b){return"array"===a.typeOf(b)||p.$&&p.$.prototype&&b instanceof p.$};a.isPlainObject=function(a){return null===a||"object"!==typeof a||"[object Object]"!==Object.prototype.toString.apply(a)||p.attachEvent&&
|
|
123
|
+
!p.addEventListener&&a&&a.constructor!==Object?!1:!0};a.instanceOf=function(a,c){if(!a||"object"!==typeof a)return!1;if(a instanceof c)return!0;if(c.__mixins)for(var b in c.__mixins)if(a instanceof b)return!0;return!1};a.copy=function(b,c,d){p.ArrayBuffer&&b instanceof ArrayBuffer&&ArrayBuffer.prototype.slice.call(b,0);if(a.isArrayLike(b)){var e=Array.prototype.slice.call(b,0);c=Object.keys(b);for(var f=0,g=c.length;f<g;++f)e[c[f]]=b[c[f]];return e}if(b&&"function"===typeof b.copy)return b.copy();
|
|
124
|
+
if(null===b||!a.isPlainObject(b))return b;e=a.objectWithPrototype(Object.getPrototypeOf(b));if(c)for(f=0,g=c.length;f<g;++f){for(var h=c[f].split("."),m=b,l=0;l<h.length;++l)if(m&&"object"===typeof m)m=m[h[l]];else{m=k;break}"undefined"!==typeof m&&(e[c[f]]=d?a.copy(m,null,d-1):m)}else for(f in b)a.has(b,f)&&(e[f]=d?a.copy(b[f],null,d-1):b[f]);return e};a.extend=function(b){var c=arguments.length,d=k;"string"===typeof arguments[c-1]&&(d=arguments[c-1],--c);if(0===c)return{};var e=!1,f=0,g=a.typeOf(b),
|
|
125
|
+
h="Q.Event"===g,m,l,n,u;for(m=1;m<c;++m)if(l=arguments[m])if(!0===l)e=!0;else if("number"===typeof l&&l)f=l;else if(b===k&&(a.isArrayLike(l)?(b=[],g="array"):(b={},g="object")),h)if(l&&l.constructor===Object)for(u in l)b.set(l[u],u);else b.set(l,d);else{if("array"===g)if(a.isArrayLike(l))b=Array.prototype.concat.call(b,l).filter(function(a,b,c){return c.indexOf(a)===b});else{if(a.isPlainObject(l))if(l.prepend&&a.isArrayLike(b)&&(b=[].concat(l.prepend,b).filter(function(a,b,c){return c.indexOf(a)===
|
|
126
|
+
b})),l.append&&a.isArrayLike(b)&&(b=[].concat(b,l.append).filter(function(a,b,c){return c.indexOf(a)===b})),l.replace)b=a.copy(l.replace);else{if(l.updates){var q=l.updates[0];l.updates.slice(1).forEach(function(c){for(var d=0;d<b.length;d++)b[d][q]===c[q]&&(b[d]=a.extend(b[d],!0,f-1,c))})}l.add&&(b=b.concat(l.add));l.remove&&(b=(q=l.updates&&l.updates[0]||null)?b.filter(function(a){return!l.remove.some(function(b){return a[q]===b[q]})}):b.filter(function(a){return-1===l.remove.indexOf(a)}))}}else for(n in l)if(!0===
|
|
127
|
+
e||l.hasOwnProperty&&l.hasOwnProperty(n)||!(l.hasOwnProperty&&n in l)){var t=l[n];var x=n in b&&a.typeOf(b[n]);var p=a.typeOf(t);if("Q.Event"===x)if(t&&"Q.Event"===t.typename&&(t=t.handlers),t&&t.constructor===Object)for(u in t)b[n].set(t[u],u);else if("Q.Event"===p)for(u in t.handlers)b[n].set(t.handlers[u],u);else b[n].set(t,d);else f&&b[n]&&("object"===typeof b[n]||"function"===typeof b[n])&&"Q.Event"!==p&&(a.isPlainObject(t)||"array"===x&&"array"===p)?b[n]="array"===x&&"replace"in t?a.copy(t.replace):
|
|
128
|
+
a.extend(b[n],e,f-1,t):b[n]=a.extend.dontCopy[a.typeOf(t)]?t:a.copy(t,null,f);t===k&&delete b[n]}e=!1;f=0}return b};a.extend.dontCopy={"Q.Tool":!0,"Q.Cache":!0};a.has=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)};a.take=function(b,c,d){d=d||{};if(!b)return d;if(a.isArrayLike(c))for(var e=0;e<c.length;++e)c[e]in b&&(d[c[e]]=b[c[e]]);else for(e in c)d[e]=e in b?b[e]:c[e];return d};a.shuffle=function(a){var b=a.length;if(!b)return a;for(;--b;){var d=Math.floor(Math.random()*(b+1)),
|
|
129
|
+
e=a[b];a[b]=a[d];a[d]=e}return a};a.mixin=function(b){var c=b.__mixins||(b.__mixins=[]),d,e;var f=1;for(e=arguments.length;f<e;++f){var g=arguments[f];if("function"!==typeof g)throw new a.Error("Q.mixin: argument "+f+" is not a function");var h=g.prototype,m=b.prototype;for(d in h)d in m||(m[d]=h[d]);for(d in g)d in b||(b[d]=g[d]);c.push(arguments[f])}b.staticProperty=function(a){for(var c=0;c<b.__mixins.length;++c)if(a in b.__mixins[c])return b.__mixins[c][a];return k};b.constructors=function(){var a=
|
|
130
|
+
b.__mixins,c;for(c=a.length-1;0<=c;--c)a[c].apply(this,arguments)};b.prototype.constructors=function(){b.constructors.apply(this,arguments)}};a.normalize=function(b,c,d,e,f){if(b===k||"string"!==typeof b){debugger;return b}e||(e=200);c===k&&(c="_");!0===d?d=a.normalize.regexpASCII:d||(d=a.normalize.regexpUNICODE);f||(b=b.toLowerCase());b=b.replace(d,c);b.length>e&&(b=b.substring(0,e-11)+"_"+Math.abs(b.substring(e-11).hashCode()));return b};a.normalize.regexpASCII=/[^A-Za-z0-9]+/g;a.normalize.regexpUNICODE=
|
|
131
|
+
RegExp("[^\\p{L}0-9]+","gu");a.normalize.memoized=function(b){b in a.normalize.memoized.collection||(a.normalize.memoized.collection[b]=a.normalize(b));return a.normalize.memoized.collection[b]};a.normalize.memoized.collection={};a.setObject=function(b,c,d,e){if(a.isPlainObject(b)){d=c;c={};for(var f in b)c[f]=a.setObject(f,b[f],d);return c}"string"===typeof b&&(b=b.split(e||"."));f=b.pop();return(b=A(b,!0,d))&&f!==k?b[f]=c:k};a.getObject=function(b,c,d,e){d=d||".";if("string"===typeof b)b=b.split(d);
|
|
132
|
+
else if(!(b instanceof Array))return b;var f=A(b,!1,c);f===k&&e!==k&&(f=a.setObject(b,e,c,d));return f};a.latest=function(b,c){b=a.calculateKey(b);if(c===k)return a.latest.issued[b]=(a.latest.issued[b]||0)%a.latest.max+1;var d=a.latest.seen[b]||0;return!0===c?d:c>d||c<d-9*a.latest.max/10?(a.latest.seen[b]=c,!0):!1};a.latest.issued={};a.latest.seen={};a.latest.max=1E4;a.humanReadable=function(b,c){if(a.getObject("bytes",c))return b=parseInt(b),b>=Math.pow(2,30)?Math.ceil(b/Math.pow(2,30))+" GB":b>=
|
|
133
|
+
Math.pow(2,20)?Math.ceil(b/Math.pow(2,20))+" MB":b>=Math.pow(2,10)?Math.ceil(b/Math.pow(2,10))+" KB":b+" bytes"};a.calculateKey=function(b,c,d){if(!0===b)return"PAGE: CURRENT";b===k&&(b=a.Tool.beingActivated);if("Q.Tool"===a.typeOf(b))b="TOOL: "+b.id+" ("+b.name+")";else if(c&&b==k)for(d=d===k?1:d,b="AUTOKEY_"+d;c[b];)b="AUTOKEY_"+ ++d;else if(b!==k&&"string"!==typeof b)throw new a.Error("Q.calculateKey: key must be a String, Q.Tool, true, null, or undefined");return b};a.calculateKey.keys=[];a.chain=
|
|
134
|
+
function(b){var c=b&&b.pop()||function(){var a=Array.prototype.slice.call(arguments).pop();"function"===typeof a&&a.apply(this,arguments)};a.each(b,function(b,e){if("function"===a.typeOf(e)){var d=c;c=function(){Array.prototype.slice.call(arguments,0).push(d);return e.apply(this,arguments)}}},{ascending:!1,numeric:!0});return c};a.promisify=function(b,c,d){return a.extend(function(){if(!a.Promise)return b.apply(this,arguments);var e=[],f,g,h=!1,m=new a.Promise(function(a,b){f=a;g=b});a.each(arguments,
|
|
135
|
+
function(a,b){d instanceof Array&&d[0]==a?(h=!0,e.push(function(a){if(b instanceof Function)try{return b.apply(this,arguments)}catch(q){return}return f(a)})):d instanceof Array&&d[1]==a?(h=!0,e.push(function(a){if(b instanceof Function)try{return b.apply(this,arguments)}catch(q){}else return g(a)})):b instanceof Function?(h=!0,e.push(function(a,d){if(b instanceof Function)try{b.apply(this,arguments)}catch(t){}a?b instanceof Function||g(a):f(c?this:d)})):e.push(b)});d instanceof Array?(d[0]&&e.length<=
|
|
136
|
+
d[0]&&(e[d[0]]=f),d[1]&&e.length<=d[1]&&(e[d[1]]=g)):h||e.splice(d===k?e.length:d,0,function(a,b){if(a)return g(a);f(c?this:b)});try{return a.extend(m,b.apply(this,e))}catch(l){return g(l),m}},b)};a.once=function(a,c){var b=!1;return function(){if(b)return c;b=!0;return a.apply(this,arguments)}};a.throttle=function(a,c,d,e){var b,g=null;return function(f){var m=this,h=arguments,n=Date.now()-b;if(n<c)return d&&(g&&clearTimeout(g),g=setTimeout(function(){b=Date.now();a.apply(m,h)},c-n)),e;b=Date.now();
|
|
137
|
+
return a.apply(this,arguments)}};a.queue=function(a,c){function b(){if(!e.length)return f=null,0;var d=e.shift();!1===a.apply(d[0],d[1])?(f=null,e=[]):f=setTimeout(b,c)}var e=[],f=null;c=c||0;return function(){var a=Array.prototype.slice.call(arguments,0);a=e.push([this,a]);f||(f=setTimeout(b,0));return a}};a.debounce=function(a,c,d,e){var b=null;return function(){var f=this,h=arguments;b?clearTimeout(b):d&&a.apply(f,h);b=setTimeout(function(){d||a.apply(f,h);b=null},c);return e}};a.preventRecursion=
|
|
138
|
+
function(a,c,d){return function(){var b="__preventRecursion_"+a;if(this[b])return d;this[b]=!0;try{var f=c.apply(this,arguments)}catch(h){throw delete this[b],h;}var g=this;setTimeout(function(){delete g[b]},0);return f}};a.openUrl=function(b,c){c=c===k?"_blank":c;var d=a.getObject("cordova.plugins.browsertabs");d?d.openUrl(b):(b=window.open(b,c))&&b.focus()};a.timeRemaining=function(a){a=(new Date(a)-Date.now())/1E3;if(0>a)return{days:0,hours:0,minutes:0,seconds:0};var b={};b.days=Math.floor(a/60/
|
|
139
|
+
60/24);a-=86400*b.days;b.hours=Math.floor(a/60/60);a-=3600*b.hours;b.minutes=Math.floor(a/60);b.seconds=parseInt(a-60*b.minutes);return b};a.zIndexTopmost=function(a,c){a=a||document.body;c=c||function(a){if("SCRIPT STYLE LINK META HEAD TITLE NOSCRIPT".split(" ").includes(a.tagName)||"notices_slot"===a.id||a.classList&&["Q_click_mask","Q_touchlabel"].some(function(b){return a.classList.contains(b)}))return!0};var b=function(a){if(a.style&&a.style.zIndex){var b=parseInt(a.style.zIndex,10);if(!isNaN(b))return b}a=
|
|
140
|
+
window.getComputedStyle(a,null);if(!a)return null;b=a.zIndex;if("auto"===b)return null;b=parseInt(b,10);return isNaN(b)?null:b},e=0;a=a.getElementsByTagName("*");var f;for(f=0;f<a.length;f++){var g=a[f];c(g)||(g=b(g),2147483647>g&&g>e&&(e=g))}return e};a.swapElements=function(a,c){var b=a.parentElement;var e=a.nextSibling;var f=c.parentElement;var g=c.nextSibling;b.insertBefore(c,e);f.insertBefore(a,g)};a.element=function(a,c,d){a=document.createElement(a);if(c)for(var b in c)b.startsWith("on")&&
|
|
141
|
+
"function"===typeof c[b]?a[b]=c[b]:a.setAttribute(b,c[b]);if(d)if("string"===typeof d)a.innerHTML=d;else for(c=0,b=d.length;c<b;++c){var f=d[c];if(f)if("string"===typeof f){var g=document.createElement("div");for(g.innerHTML=f;g.firstChild;)a.appendChild(g.firstChild)}else a.append(f)}return a};a.$=function(a,c,d){a=(c||document.body).querySelectorAll(a);return d?Array.prototype.slice.call(a):a.values()};a.RegExp={letters:function(){return/^p{L}/u}};a.Daystamp={fromTimestamp:function(b){return Math.round((b-
|
|
142
|
+
a.Daystamp.epoch)/a.Daystamp.msPerDay)},fromDate:function(b){return a.Daystamp.fromTimestamp(b.getTime())},fromDateTime:function(a){return this.fromTimestamp(Date.parse(a+" UTC"))},fromYMD:function(b,c,d){var e=new Date;e.setUTCFullYear(b,c-1,d);e.setUTCHours(0,0,0);return Math.round((e.getTime()-a.Daystamp.epoch)/a.Daystamp.msPerDay)},today:function(){return a.Daystamp.fromDate(new Date)},toTimestamp:function(b){return a.Daystamp.epoch+a.Daystamp.msPerDay*b},toDate:function(b){return new Date(a.Daystamp.toTimestamp(b))},
|
|
143
|
+
toDateTime:function(b,c){b=a.Daystamp.toDate(b);c===k&&(c=" ");return String(b.getUTCFullYear()).padStart(4,0)+"-"+String(b.getUTCMonth()+1).padStart(2,0)+"-"+String(b.getUTCDate()).padStart(2,0)+c+"00:00:00"},toYMD:function(b){b=a.Daystamp.toDate(b);return[b.getUTCFullYear(),b.getUTCMonth()+1,b.getUTCDate()]},age:function(b,c){b=a.Daystamp.toYMD(b);c=a.Daystamp.toYMD(c);var d=c[0]-b[0];return c[1]<b[1]||c[1]===b[1]&&c[2]<b[2]?d-1:d}};Object.defineProperty(a.Daystamp,"epoch",{value:-621672192E5,configurable:!1,
|
|
144
|
+
writable:!1,enumerable:!0});Object.defineProperty(a.Daystamp,"msPerDay",{value:864E5,configurable:!1,writable:!1,enumerable:!0});a.Event=function(b,c,d){if(this===a)throw new a.Error("Q.Event: Missing new keyword");var e=this;this.handlers={};this.keys=[];this.typename="Q.Event";b&&this.set(b,c,d);this.handle=function(){var b,c=0,d=e.occurring;if(e.stopped)return 0;e.occurring=!0;e.lastContext=this;e.lastArgs=arguments;var m=a.copy(e.keys);for(b=0;b<m.length;++b){var l=a.handle(e.handlers[m[b]],this,
|
|
145
|
+
arguments);if(!1===l)return!1;c+=l}e.occurring=d;e.occurred=!0;return c}};a.Event.forTool={};a.Event.forPage=[];a.Event.jQueryForTool={};a.Event.jQueryForPage=[];a.Event.define=function(b,c){var d=new a.Event;b[c]=d;d.type=c;return d};a.Event.from=function(b,c){var d=new a.Event;a.addEventListener(b,c,d.handle);d.onEmpty().set(function(){a.removeEventListener(b,c,d.handle)});return d};var D=a.Event.prototype;D.occurred=!1;D.occurring=!1;D.set=function(b,c,d){if(!b)if(c)b=null;else return null;!0===
|
|
146
|
+
c||c===k&&a.Page&&a.Page.beingActivated?a.Event.forPage.push(this):c===k&&(c=a.Tool.beingActivated);var e="Q.Tool"===a.typeOf(c);c=a.calculateKey(c,this.handlers,this.keys.length);this.handlers[c]=b;0>this.keys.indexOf(c)&&(d?this.keys.unshift(c):this.keys.push(c));e&&(a.Event.forTool[c]=a.Event.forTool[c]||[],a.Event.forTool[c].push(this));1===this.keys.length&&this._onFirst&&this._onFirst.handle.call(this,b,c,d);this._onSet&&this._onSet.handle.call(this,b,c,d);return c};D.add=function(b,c,d){c=
|
|
147
|
+
this.set(b,c,d);(this.occurred||this.occurring)&&a.handle(b,this.lastContext,this.lastArgs);return c};D.setOnce=function(a,c,d){if(!a)return k;var b=this;return c=b.set(function(){a.apply(this,arguments);b.remove(c)},c===k?null:c,d)};D.addOnce=function(b,c,d){if(!b)return k;if(this.occurred||this.occurring)return a.handle(b,this.lastContext,this.lastArgs),!0;var e=this;return c=e.add(function(){b.apply(this,arguments);e.remove(c)},c,d)};D.remove=function(b){var c=a.calculateKey(b);if(!0===b)for(b=
|
|
148
|
+
a.Event.forPage.length,d=0;d<b;++d){if(a.Event.forPage[d]===this){a.Event.forPage.splice(d,1);break}}else if(a.Event.forTool[c])for(b=a.Event.forTool[c].length,d=0;d<b;++d)if(a.Event.forTool[c][d]===this){a.Event.forTool[c].splice(d,1);break}var d=this.keys.indexOf(c);if(0>d)return 0;this.keys.splice(d,1);this._onRemove&&this._onRemove.handle.call(this,c);!this.keys.length&&this._onEmpty&&this._onEmpty.handle.call(this,c);delete this.handlers[c];return 1};D.removeAllHandlers=function(){this.handlers=
|
|
149
|
+
{};this.keys=[];this._onEmpty&&this._onEmpty.handle.call(this)};D.stop=function(a){this.stopped=!0;this._onStop&&this._onStop.handle.call(this);a&&this.removeAllHandlers.call(this)};D.copy=function(){for(var b=new a.Event,c=0;c<this.keys.length;++c)b.handlers[this.keys[c]]=this.handlers[this.keys[c]],b.keys.push(this.keys[c]);b.type=this.type;return b};D.or=function(b,c,d){var e=new a.Event;this.add(e.handle,c);b&&b.add(e.handle,d);return e};D.and=function(b,c,d){function e(){if((g.occurred||g.occurring)&&
|
|
150
|
+
(b.occurred||b.occurring))return f.handle.apply(this,arguments)}var f=new a.Event;if(!b)return a.copy(this);var g=this;f.occurred=g.occurred&&b.occurred;f.occurring=g.occurring||b.occurring;g.add(e,c);d=b.add(e,d);return f};D.until=function(b,c,d){var e=new a.Event,f=this;c=f.add(e.handle,c);d=b.add(function(){f.remove(c);b.remove(d);f.stop()},d);return e};D.then=function(b){var c=new a.Event,d=c.handle,e=!0,f=[];c.handle=function(){return e?(f.push([this,arguments]),0):d.apply(this,arguments)};var g=
|
|
151
|
+
this.onStop().add(function(){for(var a=0;a<f.length;++a)d.apply(f[a][0],f[a][1]);e=!1;this.onStop().remove(g)},b);return c};D.debounce=function(b,c,d){var e=new a.Event;this.add(a.debounce(e.handle,b,c,0),d);return e};D.throttle=function(b,c,d){var e=new a.Event;this.add(a.throttle(e.handle,b,c,0),d);return e};D.queue=function(b,c){var d=new a.Event;this.add(a.queue(d.handle,b),c);return d};D.filter=function(b,c){var d=new a.Event;this.add(function(){return b.apply(this,arguments)?d.handle.apply(this,
|
|
152
|
+
arguments):0},c);return d};D.map=function(b,c){var d=new a.Event;this.add(function(){var a=b.apply(this,arguments);return!1===a?!1:d.handle.apply(a[0],a[1])},c);return d};D.onFirst=function(){return this._onFirst||(this._onFirst=new a.Event)};D.onSet=function(){return this._onSet||(this._onSet=new a.Event)};D.onRemove=function(){return this._onRemove||(this._onRemove=new a.Event)};D.onEmpty=function(){return this._onEmpty||(this._onEmpty=new a.Event)};D.onStop=function(){return this._onStop||(this._onStop=
|
|
153
|
+
new a.Event)};D.toJSON=function(){var b=a.copy(this);delete b.lastArgs;delete b.lastContext;return b};a.Event.factory=function(b,c,d,e){function f(){var c=this.indexes.split("\t"),d=c.length,e,f=[b];for(e=0;e<d;++e)f.push(f[e][c[e]]);for(e=d-1;0<=e&&(delete f[e][c[e]],a.isEmpty(f[e]));--e);}b=b||{};c=c||[];var g,h=function(){var c=h.ifAny.apply(this,arguments);if(c)return c;c=g.join("\t");var l=new a.Event;l.factory=h;l.name=c;d&&d.apply(l,g);h.onNewEvent.handle.apply(l,g);a.setObject(c,l,b,"\t");
|
|
154
|
+
e&&l.onEmpty().set(f);l.indexes=c;return l};h.ifAny=function(){g=Array.prototype.slice.call(arguments,0);var d=c.length,e="function"===typeof c[d-1]?c[d-1]:null;e&&--d;for(var f=g.length;f<d;++f)g[f]=c[f];g=e&&e.apply(this,g)||g;d=g.join("\t");return a.getObject(d,b,"\t")||null};h.collection=b;h.onNewEvent=new a.Event;return h};a.Optimistic={onBegin:a.Event.factory({},[]),onResolve:a.Event.factory({},[]),onReject:a.Event.factory({},[]),counter:0,id:function(){return a.uuid(a.clientId()+"_"+ ++a.Optimistic.counter)}};
|
|
155
|
+
a.beforeInit=new a.Event;a.onInit=new a.Event;a.onLoad=new a.Event;a.onUnload=new a.Event;a.onHashChange=new a.Event;a.onPopState=new a.Event;a.onOnline=new a.Event(function(){Qa=!0},"Q");a.onOffline=new a.Event(function(){Qa=!1},"Q");a.beforeActivate=new a.Event;a.onActivate=new a.Event;a.onDOM=new a.Event;a.onReady=new a.Event;a.onJQuery=new a.Event;a.onHandleOpenUrl=new a.Event;var S=[],pa=[],qa=[];a.onLayout=function(b){b=b||document.documentElement;"Q.Tool"===a.typeOf(b)&&(b=b.element);for(var c=
|
|
156
|
+
0,d=S.length;c<d;++c)if(S[c]===b)return pa[c];var e={},f=new a.Event;c=f.debounce(a.onLayout.debounce,!1,"Q.onLayout").map(function(){var a=b.getBoundingClientRect();var c=a.width==e.width&&a.height==e.height?!1:[this,arguments];e=a;return c},"Q.onLayout");d=S.push(b);pa[d-1]=c;var g=null;"function"===typeof p.ResizeObserver&&(g=new p.ResizeObserver(function(){f.handle.call(f,b,b)}),g.observe(b));qa[d-1]=g;f.onEmpty().set(a.debounce(function(){for(var c=0,d=S.length;c<d;++c)if(S[c]===b){S.splice(c,
|
|
157
|
+
1);pa.splice(c,1);a.getObject("disconnect",qa[c])&&qa[c].disconnect();qa.splice(c,1);break}},a.onLayout.debounce||0),"Q");return c};a.onLayout.debounce=100;a.onScroll=new a.Event;a.onVisibilityChange=new a.Event;a.beforeReplace=new a.Event;a.currentScript=function(b){var c=p._Q_currentScript_src||a.getObject("document.currentScript.src");if(!c){c=0;var d;try{throw Error();}catch(g){var e=g.stack.split("\n")}var f=0;for(d=e.length;f<d;++f)if(e[f].match(/http[s]?:\/\//)){c=f+1+(b||0);break}c=e[c]}if("string"!==
|
|
158
|
+
typeof c)return console.warn("parseSrc: invalid type",typeof c),null;c=c.replace(/^[^a-zA-Z0-9]+(?=(https?:\/\/|file:\/\/))/,"").replace(/(:[A-Za-z0-9_-]+){1,2}$/,"").trim();b=c.match(/^((?:https?:\/\/|file:\/\/\/?)[^?#\n]+\/)([^\/?#]+\.js(?:[?#][^\n]*)?)$/i);return b?{src:b[1]+b[2].split(/[?#]/)[0],srcWithQuerystring:b[1]+b[2],path:b[1],file:b[2].split(/[?#]/)[0]}:(console.warn("parseSrc: could not parse src",c),null)};a.currentScriptPath=function(b,c){c=(c=a.currentScript(c))&&c.src||p._Q_currentScript_src||
|
|
159
|
+
document.currentScript&&document.currentScript.src;if(!c)for(var d=document.getElementsByTagName("script"),e=d.length-1;0<=e;--e)if(d[e].src){c=d[e].src;break}return c?c.split("/").slice(0,-1).join("/")+(b?"/"+b:""):a.info&&a.info.baseUrl?a.info.baseUrl:""};var Bb=a.currentScriptPath();a.ensure=function(b,c){var d=a.getObject(b,p);if(d!==k)a.handle(c,null,[d]);else{var e=a.ensure.loaders[b];if(!e)throw new a.Error("Q.ensure: missing loader for "+b);a.onInit.addOnce(function(){"string"===typeof e?
|
|
160
|
+
".js"===e.substring(e.length-3)?a.require(e,c):".json"===e.substring(e.length-5)&&a.request(e,function(d,e){a.setObject(b,e);c&&c(e)},{extend:!1,skipNonce:!0}):"function"===typeof e?e(b,c):e instanceof a.Event&&e.addOnce(function(){c&&c(b)},b)})}};a.ensure.loaders={Handlebars:"{{Q}}/js/handlebars-v4.0.10.min.js",jQuery:"{{Q}}/js/jquery-3.2.1.min.js","Q.PHPJS":"{{Q}}/js/phpjs.js","Q.info.baseUrl":a.onInit};a.Pipe=function(b,c,d,e){if(this===a)throw new a.Error("Q.Pipe: omitted keyword new");this.callbacks=
|
|
161
|
+
[];this.params={};this.subjects={};this.ignore={};this.finished=!1;this.add.apply(this,arguments);(this.internal=e)&&e.progress&&e.progress(this)};var Da=a.Pipe.prototype;Da.on=function(a,c){return this.add([a],1,function(a,b,f){return c.apply(b[f],a[f],f)})};Da.add=function(b,c,d){for(var e=null,f=null,g=null,h,m,l,n=0;n<arguments.length;n++){var k=arguments[n];if("function"===typeof k){if(g){h=[];m=[];l=[];var q=this;a.each(e,function(b,c){c=a.getObject(g,c);"Q.Event"===a.typeOf(c)&&(l.push(c.add(q.fill(b))),
|
|
162
|
+
h.push(b),m.push(c))});k.pipeEvents=m;k.pipeKeys=l;e=h}k.pipeRequires=e;k.pipeRemaining=f;e=f=g=null;this.callbacks.push(k)}else{switch(a.typeOf(k)){case "array":e=k;e.length&&"string"!==typeof e[0]&&"number"!==typeof e[0]&&(g=arguments[++n]);break;case "object":e=k;g=arguments[++n];break;case "number":f=k}if(null!=g&&"string"!==typeof g)throw new a.Error("Pipe.prototype.add requires event name after array of objects");}}return this};Da.fill=function(b,c){c=c===k?!1:c;if(!0===c)this.ignore[this.i]=
|
|
163
|
+
!0;else if("string"===typeof c)this.ignore[c]=!0;else if(a.isArrayLike(c))for(var d=0;d<c.length;++d)this.ignore[c[d]]=!0;var e=this;return function(){e.internal&&e.internal.progress&&e.internal.progress(e,b);e.params[b]=Array.prototype.slice.call(arguments);e.subjects[b]=this;e.run(b)}};Da.run=function(b){var c,d=this.callbacks,e=a.copy(this.params),f=0,g;var h=0;a:for(;h<d.length;h++)if(!this.ignore[h]&&(this.i=h,c=d[h])){if(c.pipeRequires)for(g=0;g<c.pipeRequires.length;g++)if(!(this.ignore[c.pipeRequires[g]]||
|
|
164
|
+
c.pipeRequires[g]in e))continue a;c.pipeRemaining&&(--c.pipeRemaining||delete d[h]);var m=c.call(this,this.params,this.subjects,b,c.pipeRequires);if(c.pipeEvents)for(g=0;g<c.pipeEvents.length;g++)c.pipeEvents[g].remove(c.pipeKeys[g]);++f;delete c.pipeEvents;delete c.pipeKeys;if(!1===m)delete d[h];else if(!0===m){this.callbacks=[];this.finished=!0;break}}return f};a.pipe=function(b,c,d,e){return new a.Pipe(b,c,d,e)};a.batcher=function(b,c){var d=a.extend({},a.batcher.options,c);c=function(){var a=
|
|
165
|
+
arguments;setTimeout(function(){function c(){try{b.count&&(b.call(this,b.subjects,b.params,b.callbacks),b.subjects=b.params=b.callbacks=null,b.count=0,b.argmax=0,b.cbmax=0),b.timeout=null}catch(l){throw b.count=0,b.argmax=0,b.cbmax=0,l;}}var e,h=[],m=[];for(e=0;e<a.length;++e)"function"===typeof a[e]?h.push(a[e]):m.push(a[e]);b.count||(b.count=0);b.argmax||(b.argmax=0);b.cbmax||(b.cbmax=0);++b.count;h.length>b.cbmax&&(b.cbmax=h.length);m.length>b.argmax&&(b.argmax=m.length);b.subjects||(b.subjects=
|
|
166
|
+
[]);b.params||(b.params=[]);b.callbacks||(b.callbacks=[]);b.subjects.push(this);b.params.push(m);b.callbacks.push(h);b.timeout&&clearTimeout(b.timeout);b.count==d.max?c():b.timeout=setTimeout(c,d.ms)},0)};c.batch=b;c.cancel=function(){clearTimeout(b.timeout)};return c};a.batcher.options={max:10,ms:50};a.batcher.factory=function(b,c,d,e,f,g){b||(b={});e===k&&(e="batch");f===k&&(f="batch");d&&"/"!==d[0]&&(d="/"+d);var h,m=[c,d,e,f].join("\t");if(h=a.getObject(m,b,"\t"))return h;h=a.batcher(function(b,
|
|
167
|
+
m,h){b=a.extend({method:"post",fields:{}},g);m=g&&g.preprocess?g.preprocess(m):{args:m};b.fields[f]=JSON.stringify(m);return a.req(c+d,e,function(b,c){var d=b||c.errors;if(d)a.each(h,function(a,b){b[0].call(c,d,c)});else{var e=this;c.slots?a.each(c.slots.batch,function(a,b){b&&b.errors?h[a][0].call(this,b.errors,null,e):h[a][0].call(this,null,b&&b.slots||{},e)}):a.each(h,function(a,b){b[0].call(c,"The slots field is missing",null,e)})}},b)},g);a.setObject(m,h,b,"\t");return h};a.getter=function(b,
|
|
168
|
+
c){var d=function(){function g(b,c,e,f,g){function m(b,c){d.onResult.handle(b,c,l,f,d);a.getter.usingCached=g;e.apply(b,c);d.onExecuted.handle(b,c,l,f,d);a.getter.usingCached=!1}d.prepare?d.prepare.call(d,b,c,m,l):m(b,c)}var h,m=[],l=Array.prototype.slice.call(arguments),n,u,q=new a.Promise(function(a,b){n=a;u=b});var t=a.Cache.key(l,m);if(0===m.length){var x=function(b,e){(b=!d.nonStandardErrorConvention&&a.firstErrorMessage(b,e))?u(b):n(c&&c.resolveWithSecondArgument||this===k?e:this)};m.push(x);
|
|
169
|
+
d.callbackIndex!==k?l.splice(d.callbackIndex,0,x):l.push(x)}q.dontCache=!1;d.onCalled.handle.call(this,l,q);var p;a.getter.usingCached=!1;if(d.cache&&!f&&(p=d.cache.get(l))&&(x=p.cbpos,m[x]))return g(p.subject,p.params,m[x],q,!0),q.result=a.getter.CACHED,q;f=!1;e[t]=e[t]||[];e[t].push({callbacks:m,ret:q});if(1<e[t].length)return d.onExecuted.handle.call(this,l,q),q.result=a.getter.WAITING,q;x=[];for(p=h=0;h<l.length;h++)"function"!==typeof l[h]?x.push(l[h]):(x.push(function(b,c){return function(){!d.nonStandardErrorConvention&&
|
|
170
|
+
a.firstErrorMessage(arguments[0],arguments[1])&&(q.dontCache=!0);d.cache&&!q.dontCache&&d.cache.set(l,c,this,arguments);var b=e[t];delete e[t];if(b)for(h=0;h<b.length;h++)try{g(this,arguments,b[h].callbacks[c],b[h].ret,!0)}catch(ub){d.dontWarn||console.warn(ub)}d.throttle&&d.throttle.throttleNext&&d.throttle.throttleNext(this)}}(m[p],p)),++p);if(!d.throttle)return!1===b.apply(this,x)&&(q.dontCache=!0),q.result=a.getter.REQUESTING,d.onExecuted.handle.call(this,l,q),q;if(!d.throttle.throttleTry){var r=
|
|
171
|
+
d.throttleSize;var G=0;var H=[];var y=[];d.throttle.throttleTry=function(a,b,c,d){++G;if(null===r||G<=r)return!1===b.apply(a,c)&&(d.dontCache=!0),!0;H.push(b);y.push(c);return!1};d.throttle.throttleNext=function(a){0>--G&&console.warn("Q.getter: throttle count is negative. This probably means you passed a callback somewhere it shouldn't have been passed.");H.length&&H.shift().apply(a,y.shift())}}d.throttleSize||(d.throttle.throttleSize=function(a){if(a===k)return r;r=a});q.result=d.throttle.throttleTry(this,
|
|
172
|
+
b,x,q)?a.getter.REQUESTING:a.getter.THROTTLING;d.onExecuted.handle.call(this,l,q);return q};a.extend(d,b,a.getter.options,c);d.original=b;d.onCalled=new a.Event;d.onExecuted=new a.Event;d.onResult=new a.Event;d.all=function(b,c,e){for(var f=[],g=[],m=0,h=b.length;m<h;++m){var k=b[m];f.push(e?m:a.Cache.key(k));k instanceof Array||(k=[k]);g.push(k)}e=a.pipe(f,1,function(d,e){a.handle(c,this,[d,e,b])});m=0;for(h=f.length;m<h;++m)g[m].push(e.fill(f[m])),d.apply(this,g[m]);e.run()};var e=d.waiting={};
|
|
173
|
+
!1===d.cache?d.cache=null:!0===d.cache||d.cache===k?d.cache=a.Cache.document("Q_getter_"+ ++kb):!d.cache||d.cache.get&&d.cache.set&&d.cache.clear||(d.cache=a.Cache.document("Q_getter_"+ ++kb,c&&c.cache));d.throttle=d.throttle||null;!0===d.throttle&&(d.throttle="");"string"===typeof d.throttle&&(a.getter.throttles[d.throttle]||(a.getter.throttles[d.throttle]={}),d.throttle=a.getter.throttles[d.throttle]);d.forget=function(){return d.cache?d.cache.remove(Array.prototype.slice.call(arguments)):!1};d.forget.each=
|
|
174
|
+
function(){if(!d.cache)return!1;var a=Array.prototype.slice.call(arguments);d.cache.each(a,d.cache.remove);return!0};var f=!1;d.force=function(){f=!0;return d.apply(this,arguments)};b.batch&&(d.batch=b.batch);return d};var kb=0;a.getter.options={cache:!0,throttle:null,throttleSize:100};a.getter.throttles={};a.getter.cache={};a.getter.waiting={};a.getter.CACHED=0;a.getter.REQUESTING=1;a.getter.WAITING=2;a.getter.THROTTLING=3;a.Exception=function(a,c){if(c)for(var b in c)this[b]=c[b];this.message=a||
|
|
175
|
+
""};a.Exception.prototype=Error.prototype;a.Method=function(b,c){a.extend(this,b);this.__options=c||{}};a.Method.stub=new a.Method;a.Method.load=function(b,c,d,e){var f=b[c];return new Promise(function(g,h){a.require(d,function(d){function m(){var d=b[c];if(d===f)return h("Q.Method.define: Must override method '"+c+"'");for(var m in f)m in d||(d[m]=f[m]);f.__loaded=d;g(d);a.Method.onLoad.handle(b,c,b[c],e)}if(d){b.__loaded?b=b.__loaded:b.__shim&&b.__shim.__loaded&&(b=b.__shim.__loaded);var n=e?e():
|
|
176
|
+
[];d.Q_Method_load_executed?m():Promise.resolve(d.apply(b,n)).then(function(a){"function"===typeof a&&(b[c]=a);d.Q_Method_load_executed=!0;m()}).catch(h)}else m()},!0)})};a.Method.onLoad=new a.Event;a.Method.define=function(b,c,d,e){function f(){var b=d?d():[];if(!e||!e.require)return Promise.resolve(b);if(Array.isArray(h))return Promise.resolve(b.concat(h));if(h&&"function"===typeof h.then)return h.then(function(a){return b.concat(a)});var f=a.url(c+"/"+e.require+".js");h=new Promise(function(b){a.require(f,
|
|
177
|
+
function(a){Promise.resolve("function"===typeof a?a():a).then(function(a){h=a=a!==k&&null!==a?[a]:[];b(a)})},!0)});return h.then(function(a){return b.concat(a)})}function g(d,e,g){return function q(){if(q.__loaded)return q.__loaded.apply(this,arguments);var m=a.url(d.__options&&d.__options.customPath?d.__options.customPath:c+"/"+e+".js"),h=this,l=arguments;return f().then(function(c){return a.Method.load(b,e,m,function(){return c})}).then(function(a){return(g?a[g]:a).apply(h,l)})}}c||(c=a.currentScriptPath()+
|
|
178
|
+
"/"+a.Method.define.options.siblingFolder);var h=null;a.each(b,function(c){if(b.hasOwnProperty(c)&&b[c]instanceof a.Method){var d=b[c];b[c]=d.__shim=g(d,c,null);a.extend(b[c],d);d.__options.isGetter&&(b[c].force=g(d,c,"force"),b[c].forget=g(d,c,"forget"));d.__options.cache&&(b[c].cache=d.__options.cache)}});return b};a.Tool=function(b,c){if(this.activating||this.activated)return this;this.activated=!0;this.element=b;this.elements={};this.typename="Q.Tool";!0===c&&(c={});p.jQuery&&p.jQuery(b).data("Q_tool",
|
|
179
|
+
this);if(!this.element.id){var d=a.Tool.beingActivated?a.Tool.beingActivated.prefix:"";if(!d){var e=this.element.parentElement;do if(e.hasClass&&e.hasClass("Q_tool")){d=a.getObject("Q.tool.prefix",e)||a.Tool.calculatePrefix(e.id);break}while(e=e.parentElement)}e=a.Tool.names[this.name]||this.name.toCapitalized();this.element.id=d+e.split("/").join("_")+"-"+a.Tool.nextDefaultId++ +"_tool";a.Tool.nextDefaultId%=1E6}this.prefix=a.Tool.calculatePrefix(this.element.id);this.id=this.prefix.substring(0,
|
|
180
|
+
this.prefix.length-1);d=null;(d=a.Tool.byId(this.id,this.name))&&console.warn("A "+a.Tool.names[this.name]+" tool with id "+this.id+" is already active",d);e=this.element.className&&this.element.className.split(/\s+/)||[];d=a.calculateKey(this);var f=b.getAttribute("data-"+a.normalize(this.name,"-"));if(f){var g=null;"{"===f[0]?g=JSON.parse(f):(g=f.indexOf(" "),this.id=f.substring(0,g),g=(f=f.substring(g+1))&&JSON.parse(f));g&&a.extend(this.options,a.Tool.options.levels,g,d)}var h;c=c||{};this.options=
|
|
181
|
+
this.options||{};f=a.normalize.memoized(this.name);var m=this.parentIds();c=(g=m.length)?a.extend({},a.Tool.options.levels,c):c;for(--g;0<=g;--g)if(h=a.Tool.active[m[g]])for(n in h)for(k in h[n].state)if("."===k[0]||"#"===k[0])c[k]=a.extend(c[k],a.Tool.options.levels,h[n].state[k]);g=0;for(m=e.length;g<m;g++){h=e[g];var l=a.normalize.memoized(h.substring(0,h.length-5));var n=c["."+h];!n||"_tool"===h.substring(h.length-5)&&l!==this.name||a.extend(this.options,a.Tool.options.levels,n,d)}if(n=c["#"+
|
|
182
|
+
this.element.id])for(k in a.extend(this.options,a.Tool.options.levels,n,d),c)k.startsWith("#"+this.prefix)&&(this.options[k]=c[k]);var k=this.element.id.split("_");for(g=0;g<k.length-1;++g)(n=c["#"+k.slice(g).join("_")])&&a.extend(this.options,a.Tool.options.levels,n,d);(k=b.options)&&k[f]&&a.extend(this.options,a.Tool.options.levels,k[f],d);b.Q===Element.prototype.Q&&(b.Q=function(b){return b?this.Q.tools[a.normalize.memoized(b)]||null:this.Q.tool||null});b.Q.tools||(b.Q.tools={});b.Q.toolNames||
|
|
183
|
+
(b.Q.toolNames=[]);b.Q.toolNames.push(f);b.Q.tools[f]=this;b.Q.tool||(b.Q.tool=this);a.setObject([this.id,this.name],this,a.Tool.active);this.Q=a.extend({onConstruct:new a.Event,onInit:new a.Event,beforeRemove:new a.Event,onRetain:new a.Event,onStateChanged:new a.Event.factory({},[""])},this.Q);return this};a.Tool.options={levels:10};a.Tool.active={};a.Tool.names={};var V={},W={},X={},aa={},wa=[],ea=[],Ja={},ua={};a.Tool.onConstruct=a.Event.factory(V,["",J]);a.Tool.onActivate=a.Event.factory(W,["",
|
|
184
|
+
J],null,!0);a.Tool.onInit=a.Event.factory(X,["",J],null,!0);a.Tool.beforeRemove=a.Event.factory(aa,["",J],null,!0);a.Tool.remove=function(b,c,d,e){if("string"===typeof b){b=a.Tool.byId(b);if(!b)return!1;b=b.element}"string"===typeof e&&(e=a.normalize.memoized(e));a.find(b,!0,null,function(b){var f=b.Q.toolNames;if(f)for(var h=f.length-1;0<=h;--h){if("string"===typeof e){if(f[h]!==e)continue}else if("function"===typeof e&&!e(f[h]))continue;"function"===a.typeOf(a.getObject(["Q","tools",f[h],"remove"],
|
|
185
|
+
b))&&b.Q.tools[f[h]].remove(c,d)}})};a.Tool.clear=function(b,c,d,e){if(b){if("string"===typeof b){b=a.Tool.byId(b);if(!b)return!1;b=b.element}a.Tool.remove(b.children||b.childNodes,c,d,e)}};a.Tool.define=function(b,c,d,e,f,g,h){var m={};if("object"===typeof b)m=b;else{if("function"!==typeof c&&"function"===typeof d){var l=c;c=d;d=e;e=f;f=g;g=h;"string"===typeof l&&(l=[l]);c.require=l}m[b]=c}a.each(m,function(b,c){var h=a.normalize.memoized(b);if(g||"function"!==typeof M[h])if(null==c&&(c=function(){}),
|
|
186
|
+
a.Tool.names[h]=b,"string"===typeof c||a.isPlainObject(c))"function"!==typeof M[h]&&(ra[h]=ra[h]||{},M[h]=c,c.placeholder&&(ab[h]=c.placeholder));else{c.toolName=h;a.isArrayLike(e)||(f=e,e=k);c.options=a.extend(d,a.Tool.options.levels,ra[h]);c.stateKeys=e;if("function"!==typeof c)throw new a.Error("Q.Tool.define requires ctor to be a string or a function");for(var m in c.options){var l=c.options[m];"Q.Event"===a.typeOf(l)&&(l.type=m)}var n=M[h]||{};"string"===typeof n&&(n="js"===n.split(".").pop()?
|
|
187
|
+
{js:n}:{html:n});M[h]=c;a.Text.addedFor("Q.Tool.define",h,n);"function"===typeof c&&(a.Tool.define.components&&"function"===typeof c&&a.Tool.define.component(b,c),a.extend(c.prototype,10,f),a.onInit.addOnce(function(){var d=[],e=new a.Pipe;n.text&&(d.push("text"),a.Text.get(n.text,e.fill("text")));if(n.css){var f=b.split("/")[0];d.push("css");a.addStylesheet(n.css,null,e.fill("css"),{slotName:f})}e.add(d,1,function(b){b&&b.text&&b.text[1]&&(c.text=b.text[1]);a.Tool.onLoadedConstructor(c.toolName).handle(c.toolName,
|
|
188
|
+
c);a.Tool.onLoadedConstructor("").handle(c.toolName,c)}).run()}))}});return c};a.Tool.define.pattern=function(b,c,d){"string"===typeof b&&(b=new RegExp(b));if(c&&d){var e={},f;for(f in d)if(f.match(b)){var g={},h;for(h in c)g[h]=f.replace(b,c[h]);e[f]=a.Tool.define(f,a.extend(g,d[f]))}else console.warn("Q.Tool.define.pattern: doesn't match tool name "+f);return e}};a.Tool.beingActivated=k;a.Tool.defined=function(b){return b?a.Tool.constructors[a.normalize.memoized(b)]:k};a.Tool.define.options=function(b,
|
|
189
|
+
c){b=a.normalize.memoized(b);b="function"===typeof M[b]?M[b].options:ra[b]=ra[b]||{};c&&a.extend(b,a.Tool.options.levels,c);return b};var ra={};a.Tool.jQuery=function(b,c,d,e,f,g){function h(){function g(b){var d=m+" state";if("string"===typeof b){var f=b;if(!g.methods[f])return this;var h=Array.prototype.slice.call(arguments,1);w(this).each(function(){var a=w(this);if(a.data(d))return g.methods[f].apply(a,h)})}else h=Array.prototype.slice.call(arguments,0),h[0]=a.extend({},10,g.options,10,b),w(this).each(function(){var b=
|
|
190
|
+
w(this);b.data(d)&&b.plugin(m,"remove");b.data(d,a.copy(h[0],e));c.apply(b,h)});return this}g.options=a.extend(d,a.Tool.options.levels,sa[m]);g.methods=f||{};w.fn[m]=g;var h=a.Tool.define(b,function(a){var b=w(this.element);b.plugin(m,a,this);this.state=b.state(m);this.Q.beforeRemove.set(function(){w(this.element).plugin(m,"remove",this)},"Q")});a.each(f,function(a){h.prototype["$"+a]=function(){var b=Array.prototype.slice.call(arguments,0);b.unshift(m,a);var c=w(this.element);c.plugin.apply(c,b)}})}
|
|
191
|
+
if("object"===typeof b)for(m in b)a.Tool.jQuery(m,b[m]);else{var m=a.normalize.memoized(b);a.Tool.names[m]=b;if("string"===typeof c||"object"===typeof c){if(p.jQuery&&"function"!==typeof p.jQuery.fn.plugin[m]){sa[m]=sa[m]||{};if(g||"function"!==typeof M[m])M[m]=c;p.jQuery.fn.plugin[m]=M[m]}return c}c.toolName=m;"object"===typeof e&&(f=e,e=k);(w=w||p.jQuery)&&h()}};a.Tool.jQuery.loadAtStart=[];a.Tool.jQuery.info=function(a){return p.jQuery.hasData(a)&&p.jQuery._data(a)};a.Tool.jQuery.options=function(b,
|
|
192
|
+
c){b=a.normalize.memoized(b);b=p.jQuery.fn&&"function"===typeof p.jQuery.fn[b]?p.jQuery.fn[b].options:sa[b]=sa[b]||{};c&&a.extend(b,a.Tool.options.levels,c);return b};var sa={};a.Tool.nextDefaultId=1;var M=a.Tool.constructors={},ab=a.Tool.placeholders={},I=a.Tool.prototype;I.renderTemplate=a.promisify(function(b,c,d,e){var f=this;"function"===typeof c&&(e=d,d=c,c={});return a.Template.render(b,c||{},function(c,h){if(c)return d&&d(c);a.replace(f.element,h);c=a.normalize.memoized(b);c=a.Template.info[c];
|
|
193
|
+
f.elements||(f.elements={});for(var g in c.elements||{})f.elements[g]=f.element.querySelector(c.elements[g]);e&&e.beforeActivate&&d&&d.call(f,null,h,f.elements,e);a.activate(f.element.children,e,function(a,b,c){d&&d.call(this,null,h,f.elements,b,c)})},a.extend({tool:f},e))},!1,2);I.stateChanged=function(a){if("string"===typeof a){a=a.split(",");for(var b=0,d=a.length;b<d;++b)a[b]=a[b].trim()}d=a.length;for(b=0;b<d;++b){var e=a[b];this.Q.onStateChanged(e).handle.call(this,e,this.state[e])}this.Q.onStateChanged("").handle.call(this,
|
|
194
|
+
a)};I.setState=function(b){a.extend(this.state,b);this.stateChanged(Object.keys(b))};I.rendering=function(b,c,d,e){function f(a){this.state[a]!==k[a]&&(u[a]=this.state[a],q=q||(e?setTimeout(g,0):requestAnimationFrame(g)))}function g(d){a.handle(c,h,[u,k,d]);k=a.copy(h.state,b);u={};q=null}var h=this,m;if("string"===typeof b){b=b.split(",");var l=0;for(m=b.length;l<m;++l)b[l]=b[l].trim()}if(!b.length)return!1;l=0;for(m=b.length;l<m;++l)this.Q.onStateChanged(b[l]).set(f,d);var k=a.Tool.beingActivated===
|
|
195
|
+
this?{}:a.copy(this.state,b),u={},q};I.children=function(b,c){var d={},e=this.prefix,f,g,h;b=b&&a.normalize.memoized(b);for(f in a.Tool.active)for(g in a.Tool.active[f])if((!b||b==g)&&f.startsWith(e)){var m=a.Tool.active[f][g];if(c){var l=m.parentIds();var k=Math.min(c,l.length);for(h=0;h<k;++h)l[h]===this.id&&(b?d[f]=m:a.setObject([f,g],m,d))}else b?d[f]=m:a.setObject([f,g],m,d)}return d};I.child=function(b,c){c=c&&a.normalize.memoized(c);var d=this.prefix+(b||""),e,f,g=d.length;if(b&&a.Tool.active[d])return c&&
|
|
196
|
+
a.Tool.active[d][c]?a.Tool.active[d]:a.first(a.Tool.active[d]);for(e in a.Tool.active)for(f in a.Tool.active[e]){if(c&&c!=f)break;if(e.length>=g+(b?0:1)&&e.substring(0,g)==d)return a.Tool.active[e][f]}return k};I.parentIds=function(){var b=this.prefix,c=[],d,e=b.length;for(d in a.Tool.active)d.length<e-1&&d===b.substring(0,d.length)&&"_"===b[d.length]&&c.push(d);c.sort(function(a,b){return String(b).length-String(a).length});return c};I.parents=function(){var b;var c=this.parentIds();var d={},e=c.length;
|
|
197
|
+
for(b=0;b<e;++b){var f=c[b];d[f]={};for(var g in a.Tool.active[f])d[f][g]=a.Tool.active[f][g]}return d};I.parent=function(){var b=this.parentIds();return b.length?a.first(a.Tool.active[b[0]]):null};I.ancestor=function(b){b=a.normalize.memoized(b);var c=this.parents(),d;for(d in c)for(var e in c[d])if(e===b)return c[d][e];return k};I.sibling=function(a){return this.element&&this.element.Q&&this.element.Q(a)||null};I.siblings=function(){var b=this.element&&this.element.Q&&this.element.Q.tools;b=b?a.copy(b):
|
|
198
|
+
{};delete b[this.name];return b};I.remove=function(b,c){if(!b&&null!==this.element.getAttribute("data-Q-retain")||!a.Tool.active[this.id])return!1;b=a.normalize.memoized(this.name);aa["id:"+this.id]&&aa["id:"+this.id].handle.call(this);aa[b]&&aa[b].handle.call(this);aa[""]&&aa[""].handle.call(this);a.handle(this.Q.beforeRemove,this,[]);var d;b=this.children("",1);for(e in b)for(d in b[e])b[e][d].remove();var e=a.normalize.memoized(this.name);delete this.element.Q.tools[e];delete a.Tool.active[this.id][e];
|
|
199
|
+
a.isEmpty(a.Tool.active[this.id])?(c&&a.removeElement(this.element),this.element.Q.tool=null,delete a.Tool.active[this.id]):this.element.Q.tool&&a.normalize.memoized(this.element.Q.tool.name)===e&&(this.element.Q.tool=a.Tool.byId(this.id));c=a.calculateKey(this);for(e=a.Event.forTool[c];e&&e.length;)e[0].remove(this);delete a.Event.forTool[c];if(d=a.Event.jQueryForTool[c]){for(e=d.length-1;0<=e;--e)p.jQuery.fn[d[e][0]].call(d[e][1],d[e][2],d[e][3]);delete a.Event.jQueryForTool[c]}return this.removed=
|
|
200
|
+
!0};I.$=function(b){return w?b===k?w(this.element):w(b,this.element):a.$(b,this.element,!0)};I.forEachChild=function(b,c,d,e){"string"!==typeof b&&(e=c=b,b="");"number"!==typeof c&&(d=c,c=null);"boolean"!==typeof d&&(e=d,d=!1);b=b&&a.normalize.memoized(b);var f,g,h=this;c=h.children(b,c);for(f in c)if(b)a.handle(e,c[f]);else for(g in c[f])a.handle(e,c[f][g]);var m=a.Tool.onActivate(b);if(d)for(g in b=h.siblings(),b)a.handle(e,b[g]);var l=m.set(function(){this.prefix.startsWith(h.prefix)&&(d||this.prefix.length>
|
|
201
|
+
h.prefix.length)&&a.handle(e,this,arguments)});h.Q.beforeRemove.set(function(){m.remove(l)})};a.Tool.encodeOptions=function(a){return JSON.stringify(a).encodeHTML().replaceAllPlaceholders({""":'"'})};I.updateElementOptions=function(a){var b="data-"+this.name.replace(/_/g,"-");this.element.setAttribute(b,JSON.stringify(a))};a.Tool.prepare=a.Tool.setUpElement=function(b,c,d,e,f,g){"string"===typeof d&&(f=e,e=d,d=k);"string"===typeof b&&(b=document.createElement(b));"string"===typeof c&&(c=[c]);
|
|
202
|
+
a.isPlainObject(d)&&(d=[d]);for(var h=0,m=c.length;h<m;++h){var l=c[h],n=a.normalize.memoized(l);l=l.split("/").join("_");var u=a.Tool.beingActivated;u=f||(u?u.prefix:"");b.addClass("Q_tool "+l+"_tool");d&&d[h]&&(b.options=b.options||{},b.options[n]=d[h]);if(!b.getAttribute("id")){"function"===typeof e&&(e=e());if(e==k){do e=u+l+"-"+a.Tool.nextDefaultId++ +"_",a.Tool.nextDefaultId%=1E6;while(a.Tool.active[e]);e+="tool"}else u&&(e=u+e);b.setAttribute("id",e)}da(b,n)}g&&b.setAttribute("data-Q-lazyload",
|
|
203
|
+
"waiting");return b};a.Tool.prepareHTML=a.Tool.setUpElementHTML=function(b,c,d,e,f,g){b=a.Tool.prepare(b,c,null,e,f);c=c.replace(/\//g,"_");d&&b.setAttribute("data-"+c.replace(/_/g,"-"),JSON.stringify(d));if(g)for(var h in g)"class"===h?b.addClass(g[h]):b.setAttribute(h,g[h]);return b.outerHTML};I.prepare=I.setUpElement=function(b,c,d,e){return a.Tool.prepare(b,c,d,e,this.prefix)};I.prepareHTML=I.setUpElementHTML=function(b,c,d,e,f){return a.Tool.prepareHTML(b,c,d,e,this.prefix,f)};a.Tool.from=function(b,
|
|
204
|
+
c,d){a.isArrayLike(b)&&(b=b[0]);"string"===typeof b&&(b=document.getElementById(b));d&&(d=c.split("/").join("_")+"_tool",b=b&&b.closest("."+d));return b&&b.Q?b.Q(c):null};a.Tool.byId=function(b,c){if(c)return c=a.normalize.memoized(c),a.Tool.active[b]?a.Tool.active[b][c]:null;b=a.Tool.active[b]?a.first(a.Tool.active[b]):null;if(!b)return k;b=b.element.Q;return b.tools[b.toolNames[0]]};a.Tool.byName=function(b){var c={},d="string"===typeof b;if(d)b=a.normalize.memoized(b);else for(var e=0,f=b.length;e<
|
|
205
|
+
f;++e)b[e]=a.normalize.memoized(b[e]);for(var g in a.Tool.active){e=a.Tool.active[g];for(var h in e)if(d&&b===h||!d&&0<=b.indexOf(h))c[g]=e[h]}return c};a.Tool.calculatePrefix=function(a){return a.match(/_tool$/)?a.substring(0,a.length-4):"_"===a.substring(a.length-1)?a:a+"_"};a.Tool.calculateId=function(a){return a.match(/_tool$/)?a.substring(0,a.length-5):"_"===a.substring(a.length-1)?a.substring(0,a.length-1):a};I.toString=function(){return this.id};a.Tool.onLoadedConstructor=a.Event.factory({},
|
|
206
|
+
["",function(b){return[a.normalize.memoized(b)]}]);a.Tool.onMissingConstructor=new a.Event;a.Links={tel:function(a,c){return"tel:"+a+(c?"p"+c:"")},sms:function(b,c){var d="ios"===a.info.browser.OS;if(c&&a.isArrayLike(c)){var e=[];a.each(c,function(a){e.push(encodeURIComponent(c[a]))});c=(d?"/open?addresses=":"")+e.join(",")}return"sms:"+(c||(d?"%20":""))+(d?"&":"?")+"body="+encodeURIComponent(b)},email:function(b,c,d,e,f){d=d&&a.isArrayLike(d)?d.join(","):d;e=e&&a.isArrayLike(e)?e.join(","):e;f=f&&
|
|
207
|
+
a.isArrayLike(f)?f.join(","):f;var g=["cc","bcc","subject","body"];b=[e,f,b,c];d="mailto:"+(d||"");c="?";e=0;for(f=g.length;e<f;++e)b[e]&&(d+=c+g[e]+"="+(2<=e?encodeURIComponent(b[e]):b[e]),c="&");return d},whatsApp:function(a,c){var b=[];null!=a&&b.push("phone="+a);null!=c&&b.push("text="+encodeURIComponent(c));return"whatsapp://send/?"+b.join("&")},telegram:function(b,c,d){var e=[];d=d||{};if(!b)return b="msg",d.url&&(e.unshift("url="+(d.url||"")),b="msg_url"),c&&e.push("text="+encodeURIComponent(c)),
|
|
208
|
+
"tg://"+b+"?"+e.join("&");var f="@"===b[0]?"domain="+b.substring(1):"phone="+b;if(d.action)return"tg://resolve?"+f+"&"+d.action+(d.actionValue?"="+d.actionValue:"");var g=!1,h={start:1,startgroup:1,startchannel:1,admin:1,startapp:1,appname:1,startattach:1,game:1},m;for(m in h)d[m]&&(g=!0,e.push(m+"="+encodeURIComponent(d[m])));d.choose&&(g=!0,a.isArrayLike(d.choose)&&(d.choose=d.choose.join("+")),e.push("choose="+d.choose));if(g)return"tg://resolve?"+f+"&"+e.join("&");e.push("to="+b);c&&e.push("text="+
|
|
209
|
+
encodeURIComponent(c));return"tg://msg?"+e.join("&")},twitter:function(b,c,d){d=d||{};if(d.recipientId)return d="https://twitter.com/messages/compose?recipient_id="+d.recipientId,b&&(d+="&text="+encodeURIComponent(b)),d;var e=[];b&&e.push("text="+encodeURIComponent(b));c&&e.push("url="+encodeURIComponent(c));d.hashtags&&(b=d.hashtags,a.isArrayLike(b)&&(b=b.join(",")),e.push("hashtags="+encodeURIComponent(b)));d.via&&e.push("via="+encodeURIComponent(d.via));return"https://twitter.com/intent/tweet?"+
|
|
210
|
+
e.join("&")},linkedin:function(a){return"linkedin://profile/"+a},wechat:function(a){return"weixin://dl/chat?"+a},skype:function(a,c){var b=[];a&&b.push("text="+encodeURIComponent(a));c&&b.push("url="+encodeURIComponent(c));return"https://web.skype.com/share?"+b.join("&")},androidChrome:function(a){return"googlechrome://navigate?url="+a},metamask:function(a){return"https://metamask.app.link/dapp/"+(a||"").replace(/^https?:\/\//,"")},trustWallet:function(a){return"trust://open_url?url="+encodeURIComponent(a)},
|
|
211
|
+
coinbaseWallet:function(a){return"https://go.cb-w.com/dapp?cb_url="+encodeURIComponent(a)},rainbow:function(a){return"rainbow://open?url="+encodeURIComponent(a)},ethereumPay:function(a,c){c=c||{};a="ethereum:"+a;var b=[];null!=c.value&&b.push("value="+c.value);null!=c.gas&&b.push("gas="+c.gas);null!=c.gasLimit&&b.push("gasLimit="+c.gasLimit);null!=c.chainId&&b.push("chainId="+c.chainId);b.length&&(a+="?"+b.join("&"));return a}};a.Links.whatsapp=a.Links.whatsApp;a.Session={paths:[],clear:function(){a.each(a.Session.paths,
|
|
212
|
+
function(b,c){a.getObject(c)&&a.setObject(c,null)});return!0}};a.Method.define.options={siblingFolder:"methods"};a.Request=function(a,c,d,e){this.url=a;this.slotNames=c;this.callback=d;this.options=e};a.Response=function(a){};a.Response.processScriptDataAndLines=function(b){b.scriptData&&a.each(b.scriptData,function(){a.each(this,function(b,c){a.setObject(b,c)})});b.sessionDataPaths&&(a.Session.paths=b.sessionDataPaths);if(b.scriptLines)for(var c in b.scriptLines)b.scriptLines[c]&&function(){eval("var Q = window.Q;");
|
|
213
|
+
eval(b.scriptLines[c])}();if(a.info&&a.info.uri){var d=a.info.uri.module+"/"+a.info.uri.action,e=a.info.uriString;e!==d&&0!==(e||"").indexOf(d+"/")&&(a.info.uriString=d)}};a.Response.processStylesheets=function(b,c){if(!b.stylesheets)return c();var d={},e=Object.keys(b.stylesheets);b.stylesheets[""]&&(e.splice(e.indexOf(""),1),e.unshift(""));var f=[],g=a.pipe();a.each(e,function(c,e){c=[];for(var h in b.stylesheets[e]){var m=b.stylesheets[e][h],k=e+"\t"+m.href+"\t"+m.media;(m=a.addStylesheet(m.href,
|
|
214
|
+
m.media,g.fill(k),{slotName:e,returnAll:!1,onError:g.fill(k)}))&&c.push(m);f.push(k)}d[e]=c});g.add(f,function(){c()}).run();return d};a.Response.processStyles=function(b){if(!b.stylesInline)return null;var c={},d=document.head||document.getElementsByTagName("head")[0],e=Object.keys(b.stylesInline);b.stylesInline[""]&&(e.splice(e.indexOf(""),1),e.unshift(""));a.each(e,function(a,e){if(a=b.stylesInline[e]){var f=document.createElement("style");f.setAttribute("type","text/css");f.setAttribute("data-slot",
|
|
215
|
+
e);f.styleSheet?f.styleSheet.cssText=a:f.appendChild(document.createTextNode(a));d.appendChild(f);c[e]=[f]}});return c};a.Response.processHtmlCssClasses=function(b){a.each(b.htmlCssClasses,function(a,b){document.documentElement.addClass(b)})};a.Response.processMetas=function(b){if(!b.metas)return null;var c=document.getElementsByTagName("head")[0],d;for(d in b.metas)a.each(b.metas[d],function(b){var d=this;if(d.name&&d.value){b=document.querySelectorAll("meta["+d.name+"='"+d.value+"']");var e=!1;
|
|
216
|
+
a.each(b,function(a){if(this.getAttribute(d.name)===d.value)return this.setAttribute(d.name,d.value),this.setAttribute("content",d.content),e=!0,!1});e||(b=document.createElement("meta"),b.setAttribute(d.name,d.value),b.setAttribute("content",d.content),c.appendChild(b))}})};a.Response.processTemplates=function(b){if(!b.templates)return null;var c,d={};for(c in b.templates)d[c]=[],a.each(b.templates[c],function(b){b=a.take(this,["type","text","partials","helpers"]);d[c].push(a.Template.set(this.name,
|
|
217
|
+
this.content,b))});return d};a.Response.processScripts=function(b,c,d){if(!b.scripts)return c(),null;var e=a.pipe(Object.keys(b.scripts),function(){c()}),f={},g=Object.keys(b.scripts);b.scripts[""]&&(g.splice(g.indexOf(""),1),g.unshift(""));a.each(g,function(c,g){(c=a.addScript(b.scripts[g],e.fill(g),{ignoreLoadingErrors:d.ignoreLoadingErrors,returnAll:!1,onError:e.fill(g)}))&&(f[g]=c)});return f};a.Cache=function(b){if(this===a)throw new a.Error("Q.Pipe: omitted keyword new");b=b||{};this.typename=
|
|
218
|
+
"Q.Cache";this.localStorage=!!b.localStorage;this.sessionStorage=!!b.sessionStorage;this.name=b.name;this.data={};this.special={};this.beforeEvict=new a.Event;b.beforeEvict&&a.extend(this.beforeEvict,b.beforeEvict);var c;if(b.localStorage)this.localStorage=!0;else if(b.sessionStorage)this.sessionStorage=!0;else{this.documentStorage=!0;var d=c=null;var e=0}this.max=b.max||100;this.earliest=function(a){if(a===k){if(this.documentStorage)return d;a=B(this,"earliest",!0);return a===k?null:a}this.documentStorage?
|
|
219
|
+
d=a:P(this,"earliest",a,!0)};this.latest=function(a){if(a===k){if(this.documentStorage)return c;a=B(this,"latest",!0);return a===k?null:a}this.documentStorage?c=a:P(this,"latest",a,!0)};this.count=function(a){if(a===k)return this.documentStorage?e:B(this,"count",!0)||0;this.documentStorage?e=a:P(this,"count",a,!0)};if(b.after){var f=b.after;if(!(f instanceof a.Cache))throw new a.Exception("Q.Cache after option must be a Q.Cache instance");if(f.max<this.max)throw new a.Exception("Q.Cache after.max cannot be less than this.max");
|
|
220
|
+
var g=this.set,h=this.get,m=this.remove,l=this.clear;this.set=function(){f.set.apply(this,arguments);return g.apply(this,arguments)};this.get=function(){f.get.apply(this,arguments);return h.apply(this,arguments)};this.remove=function(){f.remove.call(this,arguments);return m.apply(this,arguments)};this.clear=function(){this.each([],function(){f.remove.apply(this,arguments)});return l.apply(this,arguments)}}};a.Cache.key=function(b,c){var d,e=[];if(!a.isArrayLike(b))return b;for(d=0;d<b.length;++d)"function"===
|
|
221
|
+
typeof b[d]?c&&c.push&&c.push(b[d]):("object"!==typeof b[d]||a.isPlainObject(b[d])||b[d]instanceof Array)&&e.push(b[d]);return JSON.stringify(e)};var ba=a.Cache.prototype;ba.set=function(b,c,d,e,f){var g="string"!==typeof b?b:null;g&&(b=a.Cache.key(g));if(!f||!f.dontTouch){var h=this.get(b);if(!h){var m=this.count()+1;this.count(m)}}c={cbpos:c,subject:d,params:e instanceof Array?e:Array.prototype.slice.call(e||[]),prev:f&&f.prev?f.prev:h?h.prev:this.latest(),next:f&&f.next?f.next:h?h.next:null};P(this,
|
|
222
|
+
b,c);if(!h||!f||!f.dontTouch){if(f=B(this,c.prev))f.next=b,P(this,c.prev,f);this.latest(b);1===m&&this.earliest(b)}m>this.max&&this.removeEarliest();if(g)for(m=1,f=g.length;m<=f;++m){P(this,"index"+m+"parameters",!0,!0);if(m===f)break;c="index:"+a.Cache.key(g.slice(0,m));d=B(this,c,!0)||{};d[b]=1;P(this,c,d,!0)}return!!h};ba.get=function(b,c){"string"!==typeof b&&(b=a.Cache.key(b));var d=B(this,b);if(!d)return k;if(!(c&&c.dontTouch||this.latest()===b)){this.earliest()==b&&this.earliest(d.next);Xa(this,
|
|
223
|
+
d);d.prev=this.latest();d.next=null;P(this,b,d);if(c=B(this,d.prev))c.next=b,P(this,d.prev,c);this.latest(b)}return d};ba.remove=function(b){var c="string"!==typeof b?b:null;c&&(b=a.Cache.key(b));var d=this.get(b,{dontTouch:!0});if(!d)return!1;var e=this.count()-1;this.count(e);this.latest()===b&&this.latest(d.prev);this.earliest()===b&&this.earliest(d.next);Xa(this,d);Wa(this,b);Ya(this,c,b);return!0};ba.removeEarliest=function(){for(var b,c=this.earliest();b=B(this,c);){if(!1!==a.handle(this.beforeEvict,
|
|
224
|
+
this,[b]))return this.remove(c),b;c=b.next}};ba.clear=function(){if(this.documentStorage)this.special={},this.data={};else for(var a=this.earliest(),c,d;a;){d=B(this,a);if(d===k)break;c=a;a=d.next;Wa(this,c);try{Ya(this,JSON.parse(a),a)}catch(e){}}this.earliest(null);this.latest(null);this.count(0)};ba.each=function(b,c,d){if(c){d=d||{};var e="index"+b.length+"parameters";if(B(this,e,!0)){b=a.Cache.key(b);d=B(this,"index:"+b,!0)||{};for(var f in d)e=B(this,f),e!==k&&c.call(this,f,e);b in d||(f=B(this,
|
|
225
|
+
b),f!==k&&c.call(this,b,f))}else{if(d.throwIfNoIndex)throw new a.Exception("Cache.prototype.each: no index for "+this.name+" "+e);var g=null;"function"===typeof b?(c=b,b=k):(f=a.Cache.key(b),g=f.substring(0,f.length-1));var h=this;if(this.documentStorage)return a.each(this.data,function(a,b){if((!g||a.startsWith(g))&&!1===c.call(h,a,b))return!1});d={};e={};for(b=h.earliest();b;){f=B(this,b);if(f===k)break;if(!g||b.startsWith(g))d[b]=f;if(e[b])throw new a.Error("Q.Cache.prototype.each: "+this.name+
|
|
226
|
+
" has an infinite loop");e[b]=!0;b=f.next}for(b in d)if(!1===c.call(this,b,d[b]))break}}};ba.removeEach=function(a,c){c=c||{throwIfNoIndex:!1};this.each(a,function(a){this.remove(JSON.parse(a))},c);return this};a.Cache.document=function(b,c,d){a.Cache.document.caches[b]||(a.Cache.document.caches[b]=new a.Cache(a.extend({max:c,name:b},d)));return a.Cache.document.caches[b]};a.Cache.local=function(b,c,d){a.Cache.local.caches[b]||(a.Cache.local.caches[b]=new a.Cache(a.extend({localStorage:!0,max:c,name:b},
|
|
227
|
+
d)));return a.Cache.local.caches[b]};a.Cache.session=function(b,c,d){a.Cache.session.caches[b]||(a.Cache.session.caches[b]=new a.Cache(a.extend({sessionStorage:!0,max:c,name:b},d)));return a.Cache.session.caches[b]};a.Cache.document.caches={};a.Cache.local.caches={};a.Cache.session.caches={};a.Storage=function(){var a=p.localStorage,c=p.sessionStorage;try{return a.setItem("__qtest","1"),a.removeItem("__qtest"),a}catch(e){}try{return c.setItem("__qtest","1"),c.removeItem("__qtest"),c}catch(e){}var d=
|
|
228
|
+
{};return{getItem:function(a){return d[a]},setItem:function(a,b){d[a]=b},removeItem:function(a){delete d[a]}}}();a.IndexedDB={params:{},onEmptyDatabases:new a.Event};a.IndexedDB.open=a.getter(function(b,c,d,e){function f(g){return $jscomp.executeAsyncGenerator(function(){function n(n,u,x){for(;;)switch(q){case 0:try{return q=3,{value:indexedDB.databases(),done:!1}}catch(Ia){q=1;break}case 3:try{if(1!=n){q=4;break}q=-1;throw x;}catch(Ia){q=1;break}case 4:try{O=r=u;if((p=O.some(function(a){return 1<
|
|
229
|
+
(a.version||0)}))||a.IndexedDB.onEmptyDatabases.occurred){q=5;break}if(!1!==a.handle(a.IndexedDB.onEmptyDatabases,a.IndexedDB)){q=6;break}a.handle(e,null,[Error("Q.IndexedDB.open: aborted due to empty databases")]);q=-1;return{value:k,done:!0}}catch(Ia){q=1;break}case 6:case 5:try{q=2;break}catch(Ia){q=1;break}case 1:case 2:t=g?indexedDB.open(b,g):indexedDB.open(b),t.onupgradeneeded=function(){var a=t.result;if(1<a.version&&!a.objectStoreNames.contains(c)&&!l){l=!0;a=a.createObjectStore(c,{keyPath:d.keyPath});
|
|
230
|
+
for(var b=0;b<h.length;++b){var e=$jscomp.makeIterator(h[b]),f=e.next().value,g=e.next().value;e=e.next().value;a.createIndex(f,g,e)}}},t.onerror=function(b){a.handle(e,null,[b.target.error||Error("IndexedDB open error")])},t.onsuccess=function(){var d=t.result;d._versionchangeAttached||(d._versionchangeAttached=!0,d.onversionchange=function(){d.close()});var g=!1;try{if(!d.objectStoreNames.contains(c))g=!0;else if(a.getObject("Q.Cordova.IndexedDB.forceRecreate"))for(var k=d.transaction(c,"readonly").objectStore(c),
|
|
231
|
+
n=0;n<h.length;++n){var u=h[n][0];try{k.index(u)}catch(Ra){Ra&&"NotFoundError"===Ra.name&&(g=!0);break}}}catch(Ra){g=!0}g?l||m?a.handle(e,null,[Error("Store creation failed after upgrade"),d]):(m=!0,d.close(),g="Q.Cordova.IndexedDB.version."+b,k=parseInt(localStorage[g]||"1",10),k=Math.max(d.version||1,k)+1,localStorage[g]=k,f(k)):a.handle(e,null,[null,d])},q=-1;default:return{value:k,done:!0}}}var q=0,t,p,O,r,G={next:function(a){return n(0,a,k)},throw:function(a){return n(1,k,a)},return:function(a){throw Error("Not yet implemented");
|
|
232
|
+
}};$jscomp.initSymbolIterator();G[Symbol.iterator]=function(){return this};return G}())}if(!p.indexedDB){var g=Error("IndexedDB not supported");e&&e(g);return!1}"string"===typeof d&&(d={keyPath:d});"function"===typeof d&&(e=d,d={});d=a.extend({},a.getObject([b,c],a.IndexedDB.params),d);var h=Array.isArray(d.indexes)?d.indexes:[],m=!1,l=!1;f()},{cache:a.Cache.document("Q.IndexedDB.open",10),resolveWithSecondArgument:!0,prepare:function(b,c,d,e){var f=this,g=$jscomp.makeIterator(e),h=g.next().value,
|
|
233
|
+
m=g.next().value;g=g.next().value;var l=c[1];try{l.transaction(m,"readonly"),d(b,c)}catch(n){n.message&&0>n.message.indexOf("closing")&&0>n.message.indexOf("closed")||f.original(h,m,g,function(c,g){var h=a.Cache.key(e);if(!c&&f.cache){var m=f.cache.get(h);m&&f.cache.set(h,m.cbpos,b,arguments)}d.apply(f,arguments)})}}});a.IndexedDB.put=a.promisify(function(a,c,d){Ha(a,a.put(c),d)},!1,2);a.IndexedDB.get=a.promisify(function(a,c,d){Ha(a,a.get(c),d)},!1,2);a.IndexedDB["delete"]=a.promisify(function(a,
|
|
234
|
+
c,d){Ha(a,a.delete(c),d)},!1,2);a.Page=function(a){this.uriString=a};a.Page.push=function(b,c){var d=location.pathname+location.search+location.hash;if(location.href===b||d===b||d==="/"+b)return null;d=location.href;b=a.url(b);var e=a.baseUrl();if(!b.startsWith(e))return!1;var f=b.split("#"),g=b.substring(a.baseUrl().length+1)||"";history.pushState?"string"===typeof c?history.pushState({},c,b):history.pushState({},null,b):(g="#!url="+encodeURIComponent(g)+location.hash.replace(/#!url=[^&]*/,"").replace(/&!url=[^&]*/,
|
|
235
|
+
"").replace(/&column=[^&]+/,"").replace(/#column=[^&]+/,""),f[1]&&(g+=("&"+f[1]).replace(/&!url=[^&]*/,"").replace(/&column=[^&]+/,"")),location.hash!==g&&(K.ignore=!0,location.hash=g));"string"===typeof c&&(document.title=c);K.currentUrl=b.split("#")[0];K.currentUrlTail=K.currentUrl.substring(e.length+1);a.info.url=b;a.handle(a.Page.onPush,a,[b,c,d])};a.Page.onPush=new a.Event;a.Page.currentUrl=function(){var b=location.hash.queryField("url");return b?a.url(b):location.href.split("#")[0]};a.Page.beingLoaded=
|
|
236
|
+
!1;a.Page.beingActivated=!1;a.Page.beingProcessed=!1;a.Page.onLoad=a.Event.factory(null,[""]);a.Page.onActivate=a.Event.factory(null,[""]);a.Page.onUnload=a.Event.factory(null,[""]);a.Page.beforeUnload=a.Event.factory(null,[""]);a.page=function(b,c,d){d===k&&(d="Q");if(a.isArrayLike(b))for(var e=0,f=b.length;e<f;++e)a.page(b[e],c,d);else if(a.isPlainObject(b))for(e in b)a.page(e,b[e],d);else"function"===typeof c&&a.Page.onActivate(b).add(function(e,f){(e=c.call(a,a.Page.beforeUnload("Q\t"+b),e,f))&&
|
|
237
|
+
"function"===typeof e&&a.Page.beforeUnload("Q\t"+b).set(e,d)},d)};a.init=function(b){function c(){g.fill("ready")()}function d(){if(!(0>e.indexOf("device"))){var b=a.once(function(){a.info||(a.info={});a.info.isCordova=!0;a.addEventListener(document,"click",function(a){var b=a.target;do if(b&&"A"===b.nodeName&&b.href&&!b.outerHTML.match(/\Whref=[',"]#[',"]\W/)&&b.href.match(/^https?:\/\//)){a.preventDefault();var c="_blank"===b.target?"_blank":"_system";p.open(b.href,c,"location=no")}while(b=b.parentElement)});
|
|
238
|
+
g.fill("device")()});if(p.device)b();else{a.addEventListener(document,"deviceready",b,!1);var c=setInterval(function(){window.device&&(b(),clearInterval(c))},100)}}}if(a.init.called)return!1;a.init.called=!0;a.info.baseUrl=a.info.baseUrl||(new URL(".",document.baseURI)).href.slice(0,-1);a.loadUrl.options.slotNames=a.info.slotNames;vb();La();a.addEventListener(p,"orientationchange",La);a.addEventListener(p,"unload",a.onUnload.handle);a.addEventListener(p,"online",a.onOnline.handle);a.addEventListener(p,
|
|
239
|
+
"offline",a.onOffline.handle);a.addEventListener(p,a.Visual.focusout,zb);var e=["init","ready"];a.ServiceWorker.started&&e.push("serviceWorker");b&&b.isCordova&&(Z=b.isCordova);if(Z){var f=p.cordova;e.push("device");a.Visual.preventRubberBand();a.onReady.set(function(){p.handleOpenURL=function(b){a.handle(a.onHandleOpenUrl,a,[b])}},"Q.handleOpenUrl");a.onReady.set(function(){f.plugins&&f.plugins.browsertabs&&f.plugins.browsertabs.isAvailable(function(b){delete p.open;p.open=function(c,d,e){var g=
|
|
240
|
+
!(e&&e.noopener)&&0<=["_top","_self","_parent"].indexOf(d);if(!d||g)return a.handle(c),p;b?f.plugins.browsertabs.openUrl(c,e,function(){},function(){}):f.InAppBrowser&&f.InAppBrowser.open(c,"_system",e)};p.close=function(a,c,d){b?f.plugins.browsertabs.close(d):f.InAppBrowser&&f.InAppBrowser.close()}},function(){})},"Q.browsertabs")}var g=a.pipe(e,1,function(){function c(){setTimeout(function(){a.ready()},0)}a.info||(a.info={});a.info.isCordova=!!a.info.isCordova;b&&b.isLocalFile&&(a.info.isLocalFile=
|
|
241
|
+
!0,a.handle.options.loadUsingAjax=!0);a.info.isCordova&&!a.cookie("Q_cordova")&&a.cookie("Q_cordova","yes");var d=a.baseUrl();b&&b.isLocalFile&&!d.startsWith("file://")?a.loadUrl(d,{ignoreHistory:!0,skipNonce:!0,handler:function(){},slotNames:["cordova"]}):c()});a.init.addCheck=function(a){0>e.indexOf(a)&&e.push(a);return g.fill(a)};if(p.jQuery)a.jQueryPluginPlugin(),a.onJQuery.handle(p.jQuery,[p.jQuery]),p.jQuery(document).ready(c);else{document.addEventListener("DOMContentLoaded",c);var h=setInterval(function(){/loaded|complete/.test(document.readyState)&&
|
|
242
|
+
(clearInterval(h),c())},10)}Z&&d();a.ServiceWorker.started&&a.ServiceWorker.onActive.addOnce(g.fill("serviceWorker"),"Q");a.handle(a.beforeInit);var m=a.pipe(),l=[],k=a.info.urls;k&&k.updateBeforeInit&&(k.caching||k.integrity)&&(l.push("Q.info.urls.updateBeforeInit"),a.updateUrls(m.fill("Q.info.urls.updateBeforeInit")));a.isEmpty(a.getObject("Q.info.text.loadBeforeInit"))||(l.push("loadBeforeInit"),a.Text.get(a.info.text.loadBeforeInit,m.fill("loadBeforeInit")));m.add(l,1,function(){g.fill("init")();
|
|
243
|
+
a.handle(a.onInit,a,[g,e])}).run()};a.ready=function(){(a.ready.options.skipNonce?function(a){a()}:a.loadNonce)(function(){var b=a.baseUrl();hb=!0;if(a.info.isLocalFile&&!b.startsWith("file://")){var c=location.hash.queryField("url");c===k?a.handle(b):a.handle(-1==c.indexOf(b)?b+"/"+c:c)}else{a.jQueryPluginPlugin();a.onDOM.handle.call(p,p.jQuery);if(a.info.uri&&a.info.uri.module){b=a.info.uri.module+"/"+a.info.uri.action;try{a.Page.beingLoaded=!0,a.Page.onLoad("").handle(),a.Page.onLoad(b).handle(),
|
|
244
|
+
a.info.uriString!==b&&a.Page.onLoad(a.info.uriString).handle()}catch(d){debugger;a.Page.beingLoaded=!1;throw d;}}a.Page.beingLoaded=!1;a.activate(document.body,k,function(){a.addEventListener(p,"hashchange",a.onHashChange.handle);a.addEventListener(p,"popstate",a.onPopState.handle);a.addEventListener(p,"resize",a.layout);a.addEventListener(p,"orientationchange",a.layout);a.addEventListener(p,"scroll",a.onScroll.handle);za();a.onReady.handle.call(p,p.jQuery);try{a.Page.beingActivated=!0;a.Page.onActivate("").handle(a.info.url);
|
|
245
|
+
if(a.info&&a.info.uri){var b=a.info.uri.module+"/"+a.info.uri.action;a.Page.onActivate(b).handle();a.info.uriString!==b&&a.Page.onActivate(a.info.uriString).handle()}a.Page.beingActivated=!1}catch(e){debugger;a.Page.beingActivated=!1;throw e;}location.hash.toString()&&K()})}})};a.ready.options={};a.loadNonce=function(b,c,d){if(a.nonce)a.handle(b,c,d);else{var e=a.baseUrl();e=e&&e.parseUrl();var f=location.href.parseUrl();if(!e||e.host!==f.host||e.scheme!==f.scheme&&"https"===f.scheme)a.handle(b,c,
|
|
246
|
+
d);else return a.info.isStatic&&a.request({"Q.scriptData":1},a.info.isStatic,a.info.slotNames,function(b,c){for(var d in c.scriptData){b=c.scriptData[d];for(var e in b)a.setObject(e,b[e])}}),Cb(b,c,d)}};var Cb=a.getter(function(b,c,d){a.req("Q/nonce","data",function(e,f){if(e=a.firstErrorMessage(e,f))throw new a.Error(e);a.nonce=a.nonce||a.cookie("Q_nonce");a.nonce?a.handle(b,c,d):(e=a.ajaxExtend(a.action("Q/nonce"),"data"),a.formPost(e,{just:"something"},"post",function(){a.nonce=a.cookie("Q_nonce");
|
|
247
|
+
var b=location.hostname.isIPAddress()?" Saving cookies to IP address is not supported.":"";a.nonce||console.warn("Our server couldn't set cookies in this browser."+b)}))},{method:"post",skipNonce:!0,fields:{"Q.startNewSession":!0}})},{cache:a.Cache.document("Q.loadNonce",1)});a.loadHandlebars=a.getter(function(b){a.onInit.addOnce(function(){a.ensure("Handlebars",function(){Ab();a.handle(b)})},"Q.loadHandlebars")},{cache:a.Cache.document("Q.loadHandlebars",10)});a.fixedOffset=function(b,c){b=b||"top";
|
|
248
|
+
var d=document.body.getElementsByClassName("Q_fixed_"+b),e=0;a.each(d,function(){if(a.isArrayLike(c)){var d=(this.className||"").split(" "),g=!1;a.each(c,function(a,b){if("string"===typeof b&&0<=d.indexOf(b))return g=!0,!1});if(g)return;var h=!1,m=!1,l=this;a.each(c,function(a,b){if(b instanceof HTMLElement&&(h=!0,b.parentElement&&l.parentElement===b.parentElement))return m=!0,!1});if(h&&!m)return}if("function"!==typeof c||c.call(this)){var k=this.getBoundingClientRect();if("left"===b||"right"===
|
|
249
|
+
b)e+=k.width;else if("top"===b||"bottom"===b)e+=k.height}});return e};a.removeElement=function(b,c){if(b){if(a.isArrayLike(b))return a.each(b,function(){a.removeElement(this,c)});c&&a.Tool.remove(b);if("LINK"===b.tagName&&b.href){var d=b.href.split("?")[0];delete a.addStylesheet.loaded[d]}d=0;for(var e=S.length;d<e;++d){var f=S[d];do if(f===b){S.splice(d,1);pa.splice(d,1);--d;--e;break}while(f=f.parentElement)}if(p.jQuery)return p.jQuery(b).remove();if(!b.parentElement)return!1;b.parentElement.removeChild(b);
|
|
250
|
+
try{for(var g in b)delete b[g]}catch(h){}}};a.replace=function(b,c,d){"string"===typeof b&&(b=document.createElement(b));if(""==b.innerHTML&&"string"==typeof c)return b.innerHTML=c,b;if(!c){for(;d=b.lastChild;)a.removeElement(d,!0);return b}d=a.extend({},a.replace.options,d);if("string"===a.typeOf(c)){var e=document.createElement("div");e.innerHTML=c;c=e}var f=[];d.replaceElements&&a.each(d.replaceElements,function(a,b){f.push("string"===typeof b?document.getElementById(b):b)});if(!c.childNodes)return!1;
|
|
251
|
+
e={};for(var g={},h={},m=c.querySelectorAll(".Q_tool"),l=0,k=m.length;l<k;++l){var u=m[l],q=u.id,t=q&&document.getElementById(q);if(t&&null!==t.getAttribute("data-Q-retain")&&null===u.getAttribute("data-Q-replace")&&t.Q&&t.Q.tool&&0>f.indexOf(t)){h[u.id]=u;a.replace.retainedElements[u.id]=t;u.parentElement.replaceChild(t,u);e[q]=e[q]||{};g[q]=g[q]||{};for(var p in t.Q.tools){var O=a.Tool.from(t,p),r="data-"+a.normalize.memoized(O.name,"-"),G=a.normalize.memoized(O.name),H=u.getAttribute(r);H&&(t.setAttribute(r,
|
|
252
|
+
H),g[q][G]=JSON.parse(H));e[q][G]=O}u.options&&a.extend(g[q],u.options)}}for(a.beforeReplace.handle(b,c,d,g,e);d=b.lastChild;)a.removeElement(d,!0);if(c instanceof DocumentFragment)b.appendChild(c);else for(;d=c.childNodes[0];)b.appendChild(d);for(q in e)for(var y in e[q])O=e[q][y],c=g[q][y],a.handle(O.Q.onRetain,O,[c,h[q]]),a.extend(O.state,10,c);return b};a.replace.retainedElements={};a.Browser={detect:function(){function a(a){return(a=c.match(a))&&a[1]}var c=navigator.userAgent||"",d=c.toLowerCase(),
|
|
253
|
+
e=navigator.platform||"",f=navigator.vendor||"",g=/iphone|ipad|ipod/.test(d),h=/android/.test(d);d=/QWebView|QbixCordova|Cordova|wv/.test(c)||g&&!/safari/i.test(c);var m=!!navigator.standalone||window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches||!1;if(h&&!d){var l=Math.abs(screen.width-document.documentElement.clientWidth),k=Math.abs(screen.height-document.documentElement.clientHeight);if(0<l&&40>l||0<k&&40>k)m=!0}l="unknown";k=null;if(g){l="ios";var u=/ipad/i.test(c)?"ipad":
|
|
254
|
+
/ipod/i.test(c)?"ipod":"iphone";(e=c.match(/os (\d+)[._](\d+)(?:[._](\d+))?/i))&&(k={major:parseInt(e[1],10),minor:parseInt(e[2],10),patch:e[3]?parseInt(e[3],10):0})}else h?(l="android",(e=c.match(/android (\d+)(?:\.(\d+))?(?:\.(\d+))?/i))&&(k={major:parseInt(e[1],10),minor:e[2]?parseInt(e[2],10):0,patch:e[3]?parseInt(e[3],10):0})):/win/i.test(e)?l="windows":/mac/i.test(e)?l="mac":/linux/i.test(e)&&(l="linux");e="unknown";h=null;g="";/firefox/i.test(c)?(e="firefox",h=a(/firefox\/([\d.]+)/i),g="gecko"):
|
|
255
|
+
/edg/i.test(c)?(e="edge",h=a(/edg\/([\d.]+)/i),g="webkit"):/crios/i.test(c)?(e="chrome",h=a(/crios\/([\d.]+)/i),g="webkit"):/chrome/i.test(c)?(e="chrome",h=a(/chrome\/([\d.]+)/i),g="webkit"):/safari/i.test(c)&&/apple/i.test(f)?(e="safari",h=a(/version\/([\d.]+)/i),g="webkit"):"ios"===l&&(e="safari",g="webkit");"safari"===e&&"ios"===l&&k&&(h=k.major+"."+k.minor);f="?";h&&(f=String(h).split(".")[0]);h="";"webkit"===g?h="-webkit-":"gecko"===g&&(h="-moz-");if("explorer"===e||"edge"===e)h="-ms-";return{name:e,
|
|
256
|
+
mainVersion:f,prefix:h,OS:l,osVersion:k,engine:g,device:u,isWebView:d,isStandalone:m,isCordova:"undefined"!==typeof Z&&Z}},getScrollbarWidth:function(){if(a.Browser.scrollbarWidth)return a.Browser.scrollbarWidth;var b=document.createElement("p");b.style.width="100%";b.style.height="200px";var c=document.createElement("div");a.each({position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"},function(a,b){c.style[a]=b});c.appendChild(b);document.body.appendChild(c);
|
|
257
|
+
var d=parseInt(b.offsetWidth);c.style.overflow="scroll";b=parseInt(b.offsetWidth);d==b&&(b=c.clientWidth);a.removeElement(c);return a.Browser.scrollbarWidth=d-b},getScrollbarHeight:function(){return this.getScrollbarWidth()},getDarkMode:function(a){if(!window.matchMedia)return null;var b=window.matchMedia("(prefers-color-scheme: dark)");a&&b.addEventListener("change",a);return b.matches}};var Ea;a.addEventListener=function(b,c,d,e,f){function g(c){a.handle(d,b,[c])}function h(){}if(a.isEmpty(b)||
|
|
258
|
+
a.isEmpty(d))return!1;e=e||!1;if(a.isArrayLike(b))for(var m=0,l=b.length;m<l;++m)a.addEventListener(b[m],c,d,e,f);else if(a.isPlainObject(c))for(m in c)a.addEventListener(b,m,c[m],d);else{var n="Q.Event"===d.typename?d.eventListener=g:d;if(a.isPlainObject(e)){if(Ea===k&&(Ea=!1,Object.defineProperty))try{l=Object.defineProperty({},"passive",{get:function(){Ea=!0}}),window.addEventListener("Qtest",h,l),window.removeEventListener("Qtest",h)}catch(t){}e=Ea?e:e.capture}if("function"===typeof c){m={original:d};
|
|
259
|
+
l=c(m);if(!("eventName"in m))throw new a.Error("Custom $.fn.on handler: need to set params.eventName");d.Q_wrapper=n=l;c=l.eventName=m.eventName}if(c)if("string"===typeof c&&(m=c.trim().split(" "),1<m.length&&(c=m)),a.isArrayLike(c))for(m=0,l=c.length;m<l;++m)a.addEventListener(b,c[m],d,e,f);else{m=["Q","eventListeners","eventName|"+(e?"useCapture":"")];if(a.getObject(m,b)===n)return n;a.setObject(m,n);b.addEventListener?b.addEventListener(c,n,e):b.attachEvent?b.attachEvent("on"+c,n):(c=c.toLowerCase(),
|
|
260
|
+
b["on"+c]=function(){b["on"+c]&&b["on"+c].apply(this,arguments);n.apply(this,arguments)});if(f){f=[b,c,d,e];var u=a.addEventListener.hooks;m=0;for(l=u.length;m<l;++m){var q=u[m];if(q[0]===b&&q[1]===c&&q[2]===d&&q[3]===e){u.splice(m,1);break}}u.push(f)}return n}}};a.addEventListener.hooks=[];ma.previous=Event.prototype.stopPropagation;Event.prototype.stopPropagation=ma;a.removeEventListener=function(b,c,d,e){if(a.isEmpty(b)||a.isEmpty(d))return!1;if(a.isArrayLike(b))for(var f=0,g=b.length;f<g;++f)a.removeEventListener(b[f],
|
|
261
|
+
c,d,e);else if(e=e||!1,a.isPlainObject(e)&&(e=!!e.capture),f="Q.Event"===d.typename?d.eventListener:d,f.Q_wrapper&&(f=f.Q_wrapper),"string"===typeof c&&(g=c.split(" "),1<g.length&&(c=g)),a.isArrayLike(c))for(f=0,g=c.length;f<g;++f)a.removeEventListener(b,c[f],d,e);else{if("function"===typeof c&&(g={original:function(){}},c(g),c=g.eventName,!c))return!1;b.removeEventListener?b.removeEventListener(c,f,!!e):b.detachEvent?b.detachEvent("on"+c,f):b["on"+c]=null;a.setObject(["Q","eventListeners","eventName|"+
|
|
262
|
+
(e?"useCapture":"")],null);g=a.addEventListener.hooks;for(f=g.length-1;0<=f;--f){var h=g[f];if(h[0]===b&&h[1]===c&&h[2]===d&&h[3]===e){g.splice(f,1);break}}return!0}};a.beforeUnload=function(b){a.addEventListener(window,"beforeunload",function(a){if(!b)return k;if(a=a||window.event)a.preventDefault(),a.returnValue=b;return b})};a.trigger=function(b,c,d){b.split(".");a.find(c||document.body,!0,function(c){gb(a.Tool.from(c),b,d);return!1},null)};a.layout=function(b,c){b instanceof Element||(b=null);
|
|
263
|
+
a.each(S,function(a,e){if(!b||b.contains(e)&&b!==e){var d=pa[a];c&&qa[a]||d.handle.call(d,e,b)}})};a.scrollIntoView=function(a,c){if(!a||"function"!==typeof a.scrollIntoView)return!1;c=c||{};if(c.unlessOffscreenHorizontally){for(var b=a,e=a.getBoundingClientRect();b=b.parentElement;){var f=b.getBoundingClientRect&&b.getBoundingClientRect();if(f&&e.left<f.left)return!1}delete c.unlessOffscreenHorizontally}a.scrollIntoView(c);return!0};a.fixScrollingParent=function(b){if("ios"===a.info.platform){var c=
|
|
264
|
+
b.scrollingParent(!0);if(c){var d=c.style.overflow;c.style.overflow="hidden";setTimeout(function(){c.style.overflow=d?d:null},0)}}};a.isReady=function(){return hb};a.isOnline=function(){return Qa};a.load=function(b,c,d){var e=[];"string"===typeof b&&(b=b.split(" ").map(function(a){return a.trim()}));var f=a.baseUrl();a.each(b,function(b,c){c&&!a.plugins[c]&&e.push(f+"/Q/plugins/"+c+"/js/"+c+".js")});return a.addScript(e,c,d)};a.url=function(b,c,d){var e=b||"";if(e.startsWith("data:")||e.startsWith("blob:"))return e;
|
|
265
|
+
var f=e.split("?");if(c){for(var g in c)c[g]!==k&&(f[1]=(f[1]||"").queryField(g,c[g]));e=f[0]+(f[1]?"?"+f[1]:"")}g=d&&d.baseUrl||a.baseUrl()||"";e=a.interpolateUrl(e);if(g&&e.startsWith(g)){f=e.substring(g.length+1);f=f.split("?")[0];var h=a.getObject(f,a.updateUrls.urls,"/")}else e.isUrl()||(h=a.getObject(e,a.updateUrls.urls,"/"));h?(a.info.urls&&a.info.urls.caching&&h.t&&(f=e.split("?"),1<f.length?(f[1]=f[1].queryField("Q.cb",h.t),e=f[0]+"?"+f[1]):e=f[0]+"?Q.cb="+h.t,h.cacheBaseUrl&&h.t<a.cookie("Q_ct")&&
|
|
266
|
+
(g=h.cacheBaseUrl)),d&&d.info&&a.extend(d.info,10,h)):d&&d.cacheBust&&(d=d.cacheBust,e+="?Q.cb="+Math.floor(Date.now()/d)*d);f=e.split("?");2<f.length&&(e=f.slice(0,2).join("?")+"&"+f.slice(2).join("&"));b=b?e.isUrl()?e:g+("/"==e.substring(0,1)?"":"/")+e:g+(""===b?"/":"");a.url.options.beforeResult&&(c={what:e,fields:c,result:b},a.url.options.beforeResult.handle(c),b=c.result);return b};a.url.options={beforeResult:null};a.interpolateUrl=function(b,c){if(0>b.indexOf("{{"))return b;b=b.interpolate(a.interpolateUrl.substitutions);
|
|
267
|
+
b=b.interpolate({currentUrl:location.href});c&&(b=b.interpolate(c));c=b.split("?");2<c.length&&(b=c.slice(0,2).join("?")+"&"+c.slice(2).join("&"));return b};a.interpolateUrl.substitutions={};a.interpolateUrl.substitutionsWithFullURL={};a.interpolateArray=function(a,c,d){d=parseFloat(d);d===k&&(d=.5);for(var b=[],f=0;f<a.length;++f)b.push(a[f]+d*(c[f]-a[f]));return b};a.pluginBaseUrl=function(a){return"Q/plugins/"+a};a.action=function(b,c,d){return b.isUrl()?a.url(b,c):a.url("action.php/"+b,c,d)};
|
|
268
|
+
a.ajaxExtend=function(b,c,d){if(!b&&""!==b)return console&&"warn"in console&&console.warn("Q.ajaxExtend received empty url"),"";d=d||{};var e="string"===typeof c?c:a.extend([],c).join(","),f=d?"string"===typeof d.idPrefixes?d.idPrefixes:d.idPrefixes&&d.idPrefixes.join(","):"",g=Date.now(),h=a.info.forceFormFactor,m=d.iframe?"iframe":"json";if("string"==typeof b){b=b.split("#");var l=b[0];a.info&&a.baseUrl()===l&&(l+="/");l+=0>l.indexOf("?")?"?":"&";l+="Q.ajax="+encodeURIComponent(m);d.loadExtras&&
|
|
269
|
+
(l+="&Q.loadExtras="+encodeURIComponent(!0===d.loadExtras?"all":d.loadExtras));d.timestamp&&(l+=encodeURI("&Q.timestamp=")+encodeURIComponent(g));null!=e&&(l+=encodeURI("&Q.slotNames=")+encodeURIComponent(e));f&&(l+=encodeURI("&Q.idPrefixes=")+encodeURIComponent(f));d&&("string"===typeof d.callback&&(l+=encodeURI("&Q.callback=")+encodeURIComponent(d.callback)),"echo"in d&&(l+=encodeURI("&Q.echo=")+encodeURIComponent(d.echo)),d.method&&(l+=encodeURI("&Q.method="+encodeURIComponent(d.method.toUpperCase()))));
|
|
270
|
+
a.nonce!==k&&(l+=encodeURI("&Q.nonce=")+encodeURIComponent(a.nonce));l=b[1]?l+"#"+b[1]:l;h&&(l+="&Q.formFactor="+h)}else{l={};for(var n in b)l[n]=b[n];l["Q.ajax"]=m;d.timestamp&&(l["Q.timestamp"]=g);c&&(l["Q.slotNames"]=e);d&&(d.callback&&(l["Q.callback"]=d.callback),"echo"in d&&(l["Q.echo"]=d.echo),d.method&&(l["Q.method"]=d.method));"nonce"in a&&(l["Q.nonce"]=a.nonce);h&&(l["Q.formFactor"]=h)}return l};a.req=function(b,c,d,e){"string"===typeof e&&(e={method:e});var f=arguments,g="string"===typeof arguments[0]?
|
|
271
|
+
0:1;f[g]=a.action(f[g],null,e);return a.request.apply(this,f)};a.request=function(b,c,d,e,f){function g(b,c,d,f){function g(g,h,m){if(g)a.handle(d,this,[g,h,!1]),a.handle(f.onProcessed,this,[g,h,!1]);else{var l=h;if(!1!==f.parse)try{l=m?h:JSON.parse(h)}catch(Sa){return console.warn("Q.request("+b+",["+c+"]):"+Sa),d(Sa,h),a.handle(f.onProcessed,this,[Sa,h])}h=d&&d.call(this,g,l,l&&l.redirect&&l.redirect.url);a.handle(f.onProcessed,this,[g,l]);!1!==h&&!f.ignoreRedirect&&l&&l.redirect&&l.redirect.url&&
|
|
272
|
+
a.handle(f.onRedirect,a,[l.redirect.url,e])}}function h(){a.handle(f.onLoadStart,this,[b,c,f]);!1!==r&&(v.timeout=setTimeout(n,r))}function n(){if(!v.loaded&&(a.handle(f.onShowCancel,this,[t,f]),f.onTimeout))f.onTimeout(t)}function u(d,e){v.loaded=!0;v.timeout&&clearTimeout(v.timeout);a.handle(f.onLoadEnd,l,[b,c,f]);v.cancelled||(f.onResponse.handle.call(l,d,e),g.call(l,null,d,e))}function t(d,e){if(!ib){d=a.isInteger(d)?d:null;if(this.response)try{var h=JSON.parse(this.response);e=a.getObject(["errors",
|
|
273
|
+
0,"message"],h);var m=a.getObject(["errors",0,"code"],h)}catch(Jb){h=null,e="Response is not in JSON format",console.warn("Q.request("+b+",["+c+"]): "+e)}if(!e){var l=d?a.text.Q.request.error:a.text.Q.request.canceled;e=(e||a.text.Q.request[d]||l).interpolate({status:d,url:b})}v.cancelled=!0;u();d={errors:[a.extend({},h&&h.errors[0],{message:e||"Request was canceled",code:m||d,httpStatus:d})]};f.onCancel.handle.call(this,d,f);g.call(this,d,d)}}function q(d,g){!1!==f.extend&&(l.urlRequested=b=a.ajaxExtend(b,
|
|
274
|
+
c,z));var h=new XMLHttpRequest;h.onreadystatechange=function(){if(4==h.readyState&&!h.handled){h.handled=!0;a:if(!navigator.serviceWorker||!navigator.serviceWorker.controller){try{var a=h.getResponseHeader("Set-Cookie-JS")}catch(Db){break a}if(a)try{var b=sessionStorage.getItem("Q.cookieJar"),c=b?JSON.parse(b):{};b=!1;var e=a.split(";");for(a=0;a<e.length;a++){var f=e[a].trim().split("="),m=f[0],l=1<f.length?f.slice(1).join("="):"";m&&(""===l||"null"===l?c.hasOwnProperty(m)&&(delete c[m],b=!0):c[m]!==
|
|
275
|
+
l&&(c[m]=l,b=!0))}b&&sessionStorage.setItem("Q.cookieJar",JSON.stringify(c))}catch(Db){}}200==h.status?d.call(h,h.responseText):(T("Q.request xhr: "+h.status+" "+h.responseText.substring(h.responseText.indexOf("<body"))),g.call(h,h.status))}};"function"===typeof f.xhr&&f.xhr.call(h,h,e);var m="sync"===f.xhr;a.isPlainObject(f.xhr)&&(a.extend(h,f.xhr),m=m||h.sync);var k=f.formdata?f.formdata:a.queryString(f.fields);l.xmlhttp=h;"GET"===w?(h.open("GET",b+(k?"&"+k:""),!m),bb(h),h.send()):(h.open(w,b,!m),
|
|
276
|
+
f.asJSON?(k=JSON.stringify(f.fields),h.setRequestHeader("Content-Type","application/json")):f.formdata||h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),bb(h),h.send(k));return b}function p(b,c,f){if(f.form)!1!==f.extend&&(z.iframe=!0,f.fields=a.ajaxExtend(f.fields||{},c,z)),a.formPost(b,f.fields,f.method,{form:f.form,onLoad:function(b){b=f.resultFunction?a.getObject(f.resultFunction,b.contentWindow):null;b="function"===typeof b?b():k;g.call(l,null,b,!0)}});else{if(!f.query&&
|
|
277
|
+
!1!==f.xhr&&b.startsWith(a.baseUrl()))return h(),q(u,t);var n=a.request.callbacks.length,p=b;d?(a.request.callbacks[n]=function(b){delete a.request.callbacks[n];a.removeElement(x);u(b,!0)},p=f.callbackName?b+(0>b.indexOf("?")?"?":"&")+encodeURIComponent(f.callbackName)+"="+encodeURIComponent("Q.request.callbacks["+n+"]"):!1===f.extend?b:a.ajaxExtend(b,c,a.extend(f,{callback:"Q.request.callbacks["+n+"]"}))):p=!1===f.extend?b:a.ajaxExtend(b,c,f);e.fields&&(m=0>b.indexOf("?")?"?":"&",p+=m+a.queryString(e.fields));
|
|
278
|
+
if(!f.query)var x=a.addScript(p,null,{duplicate:f.duplicate});l.urlRequested=p}}var r=!1,v={};!1!==f.timeout&&(r=f.timeout||a.request.options.timeout);var w=(f.method||"GET").toUpperCase(),z={};f.loadExtras&&(z.loadExtras=f.loadExtras);"GET"!==w&&(w="POST",z.method=f.method);f.beforeRequest?a.chain(f.beforeRequest)(b,c,f,p):p(b,c,f)}if("object"===typeof b){var h=b;b=c;c=d;d=e;e=f;var m=0>b.indexOf("?")?"?":"&";b+=m+a.queryString(h)}"function"===typeof c?(e=d,d=c,c=[]):"string"===typeof c&&(c=c.split(","));
|
|
279
|
+
f=a.extend({},a.request.options,e);f.dontTransformUrl||(b=a.url(b,null,e));var l=new a.Request(b,c,d,f);f.skipNonce?g.call(this,b,c,d,f):a.loadNonce(g,this,[b,c,d,f]);return l};a.request.callbacks=[];a.request.once=a.getter(a.request,{cache:a.Cache.document("Q.request",10)});a.firstError=function(b){for(var c=k,d=0;d<arguments.length;++d){var e=arguments[d];if(!a.isEmpty(e)&&(e.errors&&e.errors[0]?c=e.errors[0]:e.error?c=e.error:d||(c=a.isArrayLike(e)?e[0]:e),c))break}return c||k};a.firstErrorMessage=
|
|
280
|
+
function(b){var c=a.firstError.apply(this,arguments);return c?"string"===typeof c?c:c&&c.message?c.message:JSON.stringify(c):k};a.ajaxErrors=function(a,c){var b={},e,f,g;c&&"string"===typeof c&&(c=[c]);for(f=0;f<a.length;++f){var h=!1;if(e=a[f].fields)for(g=0;g<e.length;++g)c&&0>c.indexOf(e[g])||(b[e[g]]=a[f].message,h=!0);!h&&c&&(b[c[0]]=a[f].message)}return b};a.jsonRequest=a.request;a.queryString=function(b,c,d,e){function f(b,d){if(d!=k)if(a.isArrayLike(d))a.each(d,function(c,d){/\[\]$/.test(b)?
|
|
281
|
+
g(b,d):f(b+"["+("object"===a.typeOf(d)||"array"===a.typeOf(d)?c:"")+"]",d,g)});else if(d&&"object"===a.typeOf(d)){var e=Object.keys(d);!0===c&&e.sort();for(var h=0;h<e.length;++h){var m=e[h];f(b+"["+m+"]",d[m],g)}}else g(b,d)}function g(b,c){c!=k&&"function"!=a.typeOf(c)&&(e&&e.convertBooleanToInteger&&(c=!0===c?1:!1===c?0:c),d?h[b]=c:m.push(encodeURIComponent(b)+"="+encodeURIComponent(c)))}if(a.isEmpty(b))return d?{}:"";if("string"===typeof b)return b;if(b instanceof Element){if("FORM"!==b.tagName.toUpperCase())throw new a.Error("Q.queryString: element must be a FORM");
|
|
282
|
+
var h="";a.each(b.querySelectorAll("input, textarea, select"),function(){var a="SELECT"===this.tagName.toUpperCase()?this.options[this.selectedIndex].value:this.value;h+=(h?"&":"")+this.getAttribute("name")+"="+encodeURIComponent(a)});return h}var m=[];h={};if(c){var l=!0!==c?c:a.isArrayLike(b)&&b.map?b.map(function(a,b){return b}):Object.keys(b).sort();a.each(l,function(a,c){f(c,b[c])})}else a.each(b,function(a,b){f(a,b)});return d?h:m.join("&").replace(/%20/g,"+")};a.serialize=function(b){return a.queryString(b,
|
|
283
|
+
!0,!1,{convertBooleanToInteger:!1}).replace("+","%20")};a.formPost=function(b,c,d,e){var f=0;b&&b instanceof Element&&"string"===typeof b.action&&(e=c,d=c=null,f=1);e="function"===typeof e?{onLoad:e}:!0===e?{straight:!0}:e||{};var g=a.copy(e);1==f?(g.form=b,b=g.form.action,d=g.form.method):(d=d||g.form&&g.form.method||"POST",b=b||g.form&&g.form.action||"");d=d.toUpperCase();var h;g.onLoad&&(h="Q.Event"===g.onLoad.typename?g.onLoad.handle:g.onLoad);f=g.target;var m=g.iframe,l;f||((l=g.iframe)&&(f=
|
|
284
|
+
l.getAttribute("name")),f||(f="Q_formPost_iframe_"+ ++a.formPost.counter%1E3),g.iframe||(l=e.iframe=document.createElement("iframe"),l.width=l.height=l.marginWidth=l.marginHeight=0),l.setAttribute("name",f),l.setAttribute("id",f));var k=g.form;if(k){var u=k.method;var q=k.action}else k=document.createElement("form");k.setAttribute("method",d);k.setAttribute("action",b);var t=[];b=a.queryString(c,null,!0);for(var p in b)b.hasOwnProperty(p)&&(c=document.createElement("input"),c.setAttribute("type",
|
|
285
|
+
"hidden"),c.setAttribute("name",p),c.setAttribute("value",b[p]),k.appendChild(c),t.push(c));l&&!m&&document.body.appendChild(l);l&&a.addEventListener(l,"load",function(){a.handle(h,this,[l]);!m&&l.parentElement&&a.removeElement(l)});g.form||document.body.appendChild(k);g.straight||k.setAttribute("target",f);k.submit();setTimeout(function(){if(g.form){for(var b=t.length-1;0<=b;--b)a.removeElement(t[b]);k.action=q;k.method=u}else a.removeElement(k,!0)},0)};a.formPost.counter=0;a.updateUrls=function(b){var c=
|
|
286
|
+
a.Storage,d,e,f,g=a.cookie("Q_ut");try{var h=c.getItem(a.updateUrls.timestampKey)}catch(l){}if(g&&!h)a.request("Q/urls/urls/latest.json",[],function(g,h){a.updateUrls.urls=h;f=JSON.stringify(a.updateUrls.urls);c.setItem(a.updateUrls.urlsKey,f);if(d=h["@timestamp"])c.setItem(a.updateUrls.timestampKey,d),a.cookie("Q_ut",d);(e=h["@earliest"])&&c.setItem(a.updateUrls.earliestKey,e);a.handle(b,null,[h,d])},{extend:!1,cacheBust:1E3,skipNonce:!0});else if(g&&g!==h){var m="Q/urls/diffs/"+h+".json";a.request(m,
|
|
287
|
+
[],function(g,h){function l(g){try{var h=JSON.parse(c.getItem(a.updateUrls.urlsKey))}catch(x){}a.isEmpty(h)||(a.updateUrls.urls=h);a.extend(a.updateUrls.urls,100,g);f=JSON.stringify(a.updateUrls.urls);c.setItem(a.updateUrls.urlsKey,f);if(d=g["@timestamp"])c.setItem(a.updateUrls.timestampKey,d),a.cookie("Q_ut",d);(e=g["@earliest"])&&c.setItem(a.updateUrls.earliestKey,e);a.handle(b,null,[g,d])}g?(a.request("Q/urls/urls/latest.json",function(a,b){l(b)},{extend:!1,cacheBust:1E3}),console.warn("Q.updateUrls couldn't load or parse "+
|
|
288
|
+
m)):l(h)},{extend:!1,cacheBust:1E3,skipNonce:!0})}else a.handle(b,null,[{},null])};a.updateUrls.urlsKey="Q.updateUrls.urls";a.updateUrls.earliestKey="Q.updateUrls.earliest";a.updateUrls.timestampKey="Q.updateUrls.timestamp";try{a.updateUrls.urls=JSON.parse(a.Storage.getItem(a.updateUrls.urlsKey)||"{}")}catch(b){}a.addScript=function(b,c,d){function e(){for(var a;ca[0]&&("loaded"==ca[0].readyState||"complete"==ca[0].readyState);)a=ca.shift(),a.onreadystatechange=null,t.appendChild(a),f(null,a,a.src)}
|
|
289
|
+
function f(c,d,e){if(!(this&&"readyState"in this&&"complete"!==this.readyState&&"loaded"!==this.readyState)){if(d)y=d,b=e;else if(f.executed)return;d=b.split("?")[0];for(a.addScript.loaded[d]=!0;c=a.addScript.onLoadCallbacks[d].shift();)a.nonce=a.nonce||a.cookie("Q_nonce"),c.call(this);y.onload=y.onreadystatechange=null;f.executed=!0}}function g(b){if(u.ignoreLoadingErrors)return f(b);if(!g.executed){a.addScript.loaded[r]=!1;if(a.addScript.onErrorCallbacks[r])for(;b=a.addScript.onErrorCallbacks[r].shift();)b.call(this);
|
|
290
|
+
g.executed=!0}}function h(){a.addScript.loaded[r]=!0;p.jQuery&&!a.onJQuery.occurred&&a.onJQuery.handle(p.jQuery,[p.jQuery]);a.jQueryPluginPlugin();c()}c||(c=function(){});if(a.isArrayLike(b)){var m=[],l=[];a.each(b,function(a,b){b&&l.push(b&&b.src?b.src:b)});if(a.isEmpty(l))return c(),[];var k=new a.Pipe(l,c);a.each(l,function(b,c){m.push(a.addScript(c,k.fill(c),d))});return m}var u=a.extend({},a.addScript.options,d),q=document.scripts?document.scripts[0]:document.getElementsByTagName("script")[0],
|
|
291
|
+
t=u.container||document.head||document.getElementsByTagName("head")[0];c||(c=function(){});var x;h.loaded={};b=b&&b.src?b.src:b;if(!b)return null;d=d||{};d.info={};b=a.url(b,null,d);var r=b.split("?")[0];if(!u.duplicate){if(!u.querystringMatters&&a.addScript.loaded[r])return h(),u.returnAll?null:!1;var v=document.getElementsByTagName("script"),G=ca.length;if(G){var H=[].concat(ca);for(x=0;x<v.length;++x)H.push(v[x]);v=H}for(x=0;x<v.length;++x){var y=v[x];if((H=y.getAttribute("src"))&&(u.querystringMatters?
|
|
292
|
+
H===b:H.split("?")[0]===r)){q=y;for(x=!0;q=q.parentElement;)if(q===t){x=!1;break}x&&!G&&t.appendChild(y);if(a.addScript.loaded[r]||a.addScript.loaded[r])return h(y),u.returnAll?y:!1;if(!1===a.addScript.loaded[r])return u.ignoreLoadingErrors?h(y):u.onError&&u.onError.call(y),u.returnAll?y:!1;if(!(a.addScript.added[r]||y.wasProcessedByQ||"readyState"in y&&"complete"===y.readyState&&"loaded"===y.readyState))return h(),u.returnAll?y:!1;a.addScript.onLoadCallbacks[r]||(a.addScript.onLoadCallbacks[r]=[]);
|
|
293
|
+
a.addScript.onErrorCallbacks[r]||(a.addScript.onErrorCallbacks[r]=[]);a.addScript.onLoadCallbacks[r].push(c);u.onError&&a.addScript.onErrorCallbacks[r].push(u.onError);y.wasProcessedByQ||(y.onload=f,y.onreadystatechange=f,a.addEventListener(y,"error",g),y.wasProcessedByQ=!0);return u.returnAll?y:!1}}}y=document.createElement("script");y.setAttribute("type",a.getObject("type",d)||"text/javascript");d.info.h&&!d.skipIntegrity&&a.info.urls&&a.info.urls.integrity&&y.setAttribute("integrity","sha256-"+
|
|
294
|
+
d.info.h);u.async&&(y.async=!0);a.addScript.added[r]=!0;a.addScript.onLoadCallbacks[r]=[h];a.addScript.onErrorCallbacks[r]=[];u.onError&&a.addScript.onErrorCallbacks[r].push(u.onError);a.addEventListener(y,"load",f);a.addEventListener(y,"error",g);y.wasProcessedByQ=!0;"async"in y?(y.setAttribute("src",b),u.async||(y.async=!1),t.appendChild(y)):q.readyState?(ca.push(y),y.onreadystatechange=e,y.src=b):(y.setAttribute("defer","defer"),y.setAttribute("src",b),t.appendChild(y));return y};a.addScript.onLoadCallbacks=
|
|
295
|
+
{};a.addScript.onErrorCallbacks={};a.addScript.added={};a.addScript.loaded={};var ca=[];a.addScript.options={duplicate:!1,ignoreLoadingErrors:!1};a.findScript=function(b){var c=document.getElementsByTagName("script");b=a.url(b);for(var d=0;d<c.length;++d)if(c[d].getAttribute("src")===b)return c[d];return null};a.exports=function(){var b=a.currentScript(1).src;ta[b]=Array.prototype.slice.call(arguments,0)};a.require=function(b,c,d,e){if(!b||"string"!==typeof b)throw new a.Exception("Q.require: invalid script src");
|
|
296
|
+
b=a.url(b);var f=b.split("?")[0],g=ta[b]||ta[f];g!==k?d?a.handle(c,a,g):setTimeout(function(){a.handle(c,a,g)},0):a.addScript(b,function(d){if(d)return a.handle(c,a.Exception,[d]);a.handle(c,a,ta[b]||ta[f]||[])})};var ta={};a.addStylesheet=function(b,c,d,e){function f(c){if(!(f.executed||"readyState"in this&&"complete"!==this.readyState&&"loaded"!==this.readyState)){c=b.split("?")[0];a.addStylesheet.loaded[c]=!0;for(var d;d=a.addStylesheet.onLoadCallbacks[c].shift();)d.call(this);f.executed=!0}}function g(b){if(m.ignoreLoadingErrors)return f(b);
|
|
297
|
+
if(!g.executed){a.addStylesheet.loaded[t]=!1;if(a.addStylesheet.onErrorCallbacks[t])for(;b=a.addStylesheet.onErrorCallbacks[t].shift();)b.call(this);g.executed=!0}}function h(){a.addStylesheet.loaded[t]=!0;d()}"function"===typeof c?(e=d,d=c,c=k):!a.isPlainObject(c)||c instanceof a.Event||(e=c,c=null);var m=a.extend({},a.addStylesheet.options,e);if(!m.slotName&&a.Tool.beingActivated){var l=a.Tool.names[a.Tool.beingActivated.name];l&&(m.slotName=l.split("/")[0])}d||(d=function(){});if(a.isArrayLike(b)){var n=
|
|
298
|
+
[],u=[];a.each(b,function(a,b){b&&u.push(b&&b.href?b.href:b)});if(a.isEmpty(u))return d(),[];var q=new a.Pipe(u,1,d);a.each(u,function(b,d){n.push(a.addStylesheet(d,c,q.fill(d),e))});return n}l=m.container||document.getElementsByTagName("head")[0];if(!b)return d(!1),!1;m.info={};b=a.url(b,null,m);var t=b.split("?")[0];if(!m.querystringMatters&&a.addStylesheet.loaded[t])return h(),m.returnAll?null:!1;c||(c="screen,print");var p=document.querySelectorAll("link[rel=stylesheet],style[data-slot]"),r;for(r=
|
|
299
|
+
0;r<p.length;++r){var v=p[r];var G=v.getAttribute("media");var H=p[r].getAttribute("href")||p[r].getAttribute("data-href");if((!G||G===c)&&H&&H.split("?")[0]===t){if(!1===a.addStylesheet.loaded[t])return m.ignoreLoadingErrors?h():m.onError&&m.onError.call(v),m.returnAll?v:!1;p=v;for(r=!0;p=p.parentElement;)if(p===l){r=!1;break}r&&l.appendChild(v);if(!(a.addStylesheet.added[t]||v.wasProcessedByQ||"readyState"in v&&"complete"===v.readyState&&"loaded"===v.readyState))return h(),m.returnAll?v:!1;if(a.addStylesheet.loaded[b]||
|
|
300
|
+
a.addStylesheet.loaded[t]||!a.addStylesheet.added[t])return d(),m.returnAll?v:!1;a.addStylesheet.onLoadCallbacks[t]||(a.addStylesheet.onLoadCallbacks[t]=[]);a.addStylesheet.onErrorCallbacks[t]||(a.addStylesheet.onErrorCallbacks[t]=[]);a.addStylesheet.onLoadCallbacks[t].push(d);m.onError&&a.addStylesheet.onErrorCallbacks[t].push(m.onError);v.wasProcessedByQ||(a.info.isAndroidStock?setTimeout(function(){f.call(v)},100):(a.addEventListener(v,"load",f),a.addEventListener(v,"error",g),v.onreadystatechange=
|
|
301
|
+
f),v.wasProcessedByQ=!0);return m.returnAll?v:!1}}p=document.createElement("link");p.setAttribute("rel","stylesheet");p.setAttribute("type","text/css");p.setAttribute("media",c);m.info.h&&!m.skipIntegrity&&a.info.urls&&a.info.urls.integrity&&p.setAttribute("integrity","sha256-"+m.info.h);a.addStylesheet.added[b]=!0;a.addStylesheet.onLoadCallbacks[t]=[d];a.addStylesheet.onErrorCallbacks[t]||(a.addStylesheet.onErrorCallbacks[t]=[]);m.onError&&a.addStylesheet.onErrorCallbacks[t].push(m.onError);p.onload=
|
|
302
|
+
f;p.onreadystatechange=f;p.setAttribute("href",b);r=document.querySelectorAll("link[data-slot], style[data-slot]");H=null;if(a.allSlotNames&&m.slotName){p.setAttribute("data-slot",m.slotName);G=a.allSlotNames.indexOf(m.slotName);for(var y=0;y<r.length;++y){v=r[y];var w=v.getAttribute("data-slot");if(a.allSlotNames.indexOf(w)>G){H=v;break}}}H?H.parentElement.insertBefore(p,H):l.appendChild(p);return p};a.addStylesheet.onLoadCallbacks={};a.addStylesheet.onErrorCallbacks={};a.addStylesheet.added={};
|
|
303
|
+
a.addStylesheet.loaded={};a.findStylesheet=function(b){var c=document.getElementsByTagName("link");b=a.url(b);for(var d=0;d<c.length;++d)if("stylesheet"===c[d].getAttribute("rel").toLowerCase()&&c[d].getAttribute("href")===b)return c[d];return null};a.ServiceWorker={start:function(b,c){c=c||{};if(!("serviceWorker"in navigator))return a.handle(b,null,[!1]),a.ServiceWorker.onActive.handle(!1),console.warn("Q.ServiceWorker.start: Service workers are not supported.");var d=a.info.serviceWorkerUrl;d?(a.ServiceWorker.started=
|
|
304
|
+
!0,navigator.serviceWorker.getRegistration(d).then(function(e){if(!e||!e.active||a.info&&a.info.updateServiceWorker)navigator.serviceWorker.register(d).then(function(d){T("Q.ServiceWorker.register",d);c.update&&d.update();d.removeEventListener("updatefound",cb);d.addEventListener("updatefound",cb);if(d.active)var e=d.active;else d.waiting?e=d.waiting:d.installing&&(e=d.installing);e&&(a.handle(b,a.ServiceWorker,[e,d]),a.handle(a.ServiceWorker.onActive,a.ServiceWorker,[e,d]))}).catch(function(a){b(a);
|
|
305
|
+
console.warn("Q.ServiceWorker.start error",a)});else{var f=e.active;a.handle(b,a.ServiceWorker,[f,e]);a.handle(a.ServiceWorker.onActive,a.ServiceWorker,[f,e])}}),navigator.serviceWorker.addEventListener("message",function(b){b=b.data||{};if("Q.cookie"===b.type&&b.cookies){if(window.self!==window.top)try{sessionStorage.setItem("Q.cookieJar",JSON.stringify(b.cookies))}catch(g){a.warn("Q: could not write cookie jar to sessionStorage: "+g)}for(var c in b.cookies)if(b.cookies.hasOwnProperty(c))try{document.cookie=
|
|
306
|
+
encodeURIComponent(c)+"="+encodeURIComponent(b.cookies[c])+"; path=/"}catch(g){}}}),function(){if(navigator.serviceWorker&&navigator.serviceWorker.controller)try{var b=sessionStorage.getItem("Q.cookieJar");if(b){var c=JSON.parse(b);navigator.serviceWorker.controller.postMessage({type:"Q.cookie",cookies:c})}}catch(g){a.warn("Q: could not rehydrate SW cookie jar from sessionStorage: "+g)}}()):(a.handle(b,null,[!1]),a.ServiceWorker.onActive.handle(!1))}};try{a.ServiceWorker.isSupported=!!navigator.serviceWorker}catch(b){a.ServiceWorker.isSupported=
|
|
307
|
+
!1}a.ServiceWorker.onActive=new a.Event;a.ServiceWorker.onUpdateFound=new a.Event;a.cookie=function(b,c,d){function e(){try{var a=sessionStorage.getItem("Q.cookieJar");return a?JSON.parse(a):{}}catch(O){return{}}}function f(a){try{sessionStorage.setItem("Q.cookieJar",JSON.stringify(a))}catch(O){console.warn("Q.cookie sessionStorage write failed:",O)}}function g(a,b){try{if(navigator.serviceWorker&&navigator.serviceWorker.controller){var c={type:"Q.cookie",cookies:{}};c.cookies[a]=b;navigator.serviceWorker.controller.postMessage(c)}}catch(G){console.warn("Q.cookie SW notify failed:",
|
|
308
|
+
G)}}try{d=d||{};if("undefined"!=typeof c){var h="";var m=a.baseUrl().split("://");if("path"in d)var l=";path="+d.path;else if(m[1])l=";path=/"+m[1].split("/").slice(1).join("/");else return null;if("domain"in d)h=";domain="+d.domain;else{var k=a.copy(d),u=m[1].split("/").shift();k.domain="."+u;a.cookie(b,null,k);h=""}if(null===c){document.cookie=encodeURIComponent(b)+"=;expires=Thu, 01-Jan-1970 00:00:01 GMT"+l+h;if(!("domain"in d)&&window.self!==window.top){var q=e();q.hasOwnProperty(b)&&(delete q[b],
|
|
309
|
+
f(q));g(b,"")}return null}m="";d.expires&&(m=new Date,m.setTime((new Date).getTime()+d.expires),m=";expires="+m.toGMTString());document.cookie=encodeURIComponent(b)+"="+encodeURIComponent(c)+m+l+h;"domain"in d||window.self===window.top||(q=e(),q[b]=String(c),f(q),g(b,String(c)));return null}q=e();if(q.hasOwnProperty(b))return q[b];h=document.cookie.split(";");for(c=0;c<h.length;++c){m=h[c].split("=");var t=m.splice(0,1);t.push(m.join("="));if(decodeURIComponent(t[0].replace(/^\s+|\s+$/g,""))===b){if(2>
|
|
310
|
+
t.length)break;return decodeURIComponent(t[1])}}return null}catch(x){return!1}};a.sessionName=function(){return a.info.sessionName||"Q_sessionId"};a.sessionId=function(){return a.cookie(a.sessionName())};a.clientId=function(){var b=p.sessionStorage;if(a.clientId.value=b.getItem("Q.clientId"))return a.clientId.value;var c=a.Browser.detect(),d=1E3*Math.floor(Date.now()/1E3)+Math.floor(1E3*Math.random());c=a.clientId.value=(c.device||"desktop").substring(0,4)+"-"+a.normalize.memoized(c.OS.substring(0,
|
|
311
|
+
3))+"-"+a.normalize.memoized(c.name.substring(0,3))+"-"+c.mainVersion+(c.isWebView?"n":c.isStandalone?"s":"w")+"-"+d.toString(36);b.setItem("Q.clientId",c);return c};a.uuid=function(b){b||(b=a.clientId());return a.uuid[b]=a.uuid[b]||"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})};a.find=function(b,c,d,e,f,g,h,m){var l;if(b){if(!0===c&&(c="q_tool",b.Q_activating&&g&&b.Q_activating!==g.activating))return;if(a.isArrayLike(b)&&
|
|
312
|
+
!a.instanceOf(b,Element)||"undefined"!==typeof HTMLCollection&&b instanceof p.HTMLCollection||p.jQuery&&b instanceof p.jQuery)a.each(b,function(b,m){if(m&&!1===a.find(m,c,d,e,f,g,h,b))return!1});else{var k=null===c;if(!k&&"className"in b&&"string"===typeof b.className&&b.className){var u=b.className.split(" ");for(l=u.length-1;0<=l;--l){var q=a.normalize.memoized(u[l]);if("string"===typeof c&&c===q||c instanceof RegExp&&c.test(q)||"function"===typeof c&&c(q)){k=!0;break}}}if(!k&&b.attributes)for(l=
|
|
313
|
+
b.attributes.length-1;0<=l;--l)if(u=b.attributes[l].name,"string"===typeof c&&c===u||c instanceof RegExp&&c.test(u)||"function"===typeof c&&c(u)){k=!0;break}if(k&&"function"==typeof d){var t=d(b,f,g,h,m);if(!1===t)return!1}if(!0!==t&&(t=a.find(a.copy("children"in b?b.children:b.childNodes),c,d,e,f,g,b),!1===t)||k&&"function"==typeof e&&!1===e(b,f,g,h,m))return!1}}};a.activate=function(b,c,d,e){if(b){if("Q.Tool"===a.typeOf(b)){var f=b;var g=a.Tool.beingActivated;a.Tool.beingActivated=f;b=f.element}f=
|
|
314
|
+
((b.Q_activating||0)+1)%1E6;b.Q_activating=f;a.beforeActivate.handle.call(p,b);var h={},m=null,l=null;a.Promise&&(h=new a.Promise(function(a,b){m=a;l=b}));h.cancel=function(){n.canceled=!0;l&&l()};h.element=b;var n={tool:null,tools:{},waitingForTools:[],pipe:a.pipe(),canceled:!1,activating:f};a.extend(n,3,e);"function"===typeof c&&(d=c,c=k);a.find(b,!0,va,xb,c,n);e&&e.progress&&e.progress(n);n.pipe.add(n.waitingForTools,1,function(){var e=n.firstTool||n.tool;n.internal&&n.internal.progress&&n.internal.progress(n);
|
|
315
|
+
d&&a.handle(d,e,[b,n.tools,c]);m&&m({element:b,options:c,tools:n.tools});delete b.Q_activating;a.handle(a.onActivate,e,[b,n.tools,c])}).run();g&&(a.Tool.beingActivated=g);return h}};a.loadUrl=function(b,c){var d=a.extend({},a.loadUrl.options,c),e=d.handler,f=d.slotNames||a.info&&a.info.slotNames;"string"===typeof f&&(f=f.split(","));if(d.retainSlots){var g=[],h,m=f.length;for(h=0;h<m;++h){var l=f[h];!d.retainSlots[l]||a.loadUrl.retainedSlots[l]?g.push(l):a.loadUrl.retainedSlots[l]=document.getElementById(l+
|
|
316
|
+
"_slot")}f=g}var n=b.split("#");g=n[1]&&n[1].queryField("url")||n[0];h=a.request;d.loader&&(h=d.loader);if(d.onError)var u=d.onError;if(d.onActivate)var q=d.onActivate;var t={url:b,options:c};a.loadUrl.loading[d.key]=t;h(g,f,function(c,g,h){function m(){function h(){a.Response.processStyles(g);m();!d.ignoreHash&&n[1]&&history.pushState&&document.getElementById(n[1])&&(location.hash=n[1])}function m(){if(!d.ignorePage){for(l("before",u);a.Event.forPage&&a.Event.forPage.length;)a.Event.forPage[0].remove(!0);
|
|
317
|
+
var c=a.Event.jQueryForPage;for(r=c.length-1;0<=r;--r)p.jQuery.fn[c[r][0]].call(c[r][1],c[r][2],c[r][3]);a.Event.jQueryForPage=[]}d.ignorePage||g&&g.redirect||a.each(["link","style","script"],function(b,c){if("style"===c||d.loadExtras)a.loadUrl.elementsToRemove[c]=[],a.each(document.getElementsByTagName(c),function(b,d){if("link"!==c||"stylesheet"===d.getAttribute("rel").toLowerCase()){var e=d.getAttribute("data-slot");if(e&&0<=f.indexOf(e)){b=!1;if(g.stylesheets&&g.stylesheets[e]){e=g.stylesheets[e];
|
|
318
|
+
for(var h=0,m=e.length;h<m;++h){var l=e[h],k=l&&l.href,n=d&&(d.href||d.getAttribute("data-href"));if(k&&n&&k.split("?")[0]===n.split("?")[0]&&(!l.media||!d.media||l.media===d.media)){b=!0;break}}}b||(a.addStylesheet.loaded[d.href]=!1,a.loadUrl.elementsToRemove[c].push(d))}}})});for(var h in a.loadUrl.elementsToRemove)a.each(a.loadUrl.elementsToRemove[h],function(){a.removeElement(this)});a.loadUrl.elementsToRemove={};a.handle(d.beforeFillSlots,a,[g,b,d]);x=e(g,b,d);a.handle(d.onFillSlots,a,[x,g,b,
|
|
319
|
+
d]);d.ignoreHistory||a.Page.push(b,a.getObject("slots.title",g));!d.ignorePage&&a.info&&a.info.uri&&(a.Page.onLoad(u).occurred=!1,a.Page.onActivate(u).occurred=!1,a.info.uriString!==a.moduleSlashAction&&(a.Page.onLoad(a.info.uriString).occurred=!1,a.Page.onActivate(a.info.uriString).occurred=!1));a.Response.processScriptDataAndLines(g);if(!d.ignorePage)try{a.Page.beingLoaded=!0,a.Page.onLoad("").handle(b,d),a.info&&a.info.uri&&(u=a.info.uri.module+"/"+a.info.uri.action,a.Page.onLoad(u).handle(b,d),
|
|
320
|
+
a.info.uriString!==u&&a.Page.onLoad(a.info.uriString).handle(b,d)),a.Page.beingLoaded=!1}catch(Fb){debugger;a.Page.beingLoaded=!1;throw Fb;}if(a.isEmpty(x))t();else if(a.isPlainObject(x)){t.remaining=Object.keys(x).length;for(var m in x)a.activate(x[m],k,t)}else a.activate(x,k,t)}function l(c,e){var f=a.Page[c+"Unload"];a.info&&a.info.uri&&(c=f("Q\t"+e),c.handle(b,d),c.removeAllHandlers(),c=f(e),c.handle(b,d),a.info.uriString!==e&&(c=f("Q\t"+a.info.uriString),c.handle(b,d),c.removeAllHandlers(),c=
|
|
321
|
+
f(a.info.uriString),c.handle(b,d)));c=f("Q\t");c.handle(b,d);c.removeAllHandlers();c=f("");c.handle(b,d)}function t(){if(!(t.remaining!==k&&0<--t.remaining)){a.each([y,v,G],function(b,c){a.each(c,function(b,c){b&&a.each(c,function(a,c){c&&c.setAttribute("data-slot",b)})})});if(!d.ignorePage)try{a.Page.beingActivated=!0;a.Page.onActivate("").handle(b,d);if(a.info&&a.info.uri){var e=a.info.uri.module+"/"+a.info.uri.action;a.Page.onActivate(e).handle(b,d);a.info.uriString!==e&&a.Page.onActivate(a.info.uriString).handle(b,
|
|
322
|
+
d)}a.Page.beingActivated=!1}catch(Eb){debugger;a.Page.beingActivated=!1;throw Eb;}a.handle(d.onRequestProcessed,this,[c,g]);a.Page.beingProcessed=!1;a.handle(q,this,[x])}}a.Notices.toRemove&&(a.handle(a.Notice.sremove(a.Notice.toRemove)),delete a.Notices.toRemove);var u=a.info.uri.module+"/"+a.info.uri.action,r,v;a.handle(d.beforeTransition,a,[g,b,d]);var x=null;if(d.ignorePage){var y={};h()}else l("on",u),y=a.Response.processStylesheets(g,h)}if(!w){var l=a.loadUrl.loading[d.key];delete a.loadUrl.loading[d.key];
|
|
323
|
+
if(h&&!d.ignoreRedirect)r&&r(g);else if(l&&t!=l){h=l.options&&l.options.slotNames||[];var x=t.options&&t.options.slotNames||[];h="string"===typeof h?h:h.join(",");x="string"===typeof x?x:x.join(",");l="request to "+l.url+" ("+h+") was initiated after current one to "+t.url+" ("+x+")";v&&v(l)}else{if(!a.isEmpty(c))return l=new a.Exception(a.firstErrorMessage(c),a.firstError(c)),v&&v(l),a.handle(u,this,[l]);if(!a.isEmpty(g.errors))return l=g.errors[0].message,v&&v(l),a.handle(u,this,[l]);a.handle(d.onLoad,
|
|
324
|
+
this,[g]);a.handle(d.beforeUnloadUrl,this,[d.unloadedUrl||location.href,b,g]);r&&r(g);a.Page.beingProcessed=!0;a.Response.processHtmlCssClasses(g);a.Response.processMetas(g);a.Response.processTemplates(g);if(!d.ignoreDialogs)for(;a.Dialogs.dialogs.length;)a.Dialogs.pop();if(d.ignorePage){var G=[];m()}else G=a.Response.processScripts(g,m,d)}}},d);c={};var r=null,v=null,w=null;a.Promise&&(c=new a.Promise(function(a,b){r=a;v=b}));c.cancel=function(){w=!0;v&&v("request canceled")};return c};a.loadUrl.retainedSlots=
|
|
282
325
|
{};a.loadUrl.elementsToRemove={};a.loadUrl.saveScroll=function(b){var c=a.info.slotNames,d,e;"string"===typeof c&&(c=c.split(","));var f=c.length;for(e=0;e<f;++e)(d=document.getElementById(c[e]+"_slot"))&&"scrollLeft"in d&&a.setObject(["Q","scroll",b],{left:d.scrollLeft,top:d.scrollTop},d)};a.loadUrl.request=function(b,c,d,e){return a.loadUrl(b,a.extend({ignoreHistory:!0,ignorePage:!0,ignoreDialogs:!0,ignoreRedirect:!0,ignoreLoadingErrors:!0,ignoreHash:!0,dontReload:!0,handler:function(){return null},
|
|
283
326
|
slotNames:c,onError:function(b){a.handle(d,this,[b])},onRequestProcessed:function(b,c){a.handle(d,this,[null,c])}},e))};a.loadUrl.loading={};a.displayDuration=function(a,c){a=parseInt(a);c||(c={hours:!1,seconds:!0});a=Math.floor(a/1E3);var b=Math.floor(a/60),e=Math.floor(b/60);b=(b%60).toString();1===b.length&&(b="0"+b);b=[b];if(a||c.seconds)a=(a%60).toString(),1===a.length&&(a="0"+a),b.push(a);(e||c.hours)&&b.unshift(e);return b.join(":")};a.parseQueryString=function(b,c){if(!b)return{};if("?"===
|
|
284
|
-
b[0]||"#"===b[0])b=b.substring(1);var d={};a.each(b.split("&"),function(a,b){b=b.split("=");a=decodeURIComponent(b[0]);b=null==b[1]?null:decodeURIComponent(b[1]);a&&(c&&c.push(a),d[a]=b)});return d};var
|
|
285
|
-
return a.info.nodeUrl&&a.info.nodeUrl.replace(a.info.baseUrl,a.baseUrl())};a.nodeUrl.routers=[];a.Template=function(){};a.Template.collection={};a.Template.info={};a.Template.set=function(b,c,d,e){var f=a.Template,g=a.normalize.memoized(b);if(!e&&f.info[g])return!1;f.remove(b);c!==
|
|
286
|
-
typeof b?(delete a.Template.collection[a.normalize.memoized(b)],a.Template.load.cache.removeEach([b])):a.each(b,function(b,d){a.Template.remove(d)})};a.Template.compile=function(b,c,d){var e=a.Template.compile.results;e[b]||(e[b]="handlebars"===(c||"handlebars")?
|
|
287
|
-
(d=c,c=
|
|
327
|
+
b[0]||"#"===b[0])b=b.substring(1);var d={};a.each(b.split("&"),function(a,b){b=b.split("=");a=decodeURIComponent(b[0]);b=null==b[1]?null:decodeURIComponent(b[1]);a&&(c&&c.push(a),d[a]=b)});return d};var xa={};va.alreadyActivated={};a.baseUrl=function(b){var c,d;for(d=0;d<a.baseUrl.routers.length;++d)if(c=a.baseUrl.routers[d](b))return c;return a.info.proxyBaseUrl||a.info.baseUrl};a.baseUrl.routers=[];a.nodeUrl=function(b){var c,d;for(d=0;d<a.nodeUrl.routers.length;++d)if(c=a.nodeUrl.routers[d](b))return c;
|
|
328
|
+
return a.info.nodeUrl&&a.info.nodeUrl.replace(a.info.baseUrl,a.baseUrl())};a.nodeUrl.routers=[];a.Template=function(){};a.Template.collection={};a.Template.info={};a.Template.set=function(b,c,d,e){var f=a.Template,g=a.normalize.memoized(b);if(!e&&f.info[g])return!1;f.remove(b);c!==k&&(f.collection[g]=c);d="string"===typeof d?{type:d}:d||{};a.Text.addedFor("Q.Template.set",g,d);d.type=d.type||"handlebars";f.info[g]=d;a.Template.load.forget.each(b);a.loadHandlebars();return!0};a.Template.remove=function(b){"string"===
|
|
329
|
+
typeof b?(delete a.Template.collection[a.normalize.memoized(b)],a.Template.load.cache.removeEach([b])):a.each(b,function(b,d){a.Template.remove(d)})};a.Template.compile=function(b,c,d){var e=a.Template.compile.results;e[b]||(e[b]="handlebars"===(c||"handlebars")?p.Handlebars.compile(b,a.extend({},a.Template.compile.options,d)):function(a,c){return b});return e[b]};a.Template.compile.options={preventIndent:!0};a.Template.compile.results={};a.Template.load=a.getter(function(b,c,d){"object"===typeof c&&
|
|
330
|
+
(d=c,c=k);d=d||{};d.name&&(b=d.name);if(b){d=a.extend({},a.Template.load.options,d);var e=a.Template.collection;$a(document);var f=a.normalize.memoized(b),g=a.Template.info[f];if(e&&"string"===typeof e[f])return a.handle(c,this,[null,e[f]]),!0;var h=g&&g.dir||d.dir,m=g&&g.type||d.type;b=a.url(h+"/"+b+"."+m);a.request(b,function(b,d){if(b)return a.Template.onError.handle(b),c(b,null);g&&(g.dir=h,g.type=m);e[f]=d.trim();c(null,e[f])},{parse:!1,extend:!1,skipNonce:!0});return!0}console.error("Q.Template.load: name is empty")},
|
|
288
331
|
{cache:a.Cache.document("Q.Template.load",100),throttle:"Q.Template.load"});a.Template.load.options={type:"handlebars",types:{handlebars:!0,php:!0,json:!0,"abi.json":!0},dir:"Q/views"};a.Template.onError=new a.Event(function(b){console.warn("Q.Template: "+a.firstErrorMessage(b))},"Q.Template");a.Template.render=a.promisify(function(b,c,d,e){"function"===typeof c&&(e=d,d=c,c={});var f=a.isArrayLike(b);if(f||a.isPlainObject(b)){var g=a.pipe(f?b:Object.keys(b),d);return a.each(b,function(b,d){a.Template.render(d,
|
|
289
|
-
c,g.fill(f?d:b),e)})}var
|
|
290
|
-
|
|
291
|
-
function(a,c){a=e[c]=b[c][1];
|
|
292
|
-
new a.Method;a.Method.define(a,"{{Q}}/js/methods/Q",function(){return[a]});a.
|
|
293
|
-
ArrayBuffer)return new Uint8Array(a);if("undefined"!==typeof Buffer&&a instanceof Buffer)return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);if(Array.isArray(a))return new Uint8Array(a);throw Error("Unsupported byte input");
|
|
294
|
-
for(var b=a.length/2,d=new Uint8Array(b),e=0;e<b;e++)d[e]=parseInt(a.substr(2*e,2),16);return d},toBase64:function(b){b=a.Data.toUint8Array(b);if("undefined"!==typeof Buffer)return Buffer.from(b).toString("base64");for(var c=
|
|
295
|
-
for(var b=a.length,d=new Uint8Array(b),e=0;e<b;e++)d[e]=a.charCodeAt(e);return d},blobFromDataURL:function(a){var b=a.split(",");a=b[0].match(/:(.*?);/)[1];b=atob(b[1]);for(var d=b.length,e=new Uint8Array(d);d--;)e[d]=b.charCodeAt(d);
|
|
296
|
-
c=Math.imul(c,16777619),c^=c>>>17,c=Math.imul(c,2246822507),c^=c>>>13,c=Math.imul(c,3266489909),c^=c>>>16;return 0===(c>>>0)%d}},"{{Q}}/js/methods/Q/Data",function(){return[a]});a.Crypto=a.Method.define({delegate:new a.Method,
|
|
297
|
-
|
|
298
|
-
{}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
var
|
|
302
|
-
|
|
303
|
-
a.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
a.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
e
|
|
321
|
-
|
|
322
|
-
"
|
|
323
|
-
"
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
a.
|
|
328
|
-
|
|
329
|
-
a.
|
|
330
|
-
return
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
var h=
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
a.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
{
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
"
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
a.
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
a.
|
|
380
|
-
|
|
381
|
-
function(){
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
332
|
+
c,g.fill(f?d:b),e)})}var h=e||{},m=h.name?h.name:b,l=h&&h.tool||a.Tool.beingActivated,k=a.Page.beingActivated;a.loadHandlebars(function(){var b=a.normalize.memoized(m),e=a.Template.info[b],f=a.pipe(["template","partials","helpers","text"],function(b){if(b.template[0])return d(b.template[0]);b.text[1]&&(c=Object.assign({},a.interpolateUrl.substitutionsWithFullURL,b.text[1],c));var f=a.Tool.beingActivated,g=a.Page.beingActivated;a.Tool.beingActivated=l;a.Page.beingActivated=k;try{var m=a.Template.compile(b.template[1],
|
|
333
|
+
e&&e.type||h&&h.type,h)(c,h)}catch(y){var n=y;console.warn(y)}if(n)d(n);else{if(b=h.activateInContainer)a.replace(b,m),a.activate(b,h.onActivate);d(null,m)}a.Tool.beingActivated=f;a.Page.beingActivated=g});a.Template.load(m,f.fill("template"),a.copy(h,["type","dir","name"]));a.each(["partials","helpers","text"],function(b,c){if(!e)return f.fill(c)();var d=e[c];"string"===typeof d&&(d=[d]);if(a.isEmpty(d))f.fill(c)();else if("text"===c)a.Text.get(d,f.fill(c));else if("partials"===c){var g=a.pipe(d,
|
|
334
|
+
function(b){var e={};try{a.each(d,function(a,c){a=e[c]=b[c][1];p.Handlebars.registerPartial(c,a)}),f.fill(c)([null,e])}catch(Za){Za.params=b,f.fill(c)([Za])}});a.each(d,function(b,c){"js"===c.split(".").pop()?(a.addScript(c,g.fill(c)),d.push(c)):a.Template.load(c,g.fill(c))})}else a.addScript(d,f.fill(c))})})},!1,2);a.leaves=function(b,c){if(a.isArrayLike(b))for(var d=0,e=b.length;d<e;++d)b[d]=a.leaves(b[d],c);else if("object"===typeof b)for(d in b)b[d]=a.leaves(b[d],c);else b=c(b);return b};a.sanitize=
|
|
335
|
+
new a.Method;a.globalMemoryWalk=new a.Method;a.registerWebComponent=new a.Method;a.Method.define(a,"{{Q}}/js/methods/Q",function(){return[a]});a.Tool.define.component=new a.Method;a.Method.define(a.Tool.define,"{{Q}}/js/methods/Q/Tool/define",function(){return[a]});a.Tool.define.components=!1;a.Sandbox=a.Method.define({run:new a.Method},"{{Q}}/js/methods/Q/Sandbox",function(){return[a]});a.Data=a.Method.define({digest:new a.Method,compress:new a.Method,decompress:new a.Method,hkdf:new a.Method,derive:new a.Method,
|
|
336
|
+
importKey:new a.Method,combineSecrets:new a.Method,encrypt:new a.Method,decrypt:new a.Method,sign:new a.Method,verify:new a.Method,generateKey:new a.Method,canonicalize:new a.Method,all:function(a,c){return a&&c},toUint8Array:function(a){if(a instanceof Uint8Array)return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if("undefined"!==typeof Buffer&&a instanceof Buffer)return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);if(Array.isArray(a))return new Uint8Array(a);throw Error("Unsupported byte input");
|
|
337
|
+
},toHex:function(b){b=a.Data.toUint8Array(b);for(var c="",d=0;d<b.length;d++)c+=b[d].toString(16).padStart(2,"0");return c},fromHex:function(a){if("string"!==typeof a||0!==a.length%2)throw Error("Invalid hex string");if(!/^[0-9a-fA-F]*$/.test(a))throw Error("Invalid hex characters");for(var b=a.length/2,d=new Uint8Array(b),e=0;e<b;e++)d[e]=parseInt(a.substr(2*e,2),16);return d},toBase64:function(b){b=a.Data.toUint8Array(b);if("undefined"!==typeof Buffer)return Buffer.from(b).toString("base64");for(var c=
|
|
338
|
+
"",d=0;d<b.length;d+=32768){var e=b.subarray(d,d+32768);c+=String.fromCharCode.apply(null,e)}return btoa(c)},fromBase64:function(a){if("string"!==typeof a)throw Error("Base64 must be string");if("undefined"!==typeof Buffer)return new Uint8Array(Buffer.from(a,"base64"));a=atob(a);for(var b=a.length,d=new Uint8Array(b),e=0;e<b;e++)d[e]=a.charCodeAt(e);return d},blobFromDataURL:function(a){var b=a.split(",");a=b[0].match(/:(.*?);/)[1];b=atob(b[1]);for(var d=b.length,e=new Uint8Array(d);d--;)e[d]=b.charCodeAt(d);
|
|
339
|
+
return new Blob([e],{type:a})},randomString:function(a){for(var b="";b.length<a;)b+=Math.random().toString(36).slice(2);return b.slice(0,a)},variant:function(a,c,d,e){d=d||2;e=e||47806;a=a.replace(/-/g,"");a=a+":"+c+":"+e;c=2166136261;for(e=0;e<a.length;e++)c^=a.charCodeAt(e),c=Math.imul(c,16777619),c^=c>>>17,c=Math.imul(c,2246822507),c^=c>>>13,c=Math.imul(c,3266489909),c^=c>>>16;return 0===(c>>>0)%d}},"{{Q}}/js/methods/Q/Data",function(){return[a]});a.Crypto=a.Method.define({delegate:new a.Method,
|
|
340
|
+
sign:new a.Method,verify:new a.Method,verifyDelegated:new a.Method,internalKeypair:new a.Method},"{{Q}}/js/methods/Q/Crypto",function(){return[a]});a.Crypto.OpenClaim=a.Method.define({canonicalize:new a.Method,sign:new a.Method,verify:new a.Method,resolve:new a.Method},"{{Q}}/js/methods/Q/Crypto/OpenClaim",function(){return[a]});a.Crypto.OpenClaim._keyCache={};a.Crypto.OpenClaim._urlCache={};a.Crypto.OpenClaim.EVM=a.Method.define({hashTypedData:new a.Method,sign:new a.Method,verify:new a.Method},
|
|
341
|
+
"{{Q}}/js/methods/Q/Crypto/OpenClaim/EVM",function(){return[a]});a.Models={schemas:{},fields:function(b,c){if(!a.isArrayLike(c))return c||{};b=a.Models.schemas[b]||a.Models.schemas[b.replace(/^Q\./,"").replace(/\./g,"_")];if(!b||!b.fieldNames)return{};for(var d=b.fieldNames,e={},f=0;f<d.length;f++)e[d[f]]=c[f];if(b.defaults)for(var g in b.defaults)e[g]===k&&(e[g]=b.defaults[g]);return e}};a.Text={collection:{},language:"en",locale:"US",dir:"Q/text",isRTL:function(a){return/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(a)},
|
|
342
|
+
setLanguage:function(b,c,d){a.Text.language=b.toLowerCase();a.Text.locale=c&&c.toUpperCase();a.Text.languageLocaleString=a.Text.language+(a.Text.useLocale&&a.Text.locale?"-"+a.Text.locale:"");a.Text.languageLocale=a.Text.language+(a.Text.locale?"-"+a.Text.locale:"");d&&d.skipRTL||(b=b.split("-")[0],"he ar arc az ku fa ur rhg ff".split(" ").includes(b)&&document.documentElement.setAttribute("dir","rtl"))},set:function(b,c,d){var e,f,g,h=a.Text.languageLocaleString;a.Text.override[b]&&(c=a.extend({},
|
|
343
|
+
c,10,a.Text.override[b]));d&&(e=a.getObject([h,b],a.Text.collection));e?a.extend(e,10,c):a.setObject([h,b],c,a.Text.collection);b=c&&c["@override"]||{};for(f in b)a.Text.override[f]=a.extend(a.Text.override[f],10,b[f]),(g=a.getObject([h,f],a.Text.collection))&&a.extend(g,10,a.Text.override[f]);return c},get:function(b,c,d){d=d||{};return new a.Promise(function(e,f){var g=a.Text.dir,h=d.language||a.Text.languageLocaleString,m=a.getObject([h,b],a.Text.collection);if(m)a.handle(c,a.Text,[null,m]),e(m);
|
|
344
|
+
else{var l=lb;d&&d.ignoreCache&&(l=l.force);var k=a.isArrayLike(b)?b:[b],u=a.pipe(k,function(b,d){d={};for(var g=null,h=0,m=k.length;h<m;++h){var l=k[h];b[l][0]?(g=g||{},g[l]=b[l][0]):b[l][1]&&(l=a.getObject([a.Text.languageLocaleString,l],a.Text.collection)||b[l][1],a.extend(d,10,l))}a.handle(c,a.Text,[g,d]);a.isEmpty(g)?e(d):f(g)});a.ensure("Q.info.baseUrl",function(){a.each(k,function(b,c){b=a.url(g+"/"+c+"/"+h+".json");return l(c,b,u.fill(c),a.extend({skipNonce:!0},d))})})}})},addFor:function(b,
|
|
345
|
+
c,d){a.isArrayLike(b)||(b=[b]);a.isArrayLike(d)||(d=[d]);a.each(b,function(b,f){a.Text.addFor.defined=a.Text.addFor.defined||{};b=a.normalize.memoized(c);var e={};e[f]=e[f]||{};e[f][b]=d;a.extend(a.Text.addFor.defined,3,e)})},addedFor:function(b,c,d){b=a.Text.addFor.defined[b];if(!b)return[];d=d||{};for(var e in b)if(c.startsWith(e)&&(!d||!1!==d.text)){var f=d.text=d.text||[];"string"===typeof f&&(f=d.text=[f]);a.each(b[e],function(a,b){0>f.indexOf(b)&&f.push(b)});break}return f},override:{}};a.Text.addFor.defined=
|
|
346
|
+
{};a.Text.loadBeforeInit=[];var mb=location.search.queryField("Q.language")||navigator.language;a.Text.setLanguage.apply(a.Text,mb.split("-"));var lb=a.getter(function(b,c,d,e){var f=a.extend({extend:!1,skipNonce:!0},e);return a.request(c,function(g,h){if(g&&!c.endsWith("en.json"))return c=c.replace(/[^\/]{2,5}\.json$/,"en.json"),lb.force(b,c,d,e);a.Text.set(b,h,f.merge);a.handle(d,a.Text,[g,h])},f)},{cache:a.Cache.document("Q.Text.get",100),throttle:"Q.Text.get"}),E={},Ka=[],Fa=[];a.Socket=function(a){this.socket=
|
|
347
|
+
a.socket;this.url=a.url;this.ns=a.ns};a.Socket.get=function(b,c){b===k&&c===k&&(c=a.nodeUrl());b===k&&(b="/Q");"/"!==b[0]&&(b="/"+b);return c?E[b]&&E[b][c]:c===k?E[b]:E[b]&&a.first(E[b])};a.Socket.getAll=function(){return E};var ia=p.a=a.getter(function(b,c,d,e){function f(b,c,d,f){function g(a){function b(){a.connecting=!1;a.off("connect",b);a.off("connect_error",b);a.off("disconnect",b)}a.connecting=!0;a.on("connect",b);a.on("connect_error",b);a.on("disconnect",b)}function h(d){a.each(Fa,function(e,
|
|
348
|
+
f){f[1]===b&&(e=f[0],Y(d.socket,e,a.Socket.onEvent(e,b,c).handle),Y(d.socket,e,a.Socket.onEvent(e,b,"").handle),a.handle(a.Socket.onRegister,a.Socket,[b,c,e]))})}function m(){var d=E[b][c];d.connected=!0;a.Socket.onConnect().handle(d,b,c);a.Socket.onConnect(b).handle(d,b,c);a.Socket.onConnect(b,c).handle(d,b,c);T("Socket "+b+" connected to "+c)}if(p.io){c=a.url(c);var l=E[b]&&E[b][c],k=f.earlyCallback;delete f.earlyCallback;f=a.extend({},f,10,{forceNew:!0,transports:["websocket"],auth:f.auth});if(!l){var n=
|
|
349
|
+
c.parseUrl();n=n.scheme+"://"+n.host+(n.port?":"+n.port:"");c.startsWith(n+"/")&&(f.path=c.substring(n.length)+a.getObject("Q.info.socketPath"));E[b]||(E[b]={});E[b][c]=l=new a.Socket({socket:p.io.connect(n+b,f),url:c,ns:b});f=l.socket;g(f);a.Socket.onConnect(b,c).add(h,"Q");Y(f,"connect",m);Y(f,"connect_error",function(a){T("Failed to connect to "+c,a)});Y(f.io,"close",function(){T("Socket "+b+" disconnected from "+c);l.connected=!1;ia.forget(b,c,d,e);ia.forget(b,c,d)});Y(f,"error",function(a){T("Error on connection "+
|
|
350
|
+
c+" ("+a+")")})}l.connected||!l.socket||l.socket.connecting||(l.socket.connect(),g(l.socket));a.handle(k,this,[E[b][c],b,c]);f=a.Socket.get(b,c);d&&(f&&f.connected?d.call(l,null,l,b,c):a.Socket.onConnect(b,c).setOnce(function(a,b,c){d.call(a,null,a,b,c)}))}}var g=a.extend({},a.Socket.connect.options,e);if(a.Socket.connect.validateAuth&&!a.Socket.connect.validateAuth(b,c,g))return setTimeout(function(){d("Q.Socket.connect: not authorized")},0);"/"!==b[0]&&(b="/"+b);if(p.io&&p.io.Socket)f(b,c,d,g);
|
|
351
|
+
else{var h=a.getObject("Q.info.socketPath");h===k&&(h="/socket.io");a.addScript(c+h+"/socket.io.js",function(){f(b,c,d,g)},{async:!0})}},{dontWarn:!0,callbackIndex:2});a.Socket.connect=function(b,c,d,e){c===k&&(c=a.nodeUrl());if(!c)return!1;"function"===typeof b?(d=b,b=""):b?"/"!==b[0]&&(b="/"+b):b="/Q";return d?ia(b,c,d,e):ia(b,c,e)};a.Socket.connect.options={};a.Socket.onRegister=new a.Event;a.Socket.prototype.disconnect=function(){if(this.url){var b=a.getObject([this.ns,this.url],E);b?b.socket.disconnect():
|
|
352
|
+
console.warn("Q.Socket.prototype.disconnect: Attempt to disconnect nonexistent socket: ",this.url)}else console.warn("Q.Socket.prototype.disconnect: Attempt to disconnect socket with empty url")};a.Socket.prototype.toJSON=function(){return{ns:this.ns,url:this.url}};a.Socket.disconnectAll=function(b){b?a.each(E[b],function(a,b){b&&b.disconnect()}):a.each(E,function(b,d){a.each(d,function(a,b){b&&b.disconnect()})})};a.Socket.reconnectAll=function(){var a,c;for(a in E)for(c in E[a])ia(a,c)};a.Socket.recreateAll=
|
|
353
|
+
function(){var b=[],c,d;for(c in E)for(d in E[c])b.push([c,d]);a.Socket.destroyAll();for(c=0;c<b.length;++c)ia(b[c][0],b[c][1])};a.Socket.destroyAll=function(){var b=Ka;Ka=[];a.Socket.disconnectAll();E={};for(var c=0;c<b.length;c++)b[c]()};a.Socket.onEvent=a.Event.factory({},["","/Q","",function(a,c,d){if("/"!==c[0])return[a,"/"+c,d]}],function(b,c,d){var e=this;e.onFirst().set(function(){a.each(a.Socket.get(c),function(d,g){function f(a){Y(a.socket,b,e.handle)}g&&a.Socket.onConnect(c,d).add(f,"Q")});
|
|
354
|
+
Fa.push([b,c])});e.onEmpty().set(function(){for(var c in E)for(var g in E[c])if(g===d||""===d){var h=E[c][g];h&&h.socket&&h.socket.off&&h.socket.off(b,e.handle)}a.each(Fa,function(a,d){d[0]===b&&d[1]===c&&Fa.splice(a,1)})});return e});a.Socket.onConnect=a.Event.factory({},["/Q","",function(a,c){if("/"!==a[0])return["/"+a,c]}]);a.Socket.listenForStyle=new a.Method;a.Socket.listenForSound=new a.Method;a.Socket.listenForScroll=new a.Method;a.Socket.listenForRedirect=new a.Method;a.Method.define(a.Socket,
|
|
355
|
+
"{{Q}}/js/methods/Q/Socket",function(){return[a,p]});a.Socket.prototype.onEvent=function(b){return a.Socket.onEvent(b,this.ns,this.url)};a.Animation=function(b,c,d,e,f){c==k&&(c=1E3);"object"===typeof e&&(f=e);"string"==typeof d&&(d=a.Animation.ease[d]);"function"!==typeof d&&(d=a.Animation.ease.smooth);this.sinceLastFrame=this.milliseconds=this.position=0;this.id=++Gb;this.duration=c;this.ease=d;this.until=1;this.callback=b;this.params=f;this.onRewind=new a.Event;this.onJump=new a.Event;this.onPause=
|
|
356
|
+
new a.Event;this.onRefresh=new a.Event;this.onComplete=new a.Event};var ja=a.Animation.prototype;ja.pause=function(){this.playing=!1;delete a.Animation.playing[this.id];this.onPause.handle.call(this);return this};ja.jump=function(b){var c=this.position;this.position=b;this.milliseconds=this.duration*b;this.sinceLastFrame=0;this.jumped=b;this.started=a.milliseconds();this.onJump.handle.call(this,b,c);return this};ja.rewind=function(){this.pause();this.jump(0);this.onRewind.handle.call(this);return this};
|
|
357
|
+
ja.nextFrame=function(b){var c=this,d=a.milliseconds();requestAnimationFrame(function(){var b=c.milliseconds||0,f=a.milliseconds();c.elapsed=f-c.started;c.milliseconds+=f-d;c.sinceLastFrame=c.milliseconds-b;c.playing&&(b=c.position=null==c.jumped?c.elapsed/c.duration:c.elapsed/c.duration+c.jumped,b>=c.until?(a.handle(c.callback,c,[1,c.ease(1),c.params]),c.onRefresh.stop(),c.onComplete.handle.call(c),c.rewind()):(c.render(b),c.playing&&c.nextFrame()))})};ja.render=function(b){b=b===k?this.position:
|
|
358
|
+
b;var c=this.ease(b);a.handle(this.callback,this,[b,c,this.params]);this.onRefresh.handle.call(this,b,c,this.params)};ja.play=function(b){a.Animation.playing[this.id]=this;this.playing||(this.started=a.milliseconds());this.playing=!0;this.until=b||1;this.nextFrame();return this};a.Animation.play=function(b,c,d,e,f){return(new a.Animation(b,c,d,e,f)).play()};a.Animation.fps=60;a.Animation.ease={linear:function(a){return a},power:function(a){return function(b){return 1-Math.pow(1-b,a)}},bounce:function(a){return Math.sin(1.2*
|
|
359
|
+
Math.PI*(a-.5))/1.7+.5},smooth:function(a){return Math.sin(Math.PI*(a-.5))/2+.5},easeInExpo:function(a){return 0==a?0:Math.pow(2,10*(a-1))+0-.001},inOutQuintic:function(a){var b=a*a;a*=b;return 6*a*b+-15*b*b+10*a}};a.Animation.ease.swing=a.Animation.ease.inOutQuintic;(function(){var b,c;a.each(["","moz","ms","webkit","o"],function(a,d){b=d?d+"Hidden":"hidden";if(b in document)return c=d+"visibilitychange",!1});var d=null,e=null,f=a.debounce(function(b){d=a.isDocumentHidden();e!=d&&(e=d,a.onVisibilityChange.handle.call(document,
|
|
360
|
+
!d,b))},10);a.addEventListener(document,[c,"pause","resume","resign","active"],function(b){"visibilitychange"!==b.type.toLowerCase()&&(d=a.isDocumentHidden(b),setTimeout(function(){d=null},100));f(b)},!1)})();a.onVisibilityChange.set(function(b){if(b)for(var c in a.Animation.playing)a.Animation.playing[c].play()},"Q.Animation");a.isDocumentHidden=function(a){if(a){if("pause"==a.type||"resign"==a.type)return!0;if("resume"==a.type||"active"==a.type)return!1}return"hidden"===document.visibilityState};
|
|
361
|
+
a.Animation.playing={};var Gb=0;a.jQueryPluginPlugin=function(){if((w=w||p.jQuery)&&!w.fn.plugin){w.fn.plugin=function(b,d,e){if(!this.length)return this;switch(a.typeOf(d)){case "function":e=d;d={};var c=[];case "array":c=d;break;case "string":c=Array.prototype.slice.call(arguments,1);e=null;break;default:c=[d]}var g=this;w.fn.plugin.load(b,function(d){for(var f in d){if(!d[f])throw new a.Error("jQuery.fn.plugin: "+b+" not defined");d[f].apply(g,c);a.handle(e,g,c);break}});return this};w.fn.plugin.load=
|
|
362
|
+
function(b,d,e){var c=[];"string"===typeof b&&(b=[b]);var g={};a.each(b,function(b,d){b=d.split("/");var e=a.normalize.memoized(d);g[e]=d;w.fn[e]||(d=w.fn.plugin[e]||"Q/plugins/"+b[0]+"/js/fn/"+b[1]+".js","string"===typeof d&&c.push(d))});a.addScript(c,function(){for(var b in g)g[b]=w.fn[b]||w.fn[g[b]];a.handle(d,p,[g])},e);return!1};w.fn.state=function(b){b=a.normalize.memoized(b)+" state";return w(this).data(b)};w.fn.tool=function(b,d,e,f,g){var c=arguments;return this.each(function(){var h="function"===
|
|
363
|
+
typeof e?e.apply(this,c):e;a.Tool.prepare(this,b,d,h,f,g)})};w.fn.activate=function(b,d,e){return this.length?this.each(function(){a.activate(this,b,d,e)}):(a.handle(d,null,b,[]),this)};w.fn.incrementClass=function(a){return this.each(function(){var b="$.fn.incrementClass\t"+a,c=w(this),f=w(this).data(b)||0;0==f&&c.addClass(a);c.data(b,f+1)})};w.fn.decrementClass=function(a){return this.each(function(){var b="$.fn.incrementClass\t"+a,c=w(this),f=w(this).data(b)||0;1>=f&&c.removeClass(a);c.data(b,
|
|
364
|
+
f-1)})};w.fn.andSelf=w.fn.addBack||w.fn.andSelf;var b=w.fn.html;w.fn.html=function(){var c=Array.prototype.slice.call(arguments,0);return!0===c.pop()?(this.each(function(){a.Tool.clear(this)}),b.apply(this,c)):b.apply(this,arguments)};a.each({on:"off",live:"die",bind:"unbind"},function(b,d){var c=w.fn[b];w.fn[b]=function(){for(var b=Array.prototype.slice.call(arguments,0),e=b.length-1;0<=e&&"function"!==typeof b[e];--e);var f;var l=f=b[e];var k="";a.isArrayLike(b[0])&&((k=b[0][1]||"")&&"."!==k[0]&&
|
|
365
|
+
(k="."+k),b[0]=b[0][0]);if("function"===typeof b[0]){var p={original:b[e]};f=b[e]=b[0](p);l.Q_wrapper=f;if(!("eventName"in p))throw new a.Error("Custom $.fn.on handler: need to set params.eventName");b[0]=p.eventName}if(k){l=b[0].split(" ");for(p=l.length-1;0<=p;--p)l[p]+=k;b[0]=l.join(" ")}if(!0===b[e-1]){a.Event.jQueryForPage.push([d,this,b[0],f]);var q="page"}else"Q.Tool"===a.typeOf(b[e-1])&&(k=a.calculateKey(b[e-1]),a.Event.jQueryForTool[k]||(a.Event.jQueryForTool[k]=[]),a.Event.jQueryForTool[k].push([d,
|
|
366
|
+
this,b[0],f]),q="tool");q&&b.splice(e-1,1);return c.apply(this,b)};var f=w.fn[d];w.fn[d]=function(){var b=Array.prototype.slice.call(arguments,0),c="";a.isArrayLike(arguments[0])&&((c=b[0][1]||"")&&"."!==c[0]&&(c="."+c),b[0]=b[0][0]);if("function"===typeof b[0]){var d={};b[0](d);if(!("eventName"in d))throw new a.Error("Custom $.fn.on handler: need to set params.eventName");b[0]=d.eventName}if(c){d=b[0].split(" ");for(var e=d.length-1;0<=e;--e)d[e]+=c;b[0]=d.join(" ")}d=null;for(c=b.length-1;0<=c;--c)if("function"===
|
|
367
|
+
typeof b[c]){d=b[c];break}d&&d.Q_wrapper&&(b[c]=d.Q_wrapper);return f.apply(this,b)}})}};a.jQueryPluginPlugin();Z=/(.*)QCordova(.*)/.test(navigator.userAgent)||location.search.queryField("Q.cordova")||a.cookie("Q_cordova");var Ga=a.Browser.detect(),Hb=(p.navigator&&p.navigator.maxTouchPoints)&255,nb="ontouchstart"in p||!!Hb,ob=p.matchMedia?!p.matchMedia("(any-hover: hover)").matches:null,ka=nb&&!0===ob,Ib=navigator.userAgent.match(/tablet|ipad/i)||ka&&!navigator.userAgent.match(/mobi/i);a.info={useTouchEvents:ka,
|
|
368
|
+
hasNoMouse:ob,forceFormFactor:location.search.queryField("Q.formFactor"),isTouchscreen:nb,isTablet:Ib,isWebView:Ga.isWebView,isStandalone:Ga.isStandalone,isCordova:Z,platform:Ga.OS,browser:Ga,isIE:function(b,c){return"explorer"===a.info.browser.name&&(b==k||b<=a.info.browser.mainVersion)&&(c==k||c>=a.info.browser.mainVersion)},isAndroid:function(b,c,d,e){return"android"===a.info.platform&&(b==k||b>=a.Visual.windowWidth())&&(c==k||c>=a.Visual.windowHeight())&&(d==k||d<=a.info.browser.mainVersion)&&
|
|
369
|
+
(e==k||e>=a.info.browser.mainVersion)}};"loading"!==document.readyState?db():document.addEventListener("DOMContentLoaded",db);a.info.isAndroidStock=!("android"!==a.info.platform||!navigator.userAgent.match(/Android .*Version\/[\d]+\.[\d]+/i));a.info.isMobile=a.info.isTouchscreen&&!a.info.isTablet;a.info.formFactor=a.info.isMobile?"mobile":a.info.isTablet?"tablet":"desktop";var N=document.documentElement;N.addClass("Q_js");a.ignoreBackwardCompatibility={dashboard:!1,notices:!1};a.Page.onLoad("").set(function(){N.addClass(a.info.uri.module+
|
|
370
|
+
"_"+a.info.uri.action,!0).addClass(a.info.uri.module,!0)},"Q");a.Page.beforeUnload("").set(function(){N.removeClass(a.info.uri.module+"_"+a.info.uri.action).removeClass(a.info.uri.module)},"Q");fa.options={direction:"both"};ya.options={blur:["INPUT","TEXTAREA","SELECT"],blurContentEditable:!0};za.options={milliseconds:300};a.Clipboard={copy:function(b){var c=document.createElement("textarea");c.value=b;document.body.appendChild(c);if("ios"===a.info.platform){b=document.createRange();b.selectNodeContents(c);
|
|
371
|
+
var d=window.getSelection();d.removeAllRanges();d.addRange(b);c.setSelectionRange(0,999999)}else c.select();document.execCommand("copy");document.body.removeChild(c)}};a.Visual=a.Pointer={requestFullscreen:function(a){var b={navigationUI:"hide"};a.requestFullScreen?a.requestFullscreen(b):a.mozRequestFullScreen?a.mozRequestFullScreen(b):a.webkitRequestFullScreen&&a.webkitRequestFullScreen(b);return!0},intersection:function(a,c){a instanceof Element&&(a=a.getBoundingClientRect());c instanceof Element&&
|
|
372
|
+
(c=c.getBoundingClientRect());if(a.left>c.right||c.left>a.right||a.top>c.bottom||c.top>a.bottom)return null;var b=Math.max(a.left,c.left),e=Math.max(a.top,c.top);return new p.DOMRect(b,e,Math.min(a.right,c.right)-b,Math.max(a.bottom,c.bottom)-e)},awaitNaturalImageSize:function(a,c,d){var b=setInterval(function(){if(!a.getAttribute("data-lazyload-src")||d&&d.ignoreLazyload){var e=a.naturalWidth,g=a.naturalHeight;e&&g&&(clearInterval(b),c.apply(a,[e,g]))}},30)},start:function(b){b.eventName=a.Pointer.start.eventName;
|
|
373
|
+
return function(c){a.Pointer.movedTooMuchForClickLastTime=!1;a.Visual.recentlyScrolled?a.Pointer.startedWhileRecentlyScrolled=!0:a.Pointer.canceledClick=!1;a.Pointer.startCancelingClicksOnScroll(c.target);a.removeEventListener(c.target,a.Pointer.end,Ma);a.addEventListener(c.target,a.Pointer.end,Ma);return b.original.apply(this,arguments)}},end:function(b){b.eventName=a.Pointer.end.eventName;return b.original},move:function(b){b.eventName=a.Pointer.move.eventName;return b.original},enter:function(b){b.eventName=
|
|
374
|
+
a.Pointer.enter.eventName;return b.original},leave:function(b){b.eventName=a.Pointer.leave.eventName;return b.original},cancel:function(a){a.eventName="pointercancel";return a.original},focusin:function(b){b.eventName="gecko"===a.info.browser.engine?"focus":"focusin";var c=!1;return function(a){if(!c)return c=!0,setTimeout(function(){c=!1},300),b.original.apply(this,arguments)}},focusout:function(b){b.eventName="gecko"===a.info.browser.engine?"blur":"focusout";var c=!1;return function(a){if(!c)return c=
|
|
375
|
+
!0,setTimeout(function(){c=!1},300),b.original.apply(this,arguments)}},click:function(b){b.eventName="click";return function(c){return a.Pointer.canceledClick?a.Pointer.preventDefault(c):b.original.apply(this,arguments)}},fastclick:function(b){b.eventName=a.Pointer.end.eventName;return function(c){var d=c.originalEvent||c;if("touchend"===d.type){if(d.touches&&d.touches.length)return;a.Pointer.touches=d.touches||[]}d=c.target;if(d instanceof Element&&a.Pointer.started)return!a.Pointer.canceledClick&&
|
|
376
|
+
this.contains(a.Pointer.started||null)&&this.contains(d)?b.original.apply(this,arguments):a.Pointer.preventDefault(c)}},touchclick:function(b){if(!a.info.isTouchscreen)return a.Pointer.click(b);b.eventName=a.info.useTouchEvents?"touchstart":"pointerdown";return function(c){function d(c){a.removeEventListener(p,"click",d);if(a.Pointer.canceledClick)return a.Pointer.preventDefault(c);f&&b.original.apply(g,h)}function e(b){a.removeEventListener(this,"touchend",e);setTimeout(function(){f=!1},a.Pointer.touchclick.duration)}
|
|
377
|
+
var f=!0,g=this,h=arguments;a.addEventListener(p,"click",d);a.addEventListener(this,"touchend",e)}},wheel:function d(a){d.div=document.createElement("div");a.eventName="onwheel"in d.div?"wheel":document.onmousewheel!==k?"mousewheel":"DOMMouseScroll MozMousePixelScroll";return function(c){var d=c.originalEvent||c;c.type="wheel";c.deltaMode="MozMousePixelScroll"==d.type?0:1;c.deltaX=d.deltaX||0;c.deltaY=d.deltaY||0;c.deltaZ=d.deltaZ||0;switch(a.eventName){case "mousewheel":d.wheelDelta&&(c.deltaY=-Math.ceil(1/
|
|
378
|
+
3*d.wheelDelta));d.wheelDeltaX&&(c.deltaX=-Math.ceil(1/3*d.wheelDeltaX));break;default:c.deltaY="deltaY"in d?d.deltaY:d.detail}return a.original.apply(this,arguments)}},clickedAtLeastOnce:!1,canceledClick:!1,scrollLeft:function(){return p.pageXOffset||document.documentElement.scrollLeft||document.body&&document.body.scrollLeft},scrollTop:function(){return p.pageYOffset||document.documentElement.scrollTop||document.body&&document.body.scrollTop},positionLeft:function(){var a=document.documentElement.getBoundingClientRect().left,
|
|
379
|
+
d=0;document.body&&(d=document.body.getBoundingClientRect().left);return p.pageXOffset||a||d},positionTop:function(){var a=-document.documentElement.getBoundingClientRect().top,d=0;document.body&&(d=-document.body.getBoundingClientRect().top);return p.pageYOffset||a||d},windowWidth:function(){return p.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},windowHeight:function(){return p.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},shouldOpenInNewWindow:function(c){return c&&
|
|
380
|
+
c.shiftKey||"windows"===a.info.platform&&c.ctrlKey||"mac"===a.info.platform&&c.metaKey},waitUntilNoMasks:function(c,d){if(d){var e;a.Masks.counter<=c?setTimeout(d,0):e=a.Masks.onHide.set(function(){a.Masks.counter<=c&&(setTimeout(d,0),a.Masks.onHide.remove(e))});return{cancel:function(){e&&a.Masks.onHide.remove(e)}}}},waitUntilVisible:function(c,d,e){if("Q.Tool"===a.typeOf(c)){var f=c;c=f.element}e=a.extend({},a.Visual.waitUntilVisible,e);var g=new IntersectionObserver(function(a,e){a[0]&&a[0].isIntersecting&&
|
|
381
|
+
(d&&d.apply(this,arguments),e.unobserve(c))},e);g.observe(c);f&&f.Q.beforeRemove.set(function(){g.unobserve(c)});return g},waitUntilAnimationsEnd:function(c,d){function e(){var f=a.Visual.animationStarted;if(f&&f.animationsEnding){var g=Date.now();g>=f.animationsEnding&&(!f.animationsEnding||Date.now()>=f.animationsEnding)?a.handle(c,a.Visual,d):setTimeout(e,Math.max(0,f.animationsEnding-g))}else a.handle(c,a.Visual,d)}setTimeout(e,0)},animationStarted:function(c){var d=a.Visual.animationStarted;
|
|
382
|
+
d.animationsEnding=d.animationsEnding||0;var e=Date.now();d.animationsEnding=Math.max(d.animationsEnding,e)+c},getX:function(c,d){c=c.originalEvent||c;d=d||0;c=c.touches&&c.touches.length?c.touches[d]:c.changedTouches&&c.changedTouches.length?c.changedTouches[d]:c;return Math.max(0,"pageX"in c?c.pageX:c.clientX+a.Visual.scrollLeft())},getY:function(c,d){c=c.originalEvent||c;d=d||0;c=c.touches&&c.touches.length?c.touches[d]:c.changedTouches&&c.changedTouches.length?c.changedTouches[d]:c;return Math.max(0,
|
|
383
|
+
"pageY"in c?c.pageY:c.clientY+a.Visual.scrollTop())},touchCount:function(c){var d=c.originalEvent||c;return d.touches?d.touches.length:0<a.Visual.which(c)?1:0},which:function(a){var c=a.button;(a=a.which)||c===k||(a=c&1?1:c&2?3:c&4?2:0);return a},isPressed:function(c){return!(!a.Pointer.which(c)&&!a.Pointer.touchCount(c))},target:function(a){a=a.target||a.srcElement;3===a.nodeType&&(a=a.parentElement);return a},relatedTarget:function(a){return a.relatedTarget=a.relatedTarget||("mouseover"==a.type?
|
|
384
|
+
a.fromElement:a.toElement)},offset:function(a){var c=0,e=0;do isNaN(a.offsetLeft)||(c+=a.offsetLeft),isNaN(a.offsetTop)||(e+=a.offsetTop);while(a=a.offsetParent);return{left:c,top:e}},hint:function(c,d){d=a.extend({},a.Visual.hint.options,10,d);if(d.waitUntilVisible){if(!((c&&c[0]||c)instanceof Element))throw new a.Exception("Q.Visua.hint: waitUntilVisible needs element");return a.Visual.waitUntilNoMasks(0,function(){a.Visual.waitUntilVisible(c[0]||c,function(e,f){if(e[0].isIntersecting){var g=e[0].target.scrollingParent();
|
|
385
|
+
if(g)var h=g.scrollTop,l=setInterval(function(){h===g.scrollTop&&(clearInterval(l),d.waitUntilVisible=!1,d.dontStopBeforeShown=!0,a.Visual.hint(c,d));h=g.scrollTop},300)}},!0===d.waitUntilVisible?{}:d.waitUntilVisible)})}var e,f=d.imageEvent||new a.Event,g=d.audioEvent||new a.Event,h=f.and(g);if(!d.dontRemove&&!d.waitForEvents){var k=0;for(e=a.Visual.hint.imgs.length;k<e;++k){var l=a.Visual.hint.imgs[k];l.parentElement&&l.parentElement.removeChild(l);l.tooltip&&l.tooltip.parentElement&&l.tooltip.parentElement.removeChild(l.tooltip)}a.Visual.hint.imgs=
|
|
386
|
+
[]}var n=document.createElement("img");n.setAttribute("src",a.url(d.src));a.extend(n.style,{position:"absolute",width:d.width,height:d.height,left:0,top:0,display:"block",pointerEvents:"none"});n.setAttribute("class","Q_hint");d.classes&&n.addClass(d.classes);n.style.opacity=0;n.hide=d.hide;n.dontStopBeforeShown=d.dontStopBeforeShown;setTimeout(function(){a.Visual.hint.imgs.push(n);n.style.visibility="hidden";document.body.appendChild(n);h.add(a.once(function(){n.timeout=setTimeout(function(){var e,
|
|
387
|
+
f=[n];"string"===typeof c&&(c=document.querySelectorAll(c));if(!a.isEmpty(c)){n.style.visibility="visible";if(a.isArrayLike(c)){n.target=c[0];var g=1;for(e=c.length;g<e;++g)if(c[g]&&c[g].isConnected){var h=n.cloneNode(!1);h.hide=n.hide;h.dontStopBeforeShown=n.dontStopBeforeShown;h.target=c[g];h.timeout=!1;f.push(h);a.Visual.hint.imgs.push(h);document.body.appendChild(h)}}else(n.target=c)&&!c.isConnected&&n.remove();a.each(f,function(e,g){if("string"===typeof g.target)g.target=document.querySelector(g.target);
|
|
388
|
+
else if(!g.target)return;var h=g.target;if(a.instanceOf(h,Element)){if(!h.isVisible()){g.parentElement&&(g.parentElement.removeChild(g),g.tooltip&&g.tooltip.parentElement&&g.tooltip.parentElement.removeChild(g.tooltip));return}var l=h.getBoundingClientRect();var k={x:a.Visual.positionLeft()+l.left+h.offsetWidth/2,y:a.Visual.positionTop()+l.top+h.offsetHeight/2};var m=document.elementFromPoint(k.x,k.y);if(!h.contains(m))return!1}else k=h;a.extend(g.style,{display:"block",left:k.x-g.offsetWidth*d.hotspot.x+
|
|
389
|
+
"px",top:k.y-g.offsetHeight*d.hotspot.y+"px",pointerEvents:"none"});null!==d.zIndex&&(g.style.zIndex=d.zIndex);var p=parseInt(g.style.width),t=parseInt(g.style.height),q=null;if(d.tooltip&&(d.tooltip.index||f.length-1)==e&&!g.tooltip){q=g.tooltip=g.tooltip||document.createElement("div");e="className"in d.tooltip?d.tooltip.className:"Q_pulsate";q.setAttribute("class","Q_hint_tooltip"+(e?" "+e:""));g.parentElement&&g.parentElement.insertBefore(q,g);d.tooltip.html?q.innerHTML=d.tooltip.html:d.tooltip.text&&
|
|
390
|
+
(e={},a.take(a.Pointer,["ClickOrTap","clickOrTap","CLICKORTAP"],e),a.extend(e,d.tooltip.fields),q.innerHTML=d.tooltip.text.interpolate(e).encodeHTML());q.style.zIndex=g.computedStyle().zIndex+100;a.extend(q.style,{display:"inline-block",position:"absolute",zIndex:"zIndex"in d.tooltip?d.tooltip.zIndex:q.style.zIndex,pointerEvents:"none"});e=g.getBoundingClientRect();h=q.getBoundingClientRect();m=k.x-h.width/2;var u=d.tooltip.aboveOrBelow?l.bottom:e.bottom,r="margin"in d.tooltip?d.tooltip.margin:10;
|
|
391
|
+
u="aboveOrBelow"in d.tooltip?l.bottom+d.tooltip.aboveOrBelow:e.bottom;r="margin"in d.tooltip?d.tooltip.margin:10;u+h.height>window.innerHeight-r&&(u=("aboveOrBelow"in d.tooltip?l.top-d.tooltip.aboveOrBelow:k.y)-h.height);q.style.left=m+"px";q.style.top=u+"px"}g.hintOptions=d;a.handle(d.onShow,g,[c,d]);a.Animation.play(function(c,e){d.styles&&a.extend(g.style,d.styles);d.styles&&d.styles.opacity||(g.style.opacity=e,q&&(q.style.opacity=e));if(1!==d.show.initialScale){var f=1+(d.show.initialScale-1)*
|
|
392
|
+
(1-e);c=p*f;f*=t;g.style.width=c+"px";g.style.height=f+"px";g.style.left=k.x-c*d.hotspot.x+"px";g.style.top=k.y-f*d.hotspot.y+"px"}1===e&&g===n&&(n.timeout=d.neverRemove)},d.show.duration,d.show.ease);d.hide&&d.hide.after&&setTimeout(function(){eb(g)},d.hide.after)})}},d.show.delay)}));a.Visual.hint.addedListeners||(a.Visual.stopHintsIgnore=!0,a.addEventListener(window,a.Pointer.start,a.Visual.stopHints,!1,!0),a.addEventListener(window,"keydown",a.Visual.stopHints,!1,!0),a.addEventListener(document,
|
|
393
|
+
"scroll",a.Visual.stopHints,!0,!0),a.Visual.hint.addedListeners=!0,setTimeout(function(){delete a.Visual.stopHintsIgnore},300));d.waitForEvents||(n.complete?f.handle():n.onload=f.handle)},0);var p=d.audio||{};p.src?a.Audio.load(p.src,function(){n.audio=this;this.hint=[c,d];this.play(p.from||0,p.until,p.removeAfterPlaying);g.handle()}):d.speak?a.Audio.speak(d.speak.text,a.extend({},10,d.speak,{onSpeak:g.handle})):g.handle();return n},stopHints:function(c){if(!a.Visual.stopHintsIgnore){var d=[];a.each(a.Visual.hint.imgs,
|
|
394
|
+
function(a,f){eb(f,c)&&d.push(f)});a.Visual.hint.imgs=d}},activateTouchlabels:function(c,d){if(!d||a.info.isTouchscreen)if(c=c||document.body,!c.activatedTouchlabels){c.activatedTouchlabels=!0;var e=!1,f=document.createElement("div");f.addClass("Q_touchlabel");document.body.appendChild(f);a.Masks.onShow.set(function(c,d,e){e.shouldCover&&!e.shouldCover.contains(a.Visual.latestTouchlabelTarget)||f.removeClass("Q_touchlabel_show")},"Q.Visual.activateTouchlabels");var g,h,k;a.addEventListener(c,"pointerdown pointerup pointermove",
|
|
395
|
+
function(d){if("pointerdown"===d.type){var l=d.target.scrollingParent()||document.body;g=l.scrollLeft;h=l.scrollTop;k=!0}else if("pointerup"===d.type)k=!1;else if(k&&l&&(g!==l.scrollLeft||h!==l.scrollTop)){l=d.target.scrollingParent()||document.body;f.removeClass("Q_touchlabel_show");return}if(!a.info.isTouchscreen||a.Visual.isPressed(d)){"pointerdown"==d.type&&a.addEventListener(document.body,"pointerup",function sb(){f.removeClass("Q_touchlabel_show");a.removeEventListener(document.body,"pointerup",
|
|
396
|
+
sb)},!1,!0);l=a.Pointer.getX(d);var m=a.Pointer.getY(d),p=document.elementFromPoint(l,m);if(!e){for(;p;){if(p.hasAttribute&&p.hasAttribute("data-touchlabel")){a.Visual.lastTouchlabelTarget=p;var t=p.getAttribute("data-touchlabel");if(!t)return;f.innerHTML=t;t=c.getBoundingClientRect();var r=f.getBoundingClientRect();p=p.getBoundingClientRect();d=a.getObject(["touches",0,"radiusY"],d)||10;d=a.info.isTouchscreen||p.bottom+r.height>=t.bottom?m-d-r.height:p.bottom;f.style.left=Math.max(t.left,Math.min(l-
|
|
397
|
+
r.width/2,t.left+t.width-r.width))+"px";f.style.top=Math.max(t.top,d)+"px";f.addClass("Q_touchlabel_show");e=!0;setTimeout(function(){e=!1},10);return}p=p.parentElement}f.removeClass("Q_touchlabel_show")}}},!1,!0)}},preventDefault:function(a){if("cancelable"in a&&!a.cancelable)return!1;a.preventDefault?a.preventDefault():a.returnValue=!1;return!0},cancelClick:function(c,d,e,f){if(!1===a.Pointer.onCancelClick.handle(d,e))return!1;a.Pointer.canceledClick=!0;a.Pointer.canceledEvent=d;c||a.Masks.show("Q.click.mask");
|
|
398
|
+
f&&(++pb,setTimeout(function(){0===--pb&&(a.Pointer.canceledClick=!1)},f))},elementFromPoint:function(c,d){return document.elementFromPoint(c-a.Visual.scrollLeft(),d-a.Visual.scrollTop())},preventRubberBand:function(c){document.documentElement.addClass("Q_preventRubberBand");window.CSS&&window.CSS.supports&&window.CSS.supports("overscroll-behavior","contain")||"ios"!==a.info.platform||(this.restoreRubberBand(),a.extend(fa.options,c),a.addEventListener(window,"touchmove",fa,{passive:!1},!0))},restoreRubberBand:function(){document.documentElement.removeClass("Q_preventRubberBand");
|
|
399
|
+
window.CSS&&window.CSS.supports&&window.CSS.supports("overscroll-behavior","contain")||a.removeEventListener(window,"touchmove",fa,{passive:!1},!0)},startBlurringOnTouch:function(){a.addEventListener(window,"touchstart",ya,!1,!0)},stopBlurringOnTouch:function(){a.removeEventListener(window,"touchstart",ya,!1,!0)},clearSelection:function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&
|
|
400
|
+
document.selection.empty&&document.selection.empty()},startCancelingClicksOnScroll:function(c){var d;c&&(d=c.scrollingParent(!0))?a.addEventListener(d,"scroll",Aa):a.addEventListener(document.body,"scroll",Aa,!0)},stopCancelingClicksOnScroll:function(c){c?(c=c.scrollingParent(!0),a.removeEventListener(c,"scroll",Aa)):a.removeEventListener(document.body,"scroll",Aa)},onCancelClick:new a.Event,onEnded:new a.Event,onStarted:new a.Event,options:{cancelClickDistance:10}};a.Onboarding={start:new a.Method,
|
|
401
|
+
stop:new a.Method,handle:new a.Method,processes:{},prefix:"Q.Onboarding: ",interval:{frequency:100,afterHintHide:3E3},events:{},selectors:{},waitToDisappear:{},text:{},textPath:[],treatAsVisible:[".Q_overlay.Q_behind",".Q_fullscreen_dialog.Q_behind"],options:{hint:{dontStopBeforeShown:!0,show:{delay:500}}}};a.Method.define(a.Onboarding,"{{Q}}/js/methods/Q/Onboarding",function(){return[a,p]});a.addEventListener(p,"click",function d(){a.Pointer.clickedAtLeastOnce=!0;a.removeEventListener(p,"click",
|
|
402
|
+
d)},!1,!0);var pb=0;a.Visual.preventRubberBand.suspend={};var yb=a.debounce(function(){a.Visual.recentlyScrolled=!1},300),la=a.info.useTouchEvents;a.Pointer.start.eventName=la?"touchstart":"pointerdown";a.Pointer.move.eventName=la?"touchmove":"pointermove";a.Pointer.end.eventName=la?"touchend":"pointerup";a.Pointer.cancel.eventName=la?"touchcancel":"pointercancel";a.Pointer.enter.eventName=la?"touchenter":"pointerenter";a.Pointer.leave.eventName=la?"touchleave":"pointerleave";a.Pointer.which.NONE=
|
|
403
|
+
0;a.Pointer.which.LEFT=1;a.Pointer.which.MIDDLE=2;a.Pointer.which.RIGHT=3;a.Pointer.touchclick.duration=400;a.Pointer.latest={which:a.Visual.which.NONE,touches:[]};a.Visual.waitUntilVisible.options={root:null,rootMargin:"0px",threshold:1};a.addEventListener(document.body,"pointerdown",function(d){a.Pointer.latest.which=a.Visual.which(d);a.Pointer.latest.touches=d.touches||[]},!1,!0);a.addEventListener(document.body,"pointerup pointercancel",function(d){a.Pointer.latest.which=a.Visual.which(d);a.Pointer.latest.touches=
|
|
404
|
+
d.touches||[]},!1,!0);a.Visual.hint.options={src:"{{Q}}/img/hints/tap.gif",hotspot:{x:.5,y:.3},width:"50px",height:"50px",zIndex:null,neverRemove:!1,dontRemove:!1,show:{delay:500,duration:500,initialScale:2,ease:a.Animation.ease.smooth},hide:{delay:300,duration:300,ease:a.Animation.ease.linear},onShow:new a.Event,onHide:new a.Event};a.Visual.hint.imgs=[];Na.options={prevent:["INPUT","TEXTAREA","SELECT"]};var R,Ba,ha,na,oa,Oa=null,qb=a.Pointer.ended=function e(){setTimeout(function(){a.Pointer.started=
|
|
405
|
+
null},0);clearTimeout(Oa);a.removeEventListener(window,a.Pointer.move,fb);a.removeEventListener(window,a.Pointer.end,e);a.removeEventListener(window,a.Pointer.cancel,e);a.removeEventListener(window,a.Pointer.click,Pa);a.handle(a.Pointer.onEnded,this,arguments);R=!1;setTimeout(function(){a.Pointer.canceledClick=!1},100)};a.Dialogs={options:{topMargin:"5%",bottomMargin:"5%"},onOpen:new a.Event,onClose:new a.Event,dialogs:[],push:function(e){function f(){var e=a.element("h2",{"class":"Q_dialog_title"});
|
|
406
|
+
e=a.element("div",{"class":"Q_title_slot"},[e]);var f=a.element("div",{"class":"Q_dialog_slot Q_dialog_content Q_overflow"});e=a.element("div",{},[e,f]);l.apply&&e.addClass("Q_overlay_apply");!1!==l.removeOnClose&&(l.removeOnClose=!0);return e}function g(a,e){a&&e&&("string"===typeof e?w(a).html(e):w(a).empty().append(e))}function h(e){if(0>a.Dialogs.dialogs.indexOf(n))l.removeOnClose&&a.removeElement(n,!0),a.handle(l.onClose,n,[n,{}]);else{var f=document.activeElement;f&&f!==document.body&&f.blur();
|
|
407
|
+
g(p,e);n.Q_hidDialog&&n.Q_hidDialog.addClass("Q_behind");a.handle(a.Dialogs.onOpen,a.Dialogs,[n]);l.closeAfterDelay&&setTimeout(function(){a.Dialogs.close(n)},l.closeAfterDelay);try{w(n).plugin("Q/dialog",l)}catch(O){console.warn(O)}k()}}function k(){a.Dialogs.interval||(a.Dialogs.interval=setInterval(function(){var e=document.querySelector(".Q_overlay_open");e&&e.getBoundingClientRect().width||(a.Masks.hide("Q.dialog.mask"),clearInterval(a.Dialogs.interval),a.Dialogs.interval=null)},300))}document.activeElement&&
|
|
408
|
+
document.activeElement.blur();var l=a.extend({mask:!0},a.Dialogs.options,a.Dialogs.push.options,e),n=l.dialog&&l.dialog[0]||l.dialog||f();e=n.querySelector(".Q_dialog_title");var p=n.querySelector(".Q_dialog_slot");p||console.warn("Q.Dialogs.push: dialog element has no .Q_dialog_slot");n.addClass("Q_dialog");p&&p.addClass("Q_content_container");l.elementId&&n.setAttribute("id",l.elementId);g(e,l.title);n.style.display="none";(l.appendTo||document.body).append(n);(function(){var e=l.beforeClose;l.beforeClose=
|
|
409
|
+
new a.Event(function(e){if(!1===a.handle(l.beforeClose.original,n,[n]))return a.Dialogs.attach(n),!1},"Q.Dialogs");l.beforeClose.original=e;e=l.onClose;l.onClose=new a.Event(function(e,f){a.Dialogs.detach(n);n.Q_hidDialog=null;a.handle(a.Dialogs.onClose,a.Dialogs,[n,f]);a.handle(l.onClose.original,n,[n,f])},"Q.Dialogs");l.onClose.original=e})();(function(){var e=a.Dialogs.dialogs,f=e.length?e[e.length-1]:null;n.isFullscreen=l.fullscreen;f!==n&&(e.push(n),l.hidePrevious&&f&&(n.Q_hidDialog=f))})();
|
|
410
|
+
var q=new a.Pipe(["stylesheets","content"],function(a){h(a.content[0])});l.stylesheet?a.addStylesheet(l.stylesheet,q.fill("stylesheets")):q.fill("stylesheets")();l.template?a.Template.render(l.template.name,l.template.fields,function(a,e){a&&console.warn(a);q.fill("content")(a?l.content:e)}):q.fill("content")(l.content);return n},pop:function(e,f){var g=a.Dialogs.element();return g?e?(a.Dialogs.detach(g),g):a.Dialogs.close(g,f):null},close:function(e,f){a.isInteger(e)&&(e=this.dialogs[e]);e instanceof
|
|
411
|
+
p.jQuery&&(e=e[0]);if(!(e instanceof Element)||0>this.dialogs.indexOf(e))return null;a.Dialogs.detach(e);w(e).plugin("Q/dialog","close",f);return e},detach:function(e){var f=a.Dialogs.dialogs,g=f.indexOf(e);if(0>g)return!1;e.Q_stackIndex=g;f.splice(g,1);e.Q_hidDialog&&e.Q_hidDialog.removeClass("Q_behind");return!0},attach:function(e){var f=a.Dialogs.dialogs;if(0<=f.indexOf(e))return!1;var g=e.Q_stackIndex;if(null==g||g>f.length)g=f.length;f.splice(g,0,e);e.Q_hidDialog&&e.Q_hidDialog.addClass("Q_behind");
|
|
412
|
+
return!0},element:function(a){return this.dialogs[this.dialogs.length-(a||0)-1]}};a.info.useFullscreen=a.info.isMobile&&a.info.isAndroid(1E3)&&a.info.isAndroidStock&&11>a.info.browserMainVersion;a.Dialogs.onPush=a.Dialogs.onOpen;a.Dialogs.onPop=a.Dialogs.onClose;a.Dialogs.push.options={dialog:null,url:null,title:null,content:"",className:null,fullscreen:a.info.useFullscreen,appendTo:null,alignByParent:!1,beforeLoad:new a.Event,onActivate:new a.Event,beforeClose:new a.Event,onClose:new a.Event,closeOnEsc:!0,
|
|
413
|
+
removeOnClose:null,hidePrevious:!0};a.alert=function(e,f){e=String(e);f===k&&(f={});f.title===k&&(f.title=a.alert.options.title);return a.Dialogs.push(a.extend({title:f.title,content:'<div class="Q_messagebox Q_big_prompt"><p>'+e+"</p></div>",className:"Q_alert"+(f.className?" "+f.className:""),onClose:f.onClose||k,fullscreen:!1,hidePrevious:!0},f))};a.alert.options={title:a.text.Q.words.Alert};a.extend(a.alert.options,a.text.Q.alert);a.confirm=function(e,f,g){var h=a.extend({},a.confirm.options,
|
|
414
|
+
g),k=!1;e=a.Dialogs.push(a.extend({title:h.title,content:w('<div class="Q_messagebox Q_big_prompt" />').append(w("<p />").html(e),w('<div class="Q_buttons" />').append(w('<button class="Q_button" />').html(h.ok),document.createTextNode(" "),w('<button class="Q_button" />').html(h.cancel))),className:"Q_confirm"+(h.className?" "+h.className:""),noClose:h.noClose,onClose:{"Q.confirm":function(){k||a.handle(f,this,[null])}},fullscreen:!1,hidePrevious:!0},g));g=e.querySelectorAll(".Q_buttons button");
|
|
415
|
+
a.addEventListener(g[0],a.Pointer.end,function(e){e.preventDefault();e.stopPropagation();k=!0;a.Dialogs.pop();a.handle(f,p,[!0]);return!1});a.addEventListener(g[1],a.Pointer.end,function(e){e.preventDefault();e.stopPropagation();k=!0;a.Dialogs.pop();a.handle(f,p,[!1]);return!1});e.querySelectorAll(".Q_buttons button:first-child")[0].focus();return e};a.confirm.options={title:a.text.Q.words.Confirm,ok:a.text.Q.words.Yes,cancel:a.text.Q.words.No,noClose:!0};a.extend(a.confirm.options,a.text.confirm);
|
|
416
|
+
a.prompt=function(e,f,g){function h(){l=!0;var e=w("input",p).val();a.Dialogs.pop();a.handle(f,this,[e])}g===k&&(g={});var m=a.extend({},a.prompt.options,g),l=!1,n={placeholder:m.placeholder,maxlength:m.maxLength};m.initialText&&(n.value=m.initialText);m.autocomplete&&(n.autocomplete=m.autocomplete);m.type&&(n.type=m.type);g.className="Q_prompt"+(m.className?" "+m.className:"");var p=a.Dialogs.push(a.extend({title:m.title,content:w('<div class="Q_messagebox Q_big_prompt" />').append(w("<p />").html(e),
|
|
417
|
+
w('<div class="Q_buttons" />').append(w('<input type="text" enterkeyhint="done" />').attr(n),document.createTextNode(" "),w('<button class="Q_messagebox_done Q_button" />').html(m.ok))),onActivate:{"Q.prompt":function(a){var e=w(a).find("input");a=e.parent().width()-e.next().outerWidth(!0)-5;e.css({width:a+"px",boxSizing:"border-box"}).plugin("Q/placeholders").plugin("Q/clickfocus").on("keydown",function(a){13===(a.keyCode||a.which)&&h()});m.initialText&&(e[0].value=m.initialText);setTimeout(function(){e[0].select()},
|
|
418
|
+
0)}},onClose:{"Q.prompt":function(){l||a.handle(f,this,[null])}},fullscreen:!1,hidePrevious:!0},g));e=p.querySelector(".Q_buttons button");a.addEventListener(e,a.Pointer.click,h);return p};a.prompt.options={title:a.text.Q.words.Prompt,ok:a.text.Q.words.OK,placeholder:"",maxlength:100,noClose:!0};a.extend(a.prompt.options,a.text.Q.prompt);a.invoke=function(e){function f(){a.each(a.invoke.handlers,function(f,k){if(!1===a.handle(k,a,[e,g]))return!1})}var g={};if(!a.isPlainObject(e))throw new a.Error("Q.invoke: please pass an object instead of "+
|
|
419
|
+
typeof e);e.template?a.Template.render(e.template.name,e.template.fields,function(a,g){e.content=g;delete e.template;f()}):f();return g};a.invoke.handlers=[function(e,f){var g=a.Dialogs.push(a.extend({},e,{onActivate:e.onActivate||function(){}}));f.close=function(){a.Dialogs.close(g)}}];a.Intl={calendar:function(){var a={},f=Intl.DateTimeFormat();f&&f.resolvedOptions&&(a=f.resolvedOptions()||{});return a}};a.Speech=a.Speech||{};a.Speech.Recognition=a.Speech.Recognition||{};a.Speech.Recognition.onStart=
|
|
420
|
+
new a.Event;a.Speech.Recognition.onEnd=new a.Event;a.Speech.Recognition.onResult=new a.Event;a.Speech.Recognition.onError=new a.Event;a.Speech.Recognition.onSpeechStart=new a.Event;a.Speech.Recognition.onSpeechEnd=new a.Event;a.Speech.Recognition._supported=null;a.Speech.Recognition._autoRestart=!1;a.Speech.Recognition._rec=null;a.Speech.Recognition._impl=null;a.Speech.Recognition.start=new a.Method;a.Speech.Recognition.stop=new a.Method;a.Speech.Recognition.abort=new a.Method;a.Speech.Recognition.implement=
|
|
421
|
+
new a.Method;a.Speech.Recognition.unimplement=new a.Method;a.Method.define(a.Speech.Recognition,"{{Q}}/js/methods/Q/Speech/Recognition",function(){return[a,p]});a.Speech.stopRecognition=function(){"function"===typeof a.Speech.Recognition.stop&&a.Speech.Recognition.stop()};a.Audio=function(e,f,g){function h(e){a.handle("canplay"===e.type?U.onCanPlay:"canplaythrough"===e.type?U.onCanPlayThrough:U.onEnded,k,[e]);a.handle("canplay"===e.type?a.Audio.onCanPlay:"canplaythrough"===e.type?a.Audio.onCanPlayThrough:
|
|
422
|
+
a.Audio.onEnded,k,[e])}if(this===p)throw new a.Error("Q.Audio: Please call Q.Audio with the keyword new");var k=this;this.src=e=a.url(e);f=f||document.getElementById("Q-audio-container");f||(f=document.createElement("div"),f.setAttribute("id","Q-audio-container"),f.style.display="none",document.body.appendChild(f));this.container=f;var l=this.audio=document.createElement("audio");l.setAttribute("src",e);l.setAttribute("preload","auto");g=g||{};for(var n in g)l.setAttribute(n,g[n]);a.addEventListener(l,
|
|
423
|
+
{canplay:h,canplaythrough:h,ended:h});f.appendChild(l);l.load();a.Audio.collection[e]=this};a.Audio.collection={};a.Audio.onPlay=new a.Event;a.Audio.onPause=new a.Event;a.Audio.onCanPlay=new a.Event;a.Audio.onCanPlayThrough=new a.Event;a.Audio.onEnded=new a.Event;var U=a.Audio.prototype;U.onCanPlay=new a.Event;U.onCanPlayThrough=new a.Event;U.onEnded=new a.Event;a.Audio.load=new a.Method;a.Audio.loadVoices=new a.Method;a.Audio.play=new a.Method;a.Audio.speak=new a.Method;a.Method.define(a.Audio,"{{Q}}/js/methods/Q/Audio",
|
|
424
|
+
function(){return[a,p]});U.recorderInit=function(e){var f=this;a.addScript("{{Q}}/js/audioRecorder/recorder.js",function(){f.recorder=f.recorder||new p.Recorder({leaveStreamOpen:!0,encoderPath:a.url("{{Q}}/js/audioRecorder/encoderWorker.js")});f.recorder.addEventListener("streamReady",function(a){"function"===typeof e.onStreamReady&&e.onStreamReady.call()});f.recorder.addEventListener("streamError",function(a){T("Error encountered: "+a.error.name)});f.recorder.addEventListener("dataAvailable",function(a){"function"===
|
|
425
|
+
typeof e.onDataAvailable&&e.onDataAvailable.call(a)});f.recorder.initStream()})};U.pause=function(){this.playing&&(this.audio.pause(),this.playing=!1,this.paused=!0);a.handle(a.Audio.onPause,this);return this};a.Audio.pauseAll=function(){for(var e in a.Audio.collection){var f=a.Audio.collection[e];f.pause&&f.pause()}};a.Audio.speak.options={gender:"female",rate:1,pitch:1,volume:1,locale:null};a.Audio.speak.enabled=!a.info.isTouchscreen;a.Audio.stopSpeaking=function(){p.TTS?p.TTS.stop():p.speechSynthesis&&
|
|
426
|
+
p.speechSynthesis.pause()};a.Video=function(a,f,g){};a.Video.pauseAll=function(){a.each(a.Tool.active,function(a,f){f.q_video&&f.q_video.pause()})};a.Video.upload=function(e,f,g){f=f||a.getObject("Q.videos.provider");"function"===typeof a.Video.upload[f]?a.Video.upload[f].call(this,e,g):a.require(a.Video.upload[f],function(a){a.call(this,e,g)})};a.Masks={collection:{},counter:0,mask:function(e,f){e=a.calculateKey(e);if(e in a.Masks.collection){var g=a.Masks.collection[e];f&&f.zIndex&&(g.element.style.zIndex=
|
|
427
|
+
f.zIndex);return g}g=a.Masks.collection[e]=a.extend({fadeIn:0,fadeOut:0,shouldCover:null,behind:null},a.Masks.options[e],f);var h=g.element=document.createElement("div");h.addClass("Q_mask "+(g.className||""));f&&f.html&&(h.innerHTML=f.html);document.body.appendChild(h);h.style.display="none";g.counter=0;f&&f.zIndex?h.style.zIndex=f.zIndex:f&&f.behind&&(f=f.behind.computedStyle().zIndex)&&(h.style.zIndex=f-1);return a.Masks.collection[e]=g},show:function(e,f){"Q.Tool"===a.typeOf(e)&&e.Q.beforeRemove.set(function(){a.Masks.hide(e)},
|
|
428
|
+
e);e=a.calculateKey(e);f=a.extend({},10,a.Masks.show.options,10,f);f.animation=f.animation||{};var g=a.Masks.mask(e,f);if(!g.counter){++a.Masks.counter;var h=g.element;h.style.display="block";if(g.fadeIn){var k=h.originalOpacity=h.computedStyle().opacity;a.Animation.play(function(a,e){h.style.opacity=e*k},g.fadeIn,f.animation.ease,f.animation.until);h.style.opacity=0}}++g.counter;a.Masks.update(e);g.duration&&setTimeout(function(){a.Masks.hide(e)},g.duration);a.handle(a.Masks.onShow,a.Masks,[e,f,
|
|
429
|
+
g]);return g},hide:function(e){e=a.calculateKey(e);if(e in a.Masks.collection){var f=a.Masks.collection[e];if(0!==f.counter){var g=f.element;if(0===--f.counter){if(f.fadeOut){var h=g.originalOpacity||g.computedStyle().opacity;a.Animation.play(function(a,e){g.style.opacity=(1-e)*h},f.fadeOut).onComplete.set(function(){g.style.display="none"})}else g.style.display="none";--a.Masks.counter}a.handle(a.Masks.onHide,a.Masks,[e,f])}}},update:function(e){for(var f in a.Masks.collection)if(!e||f===e){var g=
|
|
430
|
+
a.Masks.collection[f];if(g.counter){var h=document.documentElement,k=document.body.getBoundingClientRect(),l=a.Visual.scrollLeft()-k.left;k=a.Visual.scrollTop()-k.top;var n=g.element.style;h=(g.shouldCover||h).getBoundingClientRect();g.rect={left:h.left,right:h.right,top:h.top,bottom:h.bottom};0>g.rect.top&&(g.rect.top=0);0>g.rect.bottom&&(g.rect.bottom=0);n.left=l+g.rect.left+"px";n.top=k+g.rect.top+"px";n.width=g.rect.right-g.rect.left+"px";n.height=n["line-height"]=g.rect.bottom-g.rect.top+"px"}}},
|
|
431
|
+
isVisible:function(e){e=a.calculateKey(e);return!!a.getObject([e,"counter"],a.Masks.Collection)},onShow:new a.Event,onHide:new a.Event};a.Masks.options={"Q.click.mask":{className:"Q_click_mask",fadeIn:0,fadeOut:0,duration:500},"Q.screen.mask":{className:"Q_screen_mask",fadeIn:100},"Q.dialog.mask":{className:"Q_dialog_mask",fadeIn:100},"Q.request.load.mask":{className:"Q_load_mask",fadeIn:5E3},"Q.request.cancel.mask":{className:"Q_cancel_mask",fadeIn:200}};a.Masks.show.options={animation:{ease:"easeInExpo"}};
|
|
432
|
+
a.onLayout().set(function(){a.Masks.update()},"Q");a.addEventListener(window,a.Pointer.start,function(e){a.Pointer.started=a.Pointer.target(e);a.Pointer.canceledClick=!1;a.addEventListener(window,a.Pointer.move,fb,!1,!0);a.addEventListener(window,a.Pointer.end,qb,!1,!0);a.addEventListener(window,a.Pointer.cancel,qb,!1,!0);a.addEventListener(window,a.Pointer.click,Pa,!1,!0);a.handle(a.Pointer.onStarted,this,arguments);var f=a.Pointer.getX(e)-a.Visual.scrollLeft(),g=a.Pointer.getY(e)-a.Visual.scrollTop();
|
|
433
|
+
R={x:f,y:g};Ba=ha=na=oa=null;a.Pointer.movement={times:[],positions:[],velocities:[],movingAverageVelocity:null,accelerations:[],timeout:300}},!1,!0);p.console||(p.console={debug:Q,dir:Q,error:Q,group:Q,groupCollapsed:Q,groupEnd:Q,info:Q,log:Q,time:Q,timeEnd:Q,trace:Q,warn:Q});a.log=console.log.bind(console);a.warn=console.warn.bind(console);a.error=console.error.bind(console);p.console.log.register=function(a){return p.console.log[a]=function(){var e=Array.prototype.slice.call(arguments);e.unshift("%c"+
|
|
434
|
+
a+":","background: gray; color: white; font-weight: bold;");console.log.apply(console,e)}};p.console.log.unregister=function(a){p.console.log[a]=function(){}};var T=p.console.log.register("Q");a.addEventListener(window,"load",a.onLoad.handle);a.onInit.add(function(){function e(){var f=new p.SpeechSynthesisUtterance;f.text="";p.speechSynthesis.speak(f);a.removeEventListener(document.body,"click",e);a.Audio.speak.enabled=!0}console.log("%c"+(a.info.app||"Untitled App")+" - powered by Qbix","color: blue; font-size: 20px");
|
|
435
|
+
console.log("%cVisit https://qbix.com/platform to learn how this open source platform works.","color: gray; font-size: 12px; font-weight: bold;");console.log("%cYou too can build apps for communities, and make money from clients worldwide.","color: gray; font-size: 12px; font-weight: bold;");N.addClass(a.info.isTouchscreen?"Q_touchscreen":"Q_notTouchscreen");N.addClass(a.info.isMobile?"Q_mobile":"Q_notMobile");N.addClass(a.info.isAndroid()?"Q_android":"Q_notAndroid");N.addClass(a.info.isStandalone?
|
|
436
|
+
"Q_standalone":"Q_notStandalone");N.addClass(a.info.isWebView?"Q_webView":"Q_notWebView");N.removeClass(a.info.isTouchscreen?"Q_notTouchscreen":"Q_touchscreen");N.removeClass(a.info.isMobile?"Q_notMobile":"Q_mobile");N.removeClass(a.info.isAndroid()?"Q_notAndroid":"Q_android");N.removeClass(a.info.isStandalone?"Q_notStandalone":"Q_standalone");N.removeClass(a.info.isWebView?"Q_notWebView":"Q_webView");a.info.browser&&"iPad"==a.info.browser.device&&N.addClass("Q_ipad");a.info.isAndroidStock&&N.addClass("Q_androidStock");
|
|
437
|
+
a.info.hasNotch&&N.addClass("Q_notch");K.currentUrl=p.location.href.split("#")[0];K.currentUrlTail=K.currentUrl.substring(a.baseUrl().length+1);window.history.pushState?a.onPopState.set(wb,"Q.loadUrl"):a.onHashChange.set(K,"Q.loadUrl");a.onReady.set(function(){a.onOnline.set(a.Socket.reconnectAll,"Q.Socket");navigator.splashscreen&&navigator.splashscreen.hide()},"Q.Socket");var f=a.interpolateUrl.substitutions;f.baseUrl=f[a.info.app]=f.baseUrl||a.baseUrl();f.Q=f.Q||a.pluginBaseUrl("Q");f.currentScriptPath=
|
|
438
|
+
f.currentScriptPath||Bb;for(var g in a.plugins)f[g]=a.pluginBaseUrl(g);g=a.interpolateUrl.substitutionsWithFullURL;for(var h in f)g[h]=a.url(f[h]);a.info.imgLoading=a.url(a.info.imgLoading||"{{Q}}/img/throbbers/loading.gif");f=a.text.Q.words;a.Pointer.ClickOrTap=f.ClickOrTap=ka?f.Tap:f.Click;a.Pointer.clickOrTap=f.clickOrTap=ka?f.tap:f.click;a.Pointer.CLICKORTAP=f.CLICKORTAP=f.clickOrTap.toUpperCase();p.SpeechSynthesisUtterance&&p.speechSynthesis&&a.addEventListener(document.body,"click",e,!1,!0);
|
|
439
|
+
0>["en","en-US"].indexOf(a.Text.languageLocale)&&a.Text.get("Q/content",function(e,f){f&&(a.extend(a.text.Q,10,f),a.extend(a.confirm.options,10,a.text.Q.confirm),a.extend(a.prompt.options,10,a.text.Q.prompt),a.extend(a.alert.options,10,a.text.Q.alert),e=a.text.Q.words,e.ClickOrTap=ka?e.Tap:e.Click,e.clickOrTap=ka?e.tap:e.click,a.layout(null,!0))});a.Notices.process();a.addEventListener(window,"beforeunload",function(a){a.defaultPrevented||(ib=!0)});setTimeout(function(){a.addScript("{{Q}}/js/fn/dialog.js");
|
|
440
|
+
a.addScript("{{Q}}/js/fn/clickfocus.js")},0);a.Audio.speak.options.mute=!!a.getObject("Audio.speak.mute",a)},"Q");a.Text.addFor(["Q.Tool.define","Q.Template.set"],"Q/",["Q/content"]);a.Tool.define({"Q/inplace":"{{Q}}/js/tools/inplace.js","Q/tabs":{js:"{{Q}}/js/tools/tabs.js",css:"{{Q}}/css/tools/tabs.css"},"Q/form":"{{Q}}/js/tools/form.js","Q/panel":"{{Q}}/js/tools/panel.js","Q/ticker":"{{Q}}/js/tools/ticker.js","Q/timestamp":"{{Q}}/js/tools/timestamp.js","Q/countdown":"{{Q}}/js/tools/countdown.js",
|
|
441
|
+
"Q/bookmarklet":"{{Q}}/js/tools/bookmarklet.js","Q/columns":"{{Q}}/js/tools/columns.js","Q/drawers":"{{Q}}/js/tools/drawers.js","Q/expandable":{js:"{{Q}}/js/tools/expandable.js",css:"{{Q}}/css/tools/expandable.css"},"Q/filter":"{{Q}}/js/tools/filter.js","Q/rating":"{{Q}}/js/tools/rating.js","Q/paging":"{{Q}}/js/tools/paging.js","Q/pie":{js:"{{Q}}/js/tools/pie.js",css:"{{Q}}/css/tools/pie.css"},"Q/progress":{js:"{{Q}}/js/tools/progress.js",css:"{{Q}}/css/tools/progress.css"},"Q/badge":{js:"{{Q}}/js/tools/badge.js",
|
|
442
|
+
css:"{{Q}}/css/tools/badge.css"},"Q/coverflow":{js:"{{Q}}/js/tools/coverflow.js",css:"{{Q}}/css/tools/coverflow.css"},"Q/resize":"{{Q}}/js/tools/resize.js","Q/layouts":"{{Q}}/js/tools/layouts.js","Q/carousel":"{{Q}}/js/tools/carousel.js","Q/infinitescroll":"{{Q}}/js/tools/infinitescroll.js","Q/parallax":"{{Q}}/js/tools/parallax.js","Q/lazyload":{js:"{{Q}}/js/tools/lazyload.js",css:null,text:!1},"Q/audio":{js:"{{Q}}/js/tools/audio.js",css:"{{Q}}/css/tools/audio.css"},"Q/video":{js:["{{Q}}/js/videojs/lib.js",
|
|
443
|
+
"{{Q}}/js/tools/video.js"],css:["{{Q}}/css/videojs.css","{{Q}}/css/tools/video.css"]},"Q/pdf":{js:["{{Q}}/js/pdfjs/build/pdf.js","{{Q}}/js/pdfjs/canvasSize.js","{{Q}}/js/tools/pdf.js"],css:"{{Q}}/css/tools/pdf.css"},"Q/image":"{{Q}}/js/tools/image.js","Q/clip":"{{Q}}/js/tools/clip.js","Q/floating":"{{Q}}/js/tools/floating.js","Q/htmleditor":"{{Q}}/js/tools/htmleditor.js","Q/scanQR":{js:["{{Q}}/js/qrcode/html5-qrcode.min.js","{{Q}}/js/qrcode/scanQR.js"],css:"{{Q}}/js/qrcode/scanQR.css"},"Q/card/glossary":{js:"{{Q}}/js/tools/card/glossary.js",
|
|
444
|
+
css:"{{Q}}/css/tools/cards.css"},"Q/card/stat":{js:"{{Q}}/js/tools/card/stat.js",css:"{{Q}}/css/tools/cards.css"},"Q/card/profile":{js:"{{Q}}/js/tools/card/profile.js",css:"{{Q}}/css/tools/cards.css"},"Q/card/quote":{js:"{{Q}}/js/tools/card/quote.js",css:"{{Q}}/css/tools/cards.css"},"Q/card/article":{js:"{{Q}}/js/tools/card/article.js",css:"{{Q}}/css/tools/cards.css"},"Q/card/comparison":{js:"{{Q}}/js/tools/card/comparison.js",css:"{{Q}}/css/tools/cards.css"},"Q/chart/bar":{js:"{{Q}}/js/tools/chart/bar.js",
|
|
445
|
+
css:"{{Q}}/css/tools/cards.css"},"Q/chart/line":{js:"{{Q}}/js/tools/chart/line.js",css:"{{Q}}/css/tools/cards.css"},"Q/visualization/graph":"{{Q}}/js/tools/visualization/graph.js","Q/visualization/table":"{{Q}}/js/tools/visualization/table.js"});a.Tool.jQuery({"Q/placeholders":"{{Q}}/js/fn/placeholders.js","Q/textfill":"{{Q}}/js/fn/textfill.js","Q/autogrow":"{{Q}}/js/fn/autogrow.js","Q/dialog":"{{Q}}/js/fn/dialog.js","Q/flip":{js:"{{Q}}/js/fn/flip.js",css:"{{Q}}/css/fn/flip.css"},"Q/gallery":"{{Q}}/js/fn/gallery.js",
|
|
446
|
+
"Q/zoomer":"{{Q}}/js/fn/zoomer.js","Q/fisheye":"{{Q}}/js/fn/fisheye.js","Q/listing":"{{Q}}/js/fn/listing.js","Q/hautoscroll":"{{Q}}/js/fn/hautoscroll.js","Q/imagepicker":"{{Q}}/js/fn/imagepicker.js","Q/viewport":"{{Q}}/js/fn/viewport.js","Q/actions":"{{Q}}/js/fn/actions.js","Q/clickable":"{{Q}}/js/fn/clickable.js","Q/clickfocus":"{{Q}}/js/fn/clickfocus.js","Q/contextual":"{{Q}}/js/fn/contextual.js","Q/scrollIndicators":"{{Q}}/js/fn/scrollIndicators.js","Q/iScroll":"{{Q}}/js/fn/iScroll.js","Q/scroller":"{{Q}}/js/fn/scroller.js",
|
|
447
|
+
"Q/scrollbarsAutoHide":"{{Q}}/js/fn/scrollbarsAutoHide.js","Q/sortable":"{{Q}}/js/fn/sortable.js","Q/validator":"{{Q}}/js/fn/validator.js","Q/touchscroll":"{{Q}}/js/fn/touchscroll.js","Q/emojis":{js:"{{Q}}/js/fn/emojis.js",css:"{{Q}}/css/fn/emojis.css"}});a.onJQuery.add(function(e){a.jQuery=e;a.onLoad.add(function(){e.fn.plugin.load(a.Tool.jQuery.loadAtStart);document.documentElement.addClass("Q_loaded")},"Q");p.$&&e.tools&&e.tools.validator&&e.tools.validator.conf&&(e.tools.validator.conf.formEvent=
|
|
448
|
+
null)},"Q");a.loadUrl.fillSlots=function(e,f,g){var h={},k,l,n,p=g||{},q=p.slotContainer;a.isPlainObject(q)&&(p.slotContainer=function(a){return q[a]||document.getElementById(a+"_slot")});for(k in e.slots)if(!a.loadUrl.retainedSlots[k])if("TITLE"===k.toUpperCase())document.title=e.slots[k];else if(l=p.slotContainer(k,e)){try{a.replace(l,e.slots[k],g),p.dontRestoreScrollPosition[""]||p.dontRestoreScrollPosition[f]||!(n=a.getObject(["Q","scroll",f],l))?(l.scrollLeft=p.scrollLeft||0,l.scrollTop=p.scrollTop||
|
|
449
|
+
0):(l.scrollLeft=n.left,l.scrollTop=n.top)}catch(t){debugger;console.warn("slot "+k+" could not be filled");console.warn(t)}h[k]=l}return h};a.loadUrl.options={quiet:!1,onError:new a.Event,onResponse:new a.Event,onLoadStart:new a.Event,onLoadEnd:new a.Event,beforeUnloadUrl:new a.Event(a.loadUrl.saveScroll,"Q"),onLoad:new a.Event,onActivate:new a.Event,slotNames:[],dontRestoreScrollPosition:{},slotContainer:function(a){return document.getElementById(a+"_slot")},handler:a.loadUrl.fillSlots,key:"Q"};
|
|
450
|
+
a.request.options={duplicate:!0,quiet:!0,asJSON:!1,parse:"json",timeout:5E3,onRedirect:new a.Event(function(e,f){e.startsWith(a.baseUrl())?a.loadUrl(e,a.extend({},f,{target:"_self",quiet:!0,dontTransformUrl:!0})):location.href=e},"Q"),resultFunction:"result",beforeRequest:[],onLoadStart:new a.Event,onShowCancel:new a.Event,onLoadEnd:new a.Event,onResponse:new a.Event,onProcessed:new a.Event,onCancel:new a.Event(function(e){(e=a.firstErrorMessage(e))&&console.warn(e)},"Q")};a.onReady.set(function(){Na();
|
|
451
|
+
a.request.options.onLoadStart.set(function(e,f,g){g.quiet||a.Masks.show("Q.request.load.mask")},"Q.request.load.mask");a.request.options.onShowCancel.set(function(e,f){if(!f.quiet){var g=a.Masks.mask("Q.request.cancel.mask").element;g&&g[0]&&(g=g[0]);f=g.querySelector(".Q_load_cancel_button");f||(f=document.createElement("button"),f.setAttribute("class","Q_button Q_load_cancel_button Q_wiggle"),f.innerHTML="Cancel",g.appendChild(f),g=f.getBoundingClientRect(),f.style.marginLeft=-g.width/2+"px");a.removeEventListener(f,
|
|
452
|
+
a.Pointer.end,e);a.addEventListener(f,a.Pointer.end,e);a.Masks.show("Q.request.cancel.mask")}},"Q.request.load.mask");a.request.options.onLoadEnd.set(function(e,f,g){g.quiet||(a.Masks.hide("Q.request.load.mask"),a.Masks.hide("Q.request.cancel.mask"))},"Q.request.load.mask");a.layout()},"Q.Masks");a.Camera={Scan:{onClose:new a.Event,options:{sound:{src:"{{Q}}/audio/scanned.mp3"},dialog:{title:a.text.Q.scan.QR},video:{width:1920,height:1080,facingMode:"environment"},qrboxRatio:.8,fps:10},QR:function(e,
|
|
453
|
+
f){f=a.extend({},this.options,f);var g=(new a.Audio(f.sound.src)).audio;if(p.QRScanner)return this.adapters.cordova(g,e,f);this.adapters.instascan(g,e,f)},animatedQR:function(e,f,g){var h={},k={},l=!1;a.Camera.Scan.QR(function(g){if(!h[g]){h[g]=!0;var m={};if(g.isUrl()){var n=g.split("#");m=n[1];n=n[0].split("?");n=n[1];m=a.parseQueryString((n?n+"&":"")+(m||""))}else try{m=JSON.parse(g)}catch(x){return}n=m["Q.index"];var p=m["Q.total"];delete m["Q.index"];delete m["Q.total"];if(!(n&&1<n)||l){l=!0;
|
|
454
|
+
a.handle(f,a.Camera.Scan.animatedQR,[k,g]);if(n&&1!==n){if(a.extend(k,m),n<p)return}else k=m;return a.handle(e,a.Camera.Scan.animatedQR,[k])}}},g)},config:function(e){e=a.extend({},a.Camera.Scan.options,e);var f=e.qrboxRatio||.8;e={fps:e.fps||10,qrbox:function(a,e){a=Math.floor(Math.min(a,e)*f);return{width:a,height:a}},videoConstraints:{facingMode:{ideal:e.video.facingMode},width:{ideal:e.video.width},height:{ideal:e.video.height}}};p.Html5QrcodeSupportedFormats?e.formatsToSupport=[p.Html5QrcodeSupportedFormats.QR_CODE]:
|
|
455
|
+
console.warn("Q.Camera.Scan: html5-qrcode has no Html5QrcodeSupportedFormats \u2014 it is too old to restrict formats, and 1D readers will starve the QR reader. Update Q/js/qrcode/html5-qrcode.min.js");return e},adapters:{cordova:function(e,f,g){var h=p.QRScanner,k=w("html");k.addClass("Q_scanning");var l=function(e){a.getObject("target",e)&&(e.stopPropagation(),e.preventDefault());k.removeClass("Q_scanning");w(this).remove();h.cancelScan();a.handle(a.Camera.Scan.onClose)},n=w('<a href="#" class="Q_scanning_close">').on(a.Pointer.fastclick,
|
|
456
|
+
l).appendTo("body");a.onReady.add(function(){h.prepare(function(g,m){if(g)return a.handle(l,n),console.error(g);if(m.authorized){h.show();"ios"===a.info.platform&&(k.hide(),setTimeout(function(){k.show()},0));var p=function(g,k){g?console.warn(g):(e&&e.play(),a.handle(f,null,[k]),setTimeout(function(){h.scan(p)},3E3))};h.scan(p)}else a.handle(l,n)})})},instascan:function(e,f,g){function h(h){var k=w(".Q_dialog_slot",h),m=w(".Q_title_slot",h),r=[];k.height(h.offsetHeight-m.height());h="Q_instascan_"+
|
|
457
|
+
Date.now();k.prop("id",h);m=a.Camera.Scan.config(g);if("scanQR"===a.getObject("instascan.mode",g))return k.tool("Q/scanQR",a.extend({audio:e},m)).activate(function(){this.state.onSuccess.set(f);this.state.onFailure.set(function(a){})});var q=new p.Html5QrcodeScanner(h,m,!0);q.render(function(g,h){r.includes(g)||(r.push(g),e.play(),a.handle(f,null,[g]))},function(a){});w("button",k).add(".html5-qrcode-element",k).addClass("Q_button");a.Camera.Scan.onClose.set(function(){q.clear()})}a.addStylesheet("{{Q}}/js/qrcode/html5-qrcode.css",
|
|
458
|
+
{slotName:"Q"});a.addScript("{{Q}}/js/qrcode/html5-qrcode.min.js",function(){a.Dialogs.push({title:g.dialog.title,className:"Q_scanning",content:"",fullscreen:!0,onActivate:h,onClose:function(){a.handle(a.Camera.Scan.onClose)}})})}}}};a.Notices={popUpTime:500,container:document.getElementById("notices_slot"),closedGroups:[],add:function(e){if(!(this.container instanceof HTMLElement))throw Error("Q.Notices.add: Notices container element doesn't exist.");var f=a.extend({key:null,group:null,closeable:!0,
|
|
459
|
+
type:"common",timeout:!1,persistent:!1},e);if(!f.group||!a.Notices.closedGroups.includes(f.group)){f.persistent&&!f.key&&(f.key=Date.now().toString());var g=f.key,h=f.content,k="Q_"+f.type+"_notice";if(g&&this.container.querySelector('li[data-key="'+g+'"]'))throw Error('Q.Notices.add: A notice with key "'+g+'" already exists.');e=this.container.getElementsByTagName("ul")[0];e||(e=document.createElement("ul"),this.container.appendChild(e));var l=document.createElement("li"),n=a.take(f,["key","closeable",
|
|
460
|
+
"persistent","timeout"]);n.local=!0;g&&l.setAttribute("data-key",n.key);l.setAttribute("data-notice",JSON.stringify(n));l.classList.add(k);l.onclick=function(){a.Notices.remove(l);a.handle(f.handler,l,[h])};k=document.createElement("span");k.innerHTML=h.trim();l.appendChild(k);f.closeable&&(k=document.createElement("span"),k.classList.add("Q_close"),l.appendChild(k),k.onclick=function(e){e.stopPropagation();a.Notices.remove(l);f.group&&a.Notices.closedGroups.push(f.group)});"number"===typeof f.timeout&&
|
|
461
|
+
0<f.timeout&&setTimeout(function(){a.Notices.remove(l)},1E3*f.timeout);e.appendChild(l);a.activate(e);setTimeout(function(){a.Notices.show(l);var e=document.getElementById("notices_slot");e&&(e.style.zIndex=a.zIndexTopmost(this.container)+1);if(f.persistent){if(!g)throw Error("Q.Notices.add: key required for persistent notice");e=a.take(f,["persistent","closeable","timeout","handler"]);a.req("Q/notice",[],null,{method:"post",fields:{key:g,content:h,options:e}})}},0)}},get:function(a){"string"===typeof a&&
|
|
462
|
+
(a=this.container.querySelector('li[data-key="'+a+'"]'));return a instanceof HTMLElement?a:null},remove:function(e){if(Array.isArray(e))e.forEach(function(e){a.Notices.remove(e)});else if(e=this.get(e),e instanceof HTMLElement){this.hide(e);var f=e.getAttribute("data-key"),g=e.getAttribute("data-notice");g=JSON.parse(g)||{};"string"===typeof f&&g.persistent&&a.req("Q/notice",[],null,{method:"delete",fields:{key:f}});setTimeout(function(){e.remove()},this.popUpTime)}},hide:function(a){a=this.get(a);
|
|
463
|
+
a instanceof HTMLElement&&a.addClass("Q_hidden_notice").removeClass("Q_show_notice")},show:function(a){a=this.get(a);a instanceof HTMLElement&&a.removeClass("Q_hidden_notice").addClass("Q_show_notice")},process:function(){var e=document.getElementById("notices_slot");if(!(e instanceof HTMLElement))return!1;e=e.getElementsByTagName("li");var f;a.each(e,function(){f={};f.content=this.innerHTML;f.type="common";var e=this.getAttribute("data-notice"),h=JSON.parse(e)||{};a.each(h,function(a){"true"===this?
|
|
464
|
+
h[a]=!0:"false"===this&&(h[a]=!1)});a.extend(f,h);this.remove();a.Notices.add(f)});return!0}};a.beforeInit.addOnce(function(){if(!a.baseUrl())throw new a.Error("Please set Q.info.baseUrl before calling Q.init()");Ta&&(a.info.appId=Ta,a.cookie("Q_appId",Ta));Ua&&(a.info.udid=Ua,a.cookie("Q_udid",Ua));a.getObject("Q.info.cookies.indexOf")&&a.info.cookies.indexOf("Q_dpr")&&a.cookie("Q_dpr",window.devicePixelRatio);for(var e,f=["dashboard","notices"],g=0;g<f.length;++g)if(e=f[g],!0===a.ignoreBackwardCompatibility||
|
|
465
|
+
!a.ignoreBackwardCompatibility[e])if(e=document.getElementById(e+"_slot")){var h=e.getBoundingClientRect();h.top<window.innerHeight/10?e.removeClass("Q_fixed_bottom").addClass("Q_fixed_top"):h.bottom>9*window.innerHeight/10&&e.removeClass("Q_fixed_top").addClass("Q_fixed_bottom")}if(a.info.languages&&a.info.languages.length){var k=!1;a.each(a.info.languages,function(a,e){e[0]===mb&&(k=!0)});k||a.Text.setLanguage(a.info.languages[0][0],a.info.languages[0][1])}a.Onboarding.text=a.Onboarding.text||a.info.app+
|
|
466
|
+
"/content";a.info.text&&(a.Text.loadBeforeInit=a.info.text.loadBeforeInit||a.Text.loadBeforeInit,a.Text.useLocale=a.info.text.useLocale||a.Text.useLocale,a.Onboarding.textName=a.info.text.onboardingTextName||a.Onboarding.textName,a.Onboarding.textPath=a.info.text.onboardingTextPath||a.Onboarding.textPath);a.ensure("Promise")},"Q");if("undefined"!==typeof p.module&&"undefined"!==typeof p.process)p.module.exports=a;else if(!r){a.noConflict=function(e){e&&a.extend(rb,a);p.Q=rb;return a};var rb=p.Q;p.Q=
|
|
467
|
+
a}a.globalNames=Object.keys(p);a.globalNamesAdded=function(){return a.diff(Object.keys(window),a.globalNames)};a.stackTrace=function(){var e={};Error.captureStackTrace?Error.captureStackTrace(e,a.stackTrace):e=Error();return e.stack.replace("Error","Stack Trace")};a.setTimeout=function(a,f){function e(){k&&(clearTimeout(k),h(),a("unload"))}function h(){window.removeEventListener("pagehide",e);window.removeEventListener("beforeunload",e);k=null}var k=setTimeout(function(){h();a("timeout")},f);window.addEventListener("pagehide",
|
|
468
|
+
e);window.addEventListener("beforeunload",e);return function(){k&&(clearTimeout(k),h())}};a.hook=function(a,f,g){var e="AsyncFunction"===a.constructor.name||f&&"AsyncFunction"===f.constructor.name||g&&"AsyncFunction"===g.constructor.name?function(e){for(var h=[],m=0;m<arguments.length;++m)h[m-0]=arguments[m];var p=this;return $jscomp.executeAsyncGenerator(function(){function e(e,q,r){for(;;)switch(l){case 0:if(!f){l=1;break}l=2;return{value:f.apply(p,h),done:!1};case 2:if(1!=e){l=3;break}l=-1;throw r;
|
|
469
|
+
case 3:case 1:return l=4,{value:a.apply(p,h),done:!1};case 4:if(1!=e){l=5;break}l=-1;throw r;case 5:m=n=q;if(!g){l=6;break}l=7;return{value:g.apply(p,h),done:!1};case 7:if(1!=e){l=8;break}l=-1;throw r;case 8:case 6:return l=-1,{value:m,done:!0};default:return{value:k,done:!0}}}var l=0,m,n,r={next:function(a){return e(0,a,k)},throw:function(a){return e(1,k,a)},return:function(a){throw Error("Not yet implemented");}};$jscomp.initSymbolIterator();r[Symbol.iterator]=function(){return this};return r}())}:
|
|
470
|
+
function(e){for(var h=[],k=0;k<arguments.length;++k)h[k-0]=arguments[k];f&&f.apply(this,h);k=a.apply(this,h);g&&g.apply(this,h);return k};e.original=a;return e};a.removeCurrentScript=function(){var a=document.currentScript||document.scripts[document.scripts.length-1];a.textContent="";a.parentElement.removeChild(a)};var Ua=location.search.queryField("Q.udid"),Ta=location.search.queryField("Q.appId");document.addEventListener("DOMContentLoaded",function(){p.Handlebars||a.addScript(a.currentScriptPath("handlebars-v4.0.10.min.js"));
|
|
471
|
+
a.init()});return a}.call(window||this);module$temp$24_185_22_50_source.default=$jscompDefaultExport$$module$temp$24_185_22_50_source;
|
|
385
472
|
export default window.Q;
|