@acorex/core 16.0.2 → 17.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/common/README.md +3 -0
- package/common/countries/countries.data.d.ts +2 -0
- package/common/countries/country.d.ts +13 -0
- package/common/index.d.ts +2 -0
- package/config/README.md +3 -0
- package/config/index.d.ts +2 -0
- package/config/lib/configs.d.ts +6 -0
- package/config/lib/configs.service.d.ts +12 -0
- package/date-time/README.md +3 -0
- package/date-time/index.d.ts +10 -0
- package/date-time/lib/calendar.service.d.ts +27 -0
- package/date-time/lib/dateTime.config.d.ts +12 -0
- package/date-time/lib/datetime.class.d.ts +138 -0
- package/date-time/lib/datetime.module.d.ts +8 -0
- package/date-time/lib/datetime.pipe.d.ts +12 -0
- package/date-time/lib/formatters/datetime-formatter.d.ts +19 -0
- package/date-time/lib/formatters/timeleft-formatter.d.ts +16 -0
- package/date-time/lib/georgian.calendar.d.ts +21 -0
- package/date-time/lib/holidays.loader.d.ts +21 -0
- package/date-time/lib/jalali.calendar.d.ts +40 -0
- package/esm2022/common/acorex-core-common.mjs +5 -0
- package/esm2022/common/countries/countries.data.mjs +2625 -0
- package/esm2022/common/countries/country.mjs +2 -0
- package/esm2022/common/index.mjs +3 -0
- package/esm2022/config/acorex-core-config.mjs +5 -0
- package/esm2022/config/index.mjs +3 -0
- package/esm2022/config/lib/configs.mjs +7 -0
- package/esm2022/config/lib/configs.service.mjs +27 -0
- package/esm2022/date-time/acorex-core-date-time.mjs +5 -0
- package/esm2022/date-time/index.mjs +11 -0
- package/esm2022/date-time/lib/calendar.service.mjs +100 -0
- package/esm2022/date-time/lib/dateTime.config.mjs +50 -0
- package/esm2022/date-time/lib/datetime.class.mjs +337 -0
- package/esm2022/date-time/lib/datetime.module.mjs +27 -0
- package/esm2022/date-time/lib/datetime.pipe.mjs +29 -0
- package/esm2022/date-time/lib/formatters/datetime-formatter.mjs +32 -0
- package/esm2022/date-time/lib/formatters/timeleft-formatter.mjs +91 -0
- package/esm2022/date-time/lib/georgian.calendar.mjs +203 -0
- package/esm2022/date-time/lib/holidays.loader.mjs +13 -0
- package/esm2022/date-time/lib/jalali.calendar.mjs +440 -0
- package/esm2022/events/acorex-core-events.mjs +5 -0
- package/esm2022/events/index.mjs +3 -0
- package/esm2022/events/lib/event.service.mjs +43 -0
- package/esm2022/events/lib/event.type.mjs +6 -0
- package/esm2022/file/acorex-core-file.mjs +5 -0
- package/esm2022/file/index.mjs +7 -0
- package/esm2022/file/lib/file-download-ref.class.mjs +12 -0
- package/esm2022/file/lib/file-download-result.class.mjs +45 -0
- package/esm2022/file/lib/file-size-formatter.mjs +24 -0
- package/esm2022/file/lib/file-upload-ref.class.mjs +12 -0
- package/esm2022/file/lib/file.module.mjs +20 -0
- package/esm2022/file/lib/file.service.mjs +103 -0
- package/esm2022/format/acorex-core-format.mjs +5 -0
- package/esm2022/format/index.mjs +8 -0
- package/esm2022/format/lib/format.config.mjs +3 -0
- package/esm2022/format/lib/format.module.mjs +64 -0
- package/esm2022/format/lib/format.pipe.mjs +37 -0
- package/esm2022/format/lib/format.service.mjs +95 -0
- package/esm2022/format/lib/format.types.mjs +2 -0
- package/esm2022/format/lib/formatters/number-formatter.mjs +74 -0
- package/esm2022/format/lib/formatters/string-formatter.mjs +15 -0
- package/esm2022/image/acorex-core-image.mjs +5 -0
- package/esm2022/image/index.mjs +2 -0
- package/esm2022/image/lib/image.service.mjs +43 -0
- package/esm2022/index.mjs +2 -44
- package/esm2022/memorize/acorex-core-memorize.mjs +5 -0
- package/esm2022/memorize/index.mjs +2 -0
- package/esm2022/memorize/lib/memorize.decorator.mjs +19 -0
- package/esm2022/pipes/acorex-core-pipes.mjs +5 -0
- package/esm2022/pipes/index.mjs +2 -0
- package/esm2022/pipes/lib/safe/safe.pipe.mjs +38 -0
- package/esm2022/platform/acorex-core-platform.mjs +5 -0
- package/esm2022/platform/index.mjs +2 -0
- package/esm2022/platform/lib/platform.service.mjs +225 -0
- package/esm2022/storage/acorex-core-storage.mjs +5 -0
- package/esm2022/storage/cookie-storage.service.mjs +202 -0
- package/esm2022/storage/index.mjs +5 -0
- package/esm2022/storage/local-storage.service.mjs +58 -0
- package/esm2022/storage/session-storage.service.mjs +22 -0
- package/esm2022/storage/storage.interface.mjs +2 -0
- package/esm2022/translation/acorex-core-translation.mjs +5 -0
- package/esm2022/translation/index.mjs +9 -0
- package/esm2022/translation/lib/translation-scope.resolver.mjs +11 -0
- package/esm2022/translation/lib/translation.config.mjs +20 -0
- package/esm2022/translation/lib/translation.loader.mjs +14 -0
- package/esm2022/translation/lib/translation.module.mjs +40 -0
- package/esm2022/translation/lib/translation.service.mjs +173 -0
- package/esm2022/translation/lib/translation.types.mjs +2 -0
- package/esm2022/translation/lib/translator.directive.mjs +28 -0
- package/esm2022/translation/lib/translator.pipe.mjs +23 -0
- package/esm2022/types/acorex-core-types.mjs +5 -0
- package/esm2022/types/index.mjs +2 -0
- package/esm2022/utils/acorex-core-utils.mjs +5 -0
- package/esm2022/utils/index.mjs +6 -0
- package/esm2022/utils/lib/auto-unsubscribe.mjs +36 -0
- package/esm2022/utils/lib/color-util.mjs +111 -0
- package/esm2022/utils/lib/drawing-util.mjs +35 -0
- package/esm2022/utils/lib/html-util.mjs +39 -0
- package/esm2022/utils/lib/string-util.mjs +19 -0
- package/esm2022/validation/acorex-core-validation.mjs +5 -0
- package/esm2022/validation/index.mjs +18 -0
- package/esm2022/validation/lib/rules/between-rule.mjs +31 -0
- package/esm2022/validation/lib/rules/callback-rule.mjs +29 -0
- package/esm2022/validation/lib/rules/equal-rule.mjs +26 -0
- package/esm2022/validation/lib/rules/greater-than.mjs +29 -0
- package/esm2022/validation/lib/rules/length-rule.mjs +26 -0
- package/esm2022/validation/lib/rules/less-than-rule.mjs +29 -0
- package/esm2022/validation/lib/rules/maxlength-rule.mjs +27 -0
- package/esm2022/validation/lib/rules/minlength-rule.mjs +26 -0
- package/esm2022/validation/lib/rules/regex-rule.mjs +49 -0
- package/esm2022/validation/lib/rules/required-rule.mjs +36 -0
- package/esm2022/validation/lib/validation.config.mjs +33 -0
- package/esm2022/validation/lib/validation.module.mjs +84 -0
- package/esm2022/validation/lib/validation.service.mjs +98 -0
- package/esm2022/validation/lib/validation.types.mjs +3 -0
- package/events/README.md +3 -0
- package/events/index.d.ts +2 -0
- package/{lib/services → events/lib}/event.service.d.ts +8 -0
- package/events/lib/event.type.d.ts +5 -0
- package/fesm2022/acorex-core-common.mjs +2631 -0
- package/fesm2022/acorex-core-common.mjs.map +1 -0
- package/fesm2022/acorex-core-config.mjs +39 -0
- package/fesm2022/acorex-core-config.mjs.map +1 -0
- package/fesm2022/acorex-core-date-time.mjs +1305 -0
- package/fesm2022/acorex-core-date-time.mjs.map +1 -0
- package/fesm2022/acorex-core-events.mjs +56 -0
- package/fesm2022/acorex-core-events.mjs.map +1 -0
- package/fesm2022/acorex-core-file.mjs +214 -0
- package/fesm2022/acorex-core-file.mjs.map +1 -0
- package/fesm2022/acorex-core-format.mjs +282 -0
- package/fesm2022/acorex-core-format.mjs.map +1 -0
- package/fesm2022/acorex-core-image.mjs +50 -0
- package/fesm2022/acorex-core-image.mjs.map +1 -0
- package/fesm2022/acorex-core-memorize.mjs +26 -0
- package/fesm2022/acorex-core-memorize.mjs.map +1 -0
- package/fesm2022/acorex-core-pipes.mjs +44 -0
- package/fesm2022/acorex-core-pipes.mjs.map +1 -0
- package/fesm2022/acorex-core-platform.mjs +232 -0
- package/fesm2022/acorex-core-platform.mjs.map +1 -0
- package/fesm2022/acorex-core-storage.mjs +285 -0
- package/fesm2022/acorex-core-storage.mjs.map +1 -0
- package/fesm2022/acorex-core-translation.mjs +293 -0
- package/fesm2022/acorex-core-translation.mjs.map +1 -0
- package/fesm2022/acorex-core-types.mjs +6 -0
- package/fesm2022/acorex-core-types.mjs.map +1 -0
- package/fesm2022/acorex-core-utils.mjs +247 -0
- package/fesm2022/acorex-core-utils.mjs.map +1 -0
- package/fesm2022/acorex-core-validation.mjs +488 -0
- package/fesm2022/acorex-core-validation.mjs.map +1 -0
- package/fesm2022/acorex-core.mjs +2 -2309
- package/fesm2022/acorex-core.mjs.map +1 -1
- package/file/README.md +3 -0
- package/file/index.d.ts +6 -0
- package/file/lib/file-download-ref.class.d.ts +6 -0
- package/file/lib/file-download-result.class.d.ts +8 -0
- package/file/lib/file-size-formatter.d.ts +16 -0
- package/file/lib/file-upload-ref.class.d.ts +5 -0
- package/file/lib/file.module.d.ts +7 -0
- package/file/lib/file.service.d.ts +18 -0
- package/format/README.md +3 -0
- package/format/index.d.ts +7 -0
- package/format/lib/format.config.d.ts +5 -0
- package/format/lib/format.module.d.ts +18 -0
- package/format/lib/format.pipe.d.ts +12 -0
- package/format/lib/format.service.d.ts +43 -0
- package/format/lib/format.types.d.ts +4 -0
- package/format/lib/formatters/number-formatter.d.ts +23 -0
- package/format/lib/formatters/string-formatter.d.ts +14 -0
- package/image/README.md +3 -0
- package/image/index.d.ts +1 -0
- package/image/lib/image.service.d.ts +11 -0
- package/index.d.ts +1 -43
- package/memorize/README.md +3 -0
- package/memorize/index.d.ts +1 -0
- package/memorize/lib/memorize.decorator.d.ts +1 -0
- package/package.json +98 -5
- package/pipes/README.md +3 -0
- package/pipes/index.d.ts +1 -0
- package/pipes/lib/safe/safe.pipe.d.ts +10 -0
- package/platform/README.md +3 -0
- package/platform/index.d.ts +1 -0
- package/{lib/platform → platform/lib}/platform.service.d.ts +14 -6
- package/storage/README.md +3 -0
- package/storage/cookie-storage.service.d.ts +104 -0
- package/storage/index.d.ts +4 -0
- package/storage/local-storage.service.d.ts +16 -0
- package/storage/session-storage.service.d.ts +10 -0
- package/storage/storage.interface.d.ts +14 -0
- package/translation/README.md +3 -0
- package/translation/index.d.ts +8 -0
- package/translation/lib/translation-scope.resolver.d.ts +2 -0
- package/translation/lib/translation.config.d.ts +14 -0
- package/translation/lib/translation.loader.d.ts +14 -0
- package/translation/lib/translation.module.d.ts +8 -0
- package/translation/lib/translation.service.d.ts +31 -0
- package/translation/lib/translation.types.d.ts +10 -0
- package/translation/lib/translator.directive.d.ts +12 -0
- package/translation/lib/translator.pipe.d.ts +12 -0
- package/types/README.md +3 -0
- package/types/index.d.ts +2 -0
- package/utils/README.md +3 -0
- package/utils/index.d.ts +5 -0
- package/utils/lib/auto-unsubscribe.d.ts +12 -0
- package/utils/lib/color-util.d.ts +24 -0
- package/utils/lib/drawing-util.d.ts +18 -0
- package/utils/lib/html-util.d.ts +5 -0
- package/utils/lib/string-util.d.ts +6 -0
- package/validation/README.md +3 -0
- package/validation/index.d.ts +14 -0
- package/validation/lib/rules/between-rule.d.ts +18 -0
- package/validation/lib/rules/callback-rule.d.ts +23 -0
- package/validation/lib/rules/equal-rule.d.ts +17 -0
- package/validation/lib/rules/greater-than.d.ts +17 -0
- package/validation/lib/rules/length-rule.d.ts +17 -0
- package/validation/lib/rules/less-than-rule.d.ts +17 -0
- package/validation/lib/rules/maxlength-rule.d.ts +16 -0
- package/validation/lib/rules/minlength-rule.d.ts +16 -0
- package/validation/lib/rules/regex-rule.d.ts +17 -0
- package/validation/lib/rules/required-rule.d.ts +16 -0
- package/validation/lib/validation.config.d.ts +15 -0
- package/validation/lib/validation.module.d.ts +17 -0
- package/validation/lib/validation.service.d.ts +35 -0
- package/validation/lib/validation.types.d.ts +21 -0
- package/esm2022/lib/classes/base-page.class.mjs +0 -26
- package/esm2022/lib/classes/color.class.mjs +0 -49
- package/esm2022/lib/classes/datetime.class.mjs +0 -323
- package/esm2022/lib/classes/menu.class.mjs +0 -35
- package/esm2022/lib/classes/navigator.class.mjs +0 -2
- package/esm2022/lib/classes/popup.class.mjs +0 -2
- package/esm2022/lib/classes/promise.class.mjs +0 -21
- package/esm2022/lib/classes/sectionlist.class.mjs +0 -2
- package/esm2022/lib/classes/select.class.mjs +0 -8
- package/esm2022/lib/core.module.mjs +0 -27
- package/esm2022/lib/error/error.class.mjs +0 -2
- package/esm2022/lib/error/error.module.mjs +0 -19
- package/esm2022/lib/error/error.service.mjs +0 -22
- package/esm2022/lib/events/keyboard.mjs +0 -2
- package/esm2022/lib/http/http-error.class.mjs +0 -2
- package/esm2022/lib/http/http-events.interceptor.mjs +0 -3
- package/esm2022/lib/http/http-request.class.mjs +0 -2
- package/esm2022/lib/http/http-result.class.mjs +0 -25
- package/esm2022/lib/http/http.module.mjs +0 -35
- package/esm2022/lib/http/http.service.mjs +0 -148
- package/esm2022/lib/locale/en.json +0 -255
- package/esm2022/lib/locale/fa.json +0 -245
- package/esm2022/lib/pipe/datetime.pipe.mjs +0 -25
- package/esm2022/lib/pipe/htmlToText.pipe.mjs +0 -25
- package/esm2022/lib/platform/index.mjs +0 -2
- package/esm2022/lib/platform/platform.service.mjs +0 -152
- package/esm2022/lib/services/config.mjs +0 -29
- package/esm2022/lib/services/event.service.mjs +0 -34
- package/esm2022/lib/services/navigator.service.mjs +0 -10
- package/esm2022/lib/services/storage.service.mjs +0 -16
- package/esm2022/lib/translator/translator.mjs +0 -26
- package/esm2022/lib/translator/translator.module.mjs +0 -25
- package/esm2022/lib/translator/translator.pipe.mjs +0 -24
- package/esm2022/lib/translator/translator.service.mjs +0 -21
- package/esm2022/lib/utils/array/array-util.mjs +0 -133
- package/esm2022/lib/utils/html/html-util.mjs +0 -200
- package/esm2022/lib/utils/html/html.module.mjs +0 -19
- package/esm2022/lib/utils/math/math-util.mjs +0 -6
- package/esm2022/lib/utils/object/object-util.mjs +0 -83
- package/esm2022/lib/utils/render/on-demand-preload-strategy.service.mjs +0 -21
- package/esm2022/lib/utils/render/render.service.mjs +0 -109
- package/esm2022/lib/utils/render/rendering.module.mjs +0 -35
- package/esm2022/lib/utils/scroll/scroll.directive.mjs +0 -56
- package/esm2022/lib/utils/scroll/scroll.module.mjs +0 -19
- package/esm2022/lib/utils/separator/separator.module.mjs +0 -19
- package/esm2022/lib/utils/separator/separator.pipe.mjs +0 -33
- package/lib/classes/base-page.class.d.ts +0 -13
- package/lib/classes/color.class.d.ts +0 -17
- package/lib/classes/datetime.class.d.ts +0 -63
- package/lib/classes/menu.class.d.ts +0 -34
- package/lib/classes/navigator.class.d.ts +0 -5
- package/lib/classes/popup.class.d.ts +0 -12
- package/lib/classes/promise.class.d.ts +0 -7
- package/lib/classes/sectionlist.class.d.ts +0 -8
- package/lib/classes/select.class.d.ts +0 -7
- package/lib/core.module.d.ts +0 -9
- package/lib/error/error.class.d.ts +0 -4
- package/lib/error/error.module.d.ts +0 -7
- package/lib/error/error.service.d.ts +0 -13
- package/lib/events/keyboard.d.ts +0 -2
- package/lib/http/http-error.class.d.ts +0 -7
- package/lib/http/http-events.interceptor.d.ts +0 -10
- package/lib/http/http-request.class.d.ts +0 -14
- package/lib/http/http-result.class.d.ts +0 -11
- package/lib/http/http.module.d.ts +0 -10
- package/lib/http/http.service.d.ts +0 -23
- package/lib/pipe/datetime.pipe.d.ts +0 -8
- package/lib/pipe/htmlToText.pipe.d.ts +0 -7
- package/lib/platform/index.d.ts +0 -1
- package/lib/services/config.d.ts +0 -9
- package/lib/services/navigator.service.d.ts +0 -8
- package/lib/services/storage.service.d.ts +0 -7
- package/lib/translator/translator.d.ts +0 -9
- package/lib/translator/translator.module.d.ts +0 -8
- package/lib/translator/translator.pipe.d.ts +0 -8
- package/lib/translator/translator.service.d.ts +0 -8
- package/lib/utils/array/array-util.d.ts +0 -6
- package/lib/utils/html/html-util.d.ts +0 -62
- package/lib/utils/html/html.module.d.ts +0 -8
- package/lib/utils/math/math-util.d.ts +0 -3
- package/lib/utils/object/object-util.d.ts +0 -7
- package/lib/utils/render/on-demand-preload-strategy.service.d.ts +0 -10
- package/lib/utils/render/render.service.d.ts +0 -18
- package/lib/utils/render/rendering.module.d.ts +0 -8
- package/lib/utils/scroll/scroll.directive.d.ts +0 -18
- package/lib/utils/scroll/scroll.module.d.ts +0 -8
- package/lib/utils/separator/separator.module.d.ts +0 -8
- package/lib/utils/separator/separator.pipe.d.ts +0 -8
@@ -1,25 +0,0 @@
|
|
1
|
-
import { Pipe } from '@angular/core';
|
2
|
-
import { AXDateTime } from '../classes/datetime.class';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export class AXDateTimePipe {
|
5
|
-
constructor() { }
|
6
|
-
transform(value, format) {
|
7
|
-
const date = AXDateTime.convert(value);
|
8
|
-
if (value == null) {
|
9
|
-
return '';
|
10
|
-
}
|
11
|
-
if (!format) {
|
12
|
-
return date.toString();
|
13
|
-
}
|
14
|
-
else {
|
15
|
-
return date.format(format);
|
16
|
-
}
|
17
|
-
}
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
19
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: AXDateTimePipe, name: "dt" });
|
20
|
-
}
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
22
|
-
type: Pipe,
|
23
|
-
args: [{ name: 'dt' }]
|
24
|
-
}], ctorParameters: function () { return []; } });
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXRpbWUucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9zcmMvbGliL3BpcGUvZGF0ZXRpbWUucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQWlCLElBQUksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNwRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7O0FBR3ZELE1BQU0sT0FBTyxjQUFjO0lBQ3ZCLGdCQUFnQixDQUFDO0lBRWpCLFNBQVMsQ0FBQyxLQUFVLEVBQUUsTUFBZTtRQUNqQyxNQUFNLElBQUksR0FBZSxVQUFVLENBQUMsT0FBTyxDQUFDLEtBQUss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k7XG4gICAgICAgIH1cbiAgICB9XG59Il19
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { Pipe } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class AXHtmlToTextPipe {
|
4
|
-
transform(value) {
|
5
|
-
if (value) {
|
6
|
-
const regexHtml = /<\/?[^>]+>/gi;
|
7
|
-
const regexNbsp = / /gi;
|
8
|
-
const regexAmp = /&/gi;
|
9
|
-
return value
|
10
|
-
.replace(regexHtml, '')
|
11
|
-
.replace(regexNbsp, '')
|
12
|
-
.replace(regexAmp, '');
|
13
|
-
}
|
14
|
-
else {
|
15
|
-
return '';
|
16
|
-
}
|
17
|
-
}
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXHtmlToTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
19
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: AXHtmlToTextPipe, name: "html2text" });
|
20
|
-
}
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXHtmlToTextPipe, decorators: [{
|
22
|
-
type: Pipe,
|
23
|
-
args: [{ name: 'html2text' }]
|
24
|
-
}] });
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbFRvVGV4dC5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3NyYy9saWIvcGlwZS9odG1sVG9UZXh0LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7O0FBR3BELE1BQU0sT0FBTyxnQkFBZ0I7SUFDM0IsU0FBUyxDQUFDLEtBQWE7U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nJlcGxhY2UocmVnZXhBbXAsICcnKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuICcnO1xuICAgIH1cbiAgfVxufVxuIl19
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './platform.service';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvc3JjL2xpYi9wbGF0Zm9ybS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9wbGF0Zm9ybS5zZXJ2aWNlJzsiXX0=
|
@@ -1,152 +0,0 @@
|
|
1
|
-
import { Injectable } from "@angular/core";
|
2
|
-
import { fromEvent, Subject } from "rxjs";
|
3
|
-
import { debounceTime, distinctUntilChanged } from "rxjs/operators";
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
const isChrome = (win) => testUserAgent(win, /Chrome/i);
|
6
|
-
const isFirefox = (win) => testUserAgent(win, /Firefox/i);
|
7
|
-
const isEdge = (win) => testUserAgent(win, /Edge/i);
|
8
|
-
const isSafari = (win) => testUserAgent(win, /Safari/i);
|
9
|
-
const isOpera = (win) => testUserAgent(win, /Opera/i) || testUserAgent(win, /OPR/i);
|
10
|
-
const isMSIE = (win) => testUserAgent(win, /MSIE/i) || testUserAgent(win, /Trident/i);
|
11
|
-
const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
|
12
|
-
const isIpad = (win) => {
|
13
|
-
// iOS 12 and below
|
14
|
-
if (testUserAgent(win, /iPad/i)) {
|
15
|
-
return true;
|
16
|
-
}
|
17
|
-
// iOS 13+
|
18
|
-
if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
|
19
|
-
return true;
|
20
|
-
}
|
21
|
-
return false;
|
22
|
-
};
|
23
|
-
const isIphone = (win) => testUserAgent(win, /iPhone/i);
|
24
|
-
const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
|
25
|
-
const isAndroid = (win) => testUserAgent(win, /android|sink/i);
|
26
|
-
const isAndroidTablet = (win) => {
|
27
|
-
return isAndroid(win) && !testUserAgent(win, /mobile/i);
|
28
|
-
};
|
29
|
-
const isPhablet = (win) => {
|
30
|
-
const width = win.innerWidth;
|
31
|
-
const height = win.innerHeight;
|
32
|
-
const smallest = Math.min(width, height);
|
33
|
-
const largest = Math.max(width, height);
|
34
|
-
return (smallest > 390 && smallest < 520) &&
|
35
|
-
(largest > 620 && largest < 800);
|
36
|
-
};
|
37
|
-
const isTablet = (win) => {
|
38
|
-
const width = win.innerWidth;
|
39
|
-
const height = win.innerHeight;
|
40
|
-
const smallest = Math.min(width, height);
|
41
|
-
const largest = Math.max(width, height);
|
42
|
-
return (isIpad(win) ||
|
43
|
-
isAndroidTablet(win) ||
|
44
|
-
((smallest > 460 && smallest < 820) &&
|
45
|
-
(largest > 780 && largest < 1400)));
|
46
|
-
};
|
47
|
-
const isMobile = (win) => matchMedia(win, '(any-pointer:coarse)');
|
48
|
-
const isTouch = (win) => matchMedia(win, '(any-pointer:coarse)');
|
49
|
-
const isDesktop = (win) => !isMobile(win);
|
50
|
-
const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
|
51
|
-
const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
|
52
|
-
const isCapacitorNative = (win) => {
|
53
|
-
const capacitor = win['Capacitor'];
|
54
|
-
return !!(capacitor && capacitor.isNative);
|
55
|
-
};
|
56
|
-
const isElectron = (win) => testUserAgent(win, /electron/i);
|
57
|
-
const isPWA = (win) => !!(win.matchMedia('(display-mode: standalone)').matches || win.navigator.standalone);
|
58
|
-
export const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
|
59
|
-
const matchMedia = (win, query) => win.matchMedia(query).matches;
|
60
|
-
const isSMScreen = (win) => matchMedia(win, '(max-width: 640px)');
|
61
|
-
const isMDScreen = (win) => matchMedia(win, '(max-width: 768px)');
|
62
|
-
const isLGScreen = (win) => matchMedia(win, '(max-width: 1024px)');
|
63
|
-
const isXLScreen = (win) => matchMedia(win, '(max-width: 1280px)');
|
64
|
-
const is2XLScreen = (win) => matchMedia(win, '(max-width: 1536px)');
|
65
|
-
const PLATFORMS_MAP = {
|
66
|
-
'Android': isAndroid,
|
67
|
-
'iOS': isIOS,
|
68
|
-
'Desktop': isDesktop,
|
69
|
-
'Mobile': isMobile,
|
70
|
-
'Touch': isTouch,
|
71
|
-
'Chrome': isChrome,
|
72
|
-
'Firefox': isFirefox,
|
73
|
-
'Safari': isSafari,
|
74
|
-
'Edge': isEdge,
|
75
|
-
'Opera': isOpera,
|
76
|
-
'Hybrid': isHybrid,
|
77
|
-
'PWA': isPWA,
|
78
|
-
'Electron': isElectron,
|
79
|
-
SM: isSMScreen,
|
80
|
-
MD: isMDScreen,
|
81
|
-
LG: isLGScreen,
|
82
|
-
XL: isXLScreen,
|
83
|
-
"2XL": is2XLScreen,
|
84
|
-
};
|
85
|
-
export class AXPlatformEvent {
|
86
|
-
nativeEvent;
|
87
|
-
source;
|
88
|
-
}
|
89
|
-
export class AXPlatform {
|
90
|
-
resize = new Subject();
|
91
|
-
click = new Subject();
|
92
|
-
scroll = new Subject();
|
93
|
-
isRtl() {
|
94
|
-
return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';
|
95
|
-
}
|
96
|
-
isLandscape() {
|
97
|
-
return window.innerHeight < window.innerWidth;
|
98
|
-
}
|
99
|
-
isPortrate() {
|
100
|
-
return !this.isLandscape();
|
101
|
-
}
|
102
|
-
is(name) {
|
103
|
-
return PLATFORMS_MAP[name](window) || false;
|
104
|
-
}
|
105
|
-
switchDarkMode() {
|
106
|
-
const _html = document.getElementsByTagName("html")[0];
|
107
|
-
_html.classList.add('ax-dark');
|
108
|
-
}
|
109
|
-
switchLightMode() {
|
110
|
-
const _html = document.getElementsByTagName("html")[0];
|
111
|
-
_html.classList.remove('ax-dark');
|
112
|
-
}
|
113
|
-
_setFullHeightRatio() {
|
114
|
-
document.querySelector(':root').style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
|
115
|
-
}
|
116
|
-
constructor() {
|
117
|
-
fromEvent(window, 'resize')
|
118
|
-
.pipe(debounceTime(100))
|
119
|
-
.pipe(distinctUntilChanged())
|
120
|
-
.subscribe((e) => {
|
121
|
-
this.resize.next({
|
122
|
-
nativeEvent: e,
|
123
|
-
source: this
|
124
|
-
});
|
125
|
-
//
|
126
|
-
this._setFullHeightRatio();
|
127
|
-
});
|
128
|
-
document.addEventListener('click', (e) => {
|
129
|
-
this.click.next({
|
130
|
-
nativeEvent: e,
|
131
|
-
source: this
|
132
|
-
});
|
133
|
-
}, true);
|
134
|
-
document.addEventListener('scroll', (e) => {
|
135
|
-
this.scroll.next({
|
136
|
-
nativeEvent: e,
|
137
|
-
source: this
|
138
|
-
});
|
139
|
-
}, true);
|
140
|
-
// init functions
|
141
|
-
this._setFullHeightRatio();
|
142
|
-
}
|
143
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
144
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXPlatform, providedIn: 'root' });
|
145
|
-
}
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXPlatform, decorators: [{
|
147
|
-
type: Injectable,
|
148
|
-
args: [{
|
149
|
-
providedIn: 'root',
|
150
|
-
}]
|
151
|
-
}], ctorParameters: function () { return []; } });
|
152
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0uc2Vydm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lKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNpemUubmV4dCh7XG4gICAgICAgICAgICAgICAgICAgIG5hdGl2ZUV2ZW50OiBlLFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2U6IHRoaXNcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAvL1xuICAgICAgICAgICAgICAgIHRoaXMuX3NldEZ1bGxIZWlnaHRSYXRpbygpO1xuICAgICAgICAgICAgfSk7XG5cblxuICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIChlKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmNsaWNrLm5leHQoe1xuICAgICAgICAgICAgICAgIG5hdGl2ZUV2ZW50OiBlLFxuICAgICAgICAgICAgICAgIHNvdXJjZTogdGhpc1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sIHRydWUpXG5cbiAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignc2Nyb2xsJywgKGUpID0+IHtcbiAgICAgICAgICAgIHRoaXMuc2Nyb2xsLm5leHQoe1xuICAgICAgICAgICAgICAgIG5hdGl2ZUV2ZW50OiBlLFxuICAgICAgICAgICAgICAgIHNvdXJjZTogdGhpc1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sIHRydWUpO1xuICAgICAgICAvLyBpbml0IGZ1bmN0aW9uc1xuICAgICAgICB0aGlzLl9zZXRGdWxsSGVpZ2h0UmF0aW8oKTtcbiAgICB9XG59Il19
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import { Subject } from 'rxjs';
|
2
|
-
import { getPropByPath, setPropByPath } from '../utils/object/object-util';
|
3
|
-
// @dynamic
|
4
|
-
export class AXConfig {
|
5
|
-
static dataModel = {};
|
6
|
-
static dataChangeSubject = new Subject();
|
7
|
-
static get onChange() {
|
8
|
-
return AXConfig.dataChangeSubject.asObservable();
|
9
|
-
}
|
10
|
-
static set(arg1, arg2) {
|
11
|
-
if (arg1 && typeof arg1 == 'string') {
|
12
|
-
setPropByPath(AXConfig.dataModel, arg1, arg2);
|
13
|
-
AXConfig.dataChangeSubject.next(AXConfig.dataModel);
|
14
|
-
return;
|
15
|
-
}
|
16
|
-
if (arg1 && typeof arg1 == 'object') {
|
17
|
-
Object.assign(AXConfig.dataModel, arg1);
|
18
|
-
AXConfig.dataChangeSubject.next(AXConfig.dataModel);
|
19
|
-
return;
|
20
|
-
}
|
21
|
-
if (!arg1 && !arg2) {
|
22
|
-
return AXConfig.dataChangeSubject.asObservable();
|
23
|
-
}
|
24
|
-
}
|
25
|
-
static get(path) {
|
26
|
-
return getPropByPath(AXConfig.dataModel, path);
|
27
|
-
}
|
28
|
-
}
|
29
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3NyYy9saWIvc2VydmljZXMvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQWMsTUFBTSxNQUFNLENBQUM7QUFDM0MsT0FBTyxFQUFFLGFBQWEsRUFBRSxhQUFhLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUUzRSxXQUFXO0FBQ1gsTUFBTSxPQUFPLFFBQVE7SUFDVCxNQUFNLENBQUMsU0FBUyxHQUFRLEVBQUUsQ0FBQztJQUMzQixNQUFNLENBQUMsaUJBQWlCLEdBQUcsSUFBSSxPQUFPLEVBQU8sQ0FBQztJQUd0RCxNQUFNLEtBQUssUUFBUTtRQUNmLE9BQU8sUUFBUSxDQUFDLGlCQUFpQixDQUFDLFlBQVksRUFBRSxDQUFDO0lBQ3JELENBQUM7SUFJRCxNQUFNLENBQUMsR0FBRyxDQUFDLElBQVUsRUFBRSxJQUFVO1FBRTdCLElBQUksSUFBSSxJQUF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yaW5nKTogYW55IHtcbiAgICAgICAgcmV0dXJuIGdldFByb3BCeVBhdGgoQVhDb25maWcuZGF0YU1vZGVsLCBwYXRoKTtcbiAgICB9XG59Il19
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class AXEventService {
|
4
|
-
list = [];
|
5
|
-
broadcast(key, options) {
|
6
|
-
const d = this.list.find(c => c.key === key);
|
7
|
-
if (d) {
|
8
|
-
d.events.forEach(c => {
|
9
|
-
c(options);
|
10
|
-
});
|
11
|
-
}
|
12
|
-
}
|
13
|
-
on(key, callback) {
|
14
|
-
let d = this.list.find(c => c.key === key);
|
15
|
-
if (!d) {
|
16
|
-
d = { key, events: [] };
|
17
|
-
this.list.push(d);
|
18
|
-
}
|
19
|
-
d.events.push(callback);
|
20
|
-
}
|
21
|
-
destroy(key, callback) {
|
22
|
-
const d = this.list.find(c => c.key === key);
|
23
|
-
if (d) {
|
24
|
-
d.events = [];
|
25
|
-
}
|
26
|
-
}
|
27
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
28
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXEventService, providedIn: 'root' });
|
29
|
-
}
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXEventService, decorators: [{
|
31
|
-
type: Injectable,
|
32
|
-
args: [{ providedIn: 'root' }]
|
33
|
-
}] });
|
34
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9zcmMvbGliL3N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2V5LCBldmVudHM6IFtdIH07XG4gICAgICAgICAgICB0aGlzLmxpc3QucHVzaChkKTtcbiAgICAgICAgfVxuICAgICAgICBkLmV2ZW50cy5wdXNoKGNhbGxiYWNrKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZGVzdHJveShrZXk6IHN0cmluZywgY2FsbGJhY2s6IChvcHRpb25zPzogYW55KSA9PiB2b2lkKTogdm9pZCB7XG4gICAgICAgIGNvbnN0IGQgPSB0aGlzLmxpc3QuZmluZChjID0+IGMua2V5ID09PSBrZXkpO1xuICAgICAgICBpZiAoZCkge1xuICAgICAgICAgICAgZC5ldmVudHMgPSBbXTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class AXNavigator {
|
4
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXNavigator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
5
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXNavigator });
|
6
|
-
}
|
7
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXNavigator, decorators: [{
|
8
|
-
type: Injectable
|
9
|
-
}] });
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2aWdhdG9yLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvc3JjL2xpYi9zZXJ2aWNlcy9uYXZpZ2F0b3Iuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUkzQyxNQUFNLE9BQWdCLFdBQVc7d0dBQVgsV0FBVzs0R0FBWCxXQUFXOzs0RkFBWCxXQUFXO2tCQURoQyxVQUFVIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgQVhOYXZpZ2F0b3JQYXJhbSB9IGZyb20gJy4uL2NsYXNzZXMvbmF2aWdhdG9yLmNsYXNzJztcblxuQEluamVjdGFibGUoKVxuZXhwb3J0IGFic3RyYWN0IGNsYXNzIEFYTmF2aWdhdG9yIHtcbiAgICBhYnN0cmFjdCBuYXZpZ2F0ZShwYXJhbXM6IEFYTmF2aWdhdG9yUGFyYW0pO1xuICAgIGFic3RyYWN0IHBvcHVwKHBhcmFtczogQVhOYXZpZ2F0b3JQYXJhbSk7XG59Il19
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class AXStorageService {
|
4
|
-
get(key) {
|
5
|
-
return localStorage.getItem(key);
|
6
|
-
}
|
7
|
-
set(key, value) {
|
8
|
-
localStorage.setItem(key, value);
|
9
|
-
}
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
11
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXStorageService });
|
12
|
-
}
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXStorageService, decorators: [{
|
14
|
-
type: Injectable
|
15
|
-
}] });
|
16
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3NyYy9saWIvc2VydmljZXMvc3RvcmFnZS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBRzNDLE1BQU0sT0FBTyxnQkFBZ0I7SUFDMUIsR0FBRyxDQUFDLEdBQVc7UUFDWixPQUFPLFlBQVksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFRLENBQUM7SUFDM0MsQ0FBQztJQUNELEdBQUcsQ0FBQyxHQUFXLEVBQUUsS0FBVTtRQUN4QixZQUFZLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxLQUFlLENBQUMsQ0FBQztJQUM5QyxDQUFDO3dHQU5TLGdCQUFnQjs0R0FBaEIsZ0JBQWdCOzs0RkFBaEIsZ0JBQWdCO2tCQUQ1QixVQUFVIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgQVhTdG9yYWdlU2VydmljZSB7XG4gICBnZXQoa2V5OiBzdHJpbmcpOiBhbnkge1xuICAgICAgcmV0dXJuIGxvY2FsU3RvcmFnZS5nZXRJdGVtKGtleSkgYXMgYW55O1xuICAgfVxuICAgc2V0KGtleTogc3RyaW5nLCB2YWx1ZTogYW55KTogdm9pZCB7XG4gICAgICBsb2NhbFN0b3JhZ2Uuc2V0SXRlbShrZXksIHZhbHVlIGFzIHN0cmluZyk7XG4gICB9XG59XG4iXX0=
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { Subject } from 'rxjs';
|
2
|
-
import { getPropByPath } from '../utils/object/object-util';
|
3
|
-
import merge from 'lodash-es/merge';
|
4
|
-
// @dynamic
|
5
|
-
export class AXTranslator {
|
6
|
-
static lang = 'en';
|
7
|
-
static dataChangeSubject = new Subject();
|
8
|
-
static get onChange() {
|
9
|
-
return AXTranslator.dataChangeSubject.asObservable();
|
10
|
-
}
|
11
|
-
static load(lang, value) {
|
12
|
-
if (typeof value === 'object') {
|
13
|
-
if (!AXTranslator[`__data__${lang}`]) {
|
14
|
-
AXTranslator[`__data__${lang}`] = {};
|
15
|
-
}
|
16
|
-
AXTranslator[`__data__${lang}`] = merge(AXTranslator[`__data__${lang}`], value);
|
17
|
-
}
|
18
|
-
}
|
19
|
-
static use(lang) {
|
20
|
-
AXTranslator.lang = lang;
|
21
|
-
}
|
22
|
-
static get(key, lang) {
|
23
|
-
return getPropByPath(AXTranslator[`__data__${lang || AXTranslator.lang}`], key) || key;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9zcmMvbGliL3RyYW5zbGF0b3IvdHJhbnNsYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFjLE1BQU0sTUFBTSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxhQUFhLEVBQUMsTUFBTSw2QkFBNkIsQ0FBQztBQUMzRCxPQUFPLEtBQUssTUFBTSxpQkFBaUIsQ0FBQztBQUVwQyxXQUFXO0FBQ1gsTUFBTSxPQUFPLFlBQVk7SUFDYixNQUFNLENBQUMsSUFBSSxHQUFXLElBQUksQ0FBQztJQUMzQixNQUFNLENBQUMsaUJBQWlCLEdBQUcsSUFBSSxPQUFPLEVBQU8sQ0FBQztJQUd0RCxNQUFNLEtBQUssUUFBUTtRQUNmLE9BQU8sWUFBWSxDQUFDLGlCQUFpQixDQUFDLFlBQVksRUFBRSxDQUFDO0lBQ3pELEN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aWMgZGF0YUNoYW5nZVN1YmplY3QgPSBuZXcgU3ViamVjdDxhbnk+KCk7XG5cblxuICAgIHN0YXRpYyBnZXQgb25DaGFuZ2UoKTogT2JzZXJ2YWJsZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIEFYVHJhbnNsYXRvci5kYXRhQ2hhbmdlU3ViamVjdC5hc09ic2VydmFibGUoKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgc3RhdGljIGxvYWQobGFuZzogc3RyaW5nLCB2YWx1ZTogYW55KSB7XG4gICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICBpZiAoIUFYVHJhbnNsYXRvcltgX19kYXRhX18ke2xhbmd9YF0pIHtcbiAgICAgICAgICAgICAgICBBWFRyYW5zbGF0b3JbYF9fZGF0YV9fJHtsYW5nfWBdID0ge307XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBBWFRyYW5zbGF0b3JbYF9fZGF0YV9fJHtsYW5nfWBdID0gbWVyZ2UoQVhUcmFuc2xhdG9yW2BfX2RhdGFfXyR7bGFuZ31gXSwgdmFsdWUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyB1c2UobGFuZzogc3RyaW5nKSB7XG4gICAgICAgIEFYVHJhbnNsYXRvci5sYW5nID0gbGFuZztcbiAgICB9XG5cbiAgICBwdWJsaWMgc3RhdGljIGdldChrZXk6IHN0cmluZywgbGFuZz86IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBnZXRQcm9wQnlQYXRoKEFYVHJhbnNsYXRvcltgX19kYXRhX18ke2xhbmcgfHwgQVhUcmFuc2xhdG9yLmxhbmd9YF0sIGtleSkgfHwga2V5O1xuICAgIH1cbn0iXX0=
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { NgModule } from '@angular/core';
|
2
|
-
import { AXTranslatorPipe } from './translator.pipe';
|
3
|
-
import * as en from '../locale/en.json';
|
4
|
-
import * as fa from '../locale/fa.json';
|
5
|
-
import { AXTranslator } from './translator';
|
6
|
-
import * as i0 from "@angular/core";
|
7
|
-
export class AXTranslatorModule {
|
8
|
-
constructor() {
|
9
|
-
AXTranslator.load('en', en);
|
10
|
-
AXTranslator.load('fa', fa);
|
11
|
-
}
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
13
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
|
14
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorModule });
|
15
|
-
}
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorModule, decorators: [{
|
17
|
-
type: NgModule,
|
18
|
-
args: [{
|
19
|
-
imports: [],
|
20
|
-
exports: [AXTranslatorPipe],
|
21
|
-
declarations: [AXTranslatorPipe],
|
22
|
-
providers: [],
|
23
|
-
}]
|
24
|
-
}], ctorParameters: function () { return []; } });
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRvci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvc3JjL2xpYi90cmFuc2xhdG9yL3RyYW5zbGF0b3IubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFD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AgICBkZWNsYXJhdGlvbnM6IFtBWFRyYW5zbGF0b3JQaXBlXSxcbiAgICBwcm92aWRlcnM6IFtdLFxufSlcbmV4cG9ydCBjbGFzcyBBWFRyYW5zbGF0b3JNb2R1bGUge1xuICAgIGNvbnN0cnVjdG9yKCkge1xuICAgICAgICBBWFRyYW5zbGF0b3IubG9hZCgnZW4nLCBlbik7XG4gICAgICAgIEFYVHJhbnNsYXRvci5sb2FkKCdmYScsIGZhKTtcbiAgICB9XG59XG4iXX0=
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { Pipe } from '@angular/core';
|
2
|
-
import { AXTranslator } from './translator';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export class AXTranslatorPipe {
|
5
|
-
constructor() { }
|
6
|
-
// transform(value: string, lang?: string): Promise<string> {
|
7
|
-
// return new Promise<string>((resolve, reject) => {
|
8
|
-
// if (!value) {
|
9
|
-
// resolve(value);
|
10
|
-
// }
|
11
|
-
// resolve(this.translate.get(value, lang));
|
12
|
-
// });
|
13
|
-
// }
|
14
|
-
transform(value, lang) {
|
15
|
-
return AXTranslator.get(value, lang);
|
16
|
-
}
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
18
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
|
19
|
-
}
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorPipe, decorators: [{
|
21
|
-
type: Pipe,
|
22
|
-
args: [{ name: 'trans', pure: true }]
|
23
|
-
}], ctorParameters: function () { return []; } });
|
24
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRvci5waXBlLmpzIiwic291cmNlUm9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vIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nLCBsYW5nPzogc3RyaW5nKTogUHJvbWlzZTxzdHJpbmc+IHtcbiAgICAvLyAgICAgcmV0dXJuIG5ldyBQcm9taXNlPHN0cmluZz4oKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgIC8vICAgICAgICAgaWYgKCF2YWx1ZSkge1xuICAgIC8vICAgICAgICAgICAgIHJlc29sdmUodmFsdWUpO1xuICAgIC8vICAgICAgICAgfVxuICAgIC8vICAgICAgICAgcmVzb2x2ZSh0aGlzLnRyYW5zbGF0ZS5nZXQodmFsdWUsIGxhbmcpKTtcbiAgICAvLyAgICAgfSk7XG5cbiAgICAvLyB9XG5cbiAgICB0cmFuc2Zvcm0odmFsdWU6IHN0cmluZywgbGFuZz86IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBBWFRyYW5zbGF0b3IuZ2V0KHZhbHVlLCBsYW5nKTtcbiAgICB9XG59XG4iXX0=
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
2
|
-
import { AXTranslator } from './translator';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export class AXTranslatorService {
|
5
|
-
load(lang, value) {
|
6
|
-
AXTranslator.load(lang, value);
|
7
|
-
}
|
8
|
-
use(lang) {
|
9
|
-
AXTranslator.use(lang);
|
10
|
-
}
|
11
|
-
get(key, lang) {
|
12
|
-
return AXTranslator.get(lang, lang);
|
13
|
-
}
|
14
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
15
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorService, providedIn: 'platform' });
|
16
|
-
}
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXTranslatorService, decorators: [{
|
18
|
-
type: Injectable,
|
19
|
-
args: [{ providedIn: 'platform' }]
|
20
|
-
}] });
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRvci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3NyYy9saWIvdHJhbnNsYXRvci90cmFuc2xhdG9yLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sY0FBYyxDQUFDOztBQUc1QyxNQUFNLE9BQU8sbUJBQW1CO0lBRXJCLElBQUksQ0FBQyxJQUFZLEVBQUUsS0FBVTtRQUNoQyxZQUFZLENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxLQUFLLENBQUMsQ0FBQztJQUNuQyxDQUFDO0lBRU0sR0FBRyxDQUFDLElBQVk7UUFDbkIsWUFBWSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUMzQixDQUFDO0lBRU0sR0FBRyxDQUFDLEdBQVcsRUFBRSxJQUFhO1FBQ2pDLE9BQU8sWUFBWSxDQUFDLEdBQUcsQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDeEMsQ0FBQzt3R0FaUSxtQkFBbUI7NEdBQW5CLG1CQUFtQixjQUROLFVBQVU7OzRGQUN2QixtQkFBbUI7a0JBRC9CLFVBQVU7bUJBQUMsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgQVhUcmFuc2xhdG9yIH0gZnJvbSAnLi90cmFuc2xhdG9yJztcblxuQEluamVjdGFibGUoeyBwcm92aWRlZEluOiAncGxhdGZvcm0nIH0pXG5leHBvcnQgY2xhc3MgQVhUcmFuc2xhdG9yU2VydmljZSB7XG5cbiAgICBwdWJsaWMgbG9hZChsYW5nOiBzdHJpbmcsIHZhbHVlOiBhbnkpIHtcbiAgICAgICAgQVhUcmFuc2xhdG9yLmxvYWQobGFuZywgdmFsdWUpO1xuICAgIH1cblxuICAgIHB1YmxpYyB1c2UobGFuZzogc3RyaW5nKSB7XG4gICAgICAgIEFYVHJhbnNsYXRvci51c2UobGFuZyk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldChrZXk6IHN0cmluZywgbGFuZz86IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBBWFRyYW5zbGF0b3IuZ2V0KGxhbmcsIGxhbmcpO1xuICAgIH1cbn1cblxuIl19
|
@@ -1,133 +0,0 @@
|
|
1
|
-
import { AXFetchProp } from '../object/object-util';
|
2
|
-
// @dynamic
|
3
|
-
export class AXArrayUtil {
|
4
|
-
static pickRandom(array) {
|
5
|
-
return array[Math.floor(Math.random() * array.length)];
|
6
|
-
}
|
7
|
-
static insert(array, index, ...rest) {
|
8
|
-
array.splice.apply(array, [index, 0].concat(Array.prototype.slice.call(rest, 1)));
|
9
|
-
return array;
|
10
|
-
}
|
11
|
-
static range(min, max) {
|
12
|
-
return new Array(max - min).fill(1).map((d, i) => i);
|
13
|
-
}
|
14
|
-
static filter(array, filters) {
|
15
|
-
if (filters == null || filters.length === 0) {
|
16
|
-
return array;
|
17
|
-
}
|
18
|
-
const lamda = (item) => {
|
19
|
-
let result = true;
|
20
|
-
for (const key in filters) {
|
21
|
-
if (filters.hasOwnProperty(key)) {
|
22
|
-
const f = filters[key];
|
23
|
-
if (f !== 'AND') {
|
24
|
-
const vals = [];
|
25
|
-
const mt = f.field.match(/\[\:(.*?)\]/);
|
26
|
-
if (mt && mt.length > 1) {
|
27
|
-
const p1 = f.field.replace(mt[0], '');
|
28
|
-
const p2 = mt[1];
|
29
|
-
const prop = AXFetchProp(item, p1);
|
30
|
-
if (prop instanceof Array && prop.length) {
|
31
|
-
vals.push(...prop.map(m => (AXFetchProp(m, p2))));
|
32
|
-
}
|
33
|
-
else {
|
34
|
-
result = false;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
else {
|
38
|
-
vals.push(AXFetchProp(item, f.field));
|
39
|
-
}
|
40
|
-
for (const j in vals) {
|
41
|
-
if (vals.hasOwnProperty(j)) {
|
42
|
-
let v1 = vals[j];
|
43
|
-
const v2 = f.value;
|
44
|
-
if (f.dataType === 'string') {
|
45
|
-
v1 = v1.toString();
|
46
|
-
switch (f.condition) {
|
47
|
-
case 'equal':
|
48
|
-
result = (v1 && v2) && v1.toLowerCase() === v2.toLowerCase();
|
49
|
-
break;
|
50
|
-
case 'not-equal':
|
51
|
-
result = !((v1 && v2) && v1.toLowerCase() === v2.toLowerCase());
|
52
|
-
break;
|
53
|
-
case 'contains':
|
54
|
-
result = ((v1 && v2) && (v1.toLowerCase().includes(v2.toLowerCase())));
|
55
|
-
break;
|
56
|
-
case 'not-contains':
|
57
|
-
result = !((v1 && v2) && (v1.toLowerCase().includes(v2.toLowerCase())));
|
58
|
-
break;
|
59
|
-
case 'start-with':
|
60
|
-
result = ((v1 && v2) && (v1.toLowerCase().startsWith(v2.toLowerCase())));
|
61
|
-
break;
|
62
|
-
case 'end-with':
|
63
|
-
result = ((v1 && v2) && (v1.toLowerCase().endsWith(v2.toLowerCase())));
|
64
|
-
break;
|
65
|
-
case 'is-empty':
|
66
|
-
result = v1 == null || v1 === undefined;
|
67
|
-
break;
|
68
|
-
case 'is-not-empty':
|
69
|
-
result = !(v1 == null || v1 === undefined);
|
70
|
-
break;
|
71
|
-
default:
|
72
|
-
console.error('The condition is not defined');
|
73
|
-
result = false;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
else if (f.dataType === 'date') {
|
77
|
-
}
|
78
|
-
else if (f.dataType === 'number') {
|
79
|
-
v1 = Number(v1);
|
80
|
-
switch (f.condition) {
|
81
|
-
case 'equal':
|
82
|
-
result = v1 === v2;
|
83
|
-
break;
|
84
|
-
case 'not-equal':
|
85
|
-
result = v1 !== v2;
|
86
|
-
break;
|
87
|
-
case 'contains':
|
88
|
-
result = v2 && v2 instanceof Array && v2.includes(v1);
|
89
|
-
break;
|
90
|
-
case 'less-than':
|
91
|
-
result = v1 < v2;
|
92
|
-
break;
|
93
|
-
case 'less-than-equal':
|
94
|
-
result = v1 <= v2;
|
95
|
-
break;
|
96
|
-
case 'greater-than':
|
97
|
-
result = v1 > v2;
|
98
|
-
break;
|
99
|
-
case 'greater-than-equal':
|
100
|
-
result = v1 >= v2;
|
101
|
-
break;
|
102
|
-
case 'is-empty':
|
103
|
-
result = v1 == null || v1 === undefined;
|
104
|
-
break;
|
105
|
-
case 'is-not-empty':
|
106
|
-
result = !(v1 == null || v1 === undefined);
|
107
|
-
break;
|
108
|
-
default:
|
109
|
-
console.error('The condition is not defined');
|
110
|
-
result = false;
|
111
|
-
}
|
112
|
-
}
|
113
|
-
else {
|
114
|
-
console.error('The datatype is not supported');
|
115
|
-
result = false;
|
116
|
-
}
|
117
|
-
if (result) {
|
118
|
-
break;
|
119
|
-
}
|
120
|
-
}
|
121
|
-
}
|
122
|
-
}
|
123
|
-
if (!result) {
|
124
|
-
return false;
|
125
|
-
}
|
126
|
-
}
|
127
|
-
}
|
128
|
-
return true;
|
129
|
-
};
|
130
|
-
return array.filter(lamda);
|
131
|
-
}
|
132
|
-
}
|
133
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJyYXktdXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9zcmMvbGliL3V0aWxzL2FycmF5L2FycmF5LXV0aWwudHMiXSwibmFtZXMiOltdLC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hcHBseShhcnJheSwgW2luZGV4LCAwXS5jb25jYXQoQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwocmVzdCwgMSkpKTtcbiAgICAgICAgcmV0dXJuIGFycmF5O1xuICAgIH1cblxuICAgIHN0YXRpYyByYW5nZShtaW46IG51bWJlciwgbWF4OiBudW1iZXIpOiBudW1iZXJbXSB7XG4gICAgICAgIHJldHVybiBuZXcgQXJyYXkobWF4IC0gbWluKS5maWxsKDEpLm1hcCgoZCwgaSkgPT4gaSk7XG4gICAgfVxuXG4gICAgc3RhdGljIGZpbHRlcihhcnJheTogYW55W10sIGZpbHRlcnM6IGFueVtdKTogYW55W10ge1xuICAgICAgICBpZiAoZmlsdGVycyA9PSBudWxsIHx8IGZpbHRlcnMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gYXJyYXk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbGFtZGEgPSAoaXRlbSkgPT4ge1xuICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHRydWU7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBmaWx0ZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGZpbHRlcnMuaGFzT3duUHJvcGVydHkoa2V5KSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBmID0gZmlsdGVyc1trZXldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZiAhPT0gJ0FORCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG10ID0gZi5maWVsZC5tYXRjaCgvXFxbXFw6KC4qPylcXF0vKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtdCAmJiBtdC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcDEgPSBmLmZpZWxkLnJlcGxhY2UobXRbMF0sICcnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwMiA9IG10WzFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHByb3AgPSBBWEZldGNoUHJvcChpdGVtLCBwMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByb3AgaW5zdGFuY2VvZiBBcnJheSAmJiBwcm9wLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWxzLnB1c2goLi4ucHJvcC5tYXAobSA9PiAoQVhGZXRjaFByb3AobSwgcDIpKSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFscy5wdXNoKEFYRmV0Y2hQcm9wKGl0ZW0sIGYuZmllbGQpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgaiBpbiB2YWxzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHMuaGFzT3duUHJvcGVydHkoaikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHYxID0gdmFsc1tqXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdjIgPSBmLnZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZi5kYXRhVHlwZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYxID0gdjEudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoZi5jb25kaXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdlcXVhbCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9ICh2MSAmJiB2MikgJiYgdjEudG9Mb3dlckNhc2UoKSA9PT0gdjIudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbm90LWVxdWFsJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gISgodjEgJiYgdjIpICYmIHYxLnRvTG93ZXJDYXNlKCkgPT09IHYyLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjb250YWlucyc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9ICgodjEgJiYgdjIpICYmICh2MS50b0xvd2VyQ2FzZSgpLmluY2x1ZGVzKHYyLnRvTG93ZXJDYXNlKCkpKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ25vdC1jb250YWlucyc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9ICEoKHYxICYmIHYyKSAmJiAodjEudG9Mb3dlckNhc2UoKS5pbmNsdWRlcyh2Mi50b0xvd2VyQ2FzZSgpKSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdzdGFydC13aXRoJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gKCh2MSAmJiB2MikgJiYgKHYxLnRvTG93ZXJDYXNlKCkuc3RhcnRzV2l0aCh2Mi50b0xvd2VyQ2FzZSgpKSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdlbmQtd2l0aCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9ICgodjEgJiYgdjIpICYmICh2MS50b0xvd2VyQ2FzZSgpLmVuZHNXaXRoKHYyLnRvTG93ZXJDYXNlKCkpKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2lzLWVtcHR5JzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gdjEgPT0gbnVsbCB8fCB2MSA9PT0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdpcy1ub3QtZW1wdHknOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSAhKHYxID09IG51bGwgfHwgdjEgPT09IHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ1RoZSBjb25kaXRpb24gaXMgbm90IGRlZmluZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZi5kYXRhVHlwZSA9PT0gJ2RhdGUnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZi5kYXRhVHlwZSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYxID0gTnVtYmVyKHYxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoZi5jb25kaXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdlcXVhbCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHYxID09PSB2MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbm90LWVxdWFsJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gdjEgIT09IHYyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjb250YWlucyc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHYyICYmIHYyIGluc3RhbmNlb2YgQXJyYXkgJiYgdjIuaW5jbHVkZXModjEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdsZXNzLXRoYW4nOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSB2MSA8IHYyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdsZXNzLXRoYW4tZXF1YWwnOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSB2MSA8PSB2MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnZ3JlYXRlci10aGFuJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gdjEgPiB2MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnZ3JlYXRlci10aGFuLWVxdWFsJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gdjEgPj0gdjI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2lzLWVtcHR5JzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gdjEgPT0gbnVsbCB8fCB2MSA9PT0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdpcy1ub3QtZW1wdHknOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSAhKHYxID09IG51bGwgfHwgdjEgPT09IHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ1RoZSBjb25kaXRpb24gaXMgbm90IGRlZmluZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdUaGUgZGF0YXR5cGUgaXMgbm90IHN1cHBvcnRlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gYXJyYXkuZmlsdGVyKGxhbWRhKTtcbiAgICB9XG5cbn1cblxuXG5cblxuXG4iXX0=
|