blob: f47b8a47808ad11d42398ca413e269f7fa5f5117 [file] [log] [blame]
{"version":3,"sources":["src/cdk/cdk-bidi.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","bidi","core","common","this","i0","DIR_DOCUMENT","InjectionToken","providedIn","DIR_DOCUMENT_FACTORY","inject","DOCUMENT","Directionality","_document","value","change","EventEmitter","body","dir","documentElement","prototype","ngOnDestroy","complete","ɵprov","ɵɵdefineInjectable","Directionality_Factory","ɵɵinject","token","decorators","type","Injectable","args","ctorParameters","undefined","Optional","Inject","BidiModule","Dir","_dir","_isInitialized","Object","defineProperty","get","set","old","normalizedValue","toLowerCase","_rawDir","emit","enumerable","configurable","ngAfterContentInit","Directive","selector","providers","provide","useExisting","host","[attr.dir]","exportAs","propDecorators","Output","Input","NgModule","declarations","ɵangular_material_src_cdk_bidi_bidi_a"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,oBAChG,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,oBAAqB,CAAC,UAAW,gBAAiB,mBAAoBJ,GAChGA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,EAAOQ,GAAGC,KAAO,GAAIT,EAAOQ,GAAGC,IAAIC,KAAO,IAAKV,EAAOQ,GAAGG,KAAMX,EAAOQ,GAAGI,QAH7J,CAIEC,MAAM,SAAWX,EAASY,EAAIF,GAAU;;;;;;;OAwBtC,IAAIG,EAAe,IAAID,EAAGE,eAAe,cAAe,CACpDC,WAAY,OACZhB,QAASiB,IAGb,SAASA,IACL,OAAOJ,EAAGK,OAAOP,EAAOQ;;;;;;;OAc5B,IAAIC,EAAgC,WAChC,SAASA,EAAeC,GAKpB,GAHAT,KAAKU,MAAQ,MAEbV,KAAKW,OAAS,IAAIV,EAAGW,aACjBH,EAAW,CAKX,IAEIC,GAFUD,E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AAIjB,UAAU+B,mBAAqB,WAC/B/C,KAAKmC,gBAAiB,GAE1BF,EAAIjB,UAAUC,YAAc,WACxBjB,KAAKW,OAAOO,YAETe,EArCa,GAuCxBA,EAAIT,WAAa,CACb,CAAEC,KAAMxB,EAAG+C,UAAWrB,KAAM,CAAC,CACjBsB,SAAU,QACVC,UAAW,CAAC,CAAEC,QAAS3C,EAAgB4C,YAAanB,IACpDoB,KAAM,CAAEC,aAAc,WACtBC,SAAU,UAG1BtB,EAAIuB,eAAiB,CACjB7C,OAAQ,CAAC,CAAEc,KAAMxB,EAAGwD,OAAQ9B,KAAM,CAAC,eACnCb,IAAK,CAAC,CAAEW,KAAMxB,EAAGyD,UAUjB1B,EACA,SAASA,OAIFR,WAAa,CACpB,CAAEC,KAAMxB,EAAG0D,SAAUhC,KAAM,CAAC,CAChBtC,QAAS,CAAC4C,GACV2B,aAAc,CAAC3B;;;;;;;;AAgB/B5C,EAAQ2C,WAAaA,EACrB3C,EAAQa,aAAeA,EACvBb,EAAQ4C,IAAMA,EACd5C,EAAQmB,eAAiBA,EACzBnB,EAAQwE,sCAAwCxD,EAEhD+B,OAAOC,eAAehD,EAAS,aAAc,CAAEqB,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/bidi', ['exports', '@angular/core', '@angular/common'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.bidi = {}), global.ng.core, global.ng.common));\n}(this, (function (exports, i0, common) { 'use strict';\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-brower because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\n var DIR_DOCUMENT = new i0.InjectionToken('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n });\n /** @docs-private */\n function DIR_DOCUMENT_FACTORY() {\n return i0.inject(common.DOCUMENT);\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\n var Directionality = /** @class */ (function () {\n function Directionality(_document) {\n /** The current 'ltr' or 'rtl' value. */\n this.value = 'ltr';\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n this.change = new i0.EventEmitter();\n if (_document) {\n // TODO: handle 'auto' value -\n // We still need to account for dir=\"auto\".\n // It looks like HTMLElemenet.dir is also \"auto\" when that's set to the attribute,\n // but getComputedStyle return either \"ltr\" or \"rtl\". avoiding getComputedStyle for now\n var bodyDir = _document.body ? _document.body.dir : null;\n var htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n var value = bodyDir || htmlDir;\n this.value = (value === 'ltr' || value === 'rtl') ? value : 'ltr';\n }\n }\n Directionality.prototype.ngOnDestroy = function () {\n this.change.complete();\n };\n return Directionality;\n }());\n Directionality.ɵprov = i0.ɵɵdefineInjectable({ factory: function Directionality_Factory() { return new Directionality(i0.ɵɵinject(DIR_DOCUMENT, 8)); }, token: Directionality, providedIn: \"root\" });\n Directionality.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n Directionality.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [DIR_DOCUMENT,] }] }\n ]; };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\n var Dir = /** @class */ (function () {\n function Dir() {\n /** Normalized direction that accounts for invalid/unsupported values. */\n this._dir = 'ltr';\n /** Whether the `value` has been set to its initial value. */\n this._isInitialized = false;\n /** Event emitted when the direction changes. */\n this.change = new i0.EventEmitter();\n }\n Object.defineProperty(Dir.prototype, \"dir\", {\n /** @docs-private */\n get: function () { return this._dir; },\n set: function (value) {\n var old = this._dir;\n var normalizedValue = value ? value.toLowerCase() : value;\n this._rawDir = value;\n this._dir = (normalizedValue === 'ltr' || normalizedValue === 'rtl') ? normalizedValue : 'ltr';\n if (old !== this._dir && this._isInitialized) {\n this.change.emit(this._dir);\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Dir.prototype, \"value\", {\n /** Current layout direction of the element. */\n get: function () { return this.dir; },\n enumerable: false,\n configurable: true\n });\n /** Initialize once default value has been set. */\n Dir.prototype.ngAfterContentInit = function () {\n this._isInitialized = true;\n };\n Dir.prototype.ngOnDestroy = function () {\n this.change.complete();\n };\n return Dir;\n }());\n Dir.decorators = [\n { type: i0.Directive, args: [{\n selector: '[dir]',\n providers: [{ provide: Directionality, useExisting: Dir }],\n host: { '[attr.dir]': '_rawDir' },\n exportAs: 'dir',\n },] }\n ];\n Dir.propDecorators = {\n change: [{ type: i0.Output, args: ['dirChange',] }],\n dir: [{ type: i0.Input }]\n };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var BidiModule = /** @class */ (function () {\n function BidiModule() {\n }\n return BidiModule;\n }());\n BidiModule.decorators = [\n { type: i0.NgModule, args: [{\n exports: [Dir],\n declarations: [Dir],\n },] }\n ];\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.BidiModule = BidiModule;\n exports.DIR_DOCUMENT = DIR_DOCUMENT;\n exports.Dir = Dir;\n exports.Directionality = Directionality;\n exports.ɵangular_material_src_cdk_bidi_bidi_a = DIR_DOCUMENT_FACTORY;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-bidi.umd.js.map\n"]}