1 line
		
	
	
	
		
			527 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
		
		
			
		
	
	
			1 line
		
	
	
	
		
			527 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
|   | {"ast":null,"code":"/**\n * @license Angular v20.1.4\n * (c) 2010-2025 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Injectable, Optional, Inject, ɵfindLocaleData as _findLocaleData, ɵLocaleDataIndex as _LocaleDataIndex, ɵgetLocaleCurrencyCode as _getLocaleCurrencyCode, ɵgetLocalePluralCase as _getLocalePluralCase, ɵRuntimeError as _RuntimeError, ɵformatRuntimeError as _formatRuntimeError, LOCALE_ID, ɵstringify as _stringify, Directive, Input, createNgModule, NgModuleRef, Host, Attribute, RendererStyleFlags2, inject, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, ɵisPromise as _isPromise, ɵisSubscribable as _isSubscribable, Pipe, untracked, InjectionToken, DEFAULT_CURRENCY_CODE, NgModule } from '@angular/core';\nimport { LocationStrategy, joinWithSlash, normalizeQueryParams, PlatformLocation, APP_BASE_HREF } from './location.mjs';\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass HashLocationStrategy extends LocationStrategy {\n  _platformLocation;\n  _baseHref = '';\n  _removeListenerFns = [];\n  constructor(_platformLocation, _baseHref) {\n    super();\n    this._platformLocation = _platformLocation;\n    if (_baseHref != null) {\n      this._baseHref = _baseHref;\n    }\n  }\n  /** @docs-private */\n  ngOnDestroy() {\n    while (this._removeListenerFns.length) {\n      this._removeListenerFns.pop()();\n    }\n  }\n  onPopState(fn) {\n    this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n  }\n  getBaseHref() {\n    return this._baseHref;\n  }\n  path(includeHash = false) {\n    // the hash value is always prefixed with a `#`\n    // and if it is empty then it will stay empty\n    const path = this._platformLocation.hash ?? '#';\n    return path.length > 0 ? path.substring(1) : path;\n  }\n  prepareExternalUrl(internal) {\n    const url = joinWithSlash(this._baseHref, internal);\n    return url.length > 0 ? '#' + url : url;\n  }\n  pushState(state, title, path, queryParams) {\n    const url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)) || this._platformLocation.pathname;\n    this._platformLocation.pushState(state, title, url);\n  }\n  replaceState(state, title, path, queryParams) {\n    const url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)) || this._platformLocation.pathname;\n    this._platformLocation.replaceState(state, title, url);\n  }\n  forward() {\n    this._platformLocation.forward();\n  }\n  back() {\n    this._platformLocation.back();\n  }\n  getState() {\n    return this._platformLocation.getState();\n  }\n  historyGo(relativePosition = 0) {\n    this._platformLocation.historyGo?.(relativePosition);\n  }\n  static ɵfac = function HashLocationStrategy_Factory(__ngFactoryType__) {\n    return new (__ngFactoryType__ || HashLocationStrategy)(i0.ɵɵinject(PlatformLocation), i0.ɵɵinject(APP_BASE_HREF, 8));\n  };\n  static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n    token: HashLocationStrategy,\n    factory: HashLocationStrategy.ɵfac\n  });\n}\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(HashLocationStrategy, [{\n    type: Injectable\n  }], () => [{\n    type: PlatformLocation\n  }, {\n    type: undefined,\n    decorators: [{\n      type: Optional\n    }, {\n      type: Inject,\n      args: [APP_BASE_HREF]\n    }]\n  }], null);\n})();\n\n/** @internal */\nconst CURRENCIES_EN = {\n  \"ADP\": [undefined, undefined, 0],\n  \"AFN\": [undefined, \"؋\", 0],\n  \"ALL\": [undefined, undefined, 0],\n  \" |