@bbn/bbn 1.0.15 → 1.0.16
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/bundle.d.ts +32 -32
- package/dist/bundle.js +1215 -418
- package/dist/fn/_addLoader.js +21 -1
- package/dist/fn/abort.js +12 -3
- package/dist/fn/addColors.js +11 -3
- package/dist/fn/addInputs.js +9 -2
- package/dist/fn/addStyle.js +7 -3
- package/dist/fn/adjustSize.js +19 -6
- package/dist/fn/ajax.js +16 -5
- package/dist/fn/analyzeFunction.js +10 -1
- package/dist/fn/animateCss.js +8 -2
- package/dist/fn/arrayBuffer2String.js +3 -1
- package/dist/fn/arrayFromProp.js +7 -1
- package/dist/fn/autoExtend.js +2 -0
- package/dist/fn/br2nl.js +3 -1
- package/dist/fn/calendar.js +8 -1
- package/dist/fn/callback.js +4 -2
- package/dist/fn/camelToCss.js +7 -1
- package/dist/fn/canvasToImage.js +5 -1
- package/dist/fn/center.js +12 -1
- package/dist/fn/checkProps.js +3 -1
- package/dist/fn/checkPropsDetails.js +4 -1
- package/dist/fn/clone.js +3 -1
- package/dist/fn/colorToHex.js +5 -1
- package/dist/fn/compare.js +28 -15
- package/dist/fn/compareConditions.js +1 -0
- package/dist/fn/copy.js +8 -2
- package/dist/fn/correctCase.js +3 -1
- package/dist/fn/count.js +3 -1
- package/dist/fn/crc32.js +1 -1
- package/dist/fn/cssExists.js +2 -0
- package/dist/fn/dateSQL.js +6 -3
- package/dist/fn/deepPath.js +9 -7
- package/dist/fn/defaultAjaxAbortFunction.js +3 -1
- package/dist/fn/defaultAjaxErrorFunction.d.ts +1 -1
- package/dist/fn/defaultAjaxErrorFunction.js +15 -2
- package/dist/fn/defaultAlertFunction.d.ts +1 -1
- package/dist/fn/defaultAlertFunction.js +5 -1
- package/dist/fn/defaultEndLoadingFunction.d.ts +1 -1
- package/dist/fn/defaultEndLoadingFunction.js +19 -1
- package/dist/fn/defaultErrorFunction.js +3 -1
- package/dist/fn/defaultHistoryFunction.js +3 -1
- package/dist/fn/defaultLinkFunction.js +3 -1
- package/dist/fn/defaultPostLinkFunction.js +3 -1
- package/dist/fn/defaultPreLinkFunction.d.ts +1 -1
- package/dist/fn/defaultPreLinkFunction.js +11 -1
- package/dist/fn/defaultResizeFunction.js +3 -1
- package/dist/fn/defaultStartLoadingFunction.d.ts +1 -1
- package/dist/fn/defaultStartLoadingFunction.js +14 -1
- package/dist/fn/deleteProp.js +5 -1
- package/dist/fn/diffObj.js +20 -5
- package/dist/fn/download.js +4 -1
- package/dist/fn/downloadContent.js +12 -1
- package/dist/fn/eraseCookie.js +3 -1
- package/dist/fn/error.js +5 -1
- package/dist/fn/escapeRegExp.js +3 -1
- package/dist/fn/escapeUrl.js +3 -1
- package/dist/fn/extend.js +6 -1
- package/dist/fn/fdate.js +1 -0
- package/dist/fn/fdatetime.js +10 -1
- package/dist/fn/filter.js +10 -6
- package/dist/fn/filterToConditions.js +8 -2
- package/dist/fn/findAll.js +5 -3
- package/dist/fn/format.js +5 -1
- package/dist/fn/formatDate.js +3 -1
- package/dist/fn/formdata.js +7 -2
- package/dist/fn/ftime.js +3 -1
- package/dist/fn/getAllTags.js +3 -1
- package/dist/fn/getAttributes.js +3 -1
- package/dist/fn/getBrowserName.js +20 -10
- package/dist/fn/getBrowserVersion.js +21 -10
- package/dist/fn/getEventData.js +26 -6
- package/dist/fn/getField.js +1 -2
- package/dist/fn/getPath.js +14 -3
- package/dist/fn/getProp.js +5 -1
- package/dist/fn/getRequestId.js +5 -3
- package/dist/fn/getScrollBarSize.js +4 -1
- package/dist/fn/getText.js +3 -1
- package/dist/fn/happy.js +8 -1
- package/dist/fn/hash.js +2 -1
- package/dist/fn/hex2rgb.js +8 -1
- package/dist/fn/history.js +3 -1
- package/dist/fn/html2text.js +6 -1
- package/dist/fn/imageToCanvas.js +7 -1
- package/dist/fn/imgToBase64.js +4 -1
- package/dist/fn/info.js +9 -1
- package/dist/fn/init.js +72 -14
- package/dist/fn/isArray.d.ts +1 -1
- package/dist/fn/isArray.js +3 -3
- package/dist/fn/isBlob.d.ts +1 -1
- package/dist/fn/isBlob.js +3 -3
- package/dist/fn/isBoolean.d.ts +1 -1
- package/dist/fn/isBoolean.js +3 -3
- package/dist/fn/isCanvas.d.ts +1 -1
- package/dist/fn/isCanvas.js +3 -3
- package/dist/fn/isComment.d.ts +1 -1
- package/dist/fn/isComment.js +3 -3
- package/dist/fn/isCp.d.ts +1 -1
- package/dist/fn/isCp.js +3 -3
- package/dist/fn/isDate.d.ts +1 -1
- package/dist/fn/isDate.js +3 -3
- package/dist/fn/isDesktopDevice.js +3 -1
- package/dist/fn/isDom.d.ts +1 -1
- package/dist/fn/isDom.js +3 -3
- package/dist/fn/isEvent.d.ts +1 -1
- package/dist/fn/isEvent.js +3 -3
- package/dist/fn/isFocused.js +3 -1
- package/dist/fn/isFunction.d.ts +1 -1
- package/dist/fn/isFunction.js +3 -3
- package/dist/fn/isHostname.d.ts +1 -1
- package/dist/fn/isHostname.js +10 -5
- package/dist/fn/isIP.d.ts +1 -1
- package/dist/fn/isIP.js +10 -3
- package/dist/fn/isInside.js +6 -4
- package/dist/fn/isInt.d.ts +1 -1
- package/dist/fn/isInt.js +3 -3
- package/dist/fn/isIterable.js +3 -1
- package/dist/fn/isMobile.js +3 -1
- package/dist/fn/isMobileDevice.js +3 -1
- package/dist/fn/isNull.d.ts +1 -1
- package/dist/fn/isNull.js +3 -3
- package/dist/fn/isNumber.d.ts +1 -1
- package/dist/fn/isNumber.js +3 -3
- package/dist/fn/isObject.d.ts +1 -1
- package/dist/fn/isObject.js +3 -3
- package/dist/fn/isPercent.d.ts +1 -1
- package/dist/fn/isPercent.js +3 -3
- package/dist/fn/isPrimitive.d.ts +1 -1
- package/dist/fn/isPrimitive.js +3 -3
- package/dist/fn/isPromise.d.ts +1 -1
- package/dist/fn/isPromise.js +3 -3
- package/dist/fn/isPropSize.js +10 -4
- package/dist/fn/isSQLDate.d.ts +1 -1
- package/dist/fn/isSQLDate.js +5 -4
- package/dist/fn/isSame.js +7 -4
- package/dist/fn/isString.d.ts +1 -1
- package/dist/fn/isString.js +3 -3
- package/dist/fn/isSymbol.d.ts +1 -1
- package/dist/fn/isSymbol.js +3 -3
- package/dist/fn/isTabletDevice.js +3 -1
- package/dist/fn/isURL.d.ts +1 -1
- package/dist/fn/isURL.js +10 -1
- package/dist/fn/isValidDimension.js +3 -1
- package/dist/fn/isValidName.d.ts +1 -1
- package/dist/fn/isValidName.js +3 -3
- package/dist/fn/isValue.d.ts +1 -1
- package/dist/fn/isValue.js +3 -3
- package/dist/fn/isVue.d.ts +1 -1
- package/dist/fn/isVue.js +5 -5
- package/dist/fn/iterate.js +5 -3
- package/dist/fn/link.js +24 -3
- package/dist/fn/makeReactive.js +47 -11
- package/dist/fn/md5.js +12 -3
- package/dist/fn/money.js +26 -0
- package/dist/fn/nl2br.js +3 -1
- package/dist/fn/objectToFormData.js +8 -4
- package/dist/fn/order.js +3 -1
- package/dist/fn/percent.js +3 -1
- package/dist/fn/pickValue.js +5 -3
- package/dist/fn/post.js +8 -3
- package/dist/fn/printf.js +8 -1
- package/dist/fn/randomInt.js +3 -1
- package/dist/fn/randomString.js +9 -2
- package/dist/fn/removeExtraSpaces.js +3 -1
- package/dist/fn/repeat.js +7 -1
- package/dist/fn/replaceSelection.js +6 -0
- package/dist/fn/riterate.js +3 -1
- package/dist/fn/roundDecimal.js +3 -1
- package/dist/fn/search.js +17 -2
- package/dist/fn/selector.js +3 -1
- package/dist/fn/setNavigationVars.js +20 -2
- package/dist/fn/setProp.js +9 -1
- package/dist/fn/shorten.js +1 -1
- package/dist/fn/shuffle.js +6 -1
- package/dist/fn/simpleHash.js +5 -1
- package/dist/fn/simpleHash1.js +1 -1
- package/dist/fn/simpleHash2.js +1 -1
- package/dist/fn/startChrono.js +5 -3
- package/dist/fn/stat.js +4 -2
- package/dist/fn/stopChrono.js +7 -5
- package/dist/fn/string2ArrayBuffer.js +1 -1
- package/dist/fn/submit.js +12 -1
- package/dist/fn/sum.js +11 -3
- package/dist/fn/timestamp.js +4 -1
- package/dist/fn/toggleFullScreen.js +3 -1
- package/dist/fn/translate.js +6 -1
- package/dist/fn/treatAjaxArguments.js +8 -0
- package/dist/fn/uniqString.d.ts +1 -1
- package/dist/fn/uniqString.js +14 -11
- package/dist/fn/unique.js +5 -1
- package/dist/fn/upload.js +20 -9
- package/dist/fn/warning.js +10 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"use strict";
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.isString = void 0;
|
|
16
|
-
const isString = function () {
|
|
17
|
-
if (!
|
|
16
|
+
const isString = function (...args) {
|
|
17
|
+
if (!args.length)
|
|
18
18
|
return false;
|
|
19
|
-
for (let a of
|
|
19
|
+
for (let a of args) {
|
|
20
20
|
if ({}.toString.apply(a) !== '[object String]') {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"use strict";
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
31
|
exports.isInt = void 0;
|
|
32
|
-
const isInt = function () {
|
|
33
|
-
if (!
|
|
32
|
+
const isInt = function (...args) {
|
|
33
|
+
if (!args.length)
|
|
34
34
|
return false;
|
|
35
|
-
for (let a of
|
|
35
|
+
for (let a of args) {
|
|
36
36
|
if (!Number.isInteger(a)) {
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"use strict";
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
47
|
exports.isFunction = void 0;
|
|
48
|
-
const isFunction = function () {
|
|
49
|
-
if (!
|
|
48
|
+
const isFunction = function (...args) {
|
|
49
|
+
if (!args.length)
|
|
50
50
|
return false;
|
|
51
|
-
for (let obj of
|
|
51
|
+
for (let obj of args) {
|
|
52
52
|
if (!(obj && obj.constructor && obj.call && obj.apply)) {
|
|
53
53
|
return false;
|
|
54
54
|
}
|
|
@@ -118,14 +118,34 @@
|
|
|
118
118
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
119
119
|
exports._addLoader = void 0;
|
|
120
120
|
const _addLoader = function (requestId, prom, source) {
|
|
121
|
+
/** @var {Number} tst Current timestamp */
|
|
121
122
|
let tst = (new Date()).getTime();
|
|
123
|
+
/** @var {String} url The original URL (part of requestId before : and md5) */
|
|
122
124
|
let url = (0, substr_1.substr)(requestId, 0, requestId.length - 33);
|
|
123
|
-
|
|
125
|
+
/** @var {Object} loader The loader object */
|
|
126
|
+
let loader = {
|
|
127
|
+
key: requestId,
|
|
128
|
+
url: url,
|
|
129
|
+
loader: prom,
|
|
130
|
+
source: source,
|
|
131
|
+
loading: true,
|
|
132
|
+
error: false,
|
|
133
|
+
abort: false,
|
|
134
|
+
errorMessage: false,
|
|
135
|
+
success: false,
|
|
136
|
+
start: tst
|
|
137
|
+
};
|
|
138
|
+
// Adding the loader in bbn.env.loaders
|
|
124
139
|
bbn.env.loaders.push(loader);
|
|
140
|
+
// Adding an object with this loader info in bbn.env.loadersHistory
|
|
125
141
|
bbn.env.loadersHistory.unshift(loader);
|
|
142
|
+
/** @var {Number} idx A pointer starting at the end of array loadersHistory */
|
|
126
143
|
let idx = bbn.env.loadersHistory.length;
|
|
144
|
+
// Removing elements from the loadersHistory object if their number is higher
|
|
145
|
+
// than bbn.env.maxLoadersHistory
|
|
127
146
|
while (idx && (bbn.env.loadersHistory.length > bbn.env.maxLoadersHistory)) {
|
|
128
147
|
idx--;
|
|
148
|
+
// Not removing the ones still loading
|
|
129
149
|
if (!bbn.env.loadersHistory.loading) {
|
|
130
150
|
bbn.env.loadersHistory.splice(idx, 1);
|
|
131
151
|
}
|
|
@@ -172,10 +192,10 @@
|
|
|
172
192
|
"use strict";
|
|
173
193
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174
194
|
exports.isDate = void 0;
|
|
175
|
-
const isDate = function () {
|
|
176
|
-
if (!
|
|
195
|
+
const isDate = function (...args) {
|
|
196
|
+
if (!args.length)
|
|
177
197
|
return false;
|
|
178
|
-
for (let a of
|
|
198
|
+
for (let a of args) {
|
|
179
199
|
if ({}.toString.apply(a) !== '[object Date]') {
|
|
180
200
|
return false;
|
|
181
201
|
}
|
|
@@ -229,17 +249,19 @@
|
|
|
229
249
|
"use strict";
|
|
230
250
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
231
251
|
exports.isIterable = void 0;
|
|
232
|
-
const isIterable = function (v) {
|
|
252
|
+
const isIterable = function (v) {
|
|
253
|
+
return v && (typeof v === 'object') && (Symbol.iterator in Object(v));
|
|
254
|
+
};
|
|
233
255
|
exports.isIterable = isIterable;
|
|
234
256
|
});
|
|
235
257
|
define("fn/isArray", ["require", "exports"], function (require, exports) {
|
|
236
258
|
"use strict";
|
|
237
259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
238
260
|
exports.isArray = void 0;
|
|
239
|
-
const isArray = function () {
|
|
240
|
-
if (!
|
|
261
|
+
const isArray = function (...args) {
|
|
262
|
+
if (!args.length)
|
|
241
263
|
return false;
|
|
242
|
-
for (let a of
|
|
264
|
+
for (let a of args) {
|
|
243
265
|
if (!Array.isArray(a)) {
|
|
244
266
|
return false;
|
|
245
267
|
}
|
|
@@ -252,10 +274,10 @@
|
|
|
252
274
|
"use strict";
|
|
253
275
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
254
276
|
exports.isNumber = void 0;
|
|
255
|
-
const isNumber = function () {
|
|
256
|
-
if (!
|
|
277
|
+
const isNumber = function (...args) {
|
|
278
|
+
if (!args.length)
|
|
257
279
|
return false;
|
|
258
|
-
for (let a of
|
|
280
|
+
for (let a of args) {
|
|
259
281
|
if (['boolean', 'object', 'symbol'].includes(typeof a) || (a === '') || isNaN(a)) {
|
|
260
282
|
return false;
|
|
261
283
|
}
|
|
@@ -297,9 +319,11 @@
|
|
|
297
319
|
if (reverse) {
|
|
298
320
|
iter.reverse();
|
|
299
321
|
}
|
|
300
|
-
(0, each_1.each)(iter, prop => {
|
|
301
|
-
|
|
302
|
-
|
|
322
|
+
(0, each_1.each)(iter, prop => {
|
|
323
|
+
if (fn(obj[prop], prop) === false) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
303
327
|
}
|
|
304
328
|
return obj;
|
|
305
329
|
};
|
|
@@ -367,10 +391,10 @@
|
|
|
367
391
|
"use strict";
|
|
368
392
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
369
393
|
exports.isNull = void 0;
|
|
370
|
-
const isNull = function () {
|
|
371
|
-
if (!
|
|
394
|
+
const isNull = function (...args) {
|
|
395
|
+
if (!args.length)
|
|
372
396
|
return false;
|
|
373
|
-
for (let a of
|
|
397
|
+
for (let a of args) {
|
|
374
398
|
if ({}.toString.apply(a) !== '[object Null]') {
|
|
375
399
|
return false;
|
|
376
400
|
}
|
|
@@ -383,10 +407,10 @@
|
|
|
383
407
|
"use strict";
|
|
384
408
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
385
409
|
exports.isObject = void 0;
|
|
386
|
-
const isObject = function () {
|
|
387
|
-
if (!
|
|
410
|
+
const isObject = function (...args) {
|
|
411
|
+
if (!args.length)
|
|
388
412
|
return false;
|
|
389
|
-
for (let a of
|
|
413
|
+
for (let a of args) {
|
|
390
414
|
if ({}.toString.apply(a) !== '[object Object]') {
|
|
391
415
|
return false;
|
|
392
416
|
}
|
|
@@ -399,10 +423,10 @@
|
|
|
399
423
|
"use strict";
|
|
400
424
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
401
425
|
exports.isDom = void 0;
|
|
402
|
-
const isDom = function () {
|
|
403
|
-
if (!
|
|
426
|
+
const isDom = function (...args) {
|
|
427
|
+
if (!args.length)
|
|
404
428
|
return false;
|
|
405
|
-
for (let a of
|
|
429
|
+
for (let a of args) {
|
|
406
430
|
if (!(a instanceof HTMLElement)) {
|
|
407
431
|
return false;
|
|
408
432
|
}
|
|
@@ -415,14 +439,14 @@
|
|
|
415
439
|
"use strict";
|
|
416
440
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
417
441
|
exports.isCp = void 0;
|
|
418
|
-
const isCp = function () {
|
|
419
|
-
if (!
|
|
442
|
+
const isCp = function (...args) {
|
|
443
|
+
if (!args.length) {
|
|
420
444
|
return false;
|
|
421
445
|
}
|
|
422
446
|
if (!Object.hasOwn(bbn, 'cp')) {
|
|
423
447
|
return false;
|
|
424
448
|
}
|
|
425
|
-
for (let a of
|
|
449
|
+
for (let a of args) {
|
|
426
450
|
let res = bbn.cp.isComponent(a);
|
|
427
451
|
if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
|
|
428
452
|
return false;
|
|
@@ -476,7 +500,7 @@
|
|
|
476
500
|
for (let i = 0; i < str.length; i++) {
|
|
477
501
|
const char = str.charCodeAt(i);
|
|
478
502
|
hash = ((hash << 5) - hash) + char;
|
|
479
|
-
hash |= 0;
|
|
503
|
+
hash |= 0; // Convert to 32-bit integer
|
|
480
504
|
}
|
|
481
505
|
return hash;
|
|
482
506
|
};
|
|
@@ -491,7 +515,7 @@
|
|
|
491
515
|
for (let i = 0; i < str.length; i++) {
|
|
492
516
|
const char = str.charCodeAt(i);
|
|
493
517
|
hash = char + (hash << 6) + (hash << 16) - hash;
|
|
494
|
-
hash |= 0;
|
|
518
|
+
hash |= 0; // Convert to 32-bit integer
|
|
495
519
|
}
|
|
496
520
|
return hash;
|
|
497
521
|
};
|
|
@@ -501,14 +525,19 @@
|
|
|
501
525
|
"use strict";
|
|
502
526
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
503
527
|
exports.simpleHash = void 0;
|
|
504
|
-
const simpleHash = function (str) {
|
|
528
|
+
const simpleHash = function (str) {
|
|
529
|
+
const part1 = (0, simpleHash1_1.simpleHash1)(str).toString(16).padStart(8, '0');
|
|
530
|
+
const part2 = (0, simpleHash2_1.simpleHash2)(str).toString(16).padStart(8, '0');
|
|
531
|
+
return part1 + part2;
|
|
532
|
+
};
|
|
505
533
|
exports.simpleHash = simpleHash;
|
|
506
534
|
});
|
|
507
|
-
define("fn/hash", ["require", "exports", "fn/
|
|
535
|
+
define("fn/hash", ["require", "exports", "fn/log", "fn/isDom", "fn/isCp", "fn/circularReplacer", "fn/simpleHash"], function (require, exports, log_4, isDom_3, isCp_2, circularReplacer_1, simpleHash_1) {
|
|
508
536
|
"use strict";
|
|
509
537
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
510
538
|
exports.hash = void 0;
|
|
511
539
|
const hash = function (obj) {
|
|
540
|
+
//log(obj);
|
|
512
541
|
let st = '__bbn__';
|
|
513
542
|
for (let i in arguments) {
|
|
514
543
|
if (arguments[i]) {
|
|
@@ -552,6 +581,7 @@
|
|
|
552
581
|
}
|
|
553
582
|
if (obj1 && obj2 && (typeof (obj1) === 'object') && (typeof (obj2) === 'object')) {
|
|
554
583
|
let tmp1 = Object.keys(obj1).sort(), tmp2 = Object.keys(obj2).sort();
|
|
584
|
+
// Case where the keys are different
|
|
555
585
|
if ((0, hash_1.hash)(tmp1) !== (0, hash_1.hash)(tmp2)) {
|
|
556
586
|
return false;
|
|
557
587
|
}
|
|
@@ -562,10 +592,12 @@
|
|
|
562
592
|
}
|
|
563
593
|
done.push(obj1);
|
|
564
594
|
}
|
|
565
|
-
(0, each_2.each)(tmp1, a => {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
595
|
+
(0, each_2.each)(tmp1, a => {
|
|
596
|
+
if (!isSame(obj1[a], obj2[a])) {
|
|
597
|
+
ok = false;
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
});
|
|
569
601
|
return ok;
|
|
570
602
|
}
|
|
571
603
|
return false;
|
|
@@ -582,13 +614,16 @@
|
|
|
582
614
|
case "=":
|
|
583
615
|
case "equal":
|
|
584
616
|
case "eq":
|
|
585
|
-
case "is":
|
|
617
|
+
case "is":
|
|
618
|
+
return v1 === v2;
|
|
586
619
|
case "!==":
|
|
587
620
|
case "notequal":
|
|
588
621
|
case "neq":
|
|
589
|
-
case "isnot":
|
|
622
|
+
case "isnot":
|
|
623
|
+
return v1 !== v2;
|
|
590
624
|
case "!=":
|
|
591
|
-
case "different":
|
|
625
|
+
case "different":
|
|
626
|
+
return v1 != v2;
|
|
592
627
|
case "contains":
|
|
593
628
|
case "contain":
|
|
594
629
|
case "icontains":
|
|
@@ -639,21 +674,31 @@
|
|
|
639
674
|
}
|
|
640
675
|
return (0, removeAccents_2.removeAccents)(v1).toLowerCase() === (0, removeAccents_2.removeAccents)(v2).toLowerCase();
|
|
641
676
|
case "gt":
|
|
642
|
-
case ">":
|
|
677
|
+
case ">":
|
|
678
|
+
return v1 > v2;
|
|
643
679
|
case "gte":
|
|
644
|
-
case ">=":
|
|
680
|
+
case ">=":
|
|
681
|
+
return v1 >= v2;
|
|
645
682
|
case "lt":
|
|
646
|
-
case "<":
|
|
683
|
+
case "<":
|
|
684
|
+
return v1 < v2;
|
|
647
685
|
case "lte":
|
|
648
|
-
case "<=":
|
|
649
|
-
|
|
650
|
-
case "
|
|
651
|
-
|
|
652
|
-
case "
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
686
|
+
case "<=":
|
|
687
|
+
return v1 <= v2;
|
|
688
|
+
case "isnull":
|
|
689
|
+
return v1 === null;
|
|
690
|
+
case "isnotnull":
|
|
691
|
+
return v1 !== null;
|
|
692
|
+
case "isempty":
|
|
693
|
+
return v1 === '';
|
|
694
|
+
case "isnotempty":
|
|
695
|
+
return v1 !== '';
|
|
696
|
+
case '==':
|
|
697
|
+
if ((0, isObject_1.isObject)(v1, v2)) {
|
|
698
|
+
return (0, isSame_1.isSame)(v1, v2);
|
|
699
|
+
}
|
|
700
|
+
default:
|
|
701
|
+
return v1 == v2;
|
|
657
702
|
}
|
|
658
703
|
};
|
|
659
704
|
exports.compare = compare;
|
|
@@ -680,6 +725,7 @@
|
|
|
680
725
|
if (bits.length) {
|
|
681
726
|
(0, each_3.each)(bits, b => data = data[b]);
|
|
682
727
|
}
|
|
728
|
+
// Case where both are undefined: value and prop which doesn't exist; they are not the same!
|
|
683
729
|
if (((0, getProperty_2.getProperty)(data, prop) === undefined) && (a.value !== undefined)) {
|
|
684
730
|
compare = false;
|
|
685
731
|
}
|
|
@@ -715,10 +761,16 @@
|
|
|
715
761
|
tmp.push(filterToConditions(a));
|
|
716
762
|
}
|
|
717
763
|
else {
|
|
718
|
-
tmp.push({
|
|
764
|
+
tmp.push({
|
|
765
|
+
field: n,
|
|
766
|
+
operator: operator || '=',
|
|
767
|
+
value: a
|
|
768
|
+
});
|
|
719
769
|
}
|
|
720
770
|
});
|
|
721
|
-
filter = {
|
|
771
|
+
filter = {
|
|
772
|
+
conditions: tmp
|
|
773
|
+
};
|
|
722
774
|
}
|
|
723
775
|
if (!filter.logic) {
|
|
724
776
|
filter.logic = 'AND';
|
|
@@ -741,11 +793,26 @@
|
|
|
741
793
|
let filter = {};
|
|
742
794
|
let isFunction = false;
|
|
743
795
|
if ((0, isString_4.isString)(prop)) {
|
|
744
|
-
filter.conditions = [{
|
|
796
|
+
filter.conditions = [{
|
|
797
|
+
field: prop,
|
|
798
|
+
value: val,
|
|
799
|
+
operator: operator || '='
|
|
800
|
+
}];
|
|
745
801
|
}
|
|
746
802
|
else if (!prop) {
|
|
747
803
|
isFunction = true;
|
|
748
|
-
filter = a => {
|
|
804
|
+
filter = a => {
|
|
805
|
+
return (0, compareConditions_1.compareConditions)({ value: a }, (0, filterToConditions_1.filterToConditions)({
|
|
806
|
+
logic: 'AND',
|
|
807
|
+
conditions: [
|
|
808
|
+
{
|
|
809
|
+
field: 'value',
|
|
810
|
+
operator: operator || '=',
|
|
811
|
+
value: val
|
|
812
|
+
}
|
|
813
|
+
]
|
|
814
|
+
}));
|
|
815
|
+
};
|
|
749
816
|
}
|
|
750
817
|
else {
|
|
751
818
|
startFrom = operator;
|
|
@@ -843,9 +910,18 @@
|
|
|
843
910
|
"use strict";
|
|
844
911
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
845
912
|
exports.abort = void 0;
|
|
846
|
-
const abort = function (requestId) {
|
|
847
|
-
loader
|
|
848
|
-
|
|
913
|
+
const abort = function (requestId) {
|
|
914
|
+
let loader = (0, getLoader_1.getLoader)(requestId);
|
|
915
|
+
if (loader && loader.source) {
|
|
916
|
+
//this._deleteLoader(requestId);
|
|
917
|
+
loader.source.cancel('Operation canceled by the user.');
|
|
918
|
+
}
|
|
919
|
+
/*
|
|
920
|
+
else {
|
|
921
|
+
throw new Error("Impossible to find the loader " + requestId);
|
|
922
|
+
}
|
|
923
|
+
*/
|
|
924
|
+
};
|
|
849
925
|
exports.abort = abort;
|
|
850
926
|
});
|
|
851
927
|
define("fn/filter", ["require", "exports", "fn/isArray", "fn/isFunction", "fn/isObject", "fn/each", "fn/filterToConditions", "fn/compareConditions"], function (require, exports, isArray_4, isFunction_2, isObject_5, each_4, filterToConditions_2, compareConditions_2) {
|
|
@@ -872,16 +948,20 @@
|
|
|
872
948
|
throw new Error("Search function error: The prop argument should be a string or an object");
|
|
873
949
|
}
|
|
874
950
|
if (isFn) {
|
|
875
|
-
(0, each_4.each)(arr, (a, i) => {
|
|
876
|
-
|
|
877
|
-
|
|
951
|
+
(0, each_4.each)(arr, (a, i) => {
|
|
952
|
+
if (filter(a, i)) {
|
|
953
|
+
res.push(a);
|
|
954
|
+
}
|
|
955
|
+
});
|
|
878
956
|
}
|
|
879
957
|
else {
|
|
880
958
|
filter = (0, filterToConditions_2.filterToConditions)(filter, operator);
|
|
881
959
|
if (filter.conditions && filter.logic) {
|
|
882
|
-
(0, each_4.each)(arr, (a) => {
|
|
883
|
-
|
|
884
|
-
|
|
960
|
+
(0, each_4.each)(arr, (a) => {
|
|
961
|
+
if ((0, compareConditions_2.compareConditions)(a, filter)) {
|
|
962
|
+
res.push(a);
|
|
963
|
+
}
|
|
964
|
+
});
|
|
885
965
|
}
|
|
886
966
|
}
|
|
887
967
|
return res;
|
|
@@ -912,14 +992,22 @@
|
|
|
912
992
|
const addColors = function (colors) {
|
|
913
993
|
let st = '';
|
|
914
994
|
if ((0, numProperties_3.numProperties)(colors)) {
|
|
915
|
-
if (!bbn.
|
|
916
|
-
bbn.
|
|
995
|
+
if (!bbn.var.colors) {
|
|
996
|
+
bbn.var.colors = {};
|
|
917
997
|
}
|
|
918
998
|
let element = document.createElement('style');
|
|
919
999
|
document.head.appendChild(element);
|
|
920
1000
|
let sheet = element.sheet;
|
|
1001
|
+
// Append style element to head
|
|
921
1002
|
let i = 0;
|
|
922
|
-
(0, iterate_3.iterate)(colors, (v, n) => {
|
|
1003
|
+
(0, iterate_3.iterate)(colors, (v, n) => {
|
|
1004
|
+
bbn.var.colors[n] = v;
|
|
1005
|
+
sheet.insertRule('.bbn-' + n + ', .bbn-color-text-' + n + ' {color: ' + v + ' !important;}', i);
|
|
1006
|
+
sheet.insertRule('svg.bbn-' + n + ', .bbn-' + n + ' svg, svg.bbn-color-text-' + n + ', .bbn-color-text-' + n + ' svg {fill: ' + v + ';}', i);
|
|
1007
|
+
sheet.insertRule('.bbn-bg-' + n + ', .bbn-color-bg-' + n + ', .bbn-color-background-' + n + ' {background-color: ' + v + ' !important;}', i);
|
|
1008
|
+
sheet.insertRule('.bbn-border-' + n + ', .bbn-color-border-' + n + ' {border-color: ' + v + ' !important;}', i);
|
|
1009
|
+
sheet.insertRule('.bbn-color-' + n + ' {border-color: ' + v + '; background-color: ' + v + '; color: ' + v + ';}', i);
|
|
1010
|
+
});
|
|
923
1011
|
}
|
|
924
1012
|
};
|
|
925
1013
|
exports.addColors = addColors;
|
|
@@ -930,7 +1018,13 @@
|
|
|
930
1018
|
exports.addInputs = void 0;
|
|
931
1019
|
const addInputs = function (form, params, prefix) {
|
|
932
1020
|
if (form && (form.tagName === 'FORM')) {
|
|
933
|
-
let appendToForm = (name, val) => {
|
|
1021
|
+
let appendToForm = (name, val) => {
|
|
1022
|
+
let input = document.createElement('input');
|
|
1023
|
+
input.setAttribute('type', 'hidden');
|
|
1024
|
+
input.setAttribute('name', name);
|
|
1025
|
+
input.setAttribute('value', val);
|
|
1026
|
+
form.appendChild(input);
|
|
1027
|
+
};
|
|
934
1028
|
params = JSON.parse(JSON.stringify(params || {}));
|
|
935
1029
|
prefix = prefix || '';
|
|
936
1030
|
if (params) {
|
|
@@ -950,7 +1044,8 @@
|
|
|
950
1044
|
}
|
|
951
1045
|
});
|
|
952
1046
|
}
|
|
953
|
-
else if ((typeof param === 'object') &&
|
|
1047
|
+
else if ((typeof param === 'object') &&
|
|
1048
|
+
!(param instanceof File)) {
|
|
954
1049
|
addInputs(form, param, name);
|
|
955
1050
|
}
|
|
956
1051
|
else {
|
|
@@ -966,21 +1061,38 @@
|
|
|
966
1061
|
"use strict";
|
|
967
1062
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
968
1063
|
exports.addStyle = void 0;
|
|
969
|
-
const addStyle = function (ele, o) {
|
|
970
|
-
(0,
|
|
971
|
-
|
|
1064
|
+
const addStyle = function (ele, o) {
|
|
1065
|
+
if ((0, isObject_6.isObject)(o)) {
|
|
1066
|
+
(0, iterate_5.iterate)(o, (v, k) => {
|
|
1067
|
+
ele.style[k] = v;
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
972
1071
|
exports.addStyle = addStyle;
|
|
973
1072
|
});
|
|
974
1073
|
define("fn/adjustSize", ["require", "exports", "fn/each"], function (require, exports, each_6) {
|
|
975
1074
|
"use strict";
|
|
976
1075
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
977
1076
|
exports.adjustSize = void 0;
|
|
978
|
-
const adjustSize = function (type, eles) {
|
|
979
|
-
max =
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1077
|
+
const adjustSize = function (type, eles) {
|
|
1078
|
+
let max = 0, idx;
|
|
1079
|
+
(0, each_6.each)(eles, (el) => {
|
|
1080
|
+
el.style[type] = 'auto';
|
|
1081
|
+
});
|
|
1082
|
+
(0, each_6.each)(eles, (el, i) => {
|
|
1083
|
+
let rect = el.getBoundingClientRect(), s = rect[type] % 1 ? (rect[type] - (rect[type] % 1) + 1) : rect[type];
|
|
1084
|
+
//s = rect[type];
|
|
1085
|
+
if (s > max) {
|
|
1086
|
+
max = s;
|
|
1087
|
+
idx = i;
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
(0, each_6.each)(eles, (el, i) => {
|
|
1091
|
+
if (max) {
|
|
1092
|
+
el.style[type] = max + 'px';
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
};
|
|
984
1096
|
exports.adjustSize = adjustSize;
|
|
985
1097
|
});
|
|
986
1098
|
define("fn/adjustHeight", ["require", "exports", "fn/isIterable", "fn/adjustSize"], function (require, exports, isIterable_3, adjustSize_1) {
|
|
@@ -1013,7 +1125,9 @@
|
|
|
1013
1125
|
"use strict";
|
|
1014
1126
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1015
1127
|
exports.escapeRegExp = void 0;
|
|
1016
|
-
const escapeRegExp = function (str) {
|
|
1128
|
+
const escapeRegExp = function (str) {
|
|
1129
|
+
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
1130
|
+
};
|
|
1017
1131
|
exports.escapeRegExp = escapeRegExp;
|
|
1018
1132
|
});
|
|
1019
1133
|
define("fn/replaceAll", ["require", "exports", "fn/isObject", "fn/escapeRegExp"], function (require, exports, isObject_7, escapeRegExp_1) {
|
|
@@ -1043,9 +1157,18 @@
|
|
|
1043
1157
|
function gg(a, b, c, d, x, s, t) { return cm((b & d) | (c & (~d)), a, b, x, s, t); }
|
|
1044
1158
|
function hh(a, b, c, d, x, s, t) { return cm(b ^ c ^ d, a, b, x, s, t); }
|
|
1045
1159
|
function ii(a, b, c, d, x, s, t) { return cm(c ^ (b | (~d)), a, b, x, s, t); }
|
|
1046
|
-
function sb(x) {
|
|
1047
|
-
|
|
1048
|
-
|
|
1160
|
+
function sb(x) {
|
|
1161
|
+
var i;
|
|
1162
|
+
var nblk = ((x.length + 8) >> 6) + 1;
|
|
1163
|
+
var blks = new Array(nblk * 16);
|
|
1164
|
+
for (i = 0; i < nblk * 16; i++)
|
|
1165
|
+
blks[i] = 0;
|
|
1166
|
+
for (i = 0; i < x.length; i++)
|
|
1167
|
+
blks[i >> 2] |= x.charCodeAt(i) << ((i % 4) * 8);
|
|
1168
|
+
blks[i >> 2] |= 0x80 << ((i % 4) * 8);
|
|
1169
|
+
blks[nblk * 16 - 2] = x.length * 8;
|
|
1170
|
+
return blks;
|
|
1171
|
+
}
|
|
1049
1172
|
var i, x = sb(st), a = 1732584193, b = -271733879, c = -1732584194, d = 271733878, olda, oldb, oldc, oldd;
|
|
1050
1173
|
for (i = 0; i < x.length; i += 16) {
|
|
1051
1174
|
olda = a;
|
|
@@ -1132,9 +1255,11 @@
|
|
|
1132
1255
|
const getRequestId = function (url, data, datatype) {
|
|
1133
1256
|
let d = {};
|
|
1134
1257
|
if (data) {
|
|
1135
|
-
(0, iterate_6.iterate)(data, (a, n) => {
|
|
1136
|
-
|
|
1137
|
-
|
|
1258
|
+
(0, iterate_6.iterate)(data, (a, n) => {
|
|
1259
|
+
if (n.indexOf('_bbn') === -1) {
|
|
1260
|
+
d[n] = a;
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1138
1263
|
}
|
|
1139
1264
|
return url + ':' + (0, md5_1.md5)((datatype || 'json') + JSON.stringify(d));
|
|
1140
1265
|
};
|
|
@@ -1200,42 +1325,88 @@
|
|
|
1200
1325
|
}
|
|
1201
1326
|
});
|
|
1202
1327
|
if (args[i].__bbnNoData) {
|
|
1203
|
-
Object.defineProperty(out, '__bbnNoData', {
|
|
1328
|
+
Object.defineProperty(out, '__bbnNoData', {
|
|
1329
|
+
value: true,
|
|
1330
|
+
enumerable: false,
|
|
1331
|
+
configurable: false,
|
|
1332
|
+
writable: false
|
|
1333
|
+
});
|
|
1204
1334
|
}
|
|
1205
1335
|
}
|
|
1206
1336
|
return out;
|
|
1207
1337
|
};
|
|
1208
1338
|
exports.extend = extend;
|
|
1209
1339
|
});
|
|
1210
|
-
define("fn/defaultEndLoadingFunction", ["require", "exports"], function (require, exports) {
|
|
1340
|
+
define("fn/defaultEndLoadingFunction", ["require", "exports", "fn/numProperties", "fn/log", "fn/isCp"], function (require, exports, numProperties_4, log_5, isCp_3) {
|
|
1211
1341
|
"use strict";
|
|
1212
1342
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1213
1343
|
exports.defaultEndLoadingFunction = void 0;
|
|
1214
|
-
const defaultEndLoadingFunction = function (url, data, res) {
|
|
1344
|
+
const defaultEndLoadingFunction = function (url, timestamp, data, res) {
|
|
1345
|
+
var _a;
|
|
1346
|
+
if (res && res.data && ((0, numProperties_4.numProperties)(res.data) === 1) && res.data.disconnected) {
|
|
1347
|
+
window.location.reload();
|
|
1348
|
+
return;
|
|
1349
|
+
}
|
|
1350
|
+
if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
|
|
1351
|
+
this.$nextTick(() => {
|
|
1352
|
+
(0, log_5.log)("UPDATE LOADBAR");
|
|
1353
|
+
const loadBar = this.getRef('loading');
|
|
1354
|
+
if ((0, isCp_3.isCp)(loadBar)) {
|
|
1355
|
+
loadBar.$updateAllComputed();
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
};
|
|
1215
1360
|
exports.defaultEndLoadingFunction = defaultEndLoadingFunction;
|
|
1216
1361
|
});
|
|
1217
|
-
define("fn/defaultAjaxErrorFunction", ["require", "exports", "fn/
|
|
1362
|
+
define("fn/defaultAjaxErrorFunction", ["require", "exports", "fn/isCp"], function (require, exports, isCp_4) {
|
|
1218
1363
|
"use strict";
|
|
1219
1364
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1220
1365
|
exports.defaultAjaxErrorFunction = void 0;
|
|
1221
|
-
const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
|
|
1366
|
+
const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
|
|
1367
|
+
var _a;
|
|
1368
|
+
/** @todo */
|
|
1369
|
+
if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
|
|
1370
|
+
this.$nextTick(() => {
|
|
1371
|
+
const loadBar = this.getRef('loading');
|
|
1372
|
+
if ((0, isCp_4.isCp)(loadBar)) {
|
|
1373
|
+
loadBar.$forceUpdate();
|
|
1374
|
+
}
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
appui.error({ title: textStatus, content: errorThrown }, 4);
|
|
1378
|
+
return false;
|
|
1379
|
+
};
|
|
1222
1380
|
exports.defaultAjaxErrorFunction = defaultAjaxErrorFunction;
|
|
1223
1381
|
});
|
|
1224
1382
|
define("fn/defaultAjaxAbortFunction", ["require", "exports", "fn/log"], function (require, exports, log_6) {
|
|
1225
1383
|
"use strict";
|
|
1226
1384
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1227
1385
|
exports.defaultAjaxAbortFunction = void 0;
|
|
1228
|
-
const defaultAjaxAbortFunction = function (message, url) {
|
|
1386
|
+
const defaultAjaxAbortFunction = function (message, url) {
|
|
1387
|
+
(0, log_6.log)(message);
|
|
1388
|
+
};
|
|
1229
1389
|
exports.defaultAjaxAbortFunction = defaultAjaxAbortFunction;
|
|
1230
1390
|
});
|
|
1231
|
-
define("fn/defaultStartLoadingFunction", ["require", "exports"], function (require, exports) {
|
|
1391
|
+
define("fn/defaultStartLoadingFunction", ["require", "exports", "fn/log", "fn/isCp"], function (require, exports, log_7, isCp_5) {
|
|
1232
1392
|
"use strict";
|
|
1233
1393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1234
1394
|
exports.defaultStartLoadingFunction = void 0;
|
|
1235
|
-
const defaultStartLoadingFunction = function (
|
|
1395
|
+
const defaultStartLoadingFunction = function () {
|
|
1396
|
+
var _a;
|
|
1397
|
+
if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
|
|
1398
|
+
this.$nextTick(() => {
|
|
1399
|
+
(0, log_7.log)("UPDATE LOADBAR");
|
|
1400
|
+
const loadBar = this.getRef('loading');
|
|
1401
|
+
if ((0, isCp_5.isCp)(loadBar)) {
|
|
1402
|
+
loadBar.$updateAllComputed();
|
|
1403
|
+
}
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
};
|
|
1236
1407
|
exports.defaultStartLoadingFunction = defaultStartLoadingFunction;
|
|
1237
1408
|
});
|
|
1238
|
-
define("fn/ajax", ["require", "exports", "fn/isObject", "fn/replaceAll", "fn/getRequestId", "fn/getLoader", "fn/extend", "fn/numProperties", "fn/_deleteLoader", "fn/defaultEndLoadingFunction", "fn/isFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAjaxAbortFunction", "fn/_addLoader", "fn/defaultStartLoadingFunction"], function (require, exports, isObject_9, replaceAll_1, getRequestId_1, getLoader_2, extend_1,
|
|
1409
|
+
define("fn/ajax", ["require", "exports", "fn/isObject", "fn/replaceAll", "fn/getRequestId", "fn/getLoader", "fn/extend", "fn/numProperties", "fn/_deleteLoader", "fn/defaultEndLoadingFunction", "fn/isFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAjaxAbortFunction", "fn/_addLoader", "fn/defaultStartLoadingFunction"], function (require, exports, isObject_9, replaceAll_1, getRequestId_1, getLoader_2, extend_1, numProperties_5, _deleteLoader_1, defaultEndLoadingFunction_1, isFunction_3, defaultAjaxErrorFunction_1, defaultAjaxAbortFunction_1, _addLoader_1, defaultStartLoadingFunction_1) {
|
|
1239
1410
|
"use strict";
|
|
1240
1411
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1241
1412
|
exports.ajax = void 0;
|
|
@@ -1263,6 +1434,7 @@
|
|
|
1263
1434
|
}
|
|
1264
1435
|
if (url) {
|
|
1265
1436
|
if (url.indexOf('://') === -1) {
|
|
1437
|
+
// Prevent protocol mismatch by Axios
|
|
1266
1438
|
url = (0, replaceAll_1.replaceAll)("//", "/", url);
|
|
1267
1439
|
}
|
|
1268
1440
|
if (!datatype) {
|
|
@@ -1270,6 +1442,7 @@
|
|
|
1270
1442
|
}
|
|
1271
1443
|
let requestId = (0, getRequestId_1.getRequestId)(url, data, datatype);
|
|
1272
1444
|
let loaderObj = (0, getLoader_2.getLoader)(requestId);
|
|
1445
|
+
//log("IN AJAX", loaderObj? loaderObj.loader : "NO LOADER")
|
|
1273
1446
|
if (loaderObj && loaderObj.loader) {
|
|
1274
1447
|
return loaderObj.loader;
|
|
1275
1448
|
}
|
|
@@ -1278,16 +1451,23 @@
|
|
|
1278
1451
|
}
|
|
1279
1452
|
let cancelToken = axios.CancelToken;
|
|
1280
1453
|
let source = cancelToken.source();
|
|
1281
|
-
let options = {
|
|
1454
|
+
let options = {
|
|
1455
|
+
responseType: datatype,
|
|
1456
|
+
cancelToken: source.token
|
|
1457
|
+
};
|
|
1282
1458
|
if (datatype === 'text') {
|
|
1283
|
-
options.headers = {
|
|
1459
|
+
options.headers = {
|
|
1460
|
+
accept: 'text/javascript',
|
|
1461
|
+
'Content-Type': 'text/javascript'
|
|
1462
|
+
};
|
|
1284
1463
|
}
|
|
1285
1464
|
let args = [url];
|
|
1286
|
-
if ((0, isObject_9.isObject)(data) && ((0,
|
|
1465
|
+
if ((0, isObject_9.isObject)(data) && ((0, numProperties_5.numProperties)(data) > 0)) {
|
|
1287
1466
|
args.push(data);
|
|
1288
1467
|
}
|
|
1289
1468
|
args.push(options);
|
|
1290
|
-
let loader = axios[args.length === 2 ? 'get' : 'post'].apply(axios, args)
|
|
1469
|
+
let loader = axios[args.length === 2 ? 'get' : 'post'].apply(axios, args)
|
|
1470
|
+
.then((res) => {
|
|
1291
1471
|
(0, _deleteLoader_1._deleteLoader)(requestId, res);
|
|
1292
1472
|
(0, defaultEndLoadingFunction_1.defaultEndLoadingFunction)(url, tst, data, res);
|
|
1293
1473
|
switch (res.status) {
|
|
@@ -1296,10 +1476,12 @@
|
|
|
1296
1476
|
success(res.data, res.headers);
|
|
1297
1477
|
}
|
|
1298
1478
|
break;
|
|
1299
|
-
default:
|
|
1479
|
+
default:
|
|
1480
|
+
(0, defaultAjaxErrorFunction_1.defaultAjaxErrorFunction)(loader, res);
|
|
1300
1481
|
}
|
|
1301
1482
|
return res;
|
|
1302
|
-
})
|
|
1483
|
+
})
|
|
1484
|
+
.catch((err) => {
|
|
1303
1485
|
let isAbort = axios.isCancel(err);
|
|
1304
1486
|
(0, _deleteLoader_1._deleteLoader)(requestId, err.message || err.response.data, isAbort);
|
|
1305
1487
|
(0, defaultEndLoadingFunction_1.defaultEndLoadingFunction)(url, tst, data, err);
|
|
@@ -1461,7 +1643,16 @@
|
|
|
1461
1643
|
}
|
|
1462
1644
|
const argString = args.map(arg => arg.name + (arg.default ? ' = ' + arg.default : '')).join(', ');
|
|
1463
1645
|
const hash = (0, md5_2.md5)(body + (name ? '-' + name : '') + (argString ? '-' + argString : ''));
|
|
1464
|
-
return {
|
|
1646
|
+
return {
|
|
1647
|
+
body,
|
|
1648
|
+
args,
|
|
1649
|
+
argString,
|
|
1650
|
+
isArrow,
|
|
1651
|
+
hasFunction,
|
|
1652
|
+
name,
|
|
1653
|
+
isAsync,
|
|
1654
|
+
hash
|
|
1655
|
+
};
|
|
1465
1656
|
};
|
|
1466
1657
|
exports.analyzeFunction = analyzeFunction;
|
|
1467
1658
|
});
|
|
@@ -1471,12 +1662,18 @@
|
|
|
1471
1662
|
exports.animateCss = void 0;
|
|
1472
1663
|
const animateCss = function (ele, animationName, callback) {
|
|
1473
1664
|
let animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
|
|
1665
|
+
/*$(ele).addClass('animated ' + animationName).one(animationEnd, function(){
|
|
1666
|
+
if ( typeof callback == 'function' ){ // make sure the callback is a function
|
|
1667
|
+
callback.call(this); // brings the scope to the callback
|
|
1668
|
+
}
|
|
1669
|
+
$(this).removeClass('animated ' + animationName);
|
|
1670
|
+
})*/
|
|
1474
1671
|
ele.classList.add('animated');
|
|
1475
1672
|
ele.classList.add(animationName);
|
|
1476
1673
|
ele.addEventListener(animationEnd, (e) => {
|
|
1477
1674
|
e.target.removeEventListener(e.type, arguments.callee);
|
|
1478
|
-
if (typeof callback == 'function') {
|
|
1479
|
-
callback.call(this);
|
|
1675
|
+
if (typeof callback == 'function') { // make sure the callback is a function
|
|
1676
|
+
callback.call(this); // brings the scope to the callback
|
|
1480
1677
|
}
|
|
1481
1678
|
this.classList.remove(animation);
|
|
1482
1679
|
});
|
|
@@ -1487,14 +1684,22 @@
|
|
|
1487
1684
|
"use strict";
|
|
1488
1685
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1489
1686
|
exports.arrayBuffer2String = void 0;
|
|
1490
|
-
const arrayBuffer2String = function (buf) {
|
|
1687
|
+
const arrayBuffer2String = function (buf) {
|
|
1688
|
+
return String.fromCharCode.apply(null, new Uint16Array(buf));
|
|
1689
|
+
};
|
|
1491
1690
|
exports.arrayBuffer2String = arrayBuffer2String;
|
|
1492
1691
|
});
|
|
1493
1692
|
define("fn/arrayFromProp", ["require", "exports", "fn/each", "fn/getProperty"], function (require, exports, each_8, getProperty_3) {
|
|
1494
1693
|
"use strict";
|
|
1495
1694
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1496
1695
|
exports.arrayFromProp = void 0;
|
|
1497
|
-
const arrayFromProp = function (arr, prop) {
|
|
1696
|
+
const arrayFromProp = function (arr, prop) {
|
|
1697
|
+
let r = [];
|
|
1698
|
+
(0, each_8.each)(arr, (a, i) => {
|
|
1699
|
+
r.push((0, getProperty_3.getProperty)(a, prop));
|
|
1700
|
+
});
|
|
1701
|
+
return r;
|
|
1702
|
+
};
|
|
1498
1703
|
exports.arrayFromProp = arrayFromProp;
|
|
1499
1704
|
});
|
|
1500
1705
|
define("fn/autoExtend", ["require", "exports", "fn/extend"], function (require, exports, extend_2) {
|
|
@@ -1504,9 +1709,11 @@
|
|
|
1504
1709
|
const autoExtend = function (namespace, obj) {
|
|
1505
1710
|
if (!bbn[namespace]) {
|
|
1506
1711
|
bbn[namespace] = {};
|
|
1712
|
+
//$.extend(true, bbn[namespace], obj);
|
|
1507
1713
|
(0, extend_2.extend)(bbn[namespace], obj);
|
|
1508
1714
|
}
|
|
1509
1715
|
else {
|
|
1716
|
+
// $.extend(true, bbn[namespace], obj);
|
|
1510
1717
|
(0, extend_2.extend)(bbn[namespace], obj);
|
|
1511
1718
|
}
|
|
1512
1719
|
};
|
|
@@ -1536,7 +1743,9 @@
|
|
|
1536
1743
|
"use strict";
|
|
1537
1744
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1538
1745
|
exports.br2nl = void 0;
|
|
1539
|
-
const br2nl = function (st) {
|
|
1746
|
+
const br2nl = function (st) {
|
|
1747
|
+
return (0, replaceAll_2.replaceAll)("<br />", "\n", (0, replaceAll_2.replaceAll)("<br/>", "\n", (0, replaceAll_2.replaceAll)("<br>", "\n", st)));
|
|
1748
|
+
};
|
|
1540
1749
|
exports.br2nl = br2nl;
|
|
1541
1750
|
});
|
|
1542
1751
|
define("fn/date", ["require", "exports", "fn/isNumber", "fn/substr", "fn/isDate"], function (require, exports, isNumber_3, substr_4, isDate_2) {
|
|
@@ -1579,7 +1788,16 @@
|
|
|
1579
1788
|
return wrong_result && (0, isString_6.isString)(wrong_result) ? wrong_result : '';
|
|
1580
1789
|
}
|
|
1581
1790
|
if (undefined !== dayjs) {
|
|
1582
|
-
return dayjs(r).
|
|
1791
|
+
//return dayjs(r).format('lll');
|
|
1792
|
+
return dayjs(r).calendar(null, {
|
|
1793
|
+
sameDay: '[' + bbn._('Today') + '] HH:mm',
|
|
1794
|
+
nextDay: '[' + bbn._('Tomorrow') + '] HH:mm',
|
|
1795
|
+
nextWeek: 'ddd D HH:mm',
|
|
1796
|
+
lastDay: '[' + bbn._('Yesterday') + '] HH:mm',
|
|
1797
|
+
lastWeek: 'ddd D HH:mm',
|
|
1798
|
+
sameElse: 'DD/MM/YYYY HH:mm'
|
|
1799
|
+
});
|
|
1800
|
+
//return dayjs(r).format("DD/MM/YYYY HH:mm")
|
|
1583
1801
|
}
|
|
1584
1802
|
return r.toLocaleDateString();
|
|
1585
1803
|
};
|
|
@@ -1590,6 +1808,7 @@
|
|
|
1590
1808
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1591
1809
|
exports.fdate = void 0;
|
|
1592
1810
|
const fdate = function (d, wrong_result) {
|
|
1811
|
+
// Retro compatibility
|
|
1593
1812
|
if (wrong_result === true) {
|
|
1594
1813
|
return (0, fdatetime_1.fdatetime)(d);
|
|
1595
1814
|
}
|
|
@@ -1616,11 +1835,18 @@
|
|
|
1616
1835
|
if (!(0, isDate_5.isDate)(r)) {
|
|
1617
1836
|
return wrong_result && (0, isString_8.isString)(wrong_result) ? wrong_result : '';
|
|
1618
1837
|
}
|
|
1619
|
-
return dayjs(r).calendar(null, {
|
|
1838
|
+
return dayjs(r).calendar(null, {
|
|
1839
|
+
sameDay: '[' + bbn._('Today') + ']',
|
|
1840
|
+
nextDay: '[' + bbn._('Tomorrow') + ']',
|
|
1841
|
+
nextWeek: 'ddd D',
|
|
1842
|
+
lastDay: '[' + bbn._('Yesterday') + ']',
|
|
1843
|
+
lastWeek: 'ddd D',
|
|
1844
|
+
sameElse: 'L'
|
|
1845
|
+
});
|
|
1620
1846
|
};
|
|
1621
1847
|
exports.calendar = calendar;
|
|
1622
1848
|
});
|
|
1623
|
-
define("fn/error", ["require", "exports", "fn/log"], function (require, exports,
|
|
1849
|
+
define("fn/error", ["require", "exports", "fn/log"], function (require, exports, log_8) {
|
|
1624
1850
|
"use strict";
|
|
1625
1851
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1626
1852
|
exports.error = void 0;
|
|
@@ -1630,8 +1856,12 @@
|
|
|
1630
1856
|
for (let i = 1; i < arguments.length; i++) {
|
|
1631
1857
|
args.push(arguments[i]);
|
|
1632
1858
|
}
|
|
1633
|
-
args.unshift({
|
|
1634
|
-
|
|
1859
|
+
args.unshift({
|
|
1860
|
+
_bbn_console_mode: "error",
|
|
1861
|
+
_bbn_console_level: 1,
|
|
1862
|
+
_bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
|
|
1863
|
+
});
|
|
1864
|
+
log_8.log.apply(this, args);
|
|
1635
1865
|
}
|
|
1636
1866
|
throw new Error(errorMsg);
|
|
1637
1867
|
};
|
|
@@ -1641,24 +1871,32 @@
|
|
|
1641
1871
|
"use strict";
|
|
1642
1872
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1643
1873
|
exports.defaultLinkFunction = void 0;
|
|
1644
|
-
const defaultLinkFunction = function (responseObj, ele) {
|
|
1874
|
+
const defaultLinkFunction = function (responseObj, ele) {
|
|
1875
|
+
return true;
|
|
1876
|
+
};
|
|
1645
1877
|
exports.defaultLinkFunction = defaultLinkFunction;
|
|
1646
1878
|
});
|
|
1647
1879
|
define("fn/defaultPostLinkFunction", ["require", "exports"], function (require, exports) {
|
|
1648
1880
|
"use strict";
|
|
1649
1881
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1650
1882
|
exports.defaultPostLinkFunction = void 0;
|
|
1651
|
-
const defaultPostLinkFunction = function (r) {
|
|
1883
|
+
const defaultPostLinkFunction = function (r) {
|
|
1884
|
+
return true;
|
|
1885
|
+
};
|
|
1652
1886
|
exports.defaultPostLinkFunction = defaultPostLinkFunction;
|
|
1653
1887
|
});
|
|
1654
1888
|
define("fn/defaultAlertFunction", ["require", "exports"], function (require, exports) {
|
|
1655
1889
|
"use strict";
|
|
1656
1890
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1657
1891
|
exports.defaultAlertFunction = void 0;
|
|
1658
|
-
const defaultAlertFunction = function (
|
|
1892
|
+
const defaultAlertFunction = function (ele) {
|
|
1893
|
+
/** @todo */
|
|
1894
|
+
let c = appui.getCurrentContainer();
|
|
1895
|
+
c.alert.apply(c, arguments);
|
|
1896
|
+
};
|
|
1659
1897
|
exports.defaultAlertFunction = defaultAlertFunction;
|
|
1660
1898
|
});
|
|
1661
|
-
define("fn/callback", ["require", "exports", "fn/error", "fn/defaultLinkFunction", "
|
|
1899
|
+
define("fn/callback", ["require", "exports", "fn/error", "fn/defaultLinkFunction", "fn/isFunction", "fn/log", "fn/defaultPostLinkFunction", "fn/defaultAlertFunction"], function (require, exports, error_1, defaultLinkFunction_1, isFunction_4, log_9, defaultPostLinkFunction_1, defaultAlertFunction_1) {
|
|
1662
1900
|
"use strict";
|
|
1663
1901
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1664
1902
|
exports.callback = void 0;
|
|
@@ -1670,6 +1908,7 @@
|
|
|
1670
1908
|
let isObj = t.toLowerCase() === 'object';
|
|
1671
1909
|
let errTitle;
|
|
1672
1910
|
if (isObj && res.prescript) {
|
|
1911
|
+
/* var ok can be changed to false in prescript execution */
|
|
1673
1912
|
try {
|
|
1674
1913
|
eval(res.prescript);
|
|
1675
1914
|
}
|
|
@@ -1680,6 +1919,7 @@
|
|
|
1680
1919
|
if (isObj && res.url === undefined) {
|
|
1681
1920
|
res.url = url;
|
|
1682
1921
|
}
|
|
1922
|
+
/* Case where a callback is defined */
|
|
1683
1923
|
if (fn) {
|
|
1684
1924
|
tmp = fn(res, ele);
|
|
1685
1925
|
}
|
|
@@ -1691,7 +1931,7 @@
|
|
|
1691
1931
|
ele.val(res.content);
|
|
1692
1932
|
}
|
|
1693
1933
|
else {
|
|
1694
|
-
|
|
1934
|
+
ele.innerHTML = res.content;
|
|
1695
1935
|
}
|
|
1696
1936
|
}
|
|
1697
1937
|
if (tmp && isObj && res.script) {
|
|
@@ -1708,13 +1948,14 @@
|
|
|
1708
1948
|
}
|
|
1709
1949
|
}
|
|
1710
1950
|
catch (e) {
|
|
1711
|
-
(0,
|
|
1951
|
+
(0, log_9.log)(e, res);
|
|
1712
1952
|
(0, error_1.error)((0, isFunction_4.isFunction)(e.getMessage) ? e.getMessage() : null);
|
|
1713
1953
|
}
|
|
1714
1954
|
return r;
|
|
1715
1955
|
})(res.data ? res.data : {}, ele ? ele : false);
|
|
1716
1956
|
}
|
|
1717
1957
|
}
|
|
1958
|
+
/* Case where a callback is defined */
|
|
1718
1959
|
if (tmp && fn2) {
|
|
1719
1960
|
fn2(res);
|
|
1720
1961
|
}
|
|
@@ -1754,30 +1995,51 @@
|
|
|
1754
1995
|
"use strict";
|
|
1755
1996
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1756
1997
|
exports.camelToCss = void 0;
|
|
1757
|
-
const camelToCss = function (str) {
|
|
1998
|
+
const camelToCss = function (str) {
|
|
1999
|
+
return str.replace(/([A-Z])/g, function (st) {
|
|
2000
|
+
return '-' + st.toLowerCase();
|
|
2001
|
+
}).replace('/^./', function (st) {
|
|
2002
|
+
return st.toLowerCase();
|
|
2003
|
+
});
|
|
2004
|
+
};
|
|
1758
2005
|
exports.camelToCss = camelToCss;
|
|
1759
2006
|
});
|
|
1760
2007
|
define("fn/canvasToImage", ["require", "exports"], function (require, exports) {
|
|
1761
2008
|
"use strict";
|
|
1762
2009
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1763
2010
|
exports.canvasToImage = void 0;
|
|
1764
|
-
const canvasToImage = function (canvas) {
|
|
2011
|
+
const canvasToImage = function (canvas) {
|
|
2012
|
+
let img = new Image();
|
|
2013
|
+
img.src = canvas.toDataURL("image/png");
|
|
2014
|
+
return img;
|
|
2015
|
+
};
|
|
1765
2016
|
exports.canvasToImage = canvasToImage;
|
|
1766
2017
|
});
|
|
1767
|
-
define("fn/center", ["require", "exports", "fn/log"], function (require, exports,
|
|
2018
|
+
define("fn/center", ["require", "exports", "fn/log"], function (require, exports, log_10) {
|
|
1768
2019
|
"use strict";
|
|
1769
2020
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1770
2021
|
exports.center = void 0;
|
|
1771
2022
|
const center = function (ele) {
|
|
1772
|
-
|
|
2023
|
+
//ele = $(ele);
|
|
2024
|
+
let parent = ele.parentNode,
|
|
2025
|
+
//w = parent.width(),
|
|
2026
|
+
w = parent.clientWidth,
|
|
2027
|
+
//h = parent.height();
|
|
2028
|
+
h = parent.clientHeight;
|
|
1773
2029
|
while (parent && (!w || !h)) {
|
|
2030
|
+
/*parent = parent.parent(),
|
|
2031
|
+
w = parent.width(),
|
|
2032
|
+
h = parent.height();*/
|
|
1774
2033
|
parent = ele.parentNode;
|
|
1775
2034
|
w = parent.clientWidth;
|
|
1776
2035
|
h = parent.clientHeight;
|
|
1777
2036
|
}
|
|
1778
|
-
(0,
|
|
2037
|
+
(0, log_10.log)("BBN_CENTER", w, h);
|
|
2038
|
+
//ele.css("position","absolute");
|
|
1779
2039
|
ele.style.position = "absolute";
|
|
2040
|
+
//ele.css("top", Math.max(0, ((h - ele.outerHeight()) / 2) + parent.scrollTop()) + "px");
|
|
1780
2041
|
ele.style.top = Math.max(0, ((h - ele.offsetHeight) / 2) + parent.scrollTop) + "px";
|
|
2042
|
+
//ele.css("left", Math.max(0, ((w - ele.outerWidth()) / 2) + parent.scrollLeft()) + "px");
|
|
1781
2043
|
ele.style.left = Math.max(0, ((h - ele.offsetWidth) / 2) + parent.scrollLeft) + "px";
|
|
1782
2044
|
return ele;
|
|
1783
2045
|
};
|
|
@@ -1788,7 +2050,10 @@
|
|
|
1788
2050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1789
2051
|
exports.checkPropsDetails = void 0;
|
|
1790
2052
|
const checkPropsDetails = function (obj, props, checkEmpty) {
|
|
1791
|
-
let res = {
|
|
2053
|
+
let res = {
|
|
2054
|
+
error: false,
|
|
2055
|
+
result: true
|
|
2056
|
+
};
|
|
1792
2057
|
if ((0, isString_9.isString)(props)) {
|
|
1793
2058
|
props = [props];
|
|
1794
2059
|
}
|
|
@@ -1835,7 +2100,9 @@
|
|
|
1835
2100
|
"use strict";
|
|
1836
2101
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1837
2102
|
exports.checkProps = void 0;
|
|
1838
|
-
const checkProps = function (obj, props, checkEmpty) {
|
|
2103
|
+
const checkProps = function (obj, props, checkEmpty) {
|
|
2104
|
+
return (0, checkPropsDetails_1.checkPropsDetails)(obj, props, checkEmpty).result;
|
|
2105
|
+
};
|
|
1839
2106
|
exports.checkProps = checkProps;
|
|
1840
2107
|
});
|
|
1841
2108
|
define("fn/checkPropsOrDie", ["require", "exports", "fn/checkPropsDetails"], function (require, exports, checkPropsDetails_2) {
|
|
@@ -1855,10 +2122,12 @@
|
|
|
1855
2122
|
"use strict";
|
|
1856
2123
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1857
2124
|
exports.correctCase = void 0;
|
|
1858
|
-
const correctCase = function (str) {
|
|
2125
|
+
const correctCase = function (str) {
|
|
2126
|
+
return str.replace(/[A-z]{1}/, c => c.toUpperCase());
|
|
2127
|
+
};
|
|
1859
2128
|
exports.correctCase = correctCase;
|
|
1860
2129
|
});
|
|
1861
|
-
define("fn/checkType", ["require", "exports", "fn/isArray", "fn/each", "fn/isFunction", "fn/isString", "fn/correctCase", "fn/error", "fn/log"], function (require, exports, isArray_7, each_10, isFunction_5, isString_10, correctCase_1, error_2,
|
|
2130
|
+
define("fn/checkType", ["require", "exports", "fn/isArray", "fn/each", "fn/isFunction", "fn/isString", "fn/correctCase", "fn/error", "fn/log"], function (require, exports, isArray_7, each_10, isFunction_5, isString_10, correctCase_1, error_2, log_11) {
|
|
1862
2131
|
"use strict";
|
|
1863
2132
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1864
2133
|
exports.checkType = void 0;
|
|
@@ -1907,9 +2176,9 @@
|
|
|
1907
2176
|
}
|
|
1908
2177
|
});
|
|
1909
2178
|
if (!ok) {
|
|
1910
|
-
(0,
|
|
2179
|
+
(0, log_11.log)(["Value given", value, "type", typeof value, "expected", typesList.join(' or ')]);
|
|
1911
2180
|
if (logs.length) {
|
|
1912
|
-
(0,
|
|
2181
|
+
(0, log_11.log)(logs);
|
|
1913
2182
|
}
|
|
1914
2183
|
throw new Error((msg ? msg + ' - ' : '') + bbn._("The value should be a %s", typesList.join(' ' + bbn._("or a") + ' ')));
|
|
1915
2184
|
}
|
|
@@ -1922,7 +2191,9 @@
|
|
|
1922
2191
|
exports.clone = void 0;
|
|
1923
2192
|
const clone = function (obj) {
|
|
1924
2193
|
if ((0, isArray_8.isArray)(obj)) {
|
|
1925
|
-
return obj.slice().map((a) => {
|
|
2194
|
+
return obj.slice().map((a) => {
|
|
2195
|
+
return typeof (a) === 'object' ? clone(a) : a;
|
|
2196
|
+
});
|
|
1926
2197
|
}
|
|
1927
2198
|
if ((0, isObject_11.isObject)(obj)) {
|
|
1928
2199
|
const o = Object.create(Object.getPrototypeOf(obj));
|
|
@@ -1936,7 +2207,11 @@
|
|
|
1936
2207
|
"use strict";
|
|
1937
2208
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1938
2209
|
exports.colorToHex = void 0;
|
|
1939
|
-
const colorToHex = function (color) {
|
|
2210
|
+
const colorToHex = function (color) {
|
|
2211
|
+
let canvas = document.createElement("canvas").getContext("2d");
|
|
2212
|
+
canvas.fillStyle = color;
|
|
2213
|
+
return canvas.fillStyle;
|
|
2214
|
+
};
|
|
1940
2215
|
exports.colorToHex = colorToHex;
|
|
1941
2216
|
});
|
|
1942
2217
|
define("fn/copy", ["require", "exports", "fn/isObject", "fn/isFunction"], function (require, exports, isObject_12, isFunction_6) {
|
|
@@ -1948,10 +2223,16 @@
|
|
|
1948
2223
|
if (st) {
|
|
1949
2224
|
if (navigator && navigator.clipboard) {
|
|
1950
2225
|
if (st instanceof Blob) {
|
|
1951
|
-
navigator.clipboard.write([new ClipboardItem({ [st.type.toString()]: st })]).then(() => {
|
|
2226
|
+
navigator.clipboard.write([new ClipboardItem({ [st.type.toString()]: st })]).then(() => {
|
|
2227
|
+
resolve();
|
|
2228
|
+
});
|
|
1952
2229
|
}
|
|
1953
2230
|
else if ((0, isObject_12.isObject)(st) && (0, isFunction_6.isFunction)(st.toBlob)) {
|
|
1954
|
-
st.toBlob(blob => {
|
|
2231
|
+
st.toBlob(blob => {
|
|
2232
|
+
navigator.clipboard.write([new ClipboardItem({ [blob.type.toString()]: blob })]).then(() => {
|
|
2233
|
+
resolve();
|
|
2234
|
+
});
|
|
2235
|
+
});
|
|
1955
2236
|
}
|
|
1956
2237
|
else {
|
|
1957
2238
|
navigator.clipboard.writeText(st);
|
|
@@ -1977,7 +2258,9 @@
|
|
|
1977
2258
|
"use strict";
|
|
1978
2259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1979
2260
|
exports.count = void 0;
|
|
1980
|
-
const count = function (arr, prop, val, operator) {
|
|
2261
|
+
const count = function (arr, prop, val, operator) {
|
|
2262
|
+
return (0, filter_2.filter)(arr, prop, val, operator, false).length || 0;
|
|
2263
|
+
};
|
|
1981
2264
|
exports.count = count;
|
|
1982
2265
|
});
|
|
1983
2266
|
define("fn/crc32", ["require", "exports"], function (require, exports) {
|
|
@@ -1990,7 +2273,7 @@
|
|
|
1990
2273
|
const charCode = str.charCodeAt(i);
|
|
1991
2274
|
crc = (crc >>> 8) ^ crc32Table[(crc ^ charCode) & 0xFF];
|
|
1992
2275
|
}
|
|
1993
|
-
return (crc ^ (-1)) >>> 0;
|
|
2276
|
+
return (crc ^ (-1)) >>> 0; // Make sure the result is a 32-bit positive integer
|
|
1994
2277
|
};
|
|
1995
2278
|
exports.crc32 = crc32;
|
|
1996
2279
|
});
|
|
@@ -2025,7 +2308,9 @@
|
|
|
2025
2308
|
}
|
|
2026
2309
|
}
|
|
2027
2310
|
if (ok) {
|
|
2311
|
+
//log(rules);
|
|
2028
2312
|
for (var cx = 0; cx < rules.length; cx++) {
|
|
2313
|
+
//log(rules[cx].selectorText);
|
|
2029
2314
|
if (new RegExp("(^|\\s)" + (0, escapeRegExp_2.escapeRegExp)(f) + "(\\{|\\s)", "g").test(rules[cx].selectorText)) {
|
|
2030
2315
|
return true;
|
|
2031
2316
|
}
|
|
@@ -2040,9 +2325,12 @@
|
|
|
2040
2325
|
"use strict";
|
|
2041
2326
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2042
2327
|
exports.dateSQL = void 0;
|
|
2043
|
-
const dateSQL = function (v, dayOnly) {
|
|
2044
|
-
|
|
2045
|
-
|
|
2328
|
+
const dateSQL = function (v, dayOnly) {
|
|
2329
|
+
let date = date(v);
|
|
2330
|
+
if (date) {
|
|
2331
|
+
return dayjs(date).format("YYYY-MM-DD" + (dayOnly ? '' : ' HH:mm:ss'));
|
|
2332
|
+
}
|
|
2333
|
+
};
|
|
2046
2334
|
exports.dateSQL = dateSQL;
|
|
2047
2335
|
});
|
|
2048
2336
|
define("fn/daysInMonth", ["require", "exports", "fn/date"], function (require, exports, date_4) {
|
|
@@ -2069,14 +2357,16 @@
|
|
|
2069
2357
|
res.push(idx);
|
|
2070
2358
|
return res;
|
|
2071
2359
|
}
|
|
2072
|
-
(0, each_11.each)(arr, (it, i) => {
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2360
|
+
(0, each_11.each)(arr, (it, i) => {
|
|
2361
|
+
if ((0, isArray_9.isArray)(it[deepProperty])) {
|
|
2362
|
+
let r = res.slice();
|
|
2363
|
+
r.push(i);
|
|
2364
|
+
let tmp = deepPath(it[deepProperty], filter, deepProperty, r);
|
|
2365
|
+
if (tmp !== false) {
|
|
2366
|
+
return tmp;
|
|
2367
|
+
}
|
|
2078
2368
|
}
|
|
2079
|
-
}
|
|
2369
|
+
});
|
|
2080
2370
|
return false;
|
|
2081
2371
|
};
|
|
2082
2372
|
exports.deepPath = deepPath;
|
|
@@ -2099,49 +2389,68 @@
|
|
|
2099
2389
|
};
|
|
2100
2390
|
exports.defaultConfirmFunction = defaultConfirmFunction;
|
|
2101
2391
|
});
|
|
2102
|
-
define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports,
|
|
2392
|
+
define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports, log_12) {
|
|
2103
2393
|
"use strict";
|
|
2104
2394
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2105
2395
|
exports.defaultErrorFunction = void 0;
|
|
2106
|
-
const defaultErrorFunction = function (message) {
|
|
2396
|
+
const defaultErrorFunction = function (message) {
|
|
2397
|
+
(0, log_12.log)(message);
|
|
2398
|
+
};
|
|
2107
2399
|
exports.defaultErrorFunction = defaultErrorFunction;
|
|
2108
2400
|
});
|
|
2109
2401
|
define("fn/defaultHistoryFunction", ["require", "exports"], function (require, exports) {
|
|
2110
2402
|
"use strict";
|
|
2111
2403
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2112
2404
|
exports.defaultHistoryFunction = void 0;
|
|
2113
|
-
const defaultHistoryFunction = function (obj) {
|
|
2405
|
+
const defaultHistoryFunction = function (obj) {
|
|
2406
|
+
return true;
|
|
2407
|
+
};
|
|
2114
2408
|
exports.defaultHistoryFunction = defaultHistoryFunction;
|
|
2115
2409
|
});
|
|
2116
|
-
define("fn/defaultPreLinkFunction", ["require", "exports"], function (require, exports) {
|
|
2410
|
+
define("fn/defaultPreLinkFunction", ["require", "exports", "fn/isFunction"], function (require, exports, isFunction_8) {
|
|
2117
2411
|
"use strict";
|
|
2118
2412
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2119
2413
|
exports.defaultPreLinkFunction = void 0;
|
|
2120
|
-
const defaultPreLinkFunction = function (url
|
|
2414
|
+
const defaultPreLinkFunction = function (url) {
|
|
2415
|
+
let router = appui.getRef('router');
|
|
2416
|
+
if (router) {
|
|
2417
|
+
if ((0, isFunction_8.isFunction)(router.route) && !router.disabled) {
|
|
2418
|
+
router.route(url);
|
|
2419
|
+
}
|
|
2420
|
+
return false;
|
|
2421
|
+
}
|
|
2422
|
+
return true;
|
|
2423
|
+
};
|
|
2121
2424
|
exports.defaultPreLinkFunction = defaultPreLinkFunction;
|
|
2122
2425
|
});
|
|
2123
2426
|
define("fn/defaultResizeFunction", ["require", "exports"], function (require, exports) {
|
|
2124
2427
|
"use strict";
|
|
2125
2428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2126
2429
|
exports.defaultResizeFunction = void 0;
|
|
2127
|
-
const defaultResizeFunction = function () {
|
|
2430
|
+
const defaultResizeFunction = function () {
|
|
2431
|
+
return true;
|
|
2432
|
+
};
|
|
2128
2433
|
exports.defaultResizeFunction = defaultResizeFunction;
|
|
2129
2434
|
});
|
|
2130
2435
|
define("fn/deleteProp", ["require", "exports"], function (require, exports) {
|
|
2131
2436
|
"use strict";
|
|
2132
2437
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2133
2438
|
exports.deleteProp = void 0;
|
|
2134
|
-
const deleteProp = function (obj, prop) {
|
|
2439
|
+
const deleteProp = function (obj, prop) {
|
|
2440
|
+
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
2441
|
+
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
2442
|
+
delete obj[prop];
|
|
2443
|
+
};
|
|
2135
2444
|
exports.deleteProp = deleteProp;
|
|
2136
2445
|
});
|
|
2137
2446
|
define("fn/isValue", ["require", "exports", "fn/isNull"], function (require, exports, isNull_2) {
|
|
2138
2447
|
"use strict";
|
|
2139
2448
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2140
2449
|
exports.isValue = void 0;
|
|
2141
|
-
const isValue = function () {
|
|
2142
|
-
if (!
|
|
2450
|
+
const isValue = function (...args) {
|
|
2451
|
+
if (!args.length)
|
|
2143
2452
|
return false;
|
|
2144
|
-
for (let a of
|
|
2453
|
+
for (let a of args) {
|
|
2145
2454
|
if ((typeof a === 'object') && !(0, isNull_2.isNull)(a)) {
|
|
2146
2455
|
return false;
|
|
2147
2456
|
}
|
|
@@ -2150,7 +2459,7 @@
|
|
|
2150
2459
|
};
|
|
2151
2460
|
exports.isValue = isValue;
|
|
2152
2461
|
});
|
|
2153
|
-
define("fn/diffObj", ["require", "exports", "fn/isDate", "fn/createObject", "fn/isFunction", "fn/isValue", "fn/isDom", "fn/numProperties"], function (require, exports, isDate_6, createObject_1,
|
|
2462
|
+
define("fn/diffObj", ["require", "exports", "fn/isDate", "fn/createObject", "fn/isFunction", "fn/isValue", "fn/isDom", "fn/numProperties"], function (require, exports, isDate_6, createObject_1, isFunction_9, isValue_1, isDom_4, numProperties_6) {
|
|
2154
2463
|
"use strict";
|
|
2155
2464
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2156
2465
|
exports.diffObj = void 0;
|
|
@@ -2162,7 +2471,9 @@
|
|
|
2162
2471
|
if (value1 === value2) {
|
|
2163
2472
|
return VALUE_UNCHANGED;
|
|
2164
2473
|
}
|
|
2165
|
-
if ((0, isDate_6.isDate)(value1) &&
|
|
2474
|
+
if ((0, isDate_6.isDate)(value1) &&
|
|
2475
|
+
(0, isDate_6.isDate)(value2) &&
|
|
2476
|
+
(value1.getTime() === value2.getTime())) {
|
|
2166
2477
|
return VALUE_UNCHANGED;
|
|
2167
2478
|
}
|
|
2168
2479
|
if ('undefined' == typeof (value1)) {
|
|
@@ -2177,16 +2488,28 @@
|
|
|
2177
2488
|
notRoot = false;
|
|
2178
2489
|
}
|
|
2179
2490
|
let diff = (0, createObject_1.createObject)();
|
|
2180
|
-
if (!(0,
|
|
2491
|
+
if (!(0, isFunction_9.isFunction)(obj1) && !(0, isFunction_9.isFunction)(obj2)) {
|
|
2181
2492
|
if ((0, isValue_1.isValue)(obj1) || (0, isValue_1.isValue)(obj2)) {
|
|
2182
2493
|
let res = _compareValues(obj1, obj2);
|
|
2183
2494
|
if (unchanged || (res !== VALUE_UNCHANGED)) {
|
|
2184
2495
|
let ret = (0, createObject_1.createObject)();
|
|
2185
|
-
Object.defineProperty(ret, 'type', {
|
|
2186
|
-
|
|
2187
|
-
|
|
2496
|
+
Object.defineProperty(ret, 'type', {
|
|
2497
|
+
value: res,
|
|
2498
|
+
enumerable: false
|
|
2499
|
+
});
|
|
2500
|
+
Object.defineProperty(ret, 'data', {
|
|
2501
|
+
value: (obj1 === undefined) ? obj2 : obj1,
|
|
2502
|
+
enumerable: false
|
|
2503
|
+
});
|
|
2504
|
+
Object.defineProperty(ret, '_bbnDiffObjProof', {
|
|
2505
|
+
value: true,
|
|
2506
|
+
enumerable: false
|
|
2507
|
+
});
|
|
2188
2508
|
if (obj1 !== undefined) {
|
|
2189
|
-
Object.defineProperty(ret, 'newData', {
|
|
2509
|
+
Object.defineProperty(ret, 'newData', {
|
|
2510
|
+
value: obj2,
|
|
2511
|
+
enumerable: false
|
|
2512
|
+
});
|
|
2190
2513
|
}
|
|
2191
2514
|
return ret;
|
|
2192
2515
|
}
|
|
@@ -2196,11 +2519,12 @@
|
|
|
2196
2519
|
return false;
|
|
2197
2520
|
}
|
|
2198
2521
|
if (diffObjProcessed.includes(obj1) || diffObjProcessed.includes(obj2)) {
|
|
2522
|
+
//error(bbn._("Can't compare objects because they contain circular references"));
|
|
2199
2523
|
return false;
|
|
2200
2524
|
}
|
|
2201
2525
|
diffObjProcessed.push(obj1, obj2);
|
|
2202
2526
|
for (let key in obj1) {
|
|
2203
|
-
if ((0,
|
|
2527
|
+
if ((0, isFunction_9.isFunction)(obj1[key])) {
|
|
2204
2528
|
continue;
|
|
2205
2529
|
}
|
|
2206
2530
|
let value2 = undefined;
|
|
@@ -2213,7 +2537,7 @@
|
|
|
2213
2537
|
}
|
|
2214
2538
|
}
|
|
2215
2539
|
for (let key in obj2) {
|
|
2216
|
-
if ((0,
|
|
2540
|
+
if ((0, isFunction_9.isFunction)(obj2[key]) || ('undefined' != typeof (obj1[key]))) {
|
|
2217
2541
|
continue;
|
|
2218
2542
|
}
|
|
2219
2543
|
let res = diffObj(undefined, obj2[key], unchanged, true);
|
|
@@ -2222,7 +2546,7 @@
|
|
|
2222
2546
|
}
|
|
2223
2547
|
}
|
|
2224
2548
|
}
|
|
2225
|
-
return !notRoot || unchanged || (0,
|
|
2549
|
+
return !notRoot || unchanged || (0, numProperties_6.numProperties)(diff) ? diff : false;
|
|
2226
2550
|
};
|
|
2227
2551
|
exports.diffObj = diffObj;
|
|
2228
2552
|
});
|
|
@@ -2251,10 +2575,10 @@
|
|
|
2251
2575
|
"use strict";
|
|
2252
2576
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2253
2577
|
exports.isBlob = void 0;
|
|
2254
|
-
const isBlob = function () {
|
|
2255
|
-
if (!
|
|
2578
|
+
const isBlob = function (...args) {
|
|
2579
|
+
if (!args.length)
|
|
2256
2580
|
return false;
|
|
2257
|
-
for (let a of
|
|
2581
|
+
for (let a of args) {
|
|
2258
2582
|
if ({}.toString.apply(a) !== '[object Blob]') {
|
|
2259
2583
|
return false;
|
|
2260
2584
|
}
|
|
@@ -2282,10 +2606,10 @@
|
|
|
2282
2606
|
"use strict";
|
|
2283
2607
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2284
2608
|
exports.isCanvas = void 0;
|
|
2285
|
-
const isCanvas = function () {
|
|
2286
|
-
if (!
|
|
2609
|
+
const isCanvas = function (...args) {
|
|
2610
|
+
if (!args.length)
|
|
2287
2611
|
return false;
|
|
2288
|
-
for (let a of
|
|
2612
|
+
for (let a of args) {
|
|
2289
2613
|
if (!(a instanceof HTMLCanvasElement)) {
|
|
2290
2614
|
return false;
|
|
2291
2615
|
}
|
|
@@ -2294,13 +2618,22 @@
|
|
|
2294
2618
|
};
|
|
2295
2619
|
exports.isCanvas = isCanvas;
|
|
2296
2620
|
});
|
|
2297
|
-
define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_13, isString_13,
|
|
2621
|
+
define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_13, isString_13, log_13) {
|
|
2298
2622
|
"use strict";
|
|
2299
2623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2300
2624
|
exports.downloadContent = void 0;
|
|
2301
2625
|
const downloadContent = function (filename, content, type) {
|
|
2302
2626
|
if ((0, isCanvas_1.isCanvas)(content)) {
|
|
2303
|
-
content.toBlob((blob) => {
|
|
2627
|
+
content.toBlob((blob) => {
|
|
2628
|
+
// blob ready, download it
|
|
2629
|
+
let a = document.createElement('a');
|
|
2630
|
+
a.download = filename;
|
|
2631
|
+
a.href = window.URL.createObjectURL(blob);
|
|
2632
|
+
a.className = 'bbn-no';
|
|
2633
|
+
a.click();
|
|
2634
|
+
// delete the internal blob reference, to let the browser clear memory from it
|
|
2635
|
+
window.URL.revokeObjectURL(a.href);
|
|
2636
|
+
}, type || 'image/png');
|
|
2304
2637
|
return;
|
|
2305
2638
|
}
|
|
2306
2639
|
if (!type) {
|
|
@@ -2320,14 +2653,16 @@
|
|
|
2320
2653
|
src = content;
|
|
2321
2654
|
}
|
|
2322
2655
|
catch (e) {
|
|
2323
|
-
(0,
|
|
2656
|
+
(0, log_13.log)(e);
|
|
2324
2657
|
}
|
|
2325
2658
|
}
|
|
2326
2659
|
a.href = window.URL.createObjectURL(src);
|
|
2327
2660
|
a.download = filename;
|
|
2661
|
+
// Append anchor to body.
|
|
2328
2662
|
document.body.appendChild(a);
|
|
2329
2663
|
a.click();
|
|
2330
2664
|
window.URL.revokeObjectURL(a.href);
|
|
2665
|
+
// Remove anchor from body
|
|
2331
2666
|
document.body.removeChild(a);
|
|
2332
2667
|
};
|
|
2333
2668
|
exports.downloadContent = downloadContent;
|
|
@@ -2337,6 +2672,7 @@
|
|
|
2337
2672
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2338
2673
|
exports.download = void 0;
|
|
2339
2674
|
const download = function (url, filename, params) {
|
|
2675
|
+
// We can intervert the arguments
|
|
2340
2676
|
if ((0, isObject_14.isObject)(filename)) {
|
|
2341
2677
|
params = filename;
|
|
2342
2678
|
filename = null;
|
|
@@ -2360,7 +2696,9 @@
|
|
|
2360
2696
|
}
|
|
2361
2697
|
}
|
|
2362
2698
|
(0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
|
|
2363
|
-
}, e => {
|
|
2699
|
+
}, e => {
|
|
2700
|
+
(0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
|
|
2701
|
+
});
|
|
2364
2702
|
};
|
|
2365
2703
|
exports.download = download;
|
|
2366
2704
|
});
|
|
@@ -2368,7 +2706,9 @@
|
|
|
2368
2706
|
"use strict";
|
|
2369
2707
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2370
2708
|
exports.eraseCookie = void 0;
|
|
2371
|
-
const eraseCookie = function (name) {
|
|
2709
|
+
const eraseCookie = function (name) {
|
|
2710
|
+
document.cookie = name + '=; Max-Age=-99999999;';
|
|
2711
|
+
};
|
|
2372
2712
|
exports.eraseCookie = eraseCookie;
|
|
2373
2713
|
});
|
|
2374
2714
|
define("fn/escapeDquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_14) {
|
|
@@ -2423,7 +2763,9 @@
|
|
|
2423
2763
|
st += '://';
|
|
2424
2764
|
url = url.substring(3);
|
|
2425
2765
|
}
|
|
2426
|
-
(0, each_12.each)((0, dirName_1.dirName)(url).split('/'), a => {
|
|
2766
|
+
(0, each_12.each)((0, dirName_1.dirName)(url).split('/'), a => {
|
|
2767
|
+
st += encodeURIComponent(a) + '/';
|
|
2768
|
+
});
|
|
2427
2769
|
let base = (0, baseName_2.baseName)(url);
|
|
2428
2770
|
let sep = '?';
|
|
2429
2771
|
let existingParams = '';
|
|
@@ -2514,9 +2856,11 @@
|
|
|
2514
2856
|
res.push(arr[idx]);
|
|
2515
2857
|
start = idx + 1;
|
|
2516
2858
|
}
|
|
2517
|
-
(0, each_13.each)(arr, it => {
|
|
2518
|
-
|
|
2519
|
-
|
|
2859
|
+
(0, each_13.each)(arr, it => {
|
|
2860
|
+
if ((0, isArray_10.isArray)(it[deepProperty])) {
|
|
2861
|
+
findAll(it[deepProperty], filter, deepProperty, res);
|
|
2862
|
+
}
|
|
2863
|
+
});
|
|
2520
2864
|
return res;
|
|
2521
2865
|
};
|
|
2522
2866
|
exports.findAll = findAll;
|
|
@@ -2573,7 +2917,11 @@
|
|
|
2573
2917
|
let args = Array.prototype.slice.call(arguments, 1);
|
|
2574
2918
|
if (args.length) {
|
|
2575
2919
|
let i = 0;
|
|
2576
|
-
return str.replace(/\%([d|s])/g, (match, type) => {
|
|
2920
|
+
return str.replace(/\%([d|s])/g, (match, type) => {
|
|
2921
|
+
let tmp = args[i++];
|
|
2922
|
+
(0, checkType_1.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value doesn't correspond to the format"));
|
|
2923
|
+
return tmp;
|
|
2924
|
+
});
|
|
2577
2925
|
}
|
|
2578
2926
|
return str;
|
|
2579
2927
|
};
|
|
@@ -2596,7 +2944,9 @@
|
|
|
2596
2944
|
"use strict";
|
|
2597
2945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2598
2946
|
exports.formatDate = void 0;
|
|
2599
|
-
const formatDate = function (date, format) {
|
|
2947
|
+
const formatDate = function (date, format) {
|
|
2948
|
+
return dayjs(date).format(format);
|
|
2949
|
+
};
|
|
2600
2950
|
exports.formatDate = formatDate;
|
|
2601
2951
|
});
|
|
2602
2952
|
define("fn/formatSize", ["require", "exports", "fn/isNumber", "fn/isString"], function (require, exports, isNumber_6, isString_18) {
|
|
@@ -2627,12 +2977,16 @@
|
|
|
2627
2977
|
v = (0, fieldValue_1.fieldValue)(input);
|
|
2628
2978
|
if ((v !== undefined) && !input.disabled) {
|
|
2629
2979
|
let name = input.name;
|
|
2630
|
-
if ((name.indexOf("[]") === -1) &&
|
|
2980
|
+
if ((name.indexOf("[]") === -1) &&
|
|
2981
|
+
(name.indexOf("[") > -1) &&
|
|
2982
|
+
(name.indexOf("]") > -1) &&
|
|
2983
|
+
(name.lastIndexOf("]") === name.length - 1)) {
|
|
2631
2984
|
name = (0, replaceAll_3.replaceAll)("][", ".", name);
|
|
2632
2985
|
name = (0, replaceAll_3.replaceAll)("[", ".", name);
|
|
2633
2986
|
name = (0, replaceAll_3.replaceAll)("]", "", name);
|
|
2634
2987
|
}
|
|
2635
|
-
if ((name.length > 2) &&
|
|
2988
|
+
if ((name.length > 2) &&
|
|
2989
|
+
(name.indexOf("[]") === (name.length - 2))) {
|
|
2636
2990
|
n = (0, substr_8.substr)(name, 0, name.length - 2);
|
|
2637
2991
|
if (res[n] === undefined) {
|
|
2638
2992
|
res[n] = [];
|
|
@@ -2659,6 +3013,7 @@
|
|
|
2659
3013
|
}
|
|
2660
3014
|
}
|
|
2661
3015
|
});
|
|
3016
|
+
// return num_changes ? res : false;
|
|
2662
3017
|
return res;
|
|
2663
3018
|
};
|
|
2664
3019
|
exports.formdata = formdata;
|
|
@@ -2722,7 +3077,9 @@
|
|
|
2722
3077
|
return wrong_result && (0, isString_19.isString)(wrong_result) ? wrong_result : '';
|
|
2723
3078
|
}
|
|
2724
3079
|
if (undefined !== dayjs) {
|
|
2725
|
-
return dayjs(r).calendar({
|
|
3080
|
+
return dayjs(r).calendar({
|
|
3081
|
+
sameElse: 'D/M/YY HH:mm'
|
|
3082
|
+
});
|
|
2726
3083
|
}
|
|
2727
3084
|
return r.toLocaleDateString();
|
|
2728
3085
|
};
|
|
@@ -2732,14 +3089,20 @@
|
|
|
2732
3089
|
"use strict";
|
|
2733
3090
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2734
3091
|
exports.unique = void 0;
|
|
2735
|
-
const unique = function (arr) {
|
|
3092
|
+
const unique = function (arr) {
|
|
3093
|
+
return arr.filter(function (el, index, ar) {
|
|
3094
|
+
return index === ar.indexOf(el);
|
|
3095
|
+
});
|
|
3096
|
+
};
|
|
2736
3097
|
exports.unique = unique;
|
|
2737
3098
|
});
|
|
2738
3099
|
define("fn/getAllTags", ["require", "exports", "fn/unique"], function (require, exports, unique_1) {
|
|
2739
3100
|
"use strict";
|
|
2740
3101
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2741
3102
|
exports.getAllTags = void 0;
|
|
2742
|
-
const getAllTags = function () {
|
|
3103
|
+
const getAllTags = function () {
|
|
3104
|
+
return (0, unique_1.unique)(Array.prototype.map.apply(document.all, [a => a.tagName.toLowerCase()]));
|
|
3105
|
+
};
|
|
2743
3106
|
exports.getAllTags = getAllTags;
|
|
2744
3107
|
});
|
|
2745
3108
|
define("fn/getAncestors", ["require", "exports", "fn/isString"], function (require, exports, isString_20) {
|
|
@@ -2781,7 +3144,9 @@
|
|
|
2781
3144
|
(0, error_3.error)("The element is not a proper HTML Element");
|
|
2782
3145
|
}
|
|
2783
3146
|
let res = Object.create(null);
|
|
2784
|
-
ele.getAttributeNames().forEach(name => {
|
|
3147
|
+
ele.getAttributeNames().forEach(name => {
|
|
3148
|
+
res[name] = ele.getAttribute(name);
|
|
3149
|
+
});
|
|
2785
3150
|
return res;
|
|
2786
3151
|
};
|
|
2787
3152
|
exports.getAttributes = getAttributes;
|
|
@@ -2790,32 +3155,53 @@
|
|
|
2790
3155
|
"use strict";
|
|
2791
3156
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2792
3157
|
exports.getBrowserName = void 0;
|
|
2793
|
-
const getBrowserName = function () {
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
3158
|
+
const getBrowserName = function () {
|
|
3159
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
3160
|
+
switch (true) {
|
|
3161
|
+
case userAgent.includes('edge'):
|
|
3162
|
+
case userAgent.includes('edg/'):
|
|
3163
|
+
return "Edge";
|
|
3164
|
+
case userAgent.includes('opr') && !!window.opr:
|
|
3165
|
+
return "Opera";
|
|
3166
|
+
case userAgent.includes('chrome') && !!window.chrome:
|
|
3167
|
+
return "Chrome";
|
|
3168
|
+
case userAgent.includes('trident'):
|
|
3169
|
+
return "Internet Explorer";
|
|
3170
|
+
case userAgent.includes('firefox'):
|
|
3171
|
+
return "Firefox";
|
|
3172
|
+
case userAgent.includes('safari'):
|
|
3173
|
+
return "Safari";
|
|
3174
|
+
default:
|
|
3175
|
+
return "Other";
|
|
3176
|
+
}
|
|
3177
|
+
};
|
|
2803
3178
|
exports.getBrowserName = getBrowserName;
|
|
2804
3179
|
});
|
|
2805
3180
|
define("fn/getBrowserVersion", ["require", "exports"], function (require, exports) {
|
|
2806
3181
|
"use strict";
|
|
2807
3182
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2808
3183
|
exports.getBrowserVersion = void 0;
|
|
2809
|
-
const getBrowserVersion = function () {
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
3184
|
+
const getBrowserVersion = function () {
|
|
3185
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
3186
|
+
switch (true) {
|
|
3187
|
+
case userAgent.includes('edge/'):
|
|
3188
|
+
return userAgent.split('edge/')[1].split(' ')[0];
|
|
3189
|
+
case userAgent.includes('edg/'):
|
|
3190
|
+
return userAgent.split('edg/')[1].split(' ')[0];
|
|
3191
|
+
case userAgent.includes('opr/') && !!window.opr:
|
|
3192
|
+
return userAgent.split('opr/')[1].split(' ')[0];
|
|
3193
|
+
case userAgent.includes('chrome/') && !!window.chrome:
|
|
3194
|
+
return userAgent.split('chrome/')[1].split(' ')[0];
|
|
3195
|
+
case userAgent.includes('trident/'):
|
|
3196
|
+
return userAgent.split('trident/')[1].split(' ')[0];
|
|
3197
|
+
case userAgent.includes('firefox/'):
|
|
3198
|
+
return userAgent.split('firefox/')[1].split(' ')[0];
|
|
3199
|
+
case userAgent.includes('safari/'):
|
|
3200
|
+
return userAgent.split('version/')[1].split(' ')[0];
|
|
3201
|
+
default:
|
|
3202
|
+
return '';
|
|
3203
|
+
}
|
|
3204
|
+
};
|
|
2819
3205
|
exports.getBrowserVersion = getBrowserVersion;
|
|
2820
3206
|
});
|
|
2821
3207
|
define("fn/getCookie", ["require", "exports"], function (require, exports) {
|
|
@@ -2890,14 +3276,14 @@
|
|
|
2890
3276
|
};
|
|
2891
3277
|
exports.getDeviceType = getDeviceType;
|
|
2892
3278
|
});
|
|
2893
|
-
define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports,
|
|
3279
|
+
define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports, log_14) {
|
|
2894
3280
|
"use strict";
|
|
2895
3281
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2896
3282
|
exports.getHTMLOfSelection = void 0;
|
|
2897
3283
|
const getHTMLOfSelection = function () {
|
|
2898
3284
|
let range;
|
|
2899
3285
|
if (document.selection && document.selection.createRange) {
|
|
2900
|
-
(0,
|
|
3286
|
+
(0, log_14.log)("METHOD 1");
|
|
2901
3287
|
range = document.selection.createRange();
|
|
2902
3288
|
return range.htmlText;
|
|
2903
3289
|
}
|
|
@@ -2905,9 +3291,9 @@
|
|
|
2905
3291
|
let selection = window.getSelection();
|
|
2906
3292
|
if (selection.rangeCount > 0) {
|
|
2907
3293
|
range = selection.getRangeAt(0);
|
|
2908
|
-
(0,
|
|
3294
|
+
(0, log_14.log)("RANGE", range);
|
|
2909
3295
|
let clonedSelection = range.cloneContents();
|
|
2910
|
-
(0,
|
|
3296
|
+
(0, log_14.log)("clonedSelection", clonedSelection);
|
|
2911
3297
|
let div = document.createElement('div');
|
|
2912
3298
|
div.appendChild(clonedSelection);
|
|
2913
3299
|
return div.innerHTML;
|
|
@@ -2936,12 +3322,21 @@
|
|
|
2936
3322
|
let sel = window.getSelection();
|
|
2937
3323
|
res.raw = sel.toString();
|
|
2938
3324
|
let html = (0, getHTMLOfSelection_1.getHTMLOfSelection)();
|
|
2939
|
-
res.str.push({
|
|
3325
|
+
res.str.push({
|
|
3326
|
+
type: 'text/plain',
|
|
3327
|
+
data: res.raw
|
|
3328
|
+
});
|
|
2940
3329
|
if (html !== res.raw) {
|
|
2941
|
-
res.str.push({
|
|
3330
|
+
res.str.push({
|
|
3331
|
+
type: 'text/html',
|
|
3332
|
+
data: html
|
|
3333
|
+
});
|
|
2942
3334
|
}
|
|
2943
3335
|
else if (res.raw.trim().indexOf('<') === 0) {
|
|
2944
|
-
res.str.push({
|
|
3336
|
+
res.str.push({
|
|
3337
|
+
type: 'text/html',
|
|
3338
|
+
data: "<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n" + res.raw + "\n</code>"
|
|
3339
|
+
});
|
|
2945
3340
|
}
|
|
2946
3341
|
done = true;
|
|
2947
3342
|
ok(res);
|
|
@@ -2965,7 +3360,13 @@
|
|
|
2965
3360
|
if (blob) {
|
|
2966
3361
|
done = true;
|
|
2967
3362
|
num--;
|
|
2968
|
-
res.files.push({
|
|
3363
|
+
res.files.push({
|
|
3364
|
+
type: type,
|
|
3365
|
+
data: blob,
|
|
3366
|
+
name: name,
|
|
3367
|
+
size: size,
|
|
3368
|
+
mdate: lastModified
|
|
3369
|
+
});
|
|
2969
3370
|
strings.push(name);
|
|
2970
3371
|
if (!num) {
|
|
2971
3372
|
if (!res.raw) {
|
|
@@ -2982,7 +3383,10 @@
|
|
|
2982
3383
|
done = true;
|
|
2983
3384
|
item.getAsString((data) => {
|
|
2984
3385
|
num--;
|
|
2985
|
-
res.str.push({
|
|
3386
|
+
res.str.push({
|
|
3387
|
+
type: type,
|
|
3388
|
+
data: data
|
|
3389
|
+
});
|
|
2986
3390
|
if (type === 'text/plain') {
|
|
2987
3391
|
strings.push(name);
|
|
2988
3392
|
}
|
|
@@ -2997,20 +3401,22 @@
|
|
|
2997
3401
|
});
|
|
2998
3402
|
}
|
|
2999
3403
|
if (!done) {
|
|
3000
|
-
setTimeout(() => {
|
|
3404
|
+
setTimeout(() => {
|
|
3405
|
+
ok(res);
|
|
3406
|
+
});
|
|
3001
3407
|
}
|
|
3002
3408
|
});
|
|
3003
3409
|
return p;
|
|
3004
3410
|
};
|
|
3005
3411
|
exports.getEventData = getEventData;
|
|
3006
3412
|
});
|
|
3007
|
-
define("fn/getField", ["require", "exports"
|
|
3413
|
+
define("fn/getField", ["require", "exports"], function (require, exports) {
|
|
3008
3414
|
"use strict";
|
|
3009
3415
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3010
3416
|
exports.getField = void 0;
|
|
3011
3417
|
const getField = function (arr, field, prop, val, operator) {
|
|
3012
3418
|
var r;
|
|
3013
|
-
if (field && (r =
|
|
3419
|
+
if (field && (r = bbn.fn.getRow(arr, prop, val, operator))) {
|
|
3014
3420
|
return r[field];
|
|
3015
3421
|
}
|
|
3016
3422
|
return undefined;
|
|
@@ -3062,8 +3468,11 @@
|
|
|
3062
3468
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3063
3469
|
exports.getPath = void 0;
|
|
3064
3470
|
const getPath = function (element) {
|
|
3065
|
-
let path,
|
|
3471
|
+
let path,
|
|
3472
|
+
//node = $(element),
|
|
3473
|
+
node = element, done = false;
|
|
3066
3474
|
while (node.length) {
|
|
3475
|
+
//let realNode = node[0],
|
|
3067
3476
|
let realNode = node, name = realNode.localName;
|
|
3068
3477
|
if (!name)
|
|
3069
3478
|
break;
|
|
@@ -3078,9 +3487,17 @@
|
|
|
3078
3487
|
}
|
|
3079
3488
|
done = 1;
|
|
3080
3489
|
}
|
|
3081
|
-
|
|
3490
|
+
//var parent = node.parent(),
|
|
3491
|
+
let parent = node.parentNode,
|
|
3492
|
+
//sameTagSiblings = parent.children(name);
|
|
3493
|
+
sameTagSiblings = parent.children.filter(val => {
|
|
3494
|
+
return val.tagName === name;
|
|
3495
|
+
});
|
|
3082
3496
|
if (sameTagSiblings.length > 1) {
|
|
3083
|
-
|
|
3497
|
+
//var allSiblings = parent.children(),
|
|
3498
|
+
let allSiblings = parent.children,
|
|
3499
|
+
//index = allSiblings.index(realNode) + 1;
|
|
3500
|
+
index = allSiblings.indexOf(realNode) + 1;
|
|
3084
3501
|
if (index > 1) {
|
|
3085
3502
|
name += ':nth-child(' + index + ')';
|
|
3086
3503
|
}
|
|
@@ -3096,7 +3513,11 @@
|
|
|
3096
3513
|
"use strict";
|
|
3097
3514
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3098
3515
|
exports.getProp = void 0;
|
|
3099
|
-
const getProp = function (obj, prop) {
|
|
3516
|
+
const getProp = function (obj, prop) {
|
|
3517
|
+
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
3518
|
+
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
3519
|
+
return obj[prop];
|
|
3520
|
+
};
|
|
3100
3521
|
exports.getProp = getProp;
|
|
3101
3522
|
});
|
|
3102
3523
|
define("fn/getScrollBarSize", ["require", "exports"], function (require, exports) {
|
|
@@ -3108,14 +3529,17 @@
|
|
|
3108
3529
|
let outer = document.createElement("div");
|
|
3109
3530
|
outer.style.visibility = "hidden";
|
|
3110
3531
|
outer.style.width = "100px";
|
|
3111
|
-
outer.style.msOverflowStyle = "scrollbar";
|
|
3532
|
+
outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
|
|
3112
3533
|
document.body.appendChild(outer);
|
|
3113
3534
|
let widthNoScroll = outer.offsetWidth;
|
|
3535
|
+
// force scrollbars
|
|
3114
3536
|
outer.style.overflow = "scroll";
|
|
3537
|
+
// add innerdiv
|
|
3115
3538
|
let inner = document.createElement("div");
|
|
3116
3539
|
inner.style.width = "100%";
|
|
3117
3540
|
outer.appendChild(inner);
|
|
3118
3541
|
let widthWithScroll = inner.offsetWidth;
|
|
3542
|
+
// remove divs
|
|
3119
3543
|
outer.parentNode.removeChild(outer);
|
|
3120
3544
|
let sz = widthNoScroll - widthWithScroll;
|
|
3121
3545
|
bbn.env.scrollBarSize = sz ? sz + 1 : 0;
|
|
@@ -3128,7 +3552,9 @@
|
|
|
3128
3552
|
"use strict";
|
|
3129
3553
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3130
3554
|
exports.getText = void 0;
|
|
3131
|
-
const getText = function (ele) {
|
|
3555
|
+
const getText = function (ele) {
|
|
3556
|
+
return ele.innerText().trim();
|
|
3557
|
+
};
|
|
3132
3558
|
exports.getText = getText;
|
|
3133
3559
|
});
|
|
3134
3560
|
define("fn/getTimeoff", ["require", "exports"], function (require, exports) {
|
|
@@ -3143,56 +3569,94 @@
|
|
|
3143
3569
|
};
|
|
3144
3570
|
exports.getTimeoff = getTimeoff;
|
|
3145
3571
|
});
|
|
3146
|
-
define("fn/happy", ["require", "exports", "fn/log"], function (require, exports,
|
|
3572
|
+
define("fn/happy", ["require", "exports", "fn/log"], function (require, exports, log_15) {
|
|
3147
3573
|
"use strict";
|
|
3148
3574
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3149
3575
|
exports.happy = void 0;
|
|
3150
|
-
const happy = function (...args) {
|
|
3576
|
+
const happy = function (...args) {
|
|
3577
|
+
args.unshift({
|
|
3578
|
+
_bbn_console_level: 3,
|
|
3579
|
+
_bbn_console_style: "color: white; background: green; font-size: 18px;"
|
|
3580
|
+
});
|
|
3581
|
+
log_15.log.apply(this, args);
|
|
3582
|
+
return this;
|
|
3583
|
+
};
|
|
3151
3584
|
exports.happy = happy;
|
|
3152
3585
|
});
|
|
3153
3586
|
define("fn/hex2rgb", ["require", "exports"], function (require, exports) {
|
|
3154
3587
|
"use strict";
|
|
3155
3588
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3156
3589
|
exports.hex2rgb = void 0;
|
|
3157
|
-
const hex2rgb = function (hex) {
|
|
3590
|
+
const hex2rgb = function (hex) {
|
|
3591
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
3592
|
+
return result ? {
|
|
3593
|
+
r: parseInt(result[1], 16),
|
|
3594
|
+
g: parseInt(result[2], 16),
|
|
3595
|
+
b: parseInt(result[3], 16)
|
|
3596
|
+
} : null;
|
|
3597
|
+
};
|
|
3158
3598
|
exports.hex2rgb = hex2rgb;
|
|
3159
3599
|
});
|
|
3160
3600
|
define("fn/history", ["require", "exports"], function (require, exports) {
|
|
3161
3601
|
"use strict";
|
|
3162
3602
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3163
3603
|
exports.history = void 0;
|
|
3164
|
-
const history = function () {
|
|
3604
|
+
const history = function () {
|
|
3605
|
+
return window.history || false;
|
|
3606
|
+
};
|
|
3165
3607
|
exports.history = history;
|
|
3166
3608
|
});
|
|
3167
3609
|
define("fn/html2text", ["require", "exports"], function (require, exports) {
|
|
3168
3610
|
"use strict";
|
|
3169
3611
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3170
3612
|
exports.html2text = void 0;
|
|
3171
|
-
const html2text = function (st) {
|
|
3613
|
+
const html2text = function (st) {
|
|
3614
|
+
let $test = document.createElement('div');
|
|
3615
|
+
$test.innerHTML = st;
|
|
3616
|
+
st = $test.innerText;
|
|
3617
|
+
return st;
|
|
3618
|
+
};
|
|
3172
3619
|
exports.html2text = html2text;
|
|
3173
3620
|
});
|
|
3174
3621
|
define("fn/imageToCanvas", ["require", "exports"], function (require, exports) {
|
|
3175
3622
|
"use strict";
|
|
3176
3623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3177
3624
|
exports.imageToCanvas = void 0;
|
|
3178
|
-
const imageToCanvas = function (img) {
|
|
3625
|
+
const imageToCanvas = function (img) {
|
|
3626
|
+
let canvas = document.createElement("canvas");
|
|
3627
|
+
canvas.width = img.width;
|
|
3628
|
+
canvas.height = img.height;
|
|
3629
|
+
canvas.getContext("2d").drawImage(img, 0, 0);
|
|
3630
|
+
return canvas;
|
|
3631
|
+
};
|
|
3179
3632
|
exports.imageToCanvas = imageToCanvas;
|
|
3180
3633
|
});
|
|
3181
3634
|
define("fn/imgToBase64", ["require", "exports", "fn/imageToCanvas", "fn/canvasToImage"], function (require, exports, imageToCanvas_1, canvasToImage_1) {
|
|
3182
3635
|
"use strict";
|
|
3183
3636
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3184
3637
|
exports.imgToBase64 = void 0;
|
|
3185
|
-
const imgToBase64 = function (img) {
|
|
3638
|
+
const imgToBase64 = function (img) {
|
|
3639
|
+
let canvas = (0, imageToCanvas_1.imageToCanvas)(img);
|
|
3640
|
+
return (0, canvasToImage_1.canvasToImage)(canvas);
|
|
3641
|
+
};
|
|
3186
3642
|
exports.imgToBase64 = imgToBase64;
|
|
3187
3643
|
});
|
|
3188
|
-
define("fn/info", ["require", "exports", "fn/log"], function (require, exports,
|
|
3644
|
+
define("fn/info", ["require", "exports", "fn/log"], function (require, exports, log_16) {
|
|
3189
3645
|
"use strict";
|
|
3190
3646
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3191
3647
|
exports.info = void 0;
|
|
3192
|
-
const info = function (...args) {
|
|
3648
|
+
const info = function (...args) {
|
|
3649
|
+
args.unshift({
|
|
3650
|
+
//_bbn_console_mode: "info",
|
|
3651
|
+
_bbn_console_level: 4,
|
|
3652
|
+
_bbn_console_style: "color: #EEE; background: blue; font-size: 12px;"
|
|
3653
|
+
});
|
|
3654
|
+
log_16.log.apply(this, args);
|
|
3655
|
+
return this;
|
|
3656
|
+
};
|
|
3193
3657
|
exports.info = info;
|
|
3194
3658
|
});
|
|
3195
|
-
define("fn/treatAjaxArguments", ["require", "exports", "fn/isObject", "fn/isFunction", "fn/substr", "fn/numProperties"], function (require, exports, isObject_16,
|
|
3659
|
+
define("fn/treatAjaxArguments", ["require", "exports", "fn/isObject", "fn/isFunction", "fn/substr", "fn/numProperties"], function (require, exports, isObject_16, isFunction_10, substr_9, numProperties_7) {
|
|
3196
3660
|
"use strict";
|
|
3197
3661
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3198
3662
|
exports.treatAjaxArguments = void 0;
|
|
@@ -3204,7 +3668,8 @@
|
|
|
3204
3668
|
for (i = 0; i < args.length; i++) {
|
|
3205
3669
|
t = typeof (args[i]);
|
|
3206
3670
|
t = t.toLowerCase();
|
|
3207
|
-
|
|
3671
|
+
/* Callbacks */
|
|
3672
|
+
if ((0, isFunction_10.isFunction)(args[i])) {
|
|
3208
3673
|
if (cfg.errorFn && !cfg.abortFn) {
|
|
3209
3674
|
cfg.abortFn = args[i];
|
|
3210
3675
|
}
|
|
@@ -3215,14 +3680,17 @@
|
|
|
3215
3680
|
cfg.successFn = args[i];
|
|
3216
3681
|
}
|
|
3217
3682
|
}
|
|
3683
|
+
/* Force */
|
|
3218
3684
|
else if ((args[i] === 1) || (args[i] === true)) {
|
|
3219
3685
|
cfg.force = true;
|
|
3220
3686
|
}
|
|
3221
3687
|
else if (t === 'string') {
|
|
3222
3688
|
if (!cfg.url) {
|
|
3689
|
+
/* Hash */
|
|
3223
3690
|
if (args[i].indexOf('#') === 0 || args[i].indexOf(bbn.env.root + '#') === 0) {
|
|
3224
3691
|
cfg.url = (0, substr_9.substr)(args[i], bbn.env.root.length);
|
|
3225
3692
|
}
|
|
3693
|
+
/* Link */
|
|
3226
3694
|
else {
|
|
3227
3695
|
cfg.url = args[i];
|
|
3228
3696
|
if (cfg.url.indexOf(bbn.env.root) === 0) {
|
|
@@ -3230,23 +3698,27 @@
|
|
|
3230
3698
|
}
|
|
3231
3699
|
}
|
|
3232
3700
|
}
|
|
3701
|
+
/* Ajax datatype */
|
|
3233
3702
|
else {
|
|
3234
3703
|
cfg.datatype = args[i];
|
|
3235
3704
|
}
|
|
3236
3705
|
}
|
|
3706
|
+
/* Event */
|
|
3237
3707
|
else if (args[i] && (t === 'object')) {
|
|
3238
3708
|
if (args[i] instanceof Event) {
|
|
3239
3709
|
cfg.e = args[i];
|
|
3240
3710
|
}
|
|
3711
|
+
/* HTML Element */
|
|
3241
3712
|
else if (!cfg.ele && (args[i].nodeType === 1)) {
|
|
3242
3713
|
cfg.ele = args[i];
|
|
3243
3714
|
}
|
|
3715
|
+
/* An object to post */
|
|
3244
3716
|
else if (t.toLowerCase() === 'object') {
|
|
3245
3717
|
cfg.obj = args[i];
|
|
3246
3718
|
}
|
|
3247
3719
|
}
|
|
3248
3720
|
}
|
|
3249
|
-
if (!cfg.url && (0,
|
|
3721
|
+
if (!cfg.url && (0, numProperties_7.numProperties)(cfg)) {
|
|
3250
3722
|
cfg.url = bbn.env.path;
|
|
3251
3723
|
}
|
|
3252
3724
|
if (cfg.obj === undefined) {
|
|
@@ -3264,14 +3736,28 @@
|
|
|
3264
3736
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3265
3737
|
exports.setNavigationVars = void 0;
|
|
3266
3738
|
const setNavigationVars = function (url, title, data, repl) {
|
|
3739
|
+
// Current path becomes old path
|
|
3267
3740
|
bbn.env.old_path = bbn.env.path;
|
|
3741
|
+
// URL includes the domain
|
|
3268
3742
|
bbn.env.url = ['https:/', 'http://'].includes((0, substr_10.substr)(url, 0, 7)) ? url : bbn.env.root + url;
|
|
3743
|
+
// Path does not
|
|
3269
3744
|
bbn.env.path = (0, substr_10.substr)(bbn.env.url, bbn.env.root.length);
|
|
3270
|
-
|
|
3745
|
+
// Params will include each part of the URL
|
|
3746
|
+
bbn.env.params = (0, filter_4.filter)(bbn.env.path.split("/"), (v) => {
|
|
3747
|
+
return v !== '';
|
|
3748
|
+
});
|
|
3749
|
+
// Managing history
|
|
3271
3750
|
let h = window.history;
|
|
3272
3751
|
if (h) {
|
|
3752
|
+
// Current state
|
|
3273
3753
|
let state = h.state;
|
|
3274
|
-
|
|
3754
|
+
// Future state
|
|
3755
|
+
let obj = {
|
|
3756
|
+
url: bbn.env.path,
|
|
3757
|
+
old_path: bbn.env.old_path || null,
|
|
3758
|
+
data: data || {}
|
|
3759
|
+
};
|
|
3760
|
+
// If same URL we replace
|
|
3275
3761
|
if (state && (state.url === bbn.env.path)) {
|
|
3276
3762
|
if (state.data) {
|
|
3277
3763
|
(0, extend_5.extend)(obj.data, state.data);
|
|
@@ -3281,16 +3767,20 @@
|
|
|
3281
3767
|
}
|
|
3282
3768
|
repl = 1;
|
|
3283
3769
|
}
|
|
3770
|
+
// If no title the global title
|
|
3284
3771
|
if (!title) {
|
|
3285
3772
|
title = bbn.env.siteTitle;
|
|
3286
3773
|
}
|
|
3774
|
+
// Otherwise we add the global title at the end
|
|
3287
3775
|
else {
|
|
3288
3776
|
title = (0, html2text_1.html2text)(title);
|
|
3289
3777
|
}
|
|
3778
|
+
// Replacing state
|
|
3290
3779
|
if (repl) {
|
|
3291
3780
|
obj.reload = 1;
|
|
3292
3781
|
h.replaceState(obj, title, bbn.env.url);
|
|
3293
3782
|
}
|
|
3783
|
+
// Adding state
|
|
3294
3784
|
else {
|
|
3295
3785
|
h.pushState(obj, title, bbn.env.url);
|
|
3296
3786
|
}
|
|
@@ -3298,7 +3788,7 @@
|
|
|
3298
3788
|
};
|
|
3299
3789
|
exports.setNavigationVars = setNavigationVars;
|
|
3300
3790
|
});
|
|
3301
|
-
define("fn/link", ["require", "exports", "fn/treatAjaxArguments", "fn/getLoader", "fn/defaultPreLinkFunction", "fn/extend", "fn/ajax", "fn/log", "fn/isObject", "fn/callback", "fn/setNavigationVars"], function (require, exports, treatAjaxArguments_1, getLoader_3, defaultPreLinkFunction_1, extend_6, ajax_2,
|
|
3791
|
+
define("fn/link", ["require", "exports", "fn/treatAjaxArguments", "fn/getLoader", "fn/defaultPreLinkFunction", "fn/extend", "fn/ajax", "fn/log", "fn/isObject", "fn/callback", "fn/setNavigationVars"], function (require, exports, treatAjaxArguments_1, getLoader_3, defaultPreLinkFunction_1, extend_6, ajax_2, log_17, isObject_17, callback_1, setNavigationVars_1) {
|
|
3302
3792
|
"use strict";
|
|
3303
3793
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3304
3794
|
exports.link = void 0;
|
|
@@ -3307,9 +3797,11 @@
|
|
|
3307
3797
|
if (cfg === true) {
|
|
3308
3798
|
return true;
|
|
3309
3799
|
}
|
|
3800
|
+
/* If we can't find a correct link we load the current URL */
|
|
3310
3801
|
if (!cfg) {
|
|
3311
3802
|
return link(window.location.href);
|
|
3312
3803
|
}
|
|
3804
|
+
/* Just executing the javascript if there is */
|
|
3313
3805
|
if (cfg.url.indexOf('javascript:') === 0) {
|
|
3314
3806
|
return true;
|
|
3315
3807
|
}
|
|
@@ -3318,25 +3810,40 @@
|
|
|
3318
3810
|
}
|
|
3319
3811
|
if (cfg.url.indexOf('#') === 0) {
|
|
3320
3812
|
location.href = bbn.env.url + cfg.url;
|
|
3813
|
+
/*
|
|
3814
|
+
if ( window.history ){
|
|
3815
|
+
bbn.env.historyDisabled = true;
|
|
3816
|
+
let state = h.state;
|
|
3817
|
+
window.history.replaceState(null, state.title, bbn.env.url);
|
|
3818
|
+
}
|
|
3819
|
+
bbn.env.historyDisabled = false;
|
|
3820
|
+
*/
|
|
3321
3821
|
return true;
|
|
3322
3822
|
}
|
|
3823
|
+
/* Mail link */
|
|
3323
3824
|
else if (cfg.url.indexOf('mailto:') === 0) {
|
|
3324
3825
|
bbn.env.ignoreUnload = true;
|
|
3325
3826
|
window.location.href = cfg.url;
|
|
3326
|
-
setTimeout(() => {
|
|
3827
|
+
setTimeout(() => {
|
|
3828
|
+
bbn.env.ignoreUnload = false;
|
|
3829
|
+
}, 0);
|
|
3327
3830
|
return false;
|
|
3328
3831
|
}
|
|
3329
3832
|
if ((0, getLoader_3.getLoader)(cfg.url)) {
|
|
3330
3833
|
return false;
|
|
3331
3834
|
}
|
|
3332
|
-
|
|
3835
|
+
/* Opens an external page in a new window */
|
|
3836
|
+
if (((cfg.url.indexOf("http://") === 0) || (cfg.url.indexOf("https://") === 0)) &&
|
|
3837
|
+
(cfg.url.indexOf(bbn.env.host) !== 0)) {
|
|
3333
3838
|
if (cfg.e) {
|
|
3334
3839
|
cfg.e.preventDefault();
|
|
3335
3840
|
}
|
|
3336
3841
|
window.open(cfg.url);
|
|
3337
3842
|
return false;
|
|
3338
3843
|
}
|
|
3844
|
+
/* The URL is fine so go ahead if something is not already loading */
|
|
3339
3845
|
else if ((cfg.url !== bbn.env.params.join("/")) || (cfg.force === 1)) {
|
|
3846
|
+
/* If a second callback is defined, it is triggered instead of defaultPreLinkFunction */
|
|
3340
3847
|
if (cfg.successFn) {
|
|
3341
3848
|
ok = cfg.successFn(cfg.url);
|
|
3342
3849
|
}
|
|
@@ -3351,14 +3858,16 @@
|
|
|
3351
3858
|
if (ok !== 1 && (typeof ok === 'string')) {
|
|
3352
3859
|
cfg.url = ok;
|
|
3353
3860
|
}
|
|
3861
|
+
/** todo Do we keep obj in the unique string or do we make that only one concurrent connection to the same address can occur at the same time? */
|
|
3354
3862
|
let errSt = bbn._("The Ajax call to") + ' ' + cfg.url + ' ';
|
|
3355
3863
|
return (0, ajax_2.ajax)(cfg.url, cfg.datatype, cfg.obj, function (res) {
|
|
3356
3864
|
if (!res) {
|
|
3357
|
-
(0,
|
|
3865
|
+
(0, log_17.log)(errSt + bbn._("returned no answer"));
|
|
3358
3866
|
}
|
|
3359
3867
|
if ((0, isObject_17.isObject)(res)) {
|
|
3868
|
+
// If there's nothing in the result, just an empty object, the callback stops here and the URL is not changed
|
|
3360
3869
|
if ((Object.keys(res).length === 0)) {
|
|
3361
|
-
(0,
|
|
3870
|
+
(0, log_17.log)(errSt + bbn._("returned an empty object"));
|
|
3362
3871
|
}
|
|
3363
3872
|
if (res.new_url) {
|
|
3364
3873
|
res.old_path = cfg.url;
|
|
@@ -3368,7 +3877,9 @@
|
|
|
3368
3877
|
res.old_path = cfg.url;
|
|
3369
3878
|
}
|
|
3370
3879
|
}
|
|
3371
|
-
if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) &&
|
|
3880
|
+
if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) &&
|
|
3881
|
+
res.noNav === undefined) {
|
|
3882
|
+
// This solution is not very clean (we can't shorten a URL)
|
|
3372
3883
|
if (bbn.env.path.indexOf(cfg.url) !== 0) {
|
|
3373
3884
|
(0, setNavigationVars_1.setNavigationVars)(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
|
|
3374
3885
|
}
|
|
@@ -3384,12 +3895,17 @@
|
|
|
3384
3895
|
"use strict";
|
|
3385
3896
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3386
3897
|
exports.post = void 0;
|
|
3387
|
-
const post = function () {
|
|
3388
|
-
|
|
3389
|
-
|
|
3898
|
+
const post = function () {
|
|
3899
|
+
let cfg = (0, treatAjaxArguments_2.treatAjaxArguments)(arguments);
|
|
3900
|
+
if (cfg.url) {
|
|
3901
|
+
return (0, ajax_3.ajax)(cfg.url, cfg.datatype, cfg.obj, (res) => {
|
|
3902
|
+
(0, callback_2.callback)(cfg.url, res, cfg.successFn, false, cfg.ele);
|
|
3903
|
+
}, cfg.errorFn, cfg.abortFn);
|
|
3904
|
+
}
|
|
3905
|
+
};
|
|
3390
3906
|
exports.post = post;
|
|
3391
3907
|
});
|
|
3392
|
-
define("fn/submit", ["require", "exports", "fn/formdata", "fn/isFunction", "fn/isString", "fn/post"], function (require, exports, formdata_1,
|
|
3908
|
+
define("fn/submit", ["require", "exports", "fn/formdata", "fn/isFunction", "fn/isString", "fn/post"], function (require, exports, formdata_1, isFunction_11, isString_22, post_1) {
|
|
3393
3909
|
"use strict";
|
|
3394
3910
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3395
3911
|
exports.submit = void 0;
|
|
@@ -3398,17 +3914,28 @@
|
|
|
3398
3914
|
if (url === '') {
|
|
3399
3915
|
url = '.';
|
|
3400
3916
|
}
|
|
3917
|
+
//if ( (typeof(url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.is("[target]") ){
|
|
3401
3918
|
if ((typeof (url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.getAttribute("target")) {
|
|
3402
3919
|
if (e) {
|
|
3403
3920
|
e.preventDefault();
|
|
3404
3921
|
}
|
|
3405
3922
|
data = (0, formdata_1.formdata)(form);
|
|
3406
3923
|
if (data) {
|
|
3924
|
+
//$form.attr("action", null);
|
|
3407
3925
|
form.setAttribute('action', null);
|
|
3926
|
+
//$form.data("bbnSubmit", 1);
|
|
3408
3927
|
form.dataset.bbnSubmit = 1;
|
|
3928
|
+
//var script = $form.data("script");
|
|
3409
3929
|
let script = form.dataset.script;
|
|
3410
|
-
if ((0,
|
|
3411
|
-
form.
|
|
3930
|
+
if ((0, isFunction_11.isFunction)(script)) {
|
|
3931
|
+
/*$form.data("script", function(d){
|
|
3932
|
+
$form.attr("action", url);
|
|
3933
|
+
script(d);
|
|
3934
|
+
})*/
|
|
3935
|
+
form.dataset.script = d => {
|
|
3936
|
+
form.setAttribute("action", url);
|
|
3937
|
+
script(d);
|
|
3938
|
+
};
|
|
3412
3939
|
}
|
|
3413
3940
|
if (!fn) {
|
|
3414
3941
|
fn = form.getAttribute("data-script");
|
|
@@ -3470,24 +3997,30 @@
|
|
|
3470
3997
|
"use strict";
|
|
3471
3998
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3472
3999
|
exports.isMobileDevice = void 0;
|
|
3473
|
-
const isMobileDevice = function () {
|
|
4000
|
+
const isMobileDevice = function () {
|
|
4001
|
+
return this.getDeviceType() === 'mobile';
|
|
4002
|
+
};
|
|
3474
4003
|
exports.isMobileDevice = isMobileDevice;
|
|
3475
4004
|
});
|
|
3476
4005
|
define("fn/isTabletDevice", ["require", "exports"], function (require, exports) {
|
|
3477
4006
|
"use strict";
|
|
3478
4007
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3479
4008
|
exports.isTabletDevice = void 0;
|
|
3480
|
-
const isTabletDevice = function () {
|
|
4009
|
+
const isTabletDevice = function () {
|
|
4010
|
+
return this.getDeviceType() === 'tablet';
|
|
4011
|
+
};
|
|
3481
4012
|
exports.isTabletDevice = isTabletDevice;
|
|
3482
4013
|
});
|
|
3483
4014
|
define("fn/isMobile", ["require", "exports", "fn/isMobileDevice", "fn/isTabletDevice"], function (require, exports, isMobileDevice_1, isTabletDevice_1) {
|
|
3484
4015
|
"use strict";
|
|
3485
4016
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3486
4017
|
exports.isMobile = void 0;
|
|
3487
|
-
const isMobile = function () {
|
|
4018
|
+
const isMobile = function () {
|
|
4019
|
+
return (0, isMobileDevice_1.isMobileDevice)() || (0, isTabletDevice_1.isTabletDevice)();
|
|
4020
|
+
};
|
|
3488
4021
|
exports.isMobile = isMobile;
|
|
3489
4022
|
});
|
|
3490
|
-
define("fn/init", ["require", "exports", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, substr_11, each_18, extend_7, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1,
|
|
4023
|
+
define("fn/init", ["require", "exports", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, substr_11, each_18, extend_7, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_12, log_18) {
|
|
3491
4024
|
"use strict";
|
|
3492
4025
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3493
4026
|
exports.init = void 0;
|
|
@@ -3499,26 +4032,72 @@
|
|
|
3499
4032
|
bbn.env.root += '/';
|
|
3500
4033
|
}
|
|
3501
4034
|
if (!bbn.env.isInit && (typeof dayjs !== 'undefined')) {
|
|
3502
|
-
(0, each_18.each)([
|
|
3503
|
-
|
|
3504
|
-
|
|
4035
|
+
(0, each_18.each)([
|
|
4036
|
+
'advancedFormat',
|
|
4037
|
+
'arraySupport',
|
|
4038
|
+
'badMutable',
|
|
4039
|
+
'buddhistEra',
|
|
4040
|
+
'calendar',
|
|
4041
|
+
'customParseFormat',
|
|
4042
|
+
'dayOfYear',
|
|
4043
|
+
'devHelper',
|
|
4044
|
+
'duration',
|
|
4045
|
+
'isBetween',
|
|
4046
|
+
'isLeapYear',
|
|
4047
|
+
'isSameOrAfter',
|
|
4048
|
+
'isSameOrBefore',
|
|
4049
|
+
'isToday',
|
|
4050
|
+
'isTomorrow',
|
|
4051
|
+
'isYesterday',
|
|
4052
|
+
'isoWeek',
|
|
4053
|
+
'isoWeeksInYear',
|
|
4054
|
+
'localeData',
|
|
4055
|
+
'localizedFormat',
|
|
4056
|
+
'minMax',
|
|
4057
|
+
'objectSupport',
|
|
4058
|
+
'pluralGetSet',
|
|
4059
|
+
'quarterOfYear',
|
|
4060
|
+
'relativeTime',
|
|
4061
|
+
'timezone',
|
|
4062
|
+
'toArray',
|
|
4063
|
+
'toObject',
|
|
4064
|
+
'updateLocale',
|
|
4065
|
+
'utc',
|
|
4066
|
+
'weekOfYear',
|
|
4067
|
+
'weekYear',
|
|
4068
|
+
'weekday'
|
|
4069
|
+
], plugin => {
|
|
4070
|
+
if (window['dayjs_plugin_' + plugin]) {
|
|
4071
|
+
dayjs.extend(window['dayjs_plugin_' + plugin]);
|
|
4072
|
+
}
|
|
4073
|
+
});
|
|
3505
4074
|
}
|
|
4075
|
+
/* The server's path (difference between the host and the current dir */
|
|
3506
4076
|
if (typeof (cfg) === 'object') {
|
|
3507
4077
|
(0, extend_7.extend)(true, window.bbn, cfg);
|
|
3508
4078
|
}
|
|
3509
4079
|
bbn.env.path = (0, substr_11.substr)(bbn.env.url, bbn.env.root.length);
|
|
3510
4080
|
parts = bbn.env.path.split("/");
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
4081
|
+
//$.each(parts, function(i, v){
|
|
4082
|
+
(0, each_18.each)(parts, (v, i) => {
|
|
4083
|
+
v = decodeURI(v.trim());
|
|
4084
|
+
if (v !== "") {
|
|
4085
|
+
bbn.env.params.push(v);
|
|
4086
|
+
}
|
|
4087
|
+
});
|
|
4088
|
+
if (bbn.var.colors) {
|
|
4089
|
+
(0, addColors_1.addColors)(bbn.var.colors);
|
|
3516
4090
|
}
|
|
3517
4091
|
if (bbn.env.lang && (undefined !== dayjs)) {
|
|
3518
4092
|
dayjs.locale(bbn.env.lang);
|
|
3519
4093
|
}
|
|
3520
|
-
window.onfocus = () => {
|
|
3521
|
-
|
|
4094
|
+
window.onfocus = () => {
|
|
4095
|
+
bbn.env.isFocused = true;
|
|
4096
|
+
};
|
|
4097
|
+
window.onblur = () => {
|
|
4098
|
+
bbn.env.isFocused = false;
|
|
4099
|
+
bbn.env.timeoff = Math.round((new Date()).getTime() / 1000);
|
|
4100
|
+
};
|
|
3522
4101
|
document.addEventListener("focusin", e => {
|
|
3523
4102
|
if (!e.target.classList.contains('bbn-no')) {
|
|
3524
4103
|
bbn.env.focused = e.target;
|
|
@@ -3553,10 +4132,20 @@
|
|
|
3553
4132
|
return false;
|
|
3554
4133
|
}
|
|
3555
4134
|
});
|
|
3556
|
-
(0, each_18.each)(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"), (ele, i) => {
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
4135
|
+
(0, each_18.each)(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"), (ele, i) => {
|
|
4136
|
+
ele.addEventListener("submit", e => {
|
|
4137
|
+
(0, submit_1.submit)(ele, e);
|
|
4138
|
+
});
|
|
4139
|
+
});
|
|
4140
|
+
window.addEventListener('hashchange', () => {
|
|
4141
|
+
bbn.env.hashChanged = (new Date()).getTime();
|
|
4142
|
+
}, false);
|
|
4143
|
+
window.addEventListener("resize", () => {
|
|
4144
|
+
(0, resize_1.resize)();
|
|
4145
|
+
});
|
|
4146
|
+
window.addEventListener("orientationchange", () => {
|
|
4147
|
+
(0, resize_1.resize)();
|
|
4148
|
+
});
|
|
3560
4149
|
(0, resize_1.resize)();
|
|
3561
4150
|
if ((0, isMobile_1.isMobile)()) {
|
|
3562
4151
|
document.body.classList.add('bbn-mobile');
|
|
@@ -3568,12 +4157,14 @@
|
|
|
3568
4157
|
window.onpopstate = function (e) {
|
|
3569
4158
|
let h = window.history;
|
|
3570
4159
|
if (!bbn.env.historyDisabled && h) {
|
|
4160
|
+
//e.preventDefault();
|
|
3571
4161
|
let state = h.state;
|
|
3572
4162
|
if (state) {
|
|
3573
4163
|
if ((0, defaultHistoryFunction_1.defaultHistoryFunction)(state)) {
|
|
4164
|
+
//link(substr(state.url, bbn.env.root.length), $.extend({title: state.title}, state.data));
|
|
3574
4165
|
(0, link_1.link)(state.url, (0, extend_7.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
|
|
3575
4166
|
}
|
|
3576
|
-
else if (state && state.data && (0,
|
|
4167
|
+
else if (state && state.data && (0, isFunction_12.isFunction)(state.data.script)) {
|
|
3577
4168
|
state.data.script();
|
|
3578
4169
|
}
|
|
3579
4170
|
}
|
|
@@ -3583,7 +4174,7 @@
|
|
|
3583
4174
|
bbn.env.isInit = true;
|
|
3584
4175
|
document.dispatchEvent(new Event('bbninit'));
|
|
3585
4176
|
if (bbn.env.logging) {
|
|
3586
|
-
(0,
|
|
4177
|
+
(0, log_18.log)("Logging in bbn is enabled");
|
|
3587
4178
|
}
|
|
3588
4179
|
}
|
|
3589
4180
|
};
|
|
@@ -3606,10 +4197,10 @@
|
|
|
3606
4197
|
"use strict";
|
|
3607
4198
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3608
4199
|
exports.isBoolean = void 0;
|
|
3609
|
-
const isBoolean = function () {
|
|
3610
|
-
if (!
|
|
4200
|
+
const isBoolean = function (...args) {
|
|
4201
|
+
if (!args.length)
|
|
3611
4202
|
return false;
|
|
3612
|
-
for (let a of
|
|
4203
|
+
for (let a of args) {
|
|
3613
4204
|
if (![true, false].includes(a)) {
|
|
3614
4205
|
return false;
|
|
3615
4206
|
}
|
|
@@ -3635,10 +4226,10 @@
|
|
|
3635
4226
|
"use strict";
|
|
3636
4227
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3637
4228
|
exports.isComment = void 0;
|
|
3638
|
-
const isComment = function () {
|
|
3639
|
-
if (!
|
|
4229
|
+
const isComment = function (...args) {
|
|
4230
|
+
if (!args.length)
|
|
3640
4231
|
return false;
|
|
3641
|
-
for (let a of
|
|
4232
|
+
for (let a of args) {
|
|
3642
4233
|
if (!(a instanceof Comment)) {
|
|
3643
4234
|
return false;
|
|
3644
4235
|
}
|
|
@@ -3651,7 +4242,9 @@
|
|
|
3651
4242
|
"use strict";
|
|
3652
4243
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3653
4244
|
exports.isDesktopDevice = void 0;
|
|
3654
|
-
const isDesktopDevice = function () {
|
|
4245
|
+
const isDesktopDevice = function () {
|
|
4246
|
+
return this.getDeviceType() === 'desktop';
|
|
4247
|
+
};
|
|
3655
4248
|
exports.isDesktopDevice = isDesktopDevice;
|
|
3656
4249
|
});
|
|
3657
4250
|
define("fn/isValidDimension", ["require", "exports", "fn/substr"], function (require, exports, substr_12) {
|
|
@@ -3659,7 +4252,9 @@
|
|
|
3659
4252
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3660
4253
|
exports.isValidDimension = void 0;
|
|
3661
4254
|
const isValidDimension = function (st) {
|
|
3662
|
-
if ((typeof (st) === 'string') &&
|
|
4255
|
+
if ((typeof (st) === 'string') &&
|
|
4256
|
+
(st.length > 0) && ((st.indexOf('calc') === 0) ||
|
|
4257
|
+
(!isNaN((0, substr_12.substr)(st, 0, 1))))) {
|
|
3663
4258
|
let el = document.createElement('div');
|
|
3664
4259
|
el.style.width = st;
|
|
3665
4260
|
let res = !!el.style.width.length;
|
|
@@ -3699,10 +4294,10 @@
|
|
|
3699
4294
|
"use strict";
|
|
3700
4295
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3701
4296
|
exports.isEvent = void 0;
|
|
3702
|
-
const isEvent = function () {
|
|
3703
|
-
if (!
|
|
4297
|
+
const isEvent = function (...args) {
|
|
4298
|
+
if (!args.length)
|
|
3704
4299
|
return false;
|
|
3705
|
-
for (let a of
|
|
4300
|
+
for (let a of args) {
|
|
3706
4301
|
if (!(a instanceof Event)) {
|
|
3707
4302
|
return false;
|
|
3708
4303
|
}
|
|
@@ -3715,29 +4310,43 @@
|
|
|
3715
4310
|
"use strict";
|
|
3716
4311
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3717
4312
|
exports.isFocused = void 0;
|
|
3718
|
-
const isFocused = function (ele, contain) {
|
|
4313
|
+
const isFocused = function (ele, contain) {
|
|
4314
|
+
return (ele === document.activeElement) || (contain && ele.contains && (ele.contains(document.activeElement)));
|
|
4315
|
+
};
|
|
3719
4316
|
exports.isFocused = isFocused;
|
|
3720
4317
|
});
|
|
3721
4318
|
define("fn/isIP", ["require", "exports", "fn/isString"], function (require, exports, isString_25) {
|
|
3722
4319
|
"use strict";
|
|
3723
4320
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3724
4321
|
exports.isIP = void 0;
|
|
3725
|
-
const isIP = function (
|
|
3726
|
-
|
|
3727
|
-
|
|
4322
|
+
const isIP = function (...args) {
|
|
4323
|
+
if (!args.length)
|
|
4324
|
+
return false;
|
|
4325
|
+
for (let st of args) {
|
|
4326
|
+
if (!(0, isString_25.isString)(st) || !bbn.var.regexp.ip.test(st)) {
|
|
4327
|
+
return false;
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
return true;
|
|
4331
|
+
};
|
|
3728
4332
|
exports.isIP = isIP;
|
|
3729
4333
|
});
|
|
3730
4334
|
define("fn/isHostname", ["require", "exports", "fn/isString", "fn/isIP"], function (require, exports, isString_26, isIP_1) {
|
|
3731
4335
|
"use strict";
|
|
3732
4336
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3733
4337
|
exports.isHostname = void 0;
|
|
3734
|
-
const isHostname = function (
|
|
3735
|
-
if (
|
|
3736
|
-
|
|
3737
|
-
|
|
4338
|
+
const isHostname = function (...args) {
|
|
4339
|
+
if (!args.length)
|
|
4340
|
+
return false;
|
|
4341
|
+
for (let st of args) {
|
|
4342
|
+
if (!(0, isString_26.isString)(st)) {
|
|
4343
|
+
return false;
|
|
4344
|
+
}
|
|
4345
|
+
if (!(0, isIP_1.isIP)(st) && !bbn.var.regexp.hostname.test(st)) {
|
|
4346
|
+
return false;
|
|
3738
4347
|
}
|
|
3739
|
-
return bbn.vars.regexp.hostname.test(st);
|
|
3740
4348
|
}
|
|
4349
|
+
return true;
|
|
3741
4350
|
};
|
|
3742
4351
|
exports.isHostname = isHostname;
|
|
3743
4352
|
});
|
|
@@ -3750,10 +4359,12 @@
|
|
|
3750
4359
|
if (ancestors.length) {
|
|
3751
4360
|
if ((0, isString_27.isString)(ancestor)) {
|
|
3752
4361
|
let ok = false;
|
|
3753
|
-
(0, each_19.each)(ancestors, a => {
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
4362
|
+
(0, each_19.each)(ancestors, a => {
|
|
4363
|
+
if (a.matches && a.matches(ancestor)) {
|
|
4364
|
+
ok = true;
|
|
4365
|
+
return false;
|
|
4366
|
+
}
|
|
4367
|
+
});
|
|
3757
4368
|
return ok;
|
|
3758
4369
|
}
|
|
3759
4370
|
if (ancestor instanceof HTMLElement) {
|
|
@@ -3768,10 +4379,10 @@
|
|
|
3768
4379
|
"use strict";
|
|
3769
4380
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3770
4381
|
exports.isPercent = void 0;
|
|
3771
|
-
const isPercent = function () {
|
|
3772
|
-
if (!
|
|
4382
|
+
const isPercent = function (...args) {
|
|
4383
|
+
if (!args.length)
|
|
3773
4384
|
return false;
|
|
3774
|
-
for (let a of
|
|
4385
|
+
for (let a of args) {
|
|
3775
4386
|
if ((typeof a !== 'string') || !a.match(/^\d+(?:\.\d+)?%$/)) {
|
|
3776
4387
|
return false;
|
|
3777
4388
|
}
|
|
@@ -3784,10 +4395,10 @@
|
|
|
3784
4395
|
"use strict";
|
|
3785
4396
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3786
4397
|
exports.isPrimitive = void 0;
|
|
3787
|
-
const isPrimitive = function () {
|
|
3788
|
-
if (!
|
|
4398
|
+
const isPrimitive = function (...args) {
|
|
4399
|
+
if (!args.length)
|
|
3789
4400
|
return false;
|
|
3790
|
-
for (let a of
|
|
4401
|
+
for (let a of args) {
|
|
3791
4402
|
if ((a !== null) && ((typeof a == "object") || (typeof a == "function"))) {
|
|
3792
4403
|
return false;
|
|
3793
4404
|
}
|
|
@@ -3800,10 +4411,10 @@
|
|
|
3800
4411
|
"use strict";
|
|
3801
4412
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3802
4413
|
exports.isPromise = void 0;
|
|
3803
|
-
const isPromise = function () {
|
|
3804
|
-
if (!
|
|
4414
|
+
const isPromise = function (...args) {
|
|
4415
|
+
if (!args.length)
|
|
3805
4416
|
return false;
|
|
3806
|
-
for (let a of
|
|
4417
|
+
for (let a of args) {
|
|
3807
4418
|
if ({}.toString.apply(a) !== '[object Promise]') {
|
|
3808
4419
|
return false;
|
|
3809
4420
|
}
|
|
@@ -3816,21 +4427,28 @@
|
|
|
3816
4427
|
"use strict";
|
|
3817
4428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3818
4429
|
exports.isPropSize = void 0;
|
|
3819
|
-
const isPropSize = function (name) {
|
|
3820
|
-
isTrue =
|
|
3821
|
-
|
|
3822
|
-
|
|
4430
|
+
const isPropSize = function (name) {
|
|
4431
|
+
let isTrue = false;
|
|
4432
|
+
(0, each_20.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], a => {
|
|
4433
|
+
if (name.indexOf(a) !== -1) {
|
|
4434
|
+
isTrue = true;
|
|
4435
|
+
return false;
|
|
4436
|
+
}
|
|
4437
|
+
});
|
|
4438
|
+
return isTrue;
|
|
4439
|
+
};
|
|
3823
4440
|
exports.isPropSize = isPropSize;
|
|
3824
4441
|
});
|
|
3825
4442
|
define("fn/isSQLDate", ["require", "exports"], function (require, exports) {
|
|
3826
4443
|
"use strict";
|
|
3827
4444
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3828
4445
|
exports.isSQLDate = void 0;
|
|
3829
|
-
const isSQLDate = function () {
|
|
3830
|
-
if (!
|
|
4446
|
+
const isSQLDate = function (...args) {
|
|
4447
|
+
if (!args.length)
|
|
3831
4448
|
return false;
|
|
3832
|
-
for (let a of
|
|
3833
|
-
if ((typeof a !== 'string') ||
|
|
4449
|
+
for (let a of args) {
|
|
4450
|
+
if ((typeof a !== 'string') ||
|
|
4451
|
+
!a.match(/^([1-2]\d{3})-((0[0-9])|(1[12]))-(([0-2][0-9])|(3[01]))(?:( [0-2][0-9]):([0-5][0-9]):([0-5][0-9]))?$/)) {
|
|
3834
4452
|
return false;
|
|
3835
4453
|
}
|
|
3836
4454
|
}
|
|
@@ -3842,10 +4460,10 @@
|
|
|
3842
4460
|
"use strict";
|
|
3843
4461
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3844
4462
|
exports.isSymbol = void 0;
|
|
3845
|
-
const isSymbol = function () {
|
|
3846
|
-
if (!
|
|
4463
|
+
const isSymbol = function (...args) {
|
|
4464
|
+
if (!args.length)
|
|
3847
4465
|
return false;
|
|
3848
|
-
for (let a of
|
|
4466
|
+
for (let a of args) {
|
|
3849
4467
|
if ({}.toString.apply(a) !== '[object Symbol]') {
|
|
3850
4468
|
return false;
|
|
3851
4469
|
}
|
|
@@ -3858,18 +4476,27 @@
|
|
|
3858
4476
|
"use strict";
|
|
3859
4477
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3860
4478
|
exports.isURL = void 0;
|
|
3861
|
-
const isURL = function (
|
|
4479
|
+
const isURL = function (...args) {
|
|
4480
|
+
if (!args.length)
|
|
4481
|
+
return false;
|
|
4482
|
+
for (let str of args) {
|
|
4483
|
+
if (!bbn.var.regexp.url.test(str)) {
|
|
4484
|
+
return false;
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
return true;
|
|
4488
|
+
};
|
|
3862
4489
|
exports.isURL = isURL;
|
|
3863
4490
|
});
|
|
3864
4491
|
define("fn/isValidName", ["require", "exports", "fn/isString"], function (require, exports, isString_28) {
|
|
3865
4492
|
"use strict";
|
|
3866
4493
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3867
4494
|
exports.isValidName = void 0;
|
|
3868
|
-
const isValidName = function (
|
|
3869
|
-
if (!
|
|
4495
|
+
const isValidName = function (...args) {
|
|
4496
|
+
if (!args.length) {
|
|
3870
4497
|
return false;
|
|
3871
4498
|
}
|
|
3872
|
-
for (let arg of
|
|
4499
|
+
for (let arg of args) {
|
|
3873
4500
|
if (!(0, isString_28.isString)(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
|
|
3874
4501
|
return false;
|
|
3875
4502
|
}
|
|
@@ -3882,20 +4509,20 @@
|
|
|
3882
4509
|
"use strict";
|
|
3883
4510
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3884
4511
|
exports.isVue = void 0;
|
|
3885
|
-
const isVue = function () {
|
|
3886
|
-
if (!
|
|
4512
|
+
const isVue = function (...args) {
|
|
4513
|
+
if (!args.length) {
|
|
3887
4514
|
return false;
|
|
3888
4515
|
}
|
|
3889
4516
|
if (Object.hasOwn(bbn, 'vue')) {
|
|
3890
4517
|
if (bbn.vue.app) {
|
|
3891
|
-
for (let a of
|
|
4518
|
+
for (let a of args) {
|
|
3892
4519
|
if (!a || (typeof a.render !== 'function')) {
|
|
3893
4520
|
return false;
|
|
3894
4521
|
}
|
|
3895
4522
|
}
|
|
3896
4523
|
}
|
|
3897
4524
|
else {
|
|
3898
|
-
for (let a of
|
|
4525
|
+
for (let a of args) {
|
|
3899
4526
|
if (!(a instanceof Vue)) {
|
|
3900
4527
|
return false;
|
|
3901
4528
|
}
|
|
@@ -3903,7 +4530,7 @@
|
|
|
3903
4530
|
}
|
|
3904
4531
|
}
|
|
3905
4532
|
if (Object.hasOwn(bbn, 'cp')) {
|
|
3906
|
-
return bbn.cp.isComponent(...
|
|
4533
|
+
return bbn.cp.isComponent(...args);
|
|
3907
4534
|
}
|
|
3908
4535
|
return true;
|
|
3909
4536
|
};
|
|
@@ -3941,14 +4568,23 @@
|
|
|
3941
4568
|
};
|
|
3942
4569
|
exports.lightenDarkenHex = lightenDarkenHex;
|
|
3943
4570
|
});
|
|
3944
|
-
define("fn/warning", ["require", "exports", "fn/log"], function (require, exports,
|
|
4571
|
+
define("fn/warning", ["require", "exports", "fn/log"], function (require, exports, log_19) {
|
|
3945
4572
|
"use strict";
|
|
3946
4573
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3947
4574
|
exports.warning = void 0;
|
|
3948
|
-
const warning = function (message) {
|
|
4575
|
+
const warning = function (message) {
|
|
4576
|
+
const args = ["BBN: " + message];
|
|
4577
|
+
args.unshift({
|
|
4578
|
+
_bbn_console_mode: "warn",
|
|
4579
|
+
_bbn_console_level: 2,
|
|
4580
|
+
_bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
|
|
4581
|
+
});
|
|
4582
|
+
log_19.log.apply(this, args);
|
|
4583
|
+
return this;
|
|
4584
|
+
};
|
|
3949
4585
|
exports.warning = warning;
|
|
3950
4586
|
});
|
|
3951
|
-
define("fn/makeReactive", ["require", "exports", "fn/log", "fn/createObject", "fn/isSymbol", "fn/isNumber", "fn/isArray", "fn/warning", "fn/isFunction", "fn/isSame"], function (require, exports,
|
|
4587
|
+
define("fn/makeReactive", ["require", "exports", "fn/log", "fn/createObject", "fn/isSymbol", "fn/isNumber", "fn/isArray", "fn/warning", "fn/isFunction", "fn/isSame"], function (require, exports, log_20, createObject_2, isSymbol_1, isNumber_7, isArray_13, warning_1, isFunction_13, isSame_2) {
|
|
3952
4588
|
"use strict";
|
|
3953
4589
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3954
4590
|
exports.makeReactive = void 0;
|
|
@@ -3960,12 +4596,18 @@
|
|
|
3960
4596
|
return obj;
|
|
3961
4597
|
}
|
|
3962
4598
|
if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
|
|
3963
|
-
(0,
|
|
4599
|
+
(0, log_20.log)(["MAKING bbn-loadbar", obj]);
|
|
3964
4600
|
}
|
|
3965
4601
|
if (!obj.__bbnWatchers) {
|
|
3966
|
-
Reflect.defineProperty(obj, '__bbnWatchers', {
|
|
4602
|
+
Reflect.defineProperty(obj, '__bbnWatchers', {
|
|
4603
|
+
value: (0, createObject_2.createObject)(),
|
|
4604
|
+
writable: true,
|
|
4605
|
+
configurable: true,
|
|
4606
|
+
enumerable: false
|
|
4607
|
+
});
|
|
3967
4608
|
}
|
|
3968
|
-
const handler = {
|
|
4609
|
+
const handler = {
|
|
4610
|
+
get(target, key) {
|
|
3969
4611
|
const realValue = Reflect.get(target, key);
|
|
3970
4612
|
const realTarget = target.__bbnRoot || target;
|
|
3971
4613
|
if ((0, isSymbol_1.isSymbol)(key)) {
|
|
@@ -3974,9 +4616,15 @@
|
|
|
3974
4616
|
const propName = parentProp ? parentProp + '.' + key : key;
|
|
3975
4617
|
const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
|
|
3976
4618
|
if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) && (0, isArray_13.isArray)(target)) {
|
|
3977
|
-
return function (...args) {
|
|
4619
|
+
return function (...args) {
|
|
4620
|
+
let res = realTarget[key](...args);
|
|
4621
|
+
(0, warning_1.warning)("DOING ARRAY STUFF");
|
|
4622
|
+
(0, log_20.log)(target.__bbnParent);
|
|
4623
|
+
onSet(target, 'length', parent);
|
|
4624
|
+
return res;
|
|
4625
|
+
};
|
|
3978
4626
|
}
|
|
3979
|
-
if ((0,
|
|
4627
|
+
if ((0, isFunction_13.isFunction)(realValue)) {
|
|
3980
4628
|
return realValue;
|
|
3981
4629
|
}
|
|
3982
4630
|
if (key === '__bbnRoot') {
|
|
@@ -4012,7 +4660,12 @@
|
|
|
4012
4660
|
return realTarget[hiddenKey];
|
|
4013
4661
|
}
|
|
4014
4662
|
if (!Object.hasOwn(realTarget, hiddenKey)) {
|
|
4015
|
-
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4663
|
+
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4664
|
+
value: makeReactive(realValue, onSet, parent, propName),
|
|
4665
|
+
writable: true,
|
|
4666
|
+
configurable: true,
|
|
4667
|
+
enumerable: false
|
|
4668
|
+
});
|
|
4016
4669
|
}
|
|
4017
4670
|
if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
|
|
4018
4671
|
realTarget.__bbnWatchers[parentString] = propName;
|
|
@@ -4020,7 +4673,8 @@
|
|
|
4020
4673
|
return realTarget[hiddenKey];
|
|
4021
4674
|
}
|
|
4022
4675
|
return realValue;
|
|
4023
|
-
},
|
|
4676
|
+
},
|
|
4677
|
+
set(target, key, value) {
|
|
4024
4678
|
if ((0, isSymbol_1.isSymbol)(key)) {
|
|
4025
4679
|
return Reflect.get(target, key, value);
|
|
4026
4680
|
}
|
|
@@ -4030,29 +4684,40 @@
|
|
|
4030
4684
|
return Reflect.get(target, key);
|
|
4031
4685
|
}
|
|
4032
4686
|
if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
|
|
4033
|
-
(0,
|
|
4687
|
+
(0, log_20.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
|
|
4034
4688
|
}
|
|
4035
4689
|
if (!(0, isSame_2.isSame)(realTarget[key], value)) {
|
|
4036
4690
|
if (key.indexOf('__bbn_') === 0) {
|
|
4037
|
-
Reflect.defineProperty(realTarget, key, {
|
|
4691
|
+
Reflect.defineProperty(realTarget, key, {
|
|
4692
|
+
value: makeReactive(value, onSet, parent, propName),
|
|
4693
|
+
writable: true,
|
|
4694
|
+
configurable: true,
|
|
4695
|
+
enumerable: false
|
|
4696
|
+
});
|
|
4038
4697
|
}
|
|
4039
4698
|
else {
|
|
4040
4699
|
if (value && (typeof value === 'object') && [undefined, Object, Array].includes(value.constructor)) {
|
|
4041
4700
|
const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
|
|
4042
|
-
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4701
|
+
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4702
|
+
value: makeReactive(value, onSet, parent, propName),
|
|
4703
|
+
writable: true,
|
|
4704
|
+
configurable: true,
|
|
4705
|
+
enumerable: false
|
|
4706
|
+
});
|
|
4043
4707
|
if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
|
|
4044
4708
|
realTarget.__bbnWatchers[parentString] = propName;
|
|
4045
4709
|
}
|
|
4046
4710
|
}
|
|
4047
4711
|
}
|
|
4048
4712
|
if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
|
|
4049
|
-
(0,
|
|
4713
|
+
(0, log_20.log)(['Setting proxy prop in ' + parent.$options.name + ' ' + ((0, isNumber_7.isNumber)(key) ? key.toString() : key), value, target]);
|
|
4050
4714
|
}
|
|
4051
4715
|
Reflect.set(realTarget, key, value);
|
|
4052
4716
|
onSet(target, key, parent);
|
|
4053
4717
|
}
|
|
4054
4718
|
return true;
|
|
4055
|
-
},
|
|
4719
|
+
},
|
|
4720
|
+
defineProperty(target, key, description) {
|
|
4056
4721
|
const realTarget = target;
|
|
4057
4722
|
const propName = parentProp ? parentProp + '.' + key : key;
|
|
4058
4723
|
if ((key === '__bbnWatchers') || (0, isSymbol_1.isSymbol)(key) || (key.indexOf('__bbn_') === 0)) {
|
|
@@ -4060,11 +4725,17 @@
|
|
|
4060
4725
|
}
|
|
4061
4726
|
else {
|
|
4062
4727
|
const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
|
|
4063
|
-
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4728
|
+
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4729
|
+
value: makeReactive(description.value, onSet, parent, propName),
|
|
4730
|
+
writable: true,
|
|
4731
|
+
configurable: true,
|
|
4732
|
+
enumerable: false
|
|
4733
|
+
});
|
|
4064
4734
|
}
|
|
4065
4735
|
onSet(target, key, parent);
|
|
4066
4736
|
return true;
|
|
4067
|
-
},
|
|
4737
|
+
},
|
|
4738
|
+
deleteProperty(target, key) {
|
|
4068
4739
|
const realTarget = target;
|
|
4069
4740
|
if (key.indexOf('__bbn_') === 0) {
|
|
4070
4741
|
Reflect.deleteProperty(realTarget, key);
|
|
@@ -4075,7 +4746,8 @@
|
|
|
4075
4746
|
Reflect.deleteProperty(target, key);
|
|
4076
4747
|
}
|
|
4077
4748
|
return true;
|
|
4078
|
-
}
|
|
4749
|
+
}
|
|
4750
|
+
};
|
|
4079
4751
|
return (new Proxy(obj, handler));
|
|
4080
4752
|
}
|
|
4081
4753
|
return obj;
|
|
@@ -4102,6 +4774,32 @@
|
|
|
4102
4774
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4103
4775
|
exports.money = void 0;
|
|
4104
4776
|
const money = function (val, kilo, currency, novalue, decimal, thousands, precision) {
|
|
4777
|
+
/*
|
|
4778
|
+
money(val, kilo){
|
|
4779
|
+
let decimal = ',',
|
|
4780
|
+
currency = '€',
|
|
4781
|
+
thousands = ' ';
|
|
4782
|
+
if ( (isNaN(val) || !val) ){
|
|
4783
|
+
return '-';
|
|
4784
|
+
}
|
|
4785
|
+
if ( isNaN(val) || !val ){
|
|
4786
|
+
return 0;
|
|
4787
|
+
}
|
|
4788
|
+
if ( kilo && val ){
|
|
4789
|
+
val = val / 1000;
|
|
4790
|
+
if ( currency ){
|
|
4791
|
+
currency = 'K' + currency;
|
|
4792
|
+
}
|
|
4793
|
+
}
|
|
4794
|
+
return parseFloat(val).toFixed(0).replace(/./g, function(c, i, a) {
|
|
4795
|
+
if ( c === '.' ){
|
|
4796
|
+
return decimal;
|
|
4797
|
+
}
|
|
4798
|
+
return i && ((a.length - i) % 3 === 0) ? thousands + c : c;
|
|
4799
|
+
}) + ( currency ? ' ' + currency : '');
|
|
4800
|
+
},
|
|
4801
|
+
|
|
4802
|
+
*/
|
|
4105
4803
|
if (!decimal) {
|
|
4106
4804
|
decimal = (decimal === undefined) && bbn.env.money && (bbn.env.money.decimal !== undefined) ? bbn.env.money.decimal : '.';
|
|
4107
4805
|
}
|
|
@@ -4209,7 +4907,9 @@
|
|
|
4209
4907
|
"use strict";
|
|
4210
4908
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4211
4909
|
exports.nl2br = void 0;
|
|
4212
|
-
const nl2br = function (st, keepNl) {
|
|
4910
|
+
const nl2br = function (st, keepNl) {
|
|
4911
|
+
return (0, replaceAll_5.replaceAll)("\n", "<br>" + (keepNl ? "\n" : ""), st);
|
|
4912
|
+
};
|
|
4213
4913
|
exports.nl2br = nl2br;
|
|
4214
4914
|
});
|
|
4215
4915
|
define("fn/objectToFormData", ["require", "exports", "fn/isArray", "fn/each", "fn/isObject", "fn/iterate", "fn/isNull"], function (require, exports, isArray_15, each_21, isObject_18, iterate_8, isNull_3) {
|
|
@@ -4224,12 +4924,16 @@
|
|
|
4224
4924
|
formData.append(key, data);
|
|
4225
4925
|
}
|
|
4226
4926
|
else if ((0, isArray_15.isArray)(data)) {
|
|
4227
|
-
(0, each_21.each)(data, (v, i) => {
|
|
4927
|
+
(0, each_21.each)(data, (v, i) => {
|
|
4928
|
+
appendFormData(v, key + '[' + i + ']');
|
|
4929
|
+
});
|
|
4228
4930
|
}
|
|
4229
4931
|
else if ((0, isObject_18.isObject)(data) && Object.keys(data).length) {
|
|
4230
|
-
(0, iterate_8.iterate)(data, (v, i) => {
|
|
4231
|
-
|
|
4232
|
-
|
|
4932
|
+
(0, iterate_8.iterate)(data, (v, i) => {
|
|
4933
|
+
if (Object.hasOwn(data, i)) {
|
|
4934
|
+
appendFormData(v, !key ? i : key + '[' + i + ']');
|
|
4935
|
+
}
|
|
4936
|
+
});
|
|
4233
4937
|
}
|
|
4234
4938
|
else {
|
|
4235
4939
|
if (!(0, isNull_3.isNull)(data) && (data !== undefined)) {
|
|
@@ -4249,7 +4953,9 @@
|
|
|
4249
4953
|
exports.order = void 0;
|
|
4250
4954
|
const order = function (arr, prop, dir = 'asc') {
|
|
4251
4955
|
if (arr) {
|
|
4252
|
-
return arr.sort(function (a, b) {
|
|
4956
|
+
return arr.sort(function (a, b) {
|
|
4957
|
+
return (0, _compareValues_2._compareValues)(a, b, prop, dir);
|
|
4958
|
+
});
|
|
4253
4959
|
}
|
|
4254
4960
|
return arr;
|
|
4255
4961
|
};
|
|
@@ -4259,7 +4965,9 @@
|
|
|
4259
4965
|
"use strict";
|
|
4260
4966
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4261
4967
|
exports.selector = void 0;
|
|
4262
|
-
const selector = function (ele) {
|
|
4968
|
+
const selector = function (ele) {
|
|
4969
|
+
return (typeof el === 'string') ? document.querySelector(ele) : ele;
|
|
4970
|
+
};
|
|
4263
4971
|
exports.selector = selector;
|
|
4264
4972
|
});
|
|
4265
4973
|
define("fn/outerHeight", ["require", "exports", "fn/selector"], function (require, exports, selector_1) {
|
|
@@ -4292,16 +5000,20 @@
|
|
|
4292
5000
|
"use strict";
|
|
4293
5001
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4294
5002
|
exports.percent = void 0;
|
|
4295
|
-
const percent = function (percent, cent) {
|
|
5003
|
+
const percent = function (percent, cent) {
|
|
5004
|
+
return (cent / 100) * percent;
|
|
5005
|
+
};
|
|
4296
5006
|
exports.percent = percent;
|
|
4297
5007
|
});
|
|
4298
5008
|
define("fn/pickValue", ["require", "exports"], function (require, exports) {
|
|
4299
5009
|
"use strict";
|
|
4300
5010
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4301
5011
|
exports.pickValue = void 0;
|
|
4302
|
-
const pickValue = function (arr) {
|
|
4303
|
-
|
|
4304
|
-
|
|
5012
|
+
const pickValue = function (arr) {
|
|
5013
|
+
if (Array.isArray(arr) && arr.length) {
|
|
5014
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
5015
|
+
}
|
|
5016
|
+
};
|
|
4305
5017
|
exports.pickValue = pickValue;
|
|
4306
5018
|
});
|
|
4307
5019
|
define("fn/postOut", ["require", "exports", "fn/createObject", "fn/addInputs"], function (require, exports, createObject_3, addInputs_1) {
|
|
@@ -4341,7 +5053,14 @@
|
|
|
4341
5053
|
"use strict";
|
|
4342
5054
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4343
5055
|
exports.printf = void 0;
|
|
4344
|
-
const printf = function (format) {
|
|
5056
|
+
const printf = function (format) {
|
|
5057
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
5058
|
+
return format.replace(/{(\d+)}/g, function (match, number) {
|
|
5059
|
+
return typeof args[number] != 'undefined'
|
|
5060
|
+
? args[number]
|
|
5061
|
+
: match;
|
|
5062
|
+
});
|
|
5063
|
+
};
|
|
4345
5064
|
exports.printf = printf;
|
|
4346
5065
|
});
|
|
4347
5066
|
define("fn/quotes2html", ["require", "exports", "fn/replaceAll"], function (require, exports, replaceAll_6) {
|
|
@@ -4363,7 +5082,9 @@
|
|
|
4363
5082
|
"use strict";
|
|
4364
5083
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4365
5084
|
exports.randomInt = void 0;
|
|
4366
|
-
const randomInt = function (min, max) {
|
|
5085
|
+
const randomInt = function (min, max) {
|
|
5086
|
+
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
5087
|
+
};
|
|
4367
5088
|
exports.randomInt = randomInt;
|
|
4368
5089
|
});
|
|
4369
5090
|
define("fn/randomString", ["require", "exports", "fn/randomInt", "fn/isString"], function (require, exports, randomInt_1, isString_29) {
|
|
@@ -4371,7 +5092,11 @@
|
|
|
4371
5092
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4372
5093
|
exports.randomString = void 0;
|
|
4373
5094
|
const randomString = function (min, max, types) {
|
|
4374
|
-
let length, type, chars = {
|
|
5095
|
+
let length, type, chars = {
|
|
5096
|
+
n: '0123456789',
|
|
5097
|
+
l: 'abcdefghijklmnopqrstuvwxyz',
|
|
5098
|
+
u: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
|
5099
|
+
};
|
|
4375
5100
|
if (!types) {
|
|
4376
5101
|
types = 'nlu';
|
|
4377
5102
|
}
|
|
@@ -4380,7 +5105,9 @@
|
|
|
4380
5105
|
}
|
|
4381
5106
|
if ((0, isString_29.isString)(max)) {
|
|
4382
5107
|
types = 'n';
|
|
4383
|
-
chars = {
|
|
5108
|
+
chars = {
|
|
5109
|
+
n: max
|
|
5110
|
+
};
|
|
4384
5111
|
if (!length) {
|
|
4385
5112
|
length = min;
|
|
4386
5113
|
}
|
|
@@ -4393,6 +5120,7 @@
|
|
|
4393
5120
|
}
|
|
4394
5121
|
let result = '';
|
|
4395
5122
|
for (let i = 0; i < length; i++) {
|
|
5123
|
+
// Not a number for the first char
|
|
4396
5124
|
if (i === 0) {
|
|
4397
5125
|
if (types !== 'n') {
|
|
4398
5126
|
type = types.indexOf('u') === -1 ? 'l' : 'u';
|
|
@@ -4407,7 +5135,7 @@
|
|
|
4407
5135
|
};
|
|
4408
5136
|
exports.randomString = randomString;
|
|
4409
5137
|
});
|
|
4410
|
-
define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_19,
|
|
5138
|
+
define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_19, numProperties_8) {
|
|
4411
5139
|
"use strict";
|
|
4412
5140
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4413
5141
|
exports.removeEmpty = void 0;
|
|
@@ -4423,7 +5151,7 @@
|
|
|
4423
5151
|
}
|
|
4424
5152
|
}
|
|
4425
5153
|
else if ((0, isObject_19.isObject)(arr[i])) {
|
|
4426
|
-
if ((0,
|
|
5154
|
+
if ((0, numProperties_8.numProperties)(arr[i])) {
|
|
4427
5155
|
ok = true;
|
|
4428
5156
|
}
|
|
4429
5157
|
}
|
|
@@ -4444,7 +5172,9 @@
|
|
|
4444
5172
|
"use strict";
|
|
4445
5173
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4446
5174
|
exports.removeExtraSpaces = void 0;
|
|
4447
|
-
const removeExtraSpaces = function (str) {
|
|
5175
|
+
const removeExtraSpaces = function (str) {
|
|
5176
|
+
return str.replace(/\s+/g, ' ').trim();
|
|
5177
|
+
};
|
|
4448
5178
|
exports.removeExtraSpaces = removeExtraSpaces;
|
|
4449
5179
|
});
|
|
4450
5180
|
define("fn/removeTrailingChars", ["require", "exports", "fn/substr"], function (require, exports, substr_13) {
|
|
@@ -4471,7 +5201,13 @@
|
|
|
4471
5201
|
"use strict";
|
|
4472
5202
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4473
5203
|
exports.repeat = void 0;
|
|
4474
|
-
const repeat = function (st, num) {
|
|
5204
|
+
const repeat = function (st, num) {
|
|
5205
|
+
let res = '';
|
|
5206
|
+
(0, iterate_9.iterate)(num, () => {
|
|
5207
|
+
res += st;
|
|
5208
|
+
});
|
|
5209
|
+
return res;
|
|
5210
|
+
};
|
|
4475
5211
|
exports.repeat = repeat;
|
|
4476
5212
|
});
|
|
4477
5213
|
define("fn/replaceSelection", ["require", "exports"], function (require, exports) {
|
|
@@ -4481,13 +5217,19 @@
|
|
|
4481
5217
|
const replaceSelection = function (html, selectInserted) {
|
|
4482
5218
|
let sel, range, fragment;
|
|
4483
5219
|
sel = window.getSelection();
|
|
5220
|
+
// Test that the Selection object contains at least one Range
|
|
4484
5221
|
if (sel.getRangeAt && sel.rangeCount) {
|
|
5222
|
+
// Get the first Range (only Firefox supports more than one)
|
|
4485
5223
|
range = window.getSelection().getRangeAt(0);
|
|
4486
5224
|
range.deleteContents();
|
|
5225
|
+
// Create a DocumentFragment to insert and populate it with HTML
|
|
5226
|
+
// Need to test for the existence of range.createContextualFragment
|
|
5227
|
+
// because it's non-standard and IE 9 does not support it
|
|
4487
5228
|
if (range.createContextualFragment) {
|
|
4488
5229
|
fragment = range.createContextualFragment(html);
|
|
4489
5230
|
}
|
|
4490
5231
|
else {
|
|
5232
|
+
// In IE 9 we need to use innerHTML of a temporary element
|
|
4491
5233
|
const div = document.createElement("div");
|
|
4492
5234
|
let child;
|
|
4493
5235
|
div.innerHTML = html;
|
|
@@ -4532,14 +5274,18 @@
|
|
|
4532
5274
|
"use strict";
|
|
4533
5275
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4534
5276
|
exports.riterate = void 0;
|
|
4535
|
-
const riterate = function (obj, fn, noPrivate) {
|
|
5277
|
+
const riterate = function (obj, fn, noPrivate) {
|
|
5278
|
+
return (0, iterate_10.iterate)(obj, fn, noPrivate, true);
|
|
5279
|
+
};
|
|
4536
5280
|
exports.riterate = riterate;
|
|
4537
5281
|
});
|
|
4538
5282
|
define("fn/roundDecimal", ["require", "exports"], function (require, exports) {
|
|
4539
5283
|
"use strict";
|
|
4540
5284
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4541
5285
|
exports.roundDecimal = void 0;
|
|
4542
|
-
const roundDecimal = function (value, decimals) {
|
|
5286
|
+
const roundDecimal = function (value, decimals) {
|
|
5287
|
+
return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals);
|
|
5288
|
+
};
|
|
4543
5289
|
exports.roundDecimal = roundDecimal;
|
|
4544
5290
|
});
|
|
4545
5291
|
define("fn/trim", ["require", "exports", "fn/substr"], function (require, exports, substr_14) {
|
|
@@ -4646,7 +5392,15 @@
|
|
|
4646
5392
|
"use strict";
|
|
4647
5393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4648
5394
|
exports.setProp = void 0;
|
|
4649
|
-
const setProp = function (obj, prop, value, writable = true, configurable = true) {
|
|
5395
|
+
const setProp = function (obj, prop, value, writable = true, configurable = true) {
|
|
5396
|
+
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
5397
|
+
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
5398
|
+
Object.defineProperty(obj, prop, {
|
|
5399
|
+
value: value,
|
|
5400
|
+
writable: writable,
|
|
5401
|
+
configurable: configurable
|
|
5402
|
+
});
|
|
5403
|
+
};
|
|
4650
5404
|
exports.setProp = setProp;
|
|
4651
5405
|
});
|
|
4652
5406
|
define("fn/setProperty", ["require", "exports", "fn/each"], function (require, exports, each_22) {
|
|
@@ -4682,7 +5436,7 @@
|
|
|
4682
5436
|
const shorten = function (st, len, adj) {
|
|
4683
5437
|
if (typeof (st).toLowerCase() === 'string') {
|
|
4684
5438
|
if (!len) {
|
|
4685
|
-
len = bbn.
|
|
5439
|
+
len = bbn.var.shortenLen;
|
|
4686
5440
|
}
|
|
4687
5441
|
if ((adj === undefined) || !(0, isString_30.isString)(adj)) {
|
|
4688
5442
|
adj = '...';
|
|
@@ -4719,10 +5473,15 @@
|
|
|
4719
5473
|
exports.shuffle = void 0;
|
|
4720
5474
|
const shuffle = function (array) {
|
|
4721
5475
|
let currentIndex = array.length, randomIndex;
|
|
5476
|
+
// While there remain elements to shuffle.
|
|
4722
5477
|
while (currentIndex != 0) {
|
|
5478
|
+
// Pick a remaining element.
|
|
4723
5479
|
randomIndex = Math.floor(Math.random() * currentIndex);
|
|
4724
5480
|
currentIndex--;
|
|
4725
|
-
|
|
5481
|
+
// And swap it with the current element.
|
|
5482
|
+
[array[currentIndex], array[randomIndex]] = [
|
|
5483
|
+
array[randomIndex], array[currentIndex]
|
|
5484
|
+
];
|
|
4726
5485
|
}
|
|
4727
5486
|
return array;
|
|
4728
5487
|
};
|
|
@@ -4736,9 +5495,11 @@
|
|
|
4736
5495
|
let now = (new Date()).getTime();
|
|
4737
5496
|
let h1 = 3600 * 1000;
|
|
4738
5497
|
if (_private.length) {
|
|
4739
|
-
(0, each_24.each)(_private, (t, n) => {
|
|
4740
|
-
|
|
4741
|
-
|
|
5498
|
+
(0, each_24.each)(_private, (t, n) => {
|
|
5499
|
+
if (now - t > h1) {
|
|
5500
|
+
delete _private[n];
|
|
5501
|
+
}
|
|
5502
|
+
});
|
|
4742
5503
|
now = (new Date()).getTime();
|
|
4743
5504
|
}
|
|
4744
5505
|
_private[name] = now;
|
|
@@ -4752,7 +5513,7 @@
|
|
|
4752
5513
|
const stat = function (returnStat) {
|
|
4753
5514
|
return;
|
|
4754
5515
|
if (bbn.env.logging) {
|
|
4755
|
-
var logs = bbn.
|
|
5516
|
+
var logs = bbn.var.loggers;
|
|
4756
5517
|
for (var i = 0; i < arguments.length; i++) {
|
|
4757
5518
|
var a = arguments[i], type = typeof (a);
|
|
4758
5519
|
if ((type === 'boolean') || (type === 'undefined')) {
|
|
@@ -4766,7 +5527,9 @@
|
|
|
4766
5527
|
a = a.toString();
|
|
4767
5528
|
}
|
|
4768
5529
|
if (!logs[a]) {
|
|
4769
|
-
logs[a] = {
|
|
5530
|
+
logs[a] = {
|
|
5531
|
+
_num: 0,
|
|
5532
|
+
};
|
|
4770
5533
|
}
|
|
4771
5534
|
logs[a]._num++;
|
|
4772
5535
|
logs = logs[a];
|
|
@@ -4800,11 +5563,13 @@
|
|
|
4800
5563
|
"use strict";
|
|
4801
5564
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4802
5565
|
exports.stopChrono = void 0;
|
|
4803
|
-
const stopChrono = function (name) {
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
5566
|
+
const stopChrono = function (name) {
|
|
5567
|
+
if (_private[name]) {
|
|
5568
|
+
let now = (new Date()).getTime();
|
|
5569
|
+
let diff = now - _private[name];
|
|
5570
|
+
return diff;
|
|
5571
|
+
}
|
|
5572
|
+
};
|
|
4808
5573
|
exports.stopChrono = stopChrono;
|
|
4809
5574
|
});
|
|
4810
5575
|
define("fn/string2ArrayBuffer", ["require", "exports"], function (require, exports) {
|
|
@@ -4812,7 +5577,7 @@
|
|
|
4812
5577
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4813
5578
|
exports.string2ArrayBuffer = void 0;
|
|
4814
5579
|
const string2ArrayBuffer = function (str) {
|
|
4815
|
-
var buf = new ArrayBuffer(str.length * 2);
|
|
5580
|
+
var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
|
|
4816
5581
|
var bufView = new Uint16Array(buf);
|
|
4817
5582
|
for (var i = 0, strLen = str.length; i < strLen; i++) {
|
|
4818
5583
|
bufView[i] = str.charCodeAt(i);
|
|
@@ -4825,16 +5590,27 @@
|
|
|
4825
5590
|
"use strict";
|
|
4826
5591
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4827
5592
|
exports.sum = void 0;
|
|
4828
|
-
const sum = function (arr, numberProp, prop, val, operator) {
|
|
4829
|
-
r
|
|
4830
|
-
|
|
5593
|
+
const sum = function (arr, numberProp, prop, val, operator) {
|
|
5594
|
+
let r = 0;
|
|
5595
|
+
let isFunction = isFunction(numberProp);
|
|
5596
|
+
(0, each_25.each)((0, filter_5.filter)(arr, prop, val, operator), (a) => {
|
|
5597
|
+
let tmp = isFunction ? numberProp(a) : a[numberProp];
|
|
5598
|
+
if (tmp) {
|
|
5599
|
+
r += (parseFloat(tmp) || 0);
|
|
5600
|
+
}
|
|
5601
|
+
});
|
|
5602
|
+
return r;
|
|
5603
|
+
};
|
|
4831
5604
|
exports.sum = sum;
|
|
4832
5605
|
});
|
|
4833
5606
|
define("fn/timestamp", ["require", "exports"], function (require, exports) {
|
|
4834
5607
|
"use strict";
|
|
4835
5608
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4836
5609
|
exports.timestamp = void 0;
|
|
4837
|
-
const timestamp = function (seconds) {
|
|
5610
|
+
const timestamp = function (seconds) {
|
|
5611
|
+
var r = (new Date()).getTime();
|
|
5612
|
+
return seconds ? Math.round(r / 1000) : r;
|
|
5613
|
+
};
|
|
4838
5614
|
exports.timestamp = timestamp;
|
|
4839
5615
|
});
|
|
4840
5616
|
define("fn/toCSV", ["require", "exports", "fn/each", "fn/isArray", "fn/replaceAll"], function (require, exports, each_26, isArray_17, replaceAll_7) {
|
|
@@ -4916,7 +5692,9 @@
|
|
|
4916
5692
|
window.document.documentElement.requestFullscreen();
|
|
4917
5693
|
}
|
|
4918
5694
|
}
|
|
4919
|
-
setTimeout(function () {
|
|
5695
|
+
setTimeout(function () {
|
|
5696
|
+
(0, resize_2.resize)();
|
|
5697
|
+
}, 0);
|
|
4920
5698
|
};
|
|
4921
5699
|
exports.toggleFullScreen = toggleFullScreen;
|
|
4922
5700
|
});
|
|
@@ -4924,73 +5702,92 @@
|
|
|
4924
5702
|
"use strict";
|
|
4925
5703
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4926
5704
|
exports.translate = void 0;
|
|
4927
|
-
const translate = function (o, namespace) {
|
|
5705
|
+
const translate = function (o, namespace) {
|
|
5706
|
+
let lng = namespace ? bbn.lng[namespace.indexOf('_') === 0 ? namespace : '_' + namespace] : bbn.lng;
|
|
5707
|
+
(0, iterate_11.iterate)(o, (v, k) => {
|
|
5708
|
+
lng[k] = v;
|
|
5709
|
+
});
|
|
5710
|
+
};
|
|
4928
5711
|
exports.translate = translate;
|
|
4929
5712
|
});
|
|
4930
5713
|
define("fn/uniqString", ["require", "exports", "fn/isArray", "fn/each", "fn/md5"], function (require, exports, isArray_18, each_27, md5_3) {
|
|
4931
5714
|
"use strict";
|
|
4932
5715
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4933
5716
|
exports.uniqString = void 0;
|
|
4934
|
-
const uniqString = function () {
|
|
5717
|
+
const uniqString = function (...args) {
|
|
4935
5718
|
var st = '';
|
|
4936
|
-
for (var i = 0; i <
|
|
4937
|
-
if (!
|
|
5719
|
+
for (var i = 0; i < args.length; i++) {
|
|
5720
|
+
if (!args[i]) {
|
|
4938
5721
|
st += '__bbn_empty__';
|
|
4939
5722
|
}
|
|
4940
|
-
else if (typeof (
|
|
4941
|
-
if ((0, isArray_18.isArray)(
|
|
4942
|
-
st += JSON.stringify(
|
|
5723
|
+
else if (typeof (args[i]) === 'object') {
|
|
5724
|
+
if ((0, isArray_18.isArray)(args[i])) {
|
|
5725
|
+
st += JSON.stringify(args[i]);
|
|
4943
5726
|
}
|
|
4944
5727
|
else {
|
|
5728
|
+
// An object with the same properties, even in different order, should produce the same answer
|
|
4945
5729
|
let tmp = {};
|
|
4946
|
-
let ks = Object.keys(
|
|
4947
|
-
(0, each_27.each)(ks, k => {
|
|
5730
|
+
let ks = Object.keys(args[i]).sort();
|
|
5731
|
+
(0, each_27.each)(ks, k => {
|
|
5732
|
+
tmp[k] = args[i][k];
|
|
5733
|
+
});
|
|
4948
5734
|
st += JSON.stringify(tmp);
|
|
4949
5735
|
}
|
|
4950
5736
|
}
|
|
4951
|
-
else if (typeof (
|
|
4952
|
-
st +=
|
|
5737
|
+
else if (typeof (args[i]) !== 'string') {
|
|
5738
|
+
st += args[i].toString();
|
|
4953
5739
|
}
|
|
4954
5740
|
else {
|
|
4955
|
-
st +=
|
|
5741
|
+
st += args[i];
|
|
4956
5742
|
}
|
|
4957
5743
|
}
|
|
4958
5744
|
return (0, md5_3.md5)(st);
|
|
4959
5745
|
};
|
|
4960
5746
|
exports.uniqString = uniqString;
|
|
4961
5747
|
});
|
|
4962
|
-
define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1,
|
|
5748
|
+
define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1, log_21) {
|
|
4963
5749
|
"use strict";
|
|
4964
5750
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4965
5751
|
exports.upload = void 0;
|
|
4966
5752
|
const upload = function (url, file, success, failure, progress) {
|
|
4967
5753
|
let fn = () => {
|
|
4968
|
-
return axios.post(url || bbn.env.path, (0, objectToFormData_1.objectToFormData)(file), {
|
|
5754
|
+
return axios.post(url || bbn.env.path, (0, objectToFormData_1.objectToFormData)(file), {
|
|
5755
|
+
headers: {
|
|
5756
|
+
'Content-Type': 'multipart/form-data'
|
|
5757
|
+
},
|
|
5758
|
+
onUploadProgress(progressEvent) {
|
|
4969
5759
|
if (progress) {
|
|
4970
5760
|
let percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
|
|
4971
5761
|
progress(percentCompleted, progressEvent.loaded, progressEvent.total);
|
|
4972
5762
|
}
|
|
4973
|
-
}
|
|
5763
|
+
}
|
|
5764
|
+
});
|
|
4974
5765
|
};
|
|
4975
5766
|
if (!success && !failure) {
|
|
4976
5767
|
return fn();
|
|
4977
5768
|
}
|
|
4978
5769
|
else {
|
|
4979
|
-
return fn()
|
|
4980
|
-
|
|
4981
|
-
success
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
}
|
|
5770
|
+
return fn()
|
|
5771
|
+
.then(res => {
|
|
5772
|
+
if (success) {
|
|
5773
|
+
(0, log_21.log)("SUCCESS", res);
|
|
5774
|
+
success(res);
|
|
5775
|
+
}
|
|
5776
|
+
})
|
|
5777
|
+
.catch(err => {
|
|
5778
|
+
if (failure) {
|
|
5779
|
+
(0, log_21.log)("ERROR", err);
|
|
5780
|
+
failure(err);
|
|
5781
|
+
}
|
|
5782
|
+
});
|
|
4986
5783
|
}
|
|
4987
5784
|
};
|
|
4988
5785
|
exports.upload = upload;
|
|
4989
5786
|
});
|
|
4990
|
-
define("index", ["require", "exports", "fn/_addLoader", "fn/_compareValues", "fn/_deleteLoader", "fn/abort", "fn/abortURL", "fn/addColors", "fn/addInputs", "fn/addStyle", "fn/adjustHeight", "fn/adjustSize", "fn/adjustWidth", "fn/ajax", "fn/analyzeFunction", "fn/animateCss", "fn/arrayBuffer2String", "fn/arrayFromProp", "fn/autoExtend", "fn/baseName", "fn/br2nl", "fn/calendar", "fn/callback", "fn/camelize", "fn/camelToCss", "fn/canvasToImage", "fn/center", "fn/checkProps", "fn/checkPropsDetails", "fn/checkPropsOrDie", "fn/checkType", "fn/circularReplacer", "fn/clone", "fn/colorToHex", "fn/compare", "fn/compareConditions", "fn/copy", "fn/correctCase", "fn/count", "fn/crc32", "fn/createObject", "fn/cssExists", "fn/date", "fn/dateSQL", "fn/daysInMonth", "fn/deepPath", "fn/defaultAjaxAbortFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAlertFunction", "fn/defaultConfirmFunction", "fn/defaultEndLoadingFunction", "fn/defaultErrorFunction", "fn/defaultHistoryFunction", "fn/defaultLinkFunction", "fn/defaultPostLinkFunction", "fn/defaultPreLinkFunction", "fn/defaultResizeFunction", "fn/defaultStartLoadingFunction", "fn/deleteProp", "fn/diffObj", "fn/dirName", "fn/download", "fn/downloadContent", "fn/each", "fn/eraseCookie", "fn/error", "fn/escapeDquotes", "fn/escapeRegExp", "fn/escapeSquotes", "fn/escapeTicks", "fn/escapeUrl", "fn/extend", "fn/extendOut", "fn/fdate", "fn/fdatetime", "fn/fieldValue", "fn/fileExt", "fn/filter", "fn/filterToConditions", "fn/findAll", "fn/fori", "fn/forir", "fn/format", "fn/formatBytes", "fn/formatDate", "fn/formatSize", "fn/formdata", "fn/fromXml", "fn/ftime", "fn/getAllTags", "fn/getAncestors", "fn/getAttributes", "fn/getBrowserName", "fn/getBrowserVersion", "fn/getCookie", "fn/getCssVar", "fn/getDay", "fn/getDeviceType", "fn/getEventData", "fn/getField", "fn/getFieldValues", "fn/getHtml", "fn/getHTMLOfSelection", "fn/getLoader", "fn/getPath", "fn/getProp", "fn/getProperty", "fn/getRequestId", "fn/getRow", "fn/getScrollBarSize", "fn/getText", "fn/getTimeoff", "fn/happy", "fn/hash", "fn/hex2rgb", "fn/history", "fn/html2text", "fn/imageToCanvas", "fn/imgToBase64", "fn/info", "fn/init", "fn/isActiveInterface", "fn/isArray", "fn/isBlob", "fn/isBoolean", "fn/isCanvas", "fn/isColor", "fn/isComment", "fn/isCp", "fn/isDate", "fn/isDesktopDevice", "fn/isDimension", "fn/isDom", "fn/isEmail", "fn/isEmpty", "fn/isEvent", "fn/isFocused", "fn/isFunction", "fn/isHostname", "fn/isInside", "fn/isInt", "fn/isIP", "fn/isIterable", "fn/isMobile", "fn/isMobileDevice", "fn/isNull", "fn/isNumber", "fn/isObject", "fn/isPercent", "fn/isPrimitive", "fn/isPromise", "fn/isPropSize", "fn/isSame", "fn/isSQLDate", "fn/isString", "fn/isSymbol", "fn/isTabletDevice", "fn/isURL", "fn/isValidDimension", "fn/isValidName", "fn/isValue", "fn/isVue", "fn/iterate", "fn/lightenDarkenHex", "fn/link", "fn/log", "fn/makeReactive", "fn/map", "fn/md5", "fn/money", "fn/move", "fn/multiorder", "fn/nl2br", "fn/numProperties", "fn/objectToFormData", "fn/order", "fn/outerHeight", "fn/outerWidth", "fn/percent", "fn/pickValue", "fn/post", "fn/postOut", "fn/printf", "fn/quotes2html", "fn/randomInt", "fn/randomString", "fn/removeAccents", "fn/removeEmpty", "fn/removeExtraSpaces", "fn/removeHtmlComments", "fn/removePrivateProp", "fn/removeTrailingChars", "fn/repeat", "fn/replaceAll", "fn/replaceSelection", "fn/resize", "fn/rgb2hex", "fn/riterate", "fn/roundDecimal", "fn/sanitize", "fn/search", "fn/selectElementText", "fn/selector", "fn/setCookie", "fn/setCssVar", "fn/setNavigationVars", "fn/setProp", "fn/setProperty", "fn/shorten", "fn/shortenObj", "fn/shuffle", "fn/simpleHash", "fn/simpleHash1", "fn/simpleHash2", "fn/startChrono", "fn/stat", "fn/stopChrono", "fn/string2ArrayBuffer", "fn/submit", "fn/substr", "fn/sum", "fn/timestamp", "fn/toCSV", "fn/toggleFullScreen", "fn/translate", "fn/treatAjaxArguments", "fn/trim", "fn/uniqString", "fn/unique", "fn/upload", "fn/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_2, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_3, circularReplacer_2, clone_2, colorToHex_1, compare_1, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_7, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_2, defaultAjaxErrorFunction_3, defaultAlertFunction_2, defaultConfirmFunction_1, defaultEndLoadingFunction_2, defaultErrorFunction_1, defaultHistoryFunction_2, defaultLinkFunction_2, defaultPostLinkFunction_2, defaultPreLinkFunction_2, defaultResizeFunction_2, defaultStartLoadingFunction_2, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_8, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_1, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_2, getProp_1, getProperty_4, getRequestId_2,
|
|
5787
|
+
define("index", ["require", "exports", "fn/_addLoader", "fn/_compareValues", "fn/_deleteLoader", "fn/abort", "fn/abortURL", "fn/addColors", "fn/addInputs", "fn/addStyle", "fn/adjustHeight", "fn/adjustSize", "fn/adjustWidth", "fn/ajax", "fn/analyzeFunction", "fn/animateCss", "fn/arrayBuffer2String", "fn/arrayFromProp", "fn/autoExtend", "fn/baseName", "fn/br2nl", "fn/calendar", "fn/callback", "fn/camelize", "fn/camelToCss", "fn/canvasToImage", "fn/center", "fn/checkProps", "fn/checkPropsDetails", "fn/checkPropsOrDie", "fn/checkType", "fn/circularReplacer", "fn/clone", "fn/colorToHex", "fn/compare", "fn/compareConditions", "fn/copy", "fn/correctCase", "fn/count", "fn/crc32", "fn/createObject", "fn/cssExists", "fn/date", "fn/dateSQL", "fn/daysInMonth", "fn/deepPath", "fn/defaultAjaxAbortFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAlertFunction", "fn/defaultConfirmFunction", "fn/defaultEndLoadingFunction", "fn/defaultErrorFunction", "fn/defaultHistoryFunction", "fn/defaultLinkFunction", "fn/defaultPostLinkFunction", "fn/defaultPreLinkFunction", "fn/defaultResizeFunction", "fn/defaultStartLoadingFunction", "fn/deleteProp", "fn/diffObj", "fn/dirName", "fn/download", "fn/downloadContent", "fn/each", "fn/eraseCookie", "fn/error", "fn/escapeDquotes", "fn/escapeRegExp", "fn/escapeSquotes", "fn/escapeTicks", "fn/escapeUrl", "fn/extend", "fn/extendOut", "fn/fdate", "fn/fdatetime", "fn/fieldValue", "fn/fileExt", "fn/filter", "fn/filterToConditions", "fn/findAll", "fn/fori", "fn/forir", "fn/format", "fn/formatBytes", "fn/formatDate", "fn/formatSize", "fn/formdata", "fn/fromXml", "fn/ftime", "fn/getAllTags", "fn/getAncestors", "fn/getAttributes", "fn/getBrowserName", "fn/getBrowserVersion", "fn/getCookie", "fn/getCssVar", "fn/getDay", "fn/getDeviceType", "fn/getEventData", "fn/getField", "fn/getFieldValues", "fn/getHtml", "fn/getHTMLOfSelection", "fn/getLoader", "fn/getPath", "fn/getProp", "fn/getProperty", "fn/getRequestId", "fn/getRow", "fn/getScrollBarSize", "fn/getText", "fn/getTimeoff", "fn/happy", "fn/hash", "fn/hex2rgb", "fn/history", "fn/html2text", "fn/imageToCanvas", "fn/imgToBase64", "fn/info", "fn/init", "fn/isActiveInterface", "fn/isArray", "fn/isBlob", "fn/isBoolean", "fn/isCanvas", "fn/isColor", "fn/isComment", "fn/isCp", "fn/isDate", "fn/isDesktopDevice", "fn/isDimension", "fn/isDom", "fn/isEmail", "fn/isEmpty", "fn/isEvent", "fn/isFocused", "fn/isFunction", "fn/isHostname", "fn/isInside", "fn/isInt", "fn/isIP", "fn/isIterable", "fn/isMobile", "fn/isMobileDevice", "fn/isNull", "fn/isNumber", "fn/isObject", "fn/isPercent", "fn/isPrimitive", "fn/isPromise", "fn/isPropSize", "fn/isSame", "fn/isSQLDate", "fn/isString", "fn/isSymbol", "fn/isTabletDevice", "fn/isURL", "fn/isValidDimension", "fn/isValidName", "fn/isValue", "fn/isVue", "fn/iterate", "fn/lightenDarkenHex", "fn/link", "fn/log", "fn/makeReactive", "fn/map", "fn/md5", "fn/money", "fn/move", "fn/multiorder", "fn/nl2br", "fn/numProperties", "fn/objectToFormData", "fn/order", "fn/outerHeight", "fn/outerWidth", "fn/percent", "fn/pickValue", "fn/post", "fn/postOut", "fn/printf", "fn/quotes2html", "fn/randomInt", "fn/randomString", "fn/removeAccents", "fn/removeEmpty", "fn/removeExtraSpaces", "fn/removeHtmlComments", "fn/removePrivateProp", "fn/removeTrailingChars", "fn/repeat", "fn/replaceAll", "fn/replaceSelection", "fn/resize", "fn/rgb2hex", "fn/riterate", "fn/roundDecimal", "fn/sanitize", "fn/search", "fn/selectElementText", "fn/selector", "fn/setCookie", "fn/setCssVar", "fn/setNavigationVars", "fn/setProp", "fn/setProperty", "fn/shorten", "fn/shortenObj", "fn/shuffle", "fn/simpleHash", "fn/simpleHash1", "fn/simpleHash2", "fn/startChrono", "fn/stat", "fn/stopChrono", "fn/string2ArrayBuffer", "fn/submit", "fn/substr", "fn/sum", "fn/timestamp", "fn/toCSV", "fn/toggleFullScreen", "fn/translate", "fn/treatAjaxArguments", "fn/trim", "fn/uniqString", "fn/unique", "fn/upload", "fn/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_2, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_3, circularReplacer_2, clone_2, colorToHex_1, compare_1, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_7, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_2, defaultAjaxErrorFunction_3, defaultAlertFunction_2, defaultConfirmFunction_1, defaultEndLoadingFunction_2, defaultErrorFunction_1, defaultHistoryFunction_2, defaultLinkFunction_2, defaultPostLinkFunction_2, defaultPreLinkFunction_2, defaultResizeFunction_2, defaultStartLoadingFunction_2, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_8, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_1, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_2, getProp_1, getProperty_4, getRequestId_2, getRow_2, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_6, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_14, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_9, isObject_20, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_32, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_12, lightenDarkenHex_1, link_2, log_22, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_9, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_1, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, startChrono_1, stat_1, stopChrono_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
|
|
4991
5788
|
"use strict";
|
|
4992
5789
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4993
|
-
|
|
5790
|
+
const fn = {
|
|
4994
5791
|
_addLoader: _addLoader_2._addLoader,
|
|
4995
5792
|
_compareValues: _compareValues_3._compareValues,
|
|
4996
5793
|
_deleteLoader: _deleteLoader_2._deleteLoader,
|
|
@@ -5097,7 +5894,7 @@
|
|
|
5097
5894
|
getProp: getProp_1.getProp,
|
|
5098
5895
|
getProperty: getProperty_4.getProperty,
|
|
5099
5896
|
getRequestId: getRequestId_2.getRequestId,
|
|
5100
|
-
getRow:
|
|
5897
|
+
getRow: getRow_2.getRow,
|
|
5101
5898
|
getScrollBarSize: getScrollBarSize_1.getScrollBarSize,
|
|
5102
5899
|
getText: getText_1.getText,
|
|
5103
5900
|
getTimeoff: getTimeoff_1.getTimeoff,
|
|
@@ -5117,7 +5914,7 @@
|
|
|
5117
5914
|
isCanvas: isCanvas_2.isCanvas,
|
|
5118
5915
|
isColor: isColor_1.isColor,
|
|
5119
5916
|
isComment: isComment_1.isComment,
|
|
5120
|
-
isCp:
|
|
5917
|
+
isCp: isCp_6.isCp,
|
|
5121
5918
|
isDate: isDate_8.isDate,
|
|
5122
5919
|
isDesktopDevice: isDesktopDevice_1.isDesktopDevice,
|
|
5123
5920
|
isDimension: isDimension_1.isDimension,
|
|
@@ -5126,7 +5923,7 @@
|
|
|
5126
5923
|
isEmpty: isEmpty_2.isEmpty,
|
|
5127
5924
|
isEvent: isEvent_1.isEvent,
|
|
5128
5925
|
isFocused: isFocused_1.isFocused,
|
|
5129
|
-
isFunction:
|
|
5926
|
+
isFunction: isFunction_14.isFunction,
|
|
5130
5927
|
isHostname: isHostname_1.isHostname,
|
|
5131
5928
|
isInside: isInside_1.isInside,
|
|
5132
5929
|
isInt: isInt_2.isInt,
|
|
@@ -5154,7 +5951,7 @@
|
|
|
5154
5951
|
iterate: iterate_12.iterate,
|
|
5155
5952
|
lightenDarkenHex: lightenDarkenHex_1.lightenDarkenHex,
|
|
5156
5953
|
link: link_2.link,
|
|
5157
|
-
log:
|
|
5954
|
+
log: log_22.log,
|
|
5158
5955
|
makeReactive: makeReactive_1.makeReactive,
|
|
5159
5956
|
map: map_1.map,
|
|
5160
5957
|
md5: md5_4.md5,
|
|
@@ -5162,7 +5959,7 @@
|
|
|
5162
5959
|
move: move_1.move,
|
|
5163
5960
|
multiorder: multiorder_1.multiorder,
|
|
5164
5961
|
nl2br: nl2br_1.nl2br,
|
|
5165
|
-
numProperties:
|
|
5962
|
+
numProperties: numProperties_9.numProperties,
|
|
5166
5963
|
objectToFormData: objectToFormData_2.objectToFormData,
|
|
5167
5964
|
order: order_1.order,
|
|
5168
5965
|
outerHeight: outerHeight_1.outerHeight,
|