@yelon/util 18.1.1 → 18.1.3
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/esm2022/array/array.service.mjs +3 -3
- package/esm2022/browser/cookie.service.mjs +3 -3
- package/esm2022/browser/scroll.service.mjs +3 -3
- package/esm2022/config/config.service.mjs +3 -3
- package/esm2022/format/currency.service.mjs +3 -3
- package/esm2022/other/lazy.service.mjs +3 -3
- package/esm2022/other/path-to-regexp.service.mjs +3 -3
- package/esm2022/pipes/currency/cny.pipe.mjs +3 -3
- package/esm2022/pipes/currency/mega.pipe.mjs +3 -3
- package/esm2022/pipes/currency/module.mjs +4 -4
- package/esm2022/pipes/currency/price.pipe.mjs +3 -3
- package/esm2022/pipes/filter/filter.pipe.mjs +3 -3
- package/esm2022/pipes/filter/module.mjs +4 -4
- package/esm2022/pipes/format/mask.pipe.mjs +3 -3
- package/esm2022/pipes/format/module.mjs +4 -4
- package/fesm2022/array.mjs +3 -3
- package/fesm2022/browser.mjs +6 -6
- package/fesm2022/config.mjs +3 -3
- package/fesm2022/date-time.mjs.map +1 -1
- package/fesm2022/format.mjs +3 -3
- package/fesm2022/format.mjs.map +1 -1
- package/fesm2022/other.mjs +6 -6
- package/fesm2022/pipe-currency.mjs +13 -13
- package/fesm2022/pipe-filter.mjs +7 -7
- package/fesm2022/pipe-format.mjs +7 -7
- package/other/path-to-regexp.service.d.ts +1 -1
- package/package.json +1 -1
| @@ -268,10 +268,10 @@ export class ArrayService { | |
| 268 268 | 
             
                    }, new Map())
         | 
| 269 269 | 
             
                        .values());
         | 
| 270 270 | 
             
                }
         | 
| 271 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 272 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 271 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ArrayService, deps: [{ token: i1.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 272 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ArrayService, providedIn: 'root' }); }
         | 
| 273 273 | 
             
            }
         | 
| 274 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 274 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ArrayService, decorators: [{
         | 
| 275 275 | 
             
                        type: Injectable,
         | 
| 276 276 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 277 277 | 
             
                    }], ctorParameters: () => [{ type: i1.YunzaiConfigService }] });
         | 
| @@ -90,10 +90,10 @@ export class CookieService { | |
| 90 90 | 
             
                removeAll() {
         | 
| 91 91 | 
             
                    this.doc.cookie = '';
         | 
| 92 92 | 
             
                }
         | 
| 93 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 94 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 93 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CookieService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 94 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CookieService, providedIn: 'root' }); }
         | 
| 95 95 | 
             
            }
         | 
| 96 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 96 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CookieService, decorators: [{
         | 
| 97 97 | 
             
                        type: Injectable,
         | 
| 98 98 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 99 99 | 
             
                    }] });
         | 
| @@ -75,10 +75,10 @@ export class ScrollService { | |
| 75 75 | 
             
                    }
         | 
| 76 76 | 
             
                    this.scrollToElement(this._getDoc().body, topOffset);
         | 
| 77 77 | 
             
                }
         | 
| 78 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 79 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 78 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ScrollService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 79 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ScrollService, providedIn: 'root' }); }
         | 
| 80 80 | 
             
            }
         | 
| 81 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 81 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ScrollService, decorators: [{
         | 
| 82 82 | 
             
                        type: Injectable,
         | 
| 83 83 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 84 84 | 
             
                    }] });
         | 
| @@ -23,10 +23,10 @@ export class YunzaiConfigService { | |
| 23 23 | 
             
                set(componentName, value) {
         | 
| 24 24 | 
             
                    this.config[componentName] = { ...this.config[componentName], ...value };
         | 
| 25 25 | 
             
                }
         | 
| 26 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 27 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 26 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: YunzaiConfigService, deps: [{ token: YUNZAI_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 27 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: YunzaiConfigService, providedIn: 'root' }); }
         | 
| 28 28 | 
             
            }
         | 
| 29 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 29 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: YunzaiConfigService, decorators: [{
         | 
| 30 30 | 
             
                        type: Injectable,
         | 
| 31 31 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 32 32 | 
             
                    }], ctorParameters: () => [{ type: undefined, decorators: [{
         | 
| @@ -223,10 +223,10 @@ export class CurrencyService { | |
| 223 223 | 
             
                            : integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));
         | 
| 224 224 | 
             
                    return ret;
         | 
| 225 225 | 
             
                }
         | 
| 226 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 227 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 226 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, deps: [{ token: i1.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 227 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
         | 
| 228 228 | 
             
            }
         | 
| 229 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 229 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, decorators: [{
         | 
| 230 230 | 
             
                        type: Injectable,
         | 
| 231 231 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 232 232 | 
             
                    }], ctorParameters: () => [{ type: i1.YunzaiConfigService }] });
         | 
| @@ -119,10 +119,10 @@ export class LazyService { | |
| 119 119 | 
             
                        resolve(item);
         | 
| 120 120 | 
             
                    });
         | 
| 121 121 | 
             
                }
         | 
| 122 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 123 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 122 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LazyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 123 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LazyService, providedIn: 'root' }); }
         | 
| 124 124 | 
             
            }
         | 
| 125 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 125 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LazyService, decorators: [{
         | 
| 126 126 | 
             
                        type: Injectable,
         | 
| 127 127 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 128 128 | 
             
                    }] });
         | 
| @@ -227,10 +227,10 @@ export class PathToRegexpService { | |
| 227 227 | 
             
                    }
         | 
| 228 228 | 
             
                    return this.stringToRegexp(/** @type {string} */ path, keys, options);
         | 
| 229 229 | 
             
                }
         | 
| 230 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 231 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 230 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PathToRegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 231 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PathToRegexpService, providedIn: 'root' }); }
         | 
| 232 232 | 
             
            }
         | 
| 233 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 233 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PathToRegexpService, decorators: [{
         | 
| 234 234 | 
             
                        type: Injectable,
         | 
| 235 235 | 
             
                        args: [{
         | 
| 236 236 | 
             
                                providedIn: 'root'
         | 
| @@ -13,10 +13,10 @@ export class CurrencyCNYPipe { | |
| 13 13 | 
             
                transform(value, options) {
         | 
| 14 14 | 
             
                    return this.srv.cny(value, options);
         | 
| 15 15 | 
             
                }
         | 
| 16 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 17 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 16 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyCNYPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 17 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyCNYPipe, isStandalone: true, name: "cny" }); }
         | 
| 18 18 | 
             
            }
         | 
| 19 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 19 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
         | 
| 20 20 | 
             
                        type: Pipe,
         | 
| 21 21 | 
             
                        args: [{ name: 'cny', standalone: true }]
         | 
| 22 22 | 
             
                    }] });
         | 
| @@ -15,10 +15,10 @@ export class CurrencyMegaPipe { | |
| 15 15 | 
             
                    const res = this.srv.mega(value, options);
         | 
| 16 16 | 
             
                    return res.value + (this.isCN ? res.unitI18n : res.unit);
         | 
| 17 17 | 
             
                }
         | 
| 18 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 19 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 18 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyMegaPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 19 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyMegaPipe, isStandalone: true, name: "mega" }); }
         | 
| 20 20 | 
             
            }
         | 
| 21 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 21 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
         | 
| 22 22 | 
             
                        type: Pipe,
         | 
| 23 23 | 
             
                        args: [{ name: 'mega', standalone: true }]
         | 
| 24 24 | 
             
                    }] });
         | 
| @@ -5,11 +5,11 @@ import { CurrencyPricePipe } from './price.pipe'; | |
| 5 5 | 
             
            import * as i0 from "@angular/core";
         | 
| 6 6 | 
             
            const PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe];
         | 
| 7 7 | 
             
            export class CurrencyPipeModule {
         | 
| 8 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 9 | 
            -
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18. | 
| 10 | 
            -
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18. | 
| 8 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
         | 
| 9 | 
            +
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule, imports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] }); }
         | 
| 10 | 
            +
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule }); }
         | 
| 11 11 | 
             
            }
         | 
| 12 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 12 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule, decorators: [{
         | 
| 13 13 | 
             
                        type: NgModule,
         | 
| 14 14 | 
             
                        args: [{
         | 
| 15 15 | 
             
                                imports: PIPES,
         | 
| @@ -17,10 +17,10 @@ export class CurrencyPricePipe { | |
| 17 17 | 
             
                transform(value, options) {
         | 
| 18 18 | 
             
                    return this.srv.format(value, options);
         | 
| 19 19 | 
             
                }
         | 
| 20 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 21 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 20 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 21 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPricePipe, isStandalone: true, name: "price" }); }
         | 
| 22 22 | 
             
            }
         | 
| 23 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 23 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPricePipe, decorators: [{
         | 
| 24 24 | 
             
                        type: Pipe,
         | 
| 25 25 | 
             
                        args: [{ name: 'price', standalone: true }]
         | 
| 26 26 | 
             
                    }] });
         | 
| @@ -10,10 +10,10 @@ export class FilterPipe { | |
| 10 10 | 
             
                transform(array, matcher, ...args) {
         | 
| 11 11 | 
             
                    return array.filter(i => matcher(i, ...args));
         | 
| 12 12 | 
             
                }
         | 
| 13 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 14 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 13 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 14 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FilterPipe, isStandalone: true, name: "filter", pure: false }); }
         | 
| 15 15 | 
             
            }
         | 
| 16 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 16 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipe, decorators: [{
         | 
| 17 17 | 
             
                        type: Pipe,
         | 
| 18 18 | 
             
                        args: [{ name: 'filter', standalone: true, pure: false }]
         | 
| 19 19 | 
             
                    }] });
         | 
| @@ -3,11 +3,11 @@ import { FilterPipe } from './filter.pipe'; | |
| 3 3 | 
             
            import * as i0 from "@angular/core";
         | 
| 4 4 | 
             
            const PIPES = [FilterPipe];
         | 
| 5 5 | 
             
            export class FilterPipeModule {
         | 
| 6 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 7 | 
            -
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18. | 
| 8 | 
            -
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18. | 
| 6 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
         | 
| 7 | 
            +
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule, imports: [FilterPipe], exports: [FilterPipe] }); }
         | 
| 8 | 
            +
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule }); }
         | 
| 9 9 | 
             
            }
         | 
| 10 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 10 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule, decorators: [{
         | 
| 11 11 | 
             
                        type: NgModule,
         | 
| 12 12 | 
             
                        args: [{
         | 
| 13 13 | 
             
                                imports: PIPES,
         | 
| @@ -24,10 +24,10 @@ export class FormatMaskPipe { | |
| 24 24 | 
             
                transform(value, mask) {
         | 
| 25 25 | 
             
                    return formatMask(value, mask);
         | 
| 26 26 | 
             
                }
         | 
| 27 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 28 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 27 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 28 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FormatMaskPipe, isStandalone: true, name: "mask" }); }
         | 
| 29 29 | 
             
            }
         | 
| 30 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 30 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatMaskPipe, decorators: [{
         | 
| 31 31 | 
             
                        type: Pipe,
         | 
| 32 32 | 
             
                        args: [{ name: 'mask', standalone: true }]
         | 
| 33 33 | 
             
                    }] });
         | 
| @@ -3,11 +3,11 @@ import { FormatMaskPipe } from './mask.pipe'; | |
| 3 3 | 
             
            import * as i0 from "@angular/core";
         | 
| 4 4 | 
             
            const PIPES = [FormatMaskPipe];
         | 
| 5 5 | 
             
            export class FormatPipeModule {
         | 
| 6 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 7 | 
            -
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18. | 
| 8 | 
            -
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18. | 
| 6 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
         | 
| 7 | 
            +
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule, imports: [FormatMaskPipe], exports: [FormatMaskPipe] }); }
         | 
| 8 | 
            +
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule }); }
         | 
| 9 9 | 
             
            }
         | 
| 10 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 10 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule, decorators: [{
         | 
| 11 11 | 
             
                        type: NgModule,
         | 
| 12 12 | 
             
                        args: [{
         | 
| 13 13 | 
             
                                imports: PIPES,
         | 
    
        package/fesm2022/array.mjs
    CHANGED
    
    | @@ -269,10 +269,10 @@ class ArrayService { | |
| 269 269 | 
             
                    }, new Map())
         | 
| 270 270 | 
             
                        .values());
         | 
| 271 271 | 
             
                }
         | 
| 272 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 273 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 272 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ArrayService, deps: [{ token: i1.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 273 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ArrayService, providedIn: 'root' }); }
         | 
| 274 274 | 
             
            }
         | 
| 275 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 275 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ArrayService, decorators: [{
         | 
| 276 276 | 
             
                        type: Injectable,
         | 
| 277 277 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 278 278 | 
             
                    }], ctorParameters: () => [{ type: i1.YunzaiConfigService }] });
         | 
    
        package/fesm2022/browser.mjs
    CHANGED
    
    | @@ -91,10 +91,10 @@ class CookieService { | |
| 91 91 | 
             
                removeAll() {
         | 
| 92 92 | 
             
                    this.doc.cookie = '';
         | 
| 93 93 | 
             
                }
         | 
| 94 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 95 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 94 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CookieService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 95 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CookieService, providedIn: 'root' }); }
         | 
| 96 96 | 
             
            }
         | 
| 97 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 97 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CookieService, decorators: [{
         | 
| 98 98 | 
             
                        type: Injectable,
         | 
| 99 99 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 100 100 | 
             
                    }] });
         | 
| @@ -219,10 +219,10 @@ class ScrollService { | |
| 219 219 | 
             
                    }
         | 
| 220 220 | 
             
                    this.scrollToElement(this._getDoc().body, topOffset);
         | 
| 221 221 | 
             
                }
         | 
| 222 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 223 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 222 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ScrollService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 223 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ScrollService, providedIn: 'root' }); }
         | 
| 224 224 | 
             
            }
         | 
| 225 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 225 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ScrollService, decorators: [{
         | 
| 226 226 | 
             
                        type: Injectable,
         | 
| 227 227 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 228 228 | 
             
                    }] });
         | 
    
        package/fesm2022/config.mjs
    CHANGED
    
    | @@ -37,10 +37,10 @@ class YunzaiConfigService { | |
| 37 37 | 
             
                set(componentName, value) {
         | 
| 38 38 | 
             
                    this.config[componentName] = { ...this.config[componentName], ...value };
         | 
| 39 39 | 
             
                }
         | 
| 40 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 41 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 40 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: YunzaiConfigService, deps: [{ token: YUNZAI_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 41 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: YunzaiConfigService, providedIn: 'root' }); }
         | 
| 42 42 | 
             
            }
         | 
| 43 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 43 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: YunzaiConfigService, decorators: [{
         | 
| 44 44 | 
             
                        type: Injectable,
         | 
| 45 45 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 46 46 | 
             
                    }], ctorParameters: () => [{ type: undefined, decorators: [{
         | 
| @@ -1 +1 @@ | |
| 1 | 
            -
            {"version":3,"file":"date-time.mjs","sources":["../../../../packages/util/date-time/time.ts","../../../../packages/util/date-time/picker.ts","../../../../packages/util/date-time/date-time.ts"],"sourcesContent":["import {\n  addDays,\n  endOfDay,\n  endOfMonth,\n  endOfWeek,\n  endOfYear,\n  parse,\n  parseISO,\n  startOfDay,\n  startOfMonth,\n  startOfWeek,\n  startOfYear,\n  subMonths,\n  subWeeks,\n  subYears,\n  format,\n  formatDistanceToNow\n} from 'date-fns';\n\nimport type { YunzaiThemePipeDateFormatCustom } from '@yelon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { DateLocale } from 'ng-zorro-antd/i18n';\n\n/**\n * Get the time range, return `[ Date, Date]` for the start and end dates\n *\n * 获取时间范围\n *\n * @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数\n * @param time 开始时间\n * @param ignoreMaxTime 忽略追加结束日期的最大时间值\n */\nexport function getTimeDistance(\n  type: 'today' | '-today' | 'yesterday' | 'week' | '-week' | 'month' | '-month' | 'year' | '-year' | number,\n  time?: Date | string | number,\n  options?: { ignoreMaxTime?: boolean }\n): [Date, Date] {\n  time = time\n    ? typeof time === 'string'\n      ? parse(time, 'yyyy-MM-dd HH:mm:ss', new Date())\n      : new Date(time)\n    : new Date();\n  const opt: { weekStartsOn: 1 } = { weekStartsOn: 1 };\n\n  let res: [Date, Date];\n  switch (type) {\n    case 'today':\n      res = [time, time];\n      break;\n    case '-today':\n      res = [addDays(time, -1), time];\n      break;\n    case 'yesterday':\n      res = [addDays(time, -1), addDays(time, -1)];\n      break;\n    case 'week':\n      res = [startOfWeek(time, opt), endOfWeek(time, opt)];\n      break;\n    case '-week':\n      res = [startOfWeek(subWeeks(time, 1), opt), endOfWeek(subWeeks(time, 1), opt)];\n      break;\n    case 'month':\n      res = [startOfMonth(time), endOfMonth(time)];\n      break;\n    case '-month':\n      res = [startOfMonth(subMonths(time, 1)), endOfMonth(subMonths(time, 1))];\n      break;\n    case 'year':\n      res = [startOfYear(time), endOfYear(time)];\n      break;\n    case '-year':\n      res = [startOfYear(subYears(time, 1)), endOfYear(subYears(time, 1))];\n      break;\n    default:\n      res = type > 0 ? [time, addDays(time, type)] : [addDays(time, type), time];\n      break;\n  }\n  return options?.ignoreMaxTime ? res : fixEndTimeOfRange(res);\n}\n\n/**\n * fix time is the most, big value\n */\nexport function fixEndTimeOfRange(dates: [Date, Date]): [Date, Date] {\n  return [startOfDay(dates[0]), endOfDay(dates[1])];\n}\n\nexport interface ToDateOptions {\n  /** If parsing fails try to parse the date by pressing `formatString` */\n  formatString?: string;\n  /** If parsing fails returned default value, default: `new Date(NaN)` */\n  defaultValue?: NzSafeAny;\n  timestampSecond?: boolean;\n}\n\n/**\n * Convert to `Date` format\n *\n * @param value When is a number, it's treated as a timestamp; If it's seconds, you need to provide the `options.timestampSecond` parameter.\n */\nexport function toDate(value?: Date | string | number | null, options?: string | ToDateOptions): Date {\n  const { formatString, defaultValue, timestampSecond } = {\n    formatString: 'yyyy-MM-dd HH:mm:ss',\n    defaultValue: new Date(NaN),\n    timestampSecond: false,\n    ...(typeof options === 'string' ? { formatString: options } : options)\n  };\n  if (value == null) {\n    return defaultValue;\n  }\n  if (value instanceof Date) {\n    return value;\n  }\n  if (typeof value === 'number' || (typeof value === 'string' && /^[0-9]+$/.test(value))) {\n    const valueNumber = +value;\n    return new Date(timestampSecond ? valueNumber * 1000 : valueNumber);\n  }\n  let tryDate = parseISO(value);\n  if (isNaN(tryDate as NzSafeAny)) {\n    tryDate = parse(value, formatString!, new Date());\n  }\n\n  return isNaN(tryDate as NzSafeAny) ? defaultValue : tryDate;\n}\n\n/**\n * Format date, supports `Date, number, string` types\n *\n * @param value When is a number, it is treated as a timestamp (Support seconds and milliseconds timestamp).\n * @param formatString Please refer to [date-fnd format](https://date-fns.org/v2.30.0/docs/format) for string format\n * @param dateLocale Recommended to be consistent with NG-ZORRO by using `inject(NZ_DATE_LOCALE)`\n */\nexport function formatDate(\n  value: Date | string | number,\n  formatString: string,\n  options?: { locale?: DateLocale; customFormat?: YunzaiThemePipeDateFormatCustom }\n): string {\n  value = toDate(value);\n  if (isNaN(value as NzSafeAny)) return '';\n\n  const langOpt = { locale: options?.locale };\n  return formatString === 'fn'\n    ? formatDistanceToNow(value, langOpt)\n    : (options?.customFormat ?? format)(value, formatString, langOpt);\n}\n","import { addDays, addSeconds, differenceInCalendarDays, format } from 'date-fns';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { DisabledDateFn, DisabledTimeConfig, DisabledTimeFn } from 'ng-zorro-antd/date-picker';\n\n// TODO: timezone process\nexport class DateTimePickerUtil {\n  /**\n   * Current local time\n   *\n   * 当前本地时间\n   */\n  get now(): Date {\n    return new Date();\n  }\n  /**\n   * Current local date (not including time part)\n   *\n   * 当前本地日期(不包含时间部分)\n   */\n  get date(): Date {\n    return this.removeTime(this.now);\n  }\n  /**\n   * Remove the time part of the date\n   *\n   * 移除日期的时间部分\n   */\n  removeTime(d: Date): Date {\n    return new Date(d.toDateString());\n  }\n  /**\n   * Format date-time\n   *\n   * 格式化日期\n   */\n  format(d: number | Date, formatString: string = 'yyyy-MM-dd HH:mm:ss'): string {\n    return format(d, formatString);\n  }\n  private genTick(count: number): number[] {\n    return new Array(count).fill(0).map((_, idx) => idx);\n  }\n  /**\n   * Calculate the number of days between two dates, `0` means the same day\n   *\n   * 计算两个日期相差天数,`0` 表示同一天\n   */\n  getDiffDays(dateLeft: Date | number, dateRight?: Date | number): number {\n    return differenceInCalendarDays(\n      dateLeft,\n      typeof dateRight === 'number' ? addDays(this.date, dateRight) : dateRight || this.date\n    );\n  }\n  /**\n   * Disabled Before date (Default: today), Generally serves `nzDisabledDate`\n   *\n   * 禁用之前日期(默认:今天),一般服务于 `nzDisabledDate`\n   */\n  disabledBeforeDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n    return (d): boolean => this.getDiffDays(d, options?.offsetDays) < 0;\n  }\n  /**\n   * Disabled After date (Default: today), Generally serves `nzDisabledDate`\n   *\n   * 禁用之后日期(默认:今天),一般服务于 `nzDisabledDate`\n   */\n  disabledAfterDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n    return (d): boolean => this.getDiffDays(d, options?.offsetDays) > 0;\n  }\n  private baseDisabledTime(type: 'before' | 'after', offsetSeconds?: number): DisabledTimeFn {\n    const tick24 = this.genTick(24);\n    const tick60 = this.genTick(60);\n    return (current): DisabledTimeConfig => {\n      const cur = current as Date;\n      if (cur == null) {\n        return {} as NzSafeAny;\n      }\n      const now = addSeconds(this.now, offsetSeconds || 0);\n      const nowHours = now.getHours();\n      const nowMinutes = now.getMinutes();\n      const curHours = cur.getHours();\n      const isToday = this.getDiffDays(this.removeTime(cur)) === 0;\n      return {\n        nzDisabledHours: () => {\n          if (!isToday) return [];\n          return type === 'before' ? tick24.slice(0, nowHours) : tick24.slice(nowHours + 1);\n        },\n        nzDisabledMinutes: () => {\n          if (isToday && curHours === nowHours) {\n            return type === 'before' ? tick60.slice(0, nowMinutes) : tick60.slice(nowMinutes + 1);\n          }\n          return [];\n        },\n        nzDisabledSeconds: () => {\n          if (isToday && curHours === nowHours && cur.getMinutes() === nowMinutes) {\n            const nowSeconds = now.getSeconds();\n            return type === 'before' ? tick60.slice(0, nowSeconds) : tick60.slice(nowSeconds + 1);\n          }\n          return [];\n        }\n      };\n    };\n  }\n  /**\n   * Disabled Before time (Default: now), Generally serves `nzDisabledTime`\n   *\n   * 禁用之前时间(默认:现在),一般服务于 `nzDisabledTime`\n   */\n  disabledBeforeTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n    return this.baseDisabledTime('before', options?.offsetSeconds);\n  }\n  /**\n   * Disabled After time (Default: now), Generally serves `nzDisabledTime`\n   *\n   * 禁用之后时间(默认:现在),一般服务于 `nzDisabledTime`\n   */\n  disabledAfterTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n    return this.baseDisabledTime('after', options?.offsetSeconds);\n  }\n}\n\nexport const dateTimePickerUtil = new DateTimePickerUtil();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAuBA;;;;;;;;AAQG;SACa,eAAe,CAC7B,IAA0G,EAC1G,IAA6B,EAC7B,OAAqC,EAAA;AAErC,IAAA,IAAI,GAAG,IAAI;AACT,UAAE,OAAO,IAAI,KAAK,QAAQ;cACtB,KAAK,CAAC,IAAI,EAAE,qBAAqB,EAAE,IAAI,IAAI,EAAE,CAAC;AAChD,cAAE,IAAI,IAAI,CAAC,IAAI,CAAC;AAClB,UAAE,IAAI,IAAI,EAAE,CAAC;AACf,IAAA,MAAM,GAAG,GAAwB,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;AAErD,IAAA,IAAI,GAAiB,CAAC;IACtB,QAAQ,IAAI;AACV,QAAA,KAAK,OAAO;AACV,YAAA,GAAG,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACnB,MAAM;AACR,QAAA,KAAK,QAAQ;AACX,YAAA,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YAChC,MAAM;AACR,QAAA,KAAK,WAAW;AACd,YAAA,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,MAAM;AACR,QAAA,KAAK,MAAM;AACT,YAAA,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;YACrD,MAAM;AACR,QAAA,KAAK,OAAO;YACV,GAAG,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,C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,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;iBACnF;gBACD,iBAAiB,EAAE,MAAK;AACtB,oBAAA,IAAI,OAAO,IAAI,QAAQ,KAAK,QAAQ,EAAE;wBACpC,OAAO,IAAI,KAAK,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;qBACvF;AACD,oBAAA,OAAO,EAAE,CAAC;iBACX;gBACD,iBAAiB,EAAE,MAAK;AACtB,oBAAA,IAAI,OAAO,IAAI,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,EAAE,KAAK,UAAU,EAAE;AACvE,wBAAA,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;wBACpC,OAAO,IAAI,KAAK,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;qBACvF;AACD,oBAAA,OAAO,EAAE,CAAC;iBACX;aACF,CAAC;AACJ,SAAC,CAAC;KACH;AACD;;;;AAIG;AACH,IAAA,kBAAkB,CAAC,OAAoC,EAAA;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAChE;AACD;;;;AAIG;AACH,IAAA,iBAAiB,CAAC,OAAoC,EAAA;QACpD,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAC/D;AACF,CAAA;AAEY,MAAA,kBAAkB,GAAG,IAAI,kBAAkB;;ACzHxD;;AAEG;;;;"}
         | 
| 1 | 
            +
            {"version":3,"file":"date-time.mjs","sources":["../../../../packages/util/date-time/time.ts","../../../../packages/util/date-time/picker.ts","../../../../packages/util/date-time/date-time.ts"],"sourcesContent":["import {\n  addDays,\n  endOfDay,\n  endOfMonth,\n  endOfWeek,\n  endOfYear,\n  parse,\n  parseISO,\n  startOfDay,\n  startOfMonth,\n  startOfWeek,\n  startOfYear,\n  subMonths,\n  subWeeks,\n  subYears,\n  format,\n  formatDistanceToNow\n} from 'date-fns';\n\nimport type { YunzaiThemePipeDateFormatCustom } from '@yelon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { DateLocale } from 'ng-zorro-antd/i18n';\n\n/**\n * Get the time range, return `[ Date, Date]` for the start and end dates\n *\n * 获取时间范围\n *\n * @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数\n * @param time 开始时间\n * @param ignoreMaxTime 忽略追加结束日期的最大时间值\n */\nexport function getTimeDistance(\n  type: 'today' | '-today' | 'yesterday' | 'week' | '-week' | 'month' | '-month' | 'year' | '-year' | number,\n  time?: Date | string | number,\n  options?: { ignoreMaxTime?: boolean }\n): [Date, Date] {\n  time = time\n    ? typeof time === 'string'\n      ? parse(time, 'yyyy-MM-dd HH:mm:ss', new Date())\n      : new Date(time)\n    : new Date();\n  const opt: { weekStartsOn: 1 } = { weekStartsOn: 1 };\n\n  let res: [Date, Date];\n  switch (type) {\n    case 'today':\n      res = [time, time];\n      break;\n    case '-today':\n      res = [addDays(time, -1), time];\n      break;\n    case 'yesterday':\n      res = [addDays(time, -1), addDays(time, -1)];\n      break;\n    case 'week':\n      res = [startOfWeek(time, opt), endOfWeek(time, opt)];\n      break;\n    case '-week':\n      res = [startOfWeek(subWeeks(time, 1), opt), endOfWeek(subWeeks(time, 1), opt)];\n      break;\n    case 'month':\n      res = [startOfMonth(time), endOfMonth(time)];\n      break;\n    case '-month':\n      res = [startOfMonth(subMonths(time, 1)), endOfMonth(subMonths(time, 1))];\n      break;\n    case 'year':\n      res = [startOfYear(time), endOfYear(time)];\n      break;\n    case '-year':\n      res = [startOfYear(subYears(time, 1)), endOfYear(subYears(time, 1))];\n      break;\n    default:\n      res = type > 0 ? [time, addDays(time, type)] : [addDays(time, type), time];\n      break;\n  }\n  return options?.ignoreMaxTime ? res : fixEndTimeOfRange(res);\n}\n\n/**\n * fix time is the most, big value\n */\nexport function fixEndTimeOfRange(dates: [Date, Date]): [Date, Date] {\n  return [startOfDay(dates[0]), endOfDay(dates[1])];\n}\n\nexport interface ToDateOptions {\n  /** If parsing fails try to parse the date by pressing `formatString` */\n  formatString?: string;\n  /** If parsing fails returned default value, default: `new Date(NaN)` */\n  defaultValue?: NzSafeAny;\n  timestampSecond?: boolean;\n}\n\n/**\n * Convert to `Date` format\n *\n * @param value When is a number, it's treated as a timestamp; If it's seconds, you need to provide the `options.timestampSecond` parameter.\n */\nexport function toDate(value?: Date | string | number | null, options?: string | ToDateOptions): Date {\n  const { formatString, defaultValue, timestampSecond } = {\n    formatString: 'yyyy-MM-dd HH:mm:ss',\n    defaultValue: new Date(NaN),\n    timestampSecond: false,\n    ...(typeof options === 'string' ? { formatString: options } : options)\n  };\n  if (value == null) {\n    return defaultValue;\n  }\n  if (value instanceof Date) {\n    return value;\n  }\n  if (typeof value === 'number' || (typeof value === 'string' && /^[0-9]+$/.test(value))) {\n    const valueNumber = +value;\n    return new Date(timestampSecond ? valueNumber * 1000 : valueNumber);\n  }\n  let tryDate = parseISO(value);\n  if (isNaN(tryDate as NzSafeAny)) {\n    tryDate = parse(value, formatString!, new Date());\n  }\n\n  return isNaN(tryDate as NzSafeAny) ? defaultValue : tryDate;\n}\n\n/**\n * Format date, supports `Date, number, string` types\n *\n * @param value When is a number, it is treated as a timestamp (Support seconds and milliseconds timestamp).\n * @param formatString Please refer to [date-fnd format](https://date-fns.org/v2.30.0/docs/format) for string format\n * @param dateLocale Recommended to be consistent with NG-ZORRO by using `inject(NZ_DATE_LOCALE)`\n */\nexport function formatDate(\n  value: Date | string | number,\n  formatString: string,\n  options?: { locale?: DateLocale; customFormat?: YunzaiThemePipeDateFormatCustom }\n): string {\n  value = toDate(value);\n  if (isNaN(value as NzSafeAny)) return '';\n\n  const langOpt = { locale: options?.locale };\n  return formatString === 'fn'\n    ? formatDistanceToNow(value, langOpt)\n    : (options?.customFormat ?? format)(value, formatString, langOpt);\n}\n","import { addDays, addSeconds, differenceInCalendarDays, format } from 'date-fns';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { DisabledDateFn, DisabledTimeConfig, DisabledTimeFn } from 'ng-zorro-antd/date-picker';\n\n// TODO: timezone process\nexport class DateTimePickerUtil {\n  /**\n   * Current local time\n   *\n   * 当前本地时间\n   */\n  get now(): Date {\n    return new Date();\n  }\n  /**\n   * Current local date (not including time part)\n   *\n   * 当前本地日期(不包含时间部分)\n   */\n  get date(): Date {\n    return this.removeTime(this.now);\n  }\n  /**\n   * Remove the time part of the date\n   *\n   * 移除日期的时间部分\n   */\n  removeTime(d: Date): Date {\n    return new Date(d.toDateString());\n  }\n  /**\n   * Format date-time\n   *\n   * 格式化日期\n   */\n  format(d: number | Date, formatString: string = 'yyyy-MM-dd HH:mm:ss'): string {\n    return format(d, formatString);\n  }\n  private genTick(count: number): number[] {\n    return new Array(count).fill(0).map((_, idx) => idx);\n  }\n  /**\n   * Calculate the number of days between two dates, `0` means the same day\n   *\n   * 计算两个日期相差天数,`0` 表示同一天\n   */\n  getDiffDays(dateLeft: Date | number, dateRight?: Date | number): number {\n    return differenceInCalendarDays(\n      dateLeft,\n      typeof dateRight === 'number' ? addDays(this.date, dateRight) : dateRight || this.date\n    );\n  }\n  /**\n   * Disabled Before date (Default: today), Generally serves `nzDisabledDate`\n   *\n   * 禁用之前日期(默认:今天),一般服务于 `nzDisabledDate`\n   */\n  disabledBeforeDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n    return (d): boolean => this.getDiffDays(d, options?.offsetDays) < 0;\n  }\n  /**\n   * Disabled After date (Default: today), Generally serves `nzDisabledDate`\n   *\n   * 禁用之后日期(默认:今天),一般服务于 `nzDisabledDate`\n   */\n  disabledAfterDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n    return (d): boolean => this.getDiffDays(d, options?.offsetDays) > 0;\n  }\n  private baseDisabledTime(type: 'before' | 'after', offsetSeconds?: number): DisabledTimeFn {\n    const tick24 = this.genTick(24);\n    const tick60 = this.genTick(60);\n    return (current): DisabledTimeConfig => {\n      const cur = current as Date;\n      if (cur == null) {\n        return {} as NzSafeAny;\n      }\n      const now = addSeconds(this.now, offsetSeconds || 0);\n      const nowHours = now.getHours();\n      const nowMinutes = now.getMinutes();\n      const curHours = cur.getHours();\n      const isToday = this.getDiffDays(this.removeTime(cur)) === 0;\n      return {\n        nzDisabledHours: () => {\n          if (!isToday) return [];\n          return type === 'before' ? tick24.slice(0, nowHours) : tick24.slice(nowHours + 1);\n        },\n        nzDisabledMinutes: () => {\n          if (isToday && curHours === nowHours) {\n            return type === 'before' ? tick60.slice(0, nowMinutes) : tick60.slice(nowMinutes + 1);\n          }\n          return [];\n        },\n        nzDisabledSeconds: () => {\n          if (isToday && curHours === nowHours && cur.getMinutes() === nowMinutes) {\n            const nowSeconds = now.getSeconds();\n            return type === 'before' ? tick60.slice(0, nowSeconds) : tick60.slice(nowSeconds + 1);\n          }\n          return [];\n        }\n      };\n    };\n  }\n  /**\n   * Disabled Before time (Default: now), Generally serves `nzDisabledTime`\n   *\n   * 禁用之前时间(默认:现在),一般服务于 `nzDisabledTime`\n   */\n  disabledBeforeTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n    return this.baseDisabledTime('before', options?.offsetSeconds);\n  }\n  /**\n   * Disabled After time (Default: now), Generally serves `nzDisabledTime`\n   *\n   * 禁用之后时间(默认:现在),一般服务于 `nzDisabledTime`\n   */\n  disabledAfterTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n    return this.baseDisabledTime('after', options?.offsetSeconds);\n  }\n}\n\nexport const dateTimePickerUtil = new DateTimePickerUtil();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAuBA;;;;;;;;AAQG;SACa,eAAe,CAC7B,IAA0G,E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C,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;qBACvF;AACD,oBAAA,OAAO,EAAE,CAAC;iBACX;gBACD,iBAAiB,EAAE,MAAK;AACtB,oBAAA,IAAI,OAAO,IAAI,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,EAAE,KAAK,UAAU,EAAE;AACvE,wBAAA,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;wBACpC,OAAO,IAAI,KAAK,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;qBACvF;AACD,oBAAA,OAAO,EAAE,CAAC;iBACX;aACF,CAAC;AACJ,SAAC,CAAC;KACH;AACD;;;;AAIG;AACH,IAAA,kBAAkB,CAAC,OAAoC,EAAA;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAChE;AACD;;;;AAIG;AACH,IAAA,iBAAiB,CAAC,OAAoC,EAAA;QACpD,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;KAC/D;AACF,CAAA;AAEY,MAAA,kBAAkB,GAAG,IAAI,kBAAkB;;ACzHxD;;AAEG;;;;"}
         | 
    
        package/fesm2022/format.mjs
    CHANGED
    
    | @@ -410,10 +410,10 @@ class CurrencyService { | |
| 410 410 | 
             
                            : integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));
         | 
| 411 411 | 
             
                    return ret;
         | 
| 412 412 | 
             
                }
         | 
| 413 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 414 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 413 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, deps: [{ token: i1.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 414 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
         | 
| 415 415 | 
             
            }
         | 
| 416 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 416 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, decorators: [{
         | 
| 417 417 | 
             
                        type: Injectable,
         | 
| 418 418 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 419 419 | 
             
                    }], ctorParameters: () => [{ type: i1.YunzaiConfigService }] });
         | 
    
        package/fesm2022/format.mjs.map
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            {"version":3,"file":"format.mjs","sources":["../../../../packages/util/format/string.ts","../../../../packages/util/format/validate.ts","../../../../packages/util/format/currency.types.ts","../../../../packages/util/format/currency.service.ts","../../../../packages/util/format/format.ts"],"sourcesContent":["import { deepGet } from '@yelon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * String formatting\n *\n * 字符串格式化\n * ```\n * format('this is ${name}', { name: 'asdf' })\n * // output: this is asdf\n * format('this is ${user.name}', { user: { name: 'asdf' } }, true)\n * // output: this is asdf\n * ```\n */\nexport function format(\n  str: string | null | undefined,\n  obj: NzSafeAny | null | undefined,\n  needDeepGet: boolean = false\n): string {\n  return (str || '').replace(/\\${([^}]+)}/g, (_work: string, key: string) =>\n    needDeepGet ? deepGet(obj, key.split('.'), '') : (obj || {})[key] || ''\n  );\n}\n\nexport interface FormatMaskOption {\n  mask: string;\n  tokens?: { [key: string]: FormatMaskToken };\n}\n\nexport interface FormatMaskToken {\n  pattern: RegExp;\n  default?: NzSafeAny;\n  transform?: (char: string) => string;\n}\n\n/**\n * Format mask\n *\n * 格式化掩码\n *\n * | 字符 | 描述 |\n * | --- | --- |\n * | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |\n * | `9` | 任意数字 |\n * | `#` | 任意字符 |\n * | `U` | 转换大写 |\n * | `L` | 转换小写 |\n * | `*` | 转换为 `*` 字符 |\n *\n * ```ts\n * formatMask('123', '(###)') => (123)\n * formatMask('15900000000', '999****9999') => 159****0000\n * ```\n */\nexport function formatMask(value: string, option: string | FormatMaskOption): string {\n  if (!value) {\n    return '';\n  }\n  const opt: FormatMaskOption = {\n    ...(typeof option === 'string' ? { mask: option } : option)\n  };\n  const tokens: { [key: string]: FormatMaskToken } = {\n    '0': { pattern: /\\d/, default: '0' },\n    '9': { pattern: /\\d/ },\n    '#': { pattern: /[a-zA-Z0-9]/ },\n    U: {\n      pattern: /[a-zA-Z]/,\n      transform: char => char.toLocaleUpperCase()\n    },\n    L: {\n      pattern: /[a-zA-Z]/,\n      transform: char => char.toLocaleLowerCase()\n    },\n    '*': {\n      pattern: /.*/,\n      transform: _ => `*`\n    },\n    ...opt.tokens\n  };\n\n  const splitValue = value.split('');\n  return opt.mask\n    .split('')\n    .reduce((res, cur) => {\n      const token = tokens[cur];\n      if (!token) {\n        res.push(cur);\n        return res;\n      }\n\n      const value = splitValue.shift() ?? '';\n      if (!token.pattern.test(value)) {\n        if (token.default) res.push(token.default);\n        return res;\n      }\n\n      if (typeof token.transform === 'function') {\n        res.push(token.transform(value));\n      } else {\n        res.push(value);\n      }\n      return res;\n    }, [] as string[])\n    .join('');\n}\n","export const REGEX_STR = {\n  num: `(([-+]?\\\\d+\\\\.\\\\d+)|([-+]?\\\\d+)|([-+]?\\\\.\\\\d+))(?:[eE]([-+]?\\\\d+))?`,\n  idCard: `(^\\\\d{15}$)|(^\\\\d{17}(?:[0-9]|X)$)`,\n  mobile: `^(0|\\\\+?86|17951)?1[0-9]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9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\\\d]{1,4}:){2}(?:(?::[a-fA-F\\\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,5}|:)|(?:[a-fA-F\\\\d]{1,4}:){1}(?:(?::[a-fA-F\\\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\\\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)`,\n  color: `(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\\\\b|(?:rgb|hsl)a?\\\\([^\\\\)]*\\\\)`,\n  chinese: `[\\u4e00-\\u9fa5]+`\n};\n\nfunction genRegex(str: string, flags?: string): RegExp {\n  return new RegExp(`^${str}$`, flags);\n}\n\nexport const REGEX = {\n  num: genRegex(REGEX_STR.num),\n  idCard: genRegex(REGEX_STR.idCard, 'i'),\n  mobile: genRegex(REGEX_STR.mobile),\n  url: genRegex(REGEX_STR.url),\n  ip: genRegex(REGEX_STR.ip),\n  color: genRegex(REGEX_STR.color),\n  chinese: genRegex(REGEX_STR.chinese)\n};\n\n/**\n * Wheter is number\n *\n * 是否为数字\n */\nexport function isNum(value: string | number): boolean {\n  return REGEX.num.test(value.toString());\n}\n\n/**\n * Wheter is integer\n *\n * 是否为整数\n */\nexport function isInt(value: string | number): boolean {\n  return isNum(value) && parseInt(value.toString(), 10).toString() === value.toString();\n}\n\n/**\n * Wheter is decimal\n *\n * 是否为小数点数值\n */\nexport function isDecimal(value: string | number): boolean {\n  return isNum(value) && !isInt(value);\n}\n\n/**\n * Wheter is People's Republic of China identity card\n *\n * 是否为中华人民共和国居民身份证\n */\nexport function isIdCard(value: string): boolean {\n  return REGEX.idCard.test(value);\n}\n\n/**\n * Wheter is china mobile (China)\n *\n * 是否为手机号(中国)\n */\nexport function isMobile(value: string): boolean {\n  return REGEX.mobile.test(value);\n}\n\n/**\n * Wheter is url address\n *\n * 是否URL地址\n */\nexport function isUrl(url: string): boolean {\n  return REGEX.url.test(url);\n}\n\n/**\n * Wheter is IPv4 address (Support v4, v6)\n *\n * 是否IP4地址(支持v4、v6)\n */\nexport function isIp(ip: string): boolean {\n  return REGEX.ip.test(ip);\n}\n\n/**\n * Wheter is color\n *\n * 是否颜色代码值\n */\nexport function isColor(color: string): boolean {\n  return REGEX.color.test(color);\n}\n\n/**\n * Wheter is chinese\n *\n * 是否中文\n */\nexport function isChinese(value: string): boolean {\n  return REGEX.chinese.test(value);\n}\n","export type CurrencyStartingUnit = 'yuan' | 'cent';\n\nexport interface CurrencyStartingUnitOptions {\n  /**\n   * The starting unit of the value, `yuan` means 元, `cent` means 分, default: `yuan`\n   *\n   * 值的起始单位,`yuan` 元,`cent` 分,默认:`yuan`\n   */\n  startingUnit?: CurrencyStartingUnit;\n}\n\nexport interface CurrencyFormatOptions extends CurrencyStartingUnitOptions {\n  /**\n   * Using `DEFAULT_CURRENCY_CODE` when value is `true\n   *\n   * 是否使用 `CurrencyPipe` 来替代\n   */\n  useAngular?: boolean;\n  /**\n   * 精度,默认:`2`\n   */\n  precision?: number;\n  /**\n   * 是否忽略精度 `.0` 或 `.00` 结尾的字符,默认:`true`\n   */\n  ignoreZeroPrecision?: boolean;\n\n  /**\n   * Use anguar `currency` pipe parse when is set, pls refer to [document](https://angular.io/api/common/CurrencyPipe)\n   *\n   * 若指定则表示使用 Angular 自带的 `currency` 管道来解析,见[文档](https://angular.cn/api/common/CurrencyPipe)\n   */\n  ngCurrency?: {\n    display: 'code' | 'symbol' | 'symbol-narrow';\n    currencyCode?: string;\n    digitsInfo?: string;\n    locale?: string;\n  };\n}\n\n/**\n * Large number format filter, [Document](https://ng.yunzainfo.com/util/format/en#mega)\n *\n * 大数据格式化,[文档](https://ng.yunzainfo.com/util/format/en#mega)\n */\nexport interface CurrencyMegaOptions extends CurrencyStartingUnitOptions {\n  /**\n   * 精度,默认:`2`\n   */\n  precision?: number;\n\n  /**\n   * 单位国际化,默认:`{Q: '京', T: '兆', B: '亿', M: '万', K: '千',}`\n   */\n  unitI18n?: CurrencyMegaUnitI18n;\n}\n\nexport interface CurrencyMegaResult {\n  raw: number | string;\n  value: string;\n  unit: string;\n  unitI18n: string;\n}\n\nexport const CurrencyMega_Powers = [\n  { unit: 'Q', value: Math.pow(10, 15) },\n  { unit: 'T', value: Math.pow(10, 12) },\n  { unit: 'B', value: Math.pow(10, 9) },\n  { unit: 'M', value: Math.pow(10, 6) },\n  { unit: 'K', value: 1000 }\n];\n\nexport interface CurrencyMegaUnitI18n {\n  Q: string;\n  T: string;\n  B: string;\n  M: string;\n  K: string;\n}\n\nexport interface CurrencyCNYOptions extends CurrencyStartingUnitOptions {\n  /**\n   * Whether to return to uppercase notation, default: `true`\n   *\n   * 是否返回大写表示法,默认:`true`\n   */\n  inWords?: boolean;\n  /**\n   * Specify negative sign, default: `negative`\n   *\n   * 指定负数符号,默认:`负`\n   */\n  minusSymbol?: string;\n}\n","import { CurrencyPipe, formatNumber } from '@angular/common';\nimport { DEFAULT_CURRENCY_CODE, Injectable, LOCALE_ID, inject } from '@angular/core';\n\nimport { YunzaiConfigService, YunzaiUtilCurrencyConfig } from '@yelon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport {\n  CurrencyCNYOptions,\n  CurrencyFormatOptions,\n  CurrencyMegaOptions,\n  CurrencyMegaResult,\n  CurrencyMega_Powers\n} from './currency.types';\n\n@Injectable({ providedIn: 'root' })\nexport class CurrencyService {\n  private readonly locale = inject(LOCALE_ID);\n  private readonly defCurrencyCode = inject(DEFAULT_CURRENCY_CODE, { optional: true }) ?? 'USD';\n\n  private c: YunzaiUtilCurrencyConfig;\n  private readonly currencyPipe: CurrencyPipe;\n\n  constructor(cog: YunzaiConfigService) {\n    this.currencyPipe = new CurrencyPipe(this.locale, this.defCurrencyCode);\n    this.c = cog.merge('utilCurrency', {\n      startingUnit: 'yuan',\n      megaUnit: { Q: '京', T: '兆', B: '亿', M: '万', K: '千' },\n      precision: 2,\n      ignoreZeroPrecision: true\n    })!;\n  }\n\n  /**\n   * Format a number with commas as thousands separators\n   *\n   * 格式化货币,用逗号将数字格式化为千位分隔符\n   * ```ts\n   * 10000 => `10,000`\n   * 10000.567 => `10,000.57`\n   * ```\n   */\n  format(value: number | string, options?: CurrencyFormatOptions): string {\n    options = {\n      startingUnit: this.c.startingUnit,\n      precision: this.c.precision,\n      ignoreZeroPrecision: this.c.ignoreZeroPrecision,\n      ngCurrency: this.c.ngCurrency,\n      ...options\n    };\n    let truthValue = Number(value);\n    if (value == null || isNaN(truthValue)) {\n      return '';\n    }\n    if (options.startingUnit === 'cent') {\n      truthValue = truthValue / 100;\n    }\n    if (options.ngCurrency != null) {\n      const cur = options.ngCurrency!;\n      return this.currencyPipe.transform(\n        truthValue,\n        cur.currencyCode,\n        cur.display,\n        cur.digitsInfo,\n        cur.locale || this.locale\n      )!;\n    }\n    const res = formatNumber(\n      truthValue,\n      this.locale,\n      `.${options.ignoreZeroPrecision ? 1 : options.precision}-${options.precision}`\n    );\n    return options.ignoreZeroPrecision ? res.replace(/(?:\\.[0]+)$/g, '') : res;\n  }\n\n  /**\n   * Large number format filter\n   *\n   * 大数据格式化\n   * ```ts\n   * 1000 => { value: '1', unit: 'K', unitI18n: '千' }\n   * 12456 => { value: '12.46', unit: 'K', unitI18n: '千' }\n   * ```\n   */\n  mega(value: number | string, options?: CurrencyMegaOptions): CurrencyMegaResult {\n    options = { precision: this.c.precision, unitI18n: this.c.megaUnit, startingUnit: this.c.startingUnit, ...options };\n    let num = Number(value);\n    const res: CurrencyMegaResult = { raw: value, value: '', unit: '', unitI18n: '' };\n    if (isNaN(num) || num === 0) {\n      res.value = value.toString();\n      return res;\n    }\n    if (options.startingUnit === 'cent') {\n      num = num / 100;\n    }\n    let abs = Math.abs(+num);\n    const rounder = Math.pow(10, options.precision!);\n    const isNegative = num < 0;\n    for (const p of CurrencyMega_Powers) {\n      let reduced = abs / p.value;\n\n      reduced = Math.round(reduced * rounder) / rounder;\n\n      if (reduced >= 1) {\n        abs = reduced;\n        res.unit = p.unit;\n        break;\n      }\n    }\n\n    res.value = (isNegative ? '-' : '') + abs;\n    res.unitI18n = (options.unitI18n as { [key: string]: NzSafeAny })[res.unit];\n    return res;\n  }\n\n  /**\n   * Converted into RMB notation.\n   *\n   * 转化成人民币表示法\n   */\n  cny(value: number | string, options?: CurrencyCNYOptions): string {\n    options = {\n      inWords: true,\n      minusSymbol: '负',\n      startingUnit: this.c.startingUnit,\n      ...options\n    };\n\n    value = Number(value);\n    if (isNaN(value)) {\n      return '';\n    }\n    if (options.startingUnit === 'cent') {\n      value = value / 100;\n    }\n    value = value.toString();\n    let integer: number | string;\n    let decimal: number | string | null;\n    [integer, decimal] = value.split('.');\n    let symbol = '';\n    if (integer.startsWith('-')) {\n      symbol = options.minusSymbol!;\n      integer = integer.substring(1);\n    }\n    if (/^-?\\d+$/.test(value)) {\n      decimal = null;\n    }\n    integer = (+integer).toString();\n    const inWords = options.inWords;\n    const unit: { [key: string]: string[] } = {\n      num: inWords\n        ? ['', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '点']\n        : ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '点'],\n      radice: inWords\n        ? [\n            '',\n            '拾',\n            '佰',\n            '仟',\n            '万',\n            '拾',\n            '佰',\n            '仟',\n            '亿',\n            '拾',\n            '佰',\n            '仟',\n            '万亿',\n            '拾',\n            '佰',\n            '仟',\n            '兆',\n            '拾',\n            '佰',\n            '仟'\n          ]\n        : [\n            '',\n            '十',\n            '百',\n            '千',\n            '万',\n            '十',\n            '百',\n            '千',\n            '亿',\n            '十',\n            '百',\n            '千',\n            '万亿',\n            '十',\n            '百',\n            '千',\n            '兆',\n            '十',\n            '百',\n            '千'\n          ],\n      dec: ['角', '分', '厘', '毫']\n    };\n    if (inWords) {\n      value = (+value).toFixed(5).toString();\n    }\n    let integerRes = '';\n    const integerCount = integer.length;\n    if (integer === '0' || integerCount === 0) {\n      integerRes = '零';\n    } else {\n      let cnDesc = '';\n      for (let i = 0; i < integerCount; i++) {\n        const n = +integer[i];\n        const j = integerCount - i - 1;\n        const isZero = i > 1 && n !== 0 && integer[i - 1] === '0';\n        const cnZero = isZero ? '零' : '';\n        const isEmpptyUnit = (n === 0 && j % 4 !== 0) || integer.substring(i - 3, i - 3 + 4) === '0000';\n        const descMark = cnDesc;\n        let cnNum = unit.num[n];\n\n        cnDesc = isEmpptyUnit ? '' : unit.radice[j];\n        // 第一位是一十\n        if (i === 0 && cnNum === '一' && cnDesc === '十') cnNum = '';\n        const isChangeEr =\n          n > 1 &&\n          cnNum === '二' && // 去除首位\n          ['', '十', '百'].indexOf(cnDesc) === -1 && // 不读两\\两十\\两百\n          descMark !== '十'; // 不读十两\n        if (isChangeEr) cnNum = '两';\n        integerRes += cnZero + cnNum + cnDesc;\n      }\n    }\n\n    // 小数部分拼接\n    let decimalRes = '';\n    const decimalCount = decimal ? decimal.toString().length : 0;\n    if (decimal === null) {\n      decimalRes = inWords ? '整' : '';\n    } else if (decimal === '0') {\n      decimalRes = '零';\n    } else {\n      for (let i = 0; i < decimalCount; i++) {\n        if (inWords && i > unit.dec.length - 1) break;\n        const n = decimal[i];\n        const cnZero = n === '0' ? '零' : '';\n        const cnNum = unit.num[+n];\n        const cnDesc = inWords ? unit.dec[i] : '';\n        decimalRes += cnZero + cnNum + cnDesc;\n      }\n    }\n    const ret =\n      symbol +\n      (inWords\n        ? integerRes + (decimalRes === '零' ? '元整' : `元${decimalRes}`)\n        : integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));\n    return ret;\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;;AAUG;AACG,SAAU,MAAM,CACpB,GAA8B,EAC9B,GAAiC,EACjC,cAAuB,KAAK,EAAA;IAE5B,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,KAAa,EAAE,GAAW,KACpE,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,CACxE,CAAC;AACJ,CAAC;AAaD;;;;;;;;;;;;;;;;;;AAkBG;AACa,SAAA,UAAU,CAAC,KAAa,EAAE,MAAiC,EAAA;IACzE,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,EAAE,CAAC;KACX;AACD,IAAA,MAAM,GAAG,GAAqB;AAC5B,QAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM;KAC3D,CAAC;AACF,IAAA,MAAM,MAAM,GAAuC;QACjD,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;AACpC,QAAA,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;AACtB,QAAA,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE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I,GAAG,CAAI,CAAA,EAAA,UAAU,EAAE,CAAC;AAC7D,kBAAE,UAAU,IAAI,UAAU,KAAK,EAAE,GAAG,EAAE,GAAG,CAAA,CAAA,EAAI,UAAU,CAAE,CAAA,CAAC,CAAC,CAAC;AAChE,QAAA,OAAO,GAAG,CAAC;KACZ;8GA9OU,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACdlC;;AAEG;;;;"}
         | 
| 1 | 
            +
            {"version":3,"file":"format.mjs","sources":["../../../../packages/util/format/string.ts","../../../../packages/util/format/validate.ts","../../../../packages/util/format/currency.types.ts","../../../../packages/util/format/currency.service.ts","../../../../packages/util/format/format.ts"],"sourcesContent":["import { deepGet } from '@yelon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * String formatting\n *\n * 字符串格式化\n * ```\n * format('this is ${name}', { name: 'asdf' })\n * // output: this is asdf\n * format('this is ${user.name}', { user: { name: 'asdf' } }, true)\n * // output: this is asdf\n * ```\n */\nexport function format(\n  str: string | null | undefined,\n  obj: NzSafeAny | null | undefined,\n  needDeepGet: boolean = false\n): string {\n  return (str || '').replace(/\\${([^}]+)}/g, (_work: string, key: string) =>\n    needDeepGet ? deepGet(obj, key.split('.'), '') : (obj || {})[key] || ''\n  );\n}\n\nexport interface FormatMaskOption {\n  mask: string;\n  tokens?: { [key: string]: FormatMaskToken };\n}\n\nexport interface FormatMaskToken {\n  pattern: RegExp;\n  default?: NzSafeAny;\n  transform?: (char: string) => string;\n}\n\n/**\n * Format mask\n *\n * 格式化掩码\n *\n * | 字符 | 描述 |\n * | --- | --- |\n * | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |\n * | `9` | 任意数字 |\n * | `#` | 任意字符 |\n * | `U` | 转换大写 |\n * | `L` | 转换小写 |\n * | `*` | 转换为 `*` 字符 |\n *\n * ```ts\n * formatMask('123', '(###)') => (123)\n * formatMask('15900000000', '999****9999') => 159****0000\n * ```\n */\nexport function formatMask(value: string, option: string | FormatMaskOption): string {\n  if (!value) {\n    return '';\n  }\n  const opt: FormatMaskOption = {\n    ...(typeof option === 'string' ? { mask: option } : option)\n  };\n  const tokens: { [key: string]: FormatMaskToken } = {\n    '0': { pattern: /\\d/, default: '0' },\n    '9': { pattern: /\\d/ },\n    '#': { pattern: /[a-zA-Z0-9]/ },\n    U: {\n      pattern: /[a-zA-Z]/,\n      transform: char => char.toLocaleUpperCase()\n    },\n    L: {\n      pattern: /[a-zA-Z]/,\n      transform: char => char.toLocaleLowerCase()\n    },\n    '*': {\n      pattern: /.*/,\n      transform: _ => `*`\n    },\n    ...opt.tokens\n  };\n\n  const splitValue = value.split('');\n  return opt.mask\n    .split('')\n    .reduce((res, cur) => {\n      const token = tokens[cur];\n      if (!token) {\n        res.push(cur);\n        return res;\n      }\n\n      const value = splitValue.shift() ?? '';\n      if (!token.pattern.test(value)) {\n        if (token.default) res.push(token.default);\n        return res;\n      }\n\n      if (typeof token.transform === 'function') {\n        res.push(token.transform(value));\n      } else {\n        res.push(value);\n      }\n      return res;\n    }, [] as string[])\n    .join('');\n}\n","export const REGEX_STR = {\n  num: `(([-+]?\\\\d+\\\\.\\\\d+)|([-+]?\\\\d+)|([-+]?\\\\.\\\\d+))(?:[eE]([-+]?\\\\d+))?`,\n  idCard: `(^\\\\d{15}$)|(^\\\\d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{1,4}){0,2}:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\\\d]{1,4}:){2}(?:(?::[a-fA-F\\\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,5}|:)|(?:[a-fA-F\\\\d]{1,4}:){1}(?:(?::[a-fA-F\\\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\\\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}|(?::[a-fA-F\\\\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)`,\n  color: `(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\\\\b|(?:rgb|hsl)a?\\\\([^\\\\)]*\\\\)`,\n  chinese: `[\\u4e00-\\u9fa5]+`\n};\n\nfunction genRegex(str: string, flags?: string): RegExp {\n  return new RegExp(`^${str}$`, flags);\n}\n\nexport const REGEX = {\n  num: genRegex(REGEX_STR.num),\n  idCard: genRegex(REGEX_STR.idCard, 'i'),\n  mobile: genRegex(REGEX_STR.mobile),\n  url: genRegex(REGEX_STR.url),\n  ip: genRegex(REGEX_STR.ip),\n  color: genRegex(REGEX_STR.color),\n  chinese: genRegex(REGEX_STR.chinese)\n};\n\n/**\n * Wheter is number\n *\n * 是否为数字\n */\nexport function isNum(value: string | number): boolean {\n  return REGEX.num.test(value.toString());\n}\n\n/**\n * Wheter is integer\n *\n * 是否为整数\n */\nexport function isInt(value: string | number): boolean {\n  return isNum(value) && parseInt(value.toString(), 10).toString() === value.toString();\n}\n\n/**\n * Wheter is decimal\n *\n * 是否为小数点数值\n */\nexport function isDecimal(value: string | number): boolean {\n  return isNum(value) && !isInt(value);\n}\n\n/**\n * Wheter is People's Republic of China identity card\n *\n * 是否为中华人民共和国居民身份证\n */\nexport function isIdCard(value: string): boolean {\n  return REGEX.idCard.test(value);\n}\n\n/**\n * Wheter is china mobile (China)\n *\n * 是否为手机号(中国)\n */\nexport function isMobile(value: string): boolean {\n  return REGEX.mobile.test(value);\n}\n\n/**\n * Wheter is url address\n *\n * 是否URL地址\n */\nexport function isUrl(url: string): boolean {\n  return REGEX.url.test(url);\n}\n\n/**\n * Wheter is IPv4 address (Support v4, v6)\n *\n * 是否IP4地址(支持v4、v6)\n */\nexport function isIp(ip: string): boolean {\n  return REGEX.ip.test(ip);\n}\n\n/**\n * Wheter is color\n *\n * 是否颜色代码值\n */\nexport function isColor(color: string): boolean {\n  return REGEX.color.test(color);\n}\n\n/**\n * Wheter is chinese\n *\n * 是否中文\n */\nexport function isChinese(value: string): boolean {\n  return REGEX.chinese.test(value);\n}\n","export type CurrencyStartingUnit = 'yuan' | 'cent';\n\nexport interface CurrencyStartingUnitOptions {\n  /**\n   * The starting unit of the value, `yuan` means 元, `cent` means 分, default: `yuan`\n   *\n   * 值的起始单位,`yuan` 元,`cent` 分,默认:`yuan`\n   */\n  startingUnit?: CurrencyStartingUnit;\n}\n\nexport interface CurrencyFormatOptions extends CurrencyStartingUnitOptions {\n  /**\n   * Using `DEFAULT_CURRENCY_CODE` when value is `true\n   *\n   * 是否使用 `CurrencyPipe` 来替代\n   */\n  useAngular?: boolean;\n  /**\n   * 精度,默认:`2`\n   */\n  precision?: number;\n  /**\n   * 是否忽略精度 `.0` 或 `.00` 结尾的字符,默认:`true`\n   */\n  ignoreZeroPrecision?: boolean;\n\n  /**\n   * Use anguar `currency` pipe parse when is set, pls refer to [document](https://angular.io/api/common/CurrencyPipe)\n   *\n   * 若指定则表示使用 Angular 自带的 `currency` 管道来解析,见[文档](https://angular.cn/api/common/CurrencyPipe)\n   */\n  ngCurrency?: {\n    display: 'code' | 'symbol' | 'symbol-narrow';\n    currencyCode?: string;\n    digitsInfo?: string;\n    locale?: string;\n  };\n}\n\n/**\n * Large number format filter, [Document](https://ng.yunzainfo.com/util/format/en#mega)\n *\n * 大数据格式化,[文档](https://ng.yunzainfo.com/util/format/en#mega)\n */\nexport interface CurrencyMegaOptions extends CurrencyStartingUnitOptions {\n  /**\n   * 精度,默认:`2`\n   */\n  precision?: number;\n\n  /**\n   * 单位国际化,默认:`{Q: '京', T: '兆', B: '亿', M: '万', K: '千',}`\n   */\n  unitI18n?: CurrencyMegaUnitI18n;\n}\n\nexport interface CurrencyMegaResult {\n  raw: number | string;\n  value: string;\n  unit: string;\n  unitI18n: string;\n}\n\nexport const CurrencyMega_Powers = [\n  { unit: 'Q', value: Math.pow(10, 15) },\n  { unit: 'T', value: Math.pow(10, 12) },\n  { unit: 'B', value: Math.pow(10, 9) },\n  { unit: 'M', value: Math.pow(10, 6) },\n  { unit: 'K', value: 1000 }\n];\n\nexport interface CurrencyMegaUnitI18n {\n  Q: string;\n  T: string;\n  B: string;\n  M: string;\n  K: string;\n}\n\nexport interface CurrencyCNYOptions extends CurrencyStartingUnitOptions {\n  /**\n   * Whether to return to uppercase notation, default: `true`\n   *\n   * 是否返回大写表示法,默认:`true`\n   */\n  inWords?: boolean;\n  /**\n   * Specify negative sign, default: `negative`\n   *\n   * 指定负数符号,默认:`负`\n   */\n  minusSymbol?: string;\n}\n","import { CurrencyPipe, formatNumber } from '@angular/common';\nimport { DEFAULT_CURRENCY_CODE, Injectable, LOCALE_ID, inject } from '@angular/core';\n\nimport { YunzaiConfigService, YunzaiUtilCurrencyConfig } from '@yelon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport {\n  CurrencyCNYOptions,\n  CurrencyFormatOptions,\n  CurrencyMegaOptions,\n  CurrencyMegaResult,\n  CurrencyMega_Powers\n} from './currency.types';\n\n@Injectable({ providedIn: 'root' })\nexport class CurrencyService {\n  private readonly locale = inject(LOCALE_ID);\n  private readonly defCurrencyCode = inject(DEFAULT_CURRENCY_CODE, { optional: true }) ?? 'USD';\n\n  private c: YunzaiUtilCurrencyConfig;\n  private readonly currencyPipe: CurrencyPipe;\n\n  constructor(cog: YunzaiConfigService) {\n    this.currencyPipe = new CurrencyPipe(this.locale, this.defCurrencyCode);\n    this.c = cog.merge('utilCurrency', {\n      startingUnit: 'yuan',\n      megaUnit: { Q: '京', T: '兆', B: '亿', M: '万', K: '千' },\n      precision: 2,\n      ignoreZeroPrecision: true\n    })!;\n  }\n\n  /**\n   * Format a number with commas as thousands separators\n   *\n   * 格式化货币,用逗号将数字格式化为千位分隔符\n   * ```ts\n   * 10000 => `10,000`\n   * 10000.567 => `10,000.57`\n   * ```\n   */\n  format(value: number | string, options?: CurrencyFormatOptions): string {\n    options = {\n      startingUnit: this.c.startingUnit,\n      precision: this.c.precision,\n      ignoreZeroPrecision: this.c.ignoreZeroPrecision,\n      ngCurrency: this.c.ngCurrency,\n      ...options\n    };\n    let truthValue = Number(value);\n    if (value == null || isNaN(truthValue)) {\n      return '';\n    }\n    if (options.startingUnit === 'cent') {\n      truthValue = truthValue / 100;\n    }\n    if (options.ngCurrency != null) {\n      const cur = options.ngCurrency!;\n      return this.currencyPipe.transform(\n        truthValue,\n        cur.currencyCode,\n        cur.display,\n        cur.digitsInfo,\n        cur.locale || this.locale\n      )!;\n    }\n    const res = formatNumber(\n      truthValue,\n      this.locale,\n      `.${options.ignoreZeroPrecision ? 1 : options.precision}-${options.precision}`\n    );\n    return options.ignoreZeroPrecision ? res.replace(/(?:\\.[0]+)$/g, '') : res;\n  }\n\n  /**\n   * Large number format filter\n   *\n   * 大数据格式化\n   * ```ts\n   * 1000 => { value: '1', unit: 'K', unitI18n: '千' }\n   * 12456 => { value: '12.46', unit: 'K', unitI18n: '千' }\n   * ```\n   */\n  mega(value: number | string, options?: CurrencyMegaOptions): CurrencyMegaResult {\n    options = { precision: this.c.precision, unitI18n: this.c.megaUnit, startingUnit: this.c.startingUnit, ...options };\n    let num = Number(value);\n    const res: CurrencyMegaResult = { raw: value, value: '', unit: '', unitI18n: '' };\n    if (isNaN(num) || num === 0) {\n      res.value = value.toString();\n      return res;\n    }\n    if (options.startingUnit === 'cent') {\n      num = num / 100;\n    }\n    let abs = Math.abs(+num);\n    const rounder = Math.pow(10, options.precision!);\n    const isNegative = num < 0;\n    for (const p of CurrencyMega_Powers) {\n      let reduced = abs / p.value;\n\n      reduced = Math.round(reduced * rounder) / rounder;\n\n      if (reduced >= 1) {\n        abs = reduced;\n        res.unit = p.unit;\n        break;\n      }\n    }\n\n    res.value = (isNegative ? '-' : '') + abs;\n    res.unitI18n = (options.unitI18n as { [key: string]: NzSafeAny })[res.unit];\n    return res;\n  }\n\n  /**\n   * Converted into RMB notation.\n   *\n   * 转化成人民币表示法\n   */\n  cny(value: number | string, options?: CurrencyCNYOptions): string {\n    options = {\n      inWords: true,\n      minusSymbol: '负',\n      startingUnit: this.c.startingUnit,\n      ...options\n    };\n\n    value = Number(value);\n    if (isNaN(value)) {\n      return '';\n    }\n    if (options.startingUnit === 'cent') {\n      value = value / 100;\n    }\n    value = value.toString();\n    let integer: number | string;\n    let decimal: number | string | null;\n    [integer, decimal] = value.split('.');\n    let symbol = '';\n    if (integer.startsWith('-')) {\n      symbol = options.minusSymbol!;\n      integer = integer.substring(1);\n    }\n    if (/^-?\\d+$/.test(value)) {\n      decimal = null;\n    }\n    integer = (+integer).toString();\n    const inWords = options.inWords;\n    const unit: { [key: string]: string[] } = {\n      num: inWords\n        ? ['', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '点']\n        : ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '点'],\n      radice: inWords\n        ? [\n            '',\n            '拾',\n            '佰',\n            '仟',\n            '万',\n            '拾',\n            '佰',\n            '仟',\n            '亿',\n            '拾',\n            '佰',\n            '仟',\n            '万亿',\n            '拾',\n            '佰',\n            '仟',\n            '兆',\n            '拾',\n            '佰',\n            '仟'\n          ]\n        : [\n            '',\n            '十',\n            '百',\n            '千',\n            '万',\n            '十',\n            '百',\n            '千',\n            '亿',\n            '十',\n            '百',\n            '千',\n            '万亿',\n            '十',\n            '百',\n            '千',\n            '兆',\n            '十',\n            '百',\n            '千'\n          ],\n      dec: ['角', '分', '厘', '毫']\n    };\n    if (inWords) {\n      value = (+value).toFixed(5).toString();\n    }\n    let integerRes = '';\n    const integerCount = integer.length;\n    if (integer === '0' || integerCount === 0) {\n      integerRes = '零';\n    } else {\n      let cnDesc = '';\n      for (let i = 0; i < integerCount; i++) {\n        const n = +integer[i];\n        const j = integerCount - i - 1;\n        const isZero = i > 1 && n !== 0 && integer[i - 1] === '0';\n        const cnZero = isZero ? '零' : '';\n        const isEmpptyUnit = (n === 0 && j % 4 !== 0) || integer.substring(i - 3, i - 3 + 4) === '0000';\n        const descMark = cnDesc;\n        let cnNum = unit.num[n];\n\n        cnDesc = isEmpptyUnit ? '' : unit.radice[j];\n        // 第一位是一十\n        if (i === 0 && cnNum === '一' && cnDesc === '十') cnNum = '';\n        const isChangeEr =\n          n > 1 &&\n          cnNum === '二' && // 去除首位\n          ['', '十', '百'].indexOf(cnDesc) === -1 && // 不读两\\两十\\两百\n          descMark !== '十'; // 不读十两\n        if (isChangeEr) cnNum = '两';\n        integerRes += cnZero + cnNum + cnDesc;\n      }\n    }\n\n    // 小数部分拼接\n    let decimalRes = '';\n    const decimalCount = decimal ? decimal.toString().length : 0;\n    if (decimal === null) {\n      decimalRes = inWords ? '整' : '';\n    } else if (decimal === '0') {\n      decimalRes = '零';\n    } else {\n      for (let i = 0; i < decimalCount; i++) {\n        if (inWords && i > unit.dec.length - 1) break;\n        const n = decimal[i];\n        const cnZero = n === '0' ? '零' : '';\n        const cnNum = unit.num[+n];\n        const cnDesc = inWords ? unit.dec[i] : '';\n        decimalRes += cnZero + cnNum + cnDesc;\n      }\n    }\n    const ret =\n      symbol +\n      (inWords\n        ? integerRes + (decimalRes === '零' ? '元整' : `元${decimalRes}`)\n        : integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));\n    return ret;\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;;AAUG;AACG,SAAU,MAAM,CACpB,GAA8B,EAC9B,GAAiC,EACjC,cAAuB,KAAK,EAAA;IAE5B,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,KAAa,EAAE,GAAW,KACpE,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,CACxE,CAAC;AACJ,CAAC;AAaD;;;;;;;;;;;;;;;;;;AAkBG;AACa,SAAA,UAAU,CAAC,KAAa,EAAE,MAAiC,EAAA;IACzE,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,EAAE,CAAC;KACX;AACD,IAAA,MAAM,GAAG,GAAqB;AAC5B,QAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;KAC5D,CAAC;AACF,IAAA,MAAM,MAAM,GAAuC;QACjD,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;AACpC,QAAA,GAAG,EAAE,EAAE,OAAO,EAAE,I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aAAC,OAAO;AACN,kBAAE,UAAU,IAAI,UAAU,KAAK,GAAG,GAAG,IAAI,GAAG,CAAI,CAAA,EAAA,UAAU,EAAE,CAAC;AAC7D,kBAAE,UAAU,IAAI,UAAU,KAAK,EAAE,GAAG,EAAE,GAAG,CAAA,CAAA,EAAI,UAAU,CAAE,CAAA,CAAC,CAAC,CAAC;AAChE,QAAA,OAAO,GAAG,CAAC;KACZ;8GA9OU,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACdlC;;AAEG;;;;"}
         | 
    
        package/fesm2022/other.mjs
    CHANGED
    
    | @@ -231,10 +231,10 @@ class LazyService { | |
| 231 231 | 
             
                        resolve(item);
         | 
| 232 232 | 
             
                    });
         | 
| 233 233 | 
             
                }
         | 
| 234 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 235 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 234 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LazyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 235 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LazyService, providedIn: 'root' }); }
         | 
| 236 236 | 
             
            }
         | 
| 237 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 237 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LazyService, decorators: [{
         | 
| 238 238 | 
             
                        type: Injectable,
         | 
| 239 239 | 
             
                        args: [{ providedIn: 'root' }]
         | 
| 240 240 | 
             
                    }] });
         | 
| @@ -532,10 +532,10 @@ class PathToRegexpService { | |
| 532 532 | 
             
                    }
         | 
| 533 533 | 
             
                    return this.stringToRegexp(/** @type {string} */ path, keys, options);
         | 
| 534 534 | 
             
                }
         | 
| 535 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 536 | 
            -
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18. | 
| 535 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PathToRegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
         | 
| 536 | 
            +
                static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PathToRegexpService, providedIn: 'root' }); }
         | 
| 537 537 | 
             
            }
         | 
| 538 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 538 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PathToRegexpService, decorators: [{
         | 
| 539 539 | 
             
                        type: Injectable,
         | 
| 540 540 | 
             
                        args: [{
         | 
| 541 541 | 
             
                                providedIn: 'root'
         | 
| @@ -16,10 +16,10 @@ class CurrencyMegaPipe { | |
| 16 16 | 
             
                    const res = this.srv.mega(value, options);
         | 
| 17 17 | 
             
                    return res.value + (this.isCN ? res.unitI18n : res.unit);
         | 
| 18 18 | 
             
                }
         | 
| 19 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 20 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 19 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyMegaPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 20 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyMegaPipe, isStandalone: true, name: "mega" }); }
         | 
| 21 21 | 
             
            }
         | 
| 22 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 22 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyMegaPipe, decorators: [{
         | 
| 23 23 | 
             
                        type: Pipe,
         | 
| 24 24 | 
             
                        args: [{ name: 'mega', standalone: true }]
         | 
| 25 25 | 
             
                    }] });
         | 
| @@ -40,10 +40,10 @@ class CurrencyPricePipe { | |
| 40 40 | 
             
                transform(value, options) {
         | 
| 41 41 | 
             
                    return this.srv.format(value, options);
         | 
| 42 42 | 
             
                }
         | 
| 43 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 44 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 43 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 44 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPricePipe, isStandalone: true, name: "price" }); }
         | 
| 45 45 | 
             
            }
         | 
| 46 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 46 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPricePipe, decorators: [{
         | 
| 47 47 | 
             
                        type: Pipe,
         | 
| 48 48 | 
             
                        args: [{ name: 'price', standalone: true }]
         | 
| 49 49 | 
             
                    }] });
         | 
| @@ -60,21 +60,21 @@ class CurrencyCNYPipe { | |
| 60 60 | 
             
                transform(value, options) {
         | 
| 61 61 | 
             
                    return this.srv.cny(value, options);
         | 
| 62 62 | 
             
                }
         | 
| 63 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 64 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 63 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyCNYPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 64 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyCNYPipe, isStandalone: true, name: "cny" }); }
         | 
| 65 65 | 
             
            }
         | 
| 66 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 66 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyCNYPipe, decorators: [{
         | 
| 67 67 | 
             
                        type: Pipe,
         | 
| 68 68 | 
             
                        args: [{ name: 'cny', standalone: true }]
         | 
| 69 69 | 
             
                    }] });
         | 
| 70 70 |  | 
| 71 71 | 
             
            const PIPES = [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe];
         | 
| 72 72 | 
             
            class CurrencyPipeModule {
         | 
| 73 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 74 | 
            -
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18. | 
| 75 | 
            -
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18. | 
| 73 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
         | 
| 74 | 
            +
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule, imports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe], exports: [CurrencyMegaPipe, CurrencyPricePipe, CurrencyCNYPipe] }); }
         | 
| 75 | 
            +
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule }); }
         | 
| 76 76 | 
             
            }
         | 
| 77 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 77 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyPipeModule, decorators: [{
         | 
| 78 78 | 
             
                        type: NgModule,
         | 
| 79 79 | 
             
                        args: [{
         | 
| 80 80 | 
             
                                imports: PIPES,
         | 
    
        package/fesm2022/pipe-filter.mjs
    CHANGED
    
    | @@ -11,21 +11,21 @@ class FilterPipe { | |
| 11 11 | 
             
                transform(array, matcher, ...args) {
         | 
| 12 12 | 
             
                    return array.filter(i => matcher(i, ...args));
         | 
| 13 13 | 
             
                }
         | 
| 14 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 15 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 14 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 15 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FilterPipe, isStandalone: true, name: "filter", pure: false }); }
         | 
| 16 16 | 
             
            }
         | 
| 17 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 17 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipe, decorators: [{
         | 
| 18 18 | 
             
                        type: Pipe,
         | 
| 19 19 | 
             
                        args: [{ name: 'filter', standalone: true, pure: false }]
         | 
| 20 20 | 
             
                    }] });
         | 
| 21 21 |  | 
| 22 22 | 
             
            const PIPES = [FilterPipe];
         | 
| 23 23 | 
             
            class FilterPipeModule {
         | 
| 24 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 25 | 
            -
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18. | 
| 26 | 
            -
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18. | 
| 24 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
         | 
| 25 | 
            +
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule, imports: [FilterPipe], exports: [FilterPipe] }); }
         | 
| 26 | 
            +
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule }); }
         | 
| 27 27 | 
             
            }
         | 
| 28 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 28 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FilterPipeModule, decorators: [{
         | 
| 29 29 | 
             
                        type: NgModule,
         | 
| 30 30 | 
             
                        args: [{
         | 
| 31 31 | 
             
                                imports: PIPES,
         | 
    
        package/fesm2022/pipe-format.mjs
    CHANGED
    
    | @@ -25,21 +25,21 @@ class FormatMaskPipe { | |
| 25 25 | 
             
                transform(value, mask) {
         | 
| 26 26 | 
             
                    return formatMask(value, mask);
         | 
| 27 27 | 
             
                }
         | 
| 28 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 29 | 
            -
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18. | 
| 28 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
         | 
| 29 | 
            +
                static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FormatMaskPipe, isStandalone: true, name: "mask" }); }
         | 
| 30 30 | 
             
            }
         | 
| 31 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 31 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatMaskPipe, decorators: [{
         | 
| 32 32 | 
             
                        type: Pipe,
         | 
| 33 33 | 
             
                        args: [{ name: 'mask', standalone: true }]
         | 
| 34 34 | 
             
                    }] });
         | 
| 35 35 |  | 
| 36 36 | 
             
            const PIPES = [FormatMaskPipe];
         | 
| 37 37 | 
             
            class FormatPipeModule {
         | 
| 38 | 
            -
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18. | 
| 39 | 
            -
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18. | 
| 40 | 
            -
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18. | 
| 38 | 
            +
                static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
         | 
| 39 | 
            +
                static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule, imports: [FormatMaskPipe], exports: [FormatMaskPipe] }); }
         | 
| 40 | 
            +
                static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule }); }
         | 
| 41 41 | 
             
            }
         | 
| 42 | 
            -
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18. | 
| 42 | 
            +
            i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: FormatPipeModule, decorators: [{
         | 
| 43 43 | 
             
                        type: NgModule,
         | 
| 44 44 | 
             
                        args: [{
         | 
| 45 45 | 
             
                                imports: PIPES,
         | 
| @@ -12,7 +12,7 @@ export declare class PathToRegexpService { | |
| 12 12 | 
             
                    repeat: boolean;
         | 
| 13 13 | 
             
                    pattern: any;
         | 
| 14 14 | 
             
                })[];
         | 
| 15 | 
            -
                compile(str: NzSafeAny, options: NzSafeAny): (data:  | 
| 15 | 
            +
                compile(str: NzSafeAny, options: NzSafeAny): (data: NzSafeAny, options: NzSafeAny) => string;
         | 
| 16 16 | 
             
                tokensToFunction(tokens: NzSafeAny, options: NzSafeAny): (data: NzSafeAny, options: NzSafeAny) => string;
         | 
| 17 17 | 
             
                escapeString(str: NzSafeAny): any;
         | 
| 18 18 | 
             
                escapeGroup(group: NzSafeAny): any;
         |