@angular-wave/angular.ts 0.9.3 → 0.9.4

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.
Files changed (195) hide show
  1. package/@types/angular.d.ts +4 -19
  2. package/@types/animations/animate.d.ts +2 -2
  3. package/@types/animations/animation.d.ts +1 -1
  4. package/@types/core/compile/attributes.d.ts +1 -1
  5. package/@types/core/compile/compile.d.ts +2 -2
  6. package/@types/core/controller/controller.d.ts +1 -1
  7. package/@types/core/controller/interface.d.ts +6 -0
  8. package/@types/core/di/ng-module.d.ts +27 -26
  9. package/@types/core/filter/filter.d.ts +5 -5
  10. package/@types/core/interpolate/interface.d.ts +13 -0
  11. package/@types/core/interpolate/interpolate.d.ts +1 -13
  12. package/@types/core/scope/scope.d.ts +4 -1
  13. package/@types/directive/http/http.d.ts +16 -16
  14. package/@types/directive/http/interface.d.ts +27 -0
  15. package/@types/directive/include/include.d.ts +4 -4
  16. package/@types/directive/inject/inject.d.ts +12 -0
  17. package/@types/directive/model/model.d.ts +1 -1
  18. package/@types/directive/script/script.d.ts +2 -2
  19. package/@types/directive/setter/setter.d.ts +4 -4
  20. package/@types/filters/filter.d.ts +2 -2
  21. package/@types/filters/filters.d.ts +2 -2
  22. package/@types/filters/interface.d.ts +8 -0
  23. package/@types/filters/limit-to.d.ts +2 -2
  24. package/@types/filters/order-by.d.ts +2 -2
  25. package/@types/index.d.ts +84 -1
  26. package/@types/interface.d.ts +105 -82
  27. package/@types/router/state/interface.d.ts +8 -8
  28. package/@types/router/state-filters.d.ts +4 -4
  29. package/@types/router/template-factory.d.ts +6 -6
  30. package/@types/router/transition/hook-builder.d.ts +5 -2
  31. package/@types/router/transition/hook-registry.d.ts +11 -2
  32. package/@types/router/transition/transition-service.d.ts +6 -2
  33. package/@types/router/transition/transition.d.ts +2 -2
  34. package/@types/router/view/view.d.ts +1 -8
  35. package/@types/router/view-scroll.d.ts +4 -2
  36. package/@types/services/{anchor-scroll.d.ts → anchor-scroll/anchor-scroll.d.ts} +2 -2
  37. package/@types/services/exception/exception-handler.d.ts +2 -2
  38. package/@types/services/exception/interface.d.ts +1 -1
  39. package/@types/services/http/http.d.ts +40 -2
  40. package/@types/services/http/interface.d.ts +11 -0
  41. package/@types/services/location/location.d.ts +1 -4
  42. package/@types/services/sce/sce.d.ts +3 -4
  43. package/@types/services/template-cache/template-cache.d.ts +4 -4
  44. package/@types/services/template-request/interface.d.ts +22 -0
  45. package/@types/services/{template-request.d.ts → template-request/template-request.d.ts} +4 -7
  46. package/@types/shared/common.d.ts +8 -69
  47. package/@types/shared/hof.d.ts +7 -7
  48. package/dist/angular-ts.esm.js +509 -569
  49. package/dist/angular-ts.umd.js +509 -569
  50. package/dist/angular-ts.umd.min.js +1 -1
  51. package/{src/filters → docs/content/docs/filter}/filter.md +18 -9
  52. package/{src/filters → docs/content/docs/filter}/json.md +6 -3
  53. package/docs/content/docs/filter/limit-to.md +30 -0
  54. package/docs/content/docs/filter/order-by.md +123 -0
  55. package/docs/content/docs/provider/sceProvider.md +194 -0
  56. package/docs/content/docs/provider/templateRequestProvider.md +5 -0
  57. package/docs/content/docs/service/compile.md +5 -0
  58. package/docs/content/docs/service/controller.md +5 -0
  59. package/docs/content/docs/service/http.md +161 -0
  60. package/docs/content/docs/service/interpolation.md +5 -0
  61. package/docs/content/docs/service/log.md +1 -1
  62. package/docs/content/docs/service/parse.md +5 -0
  63. package/docs/content/docs/service/rootElement.md +5 -0
  64. package/docs/content/docs/service/rootScope.md +5 -0
  65. package/docs/content/docs/service/sce.md +194 -0
  66. package/docs/content/docs/service/templateRequest.md +5 -0
  67. package/docs/content/docs/values/_index.md +4 -0
  68. package/docs/content/docs/values/document.md +29 -0
  69. package/docs/content/docs/values/window.md +29 -0
  70. package/docs/layouts/shortcodes/version.html +1 -1
  71. package/docs/static/examples/document/document.html +3 -0
  72. package/docs/static/examples/i18n/i18n.html +77 -0
  73. package/docs/static/examples/window/window.html +4 -0
  74. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  75. package/docs/static/typedoc/assets/highlight.css +0 -49
  76. package/docs/static/typedoc/assets/navigation.js +1 -1
  77. package/docs/static/typedoc/assets/search.js +1 -1
  78. package/docs/static/typedoc/classes/PubSubProvider.html +3 -2
  79. package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
  80. package/docs/static/typedoc/hierarchy.html +1 -1
  81. package/docs/static/typedoc/index.html +1 -1
  82. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
  83. package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
  84. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
  85. package/docs/static/typedoc/interfaces/ServiceProvider.html +3 -3
  86. package/docs/static/typedoc/types/HttpParamSerializer.html +2 -0
  87. package/docs/static/typedoc/types/{Expression.html → HttpParams.html} +1 -5
  88. package/legacy.d.ts +0 -921
  89. package/package.json +1 -1
  90. package/src/angular.js +2 -9
  91. package/src/animations/animate.js +1 -1
  92. package/src/animations/animation.js +7 -7
  93. package/src/core/compile/compile.js +3 -2
  94. package/src/core/controller/controller.js +10 -6
  95. package/src/core/controller/interface.ts +6 -0
  96. package/src/core/di/injector.js +1 -1
  97. package/src/core/di/internal-injector.js +2 -0
  98. package/src/core/di/ng-module.js +16 -13
  99. package/src/core/filter/filter.js +3 -3
  100. package/src/core/interpolate/interface.ts +14 -0
  101. package/src/core/interpolate/interpolate.js +7 -5
  102. package/src/core/scope/scope.js +4 -1
  103. package/src/directive/http/delete.spec.js +5 -8
  104. package/src/directive/http/http.js +16 -16
  105. package/src/directive/http/interface.ts +36 -0
  106. package/src/directive/http/put.spec.js +5 -8
  107. package/src/directive/include/include.js +2 -2
  108. package/src/{services/http-backend/http-backend.html → directive/inject/inject.html} +1 -4
  109. package/src/directive/inject/inject.js +35 -0
  110. package/src/directive/inject/inject.spec.js +108 -0
  111. package/src/{services/http-backend/http-backend.test.js → directive/inject/inject.test.js} +1 -1
  112. package/src/directive/script/script.js +1 -1
  113. package/src/directive/setter/setter.js +2 -2
  114. package/src/filters/filter.js +1 -1
  115. package/src/filters/filters.js +1 -1
  116. package/src/filters/interface.ts +9 -0
  117. package/src/filters/limit-to.js +1 -1
  118. package/src/filters/order-by.js +1 -1
  119. package/src/index.ts +96 -0
  120. package/src/injection-tokens.js +4 -1
  121. package/src/interface.ts +102 -93
  122. package/src/ng.js +6 -4
  123. package/src/ng.spec.js +12 -0
  124. package/src/router/directives/state-directives.js +1 -1
  125. package/src/router/directives/view-directive.spec.js +19 -35
  126. package/src/router/state/interface.ts +8 -8
  127. package/src/router/state/state-builder.js +4 -4
  128. package/src/router/state/state-registry.js +7 -2
  129. package/src/router/state/state-service.js +2 -14
  130. package/src/router/state-filters.js +2 -2
  131. package/src/router/template-factory.js +3 -3
  132. package/src/router/template-factory.spec.js +10 -19
  133. package/src/router/transition/hook-builder.js +5 -1
  134. package/src/router/transition/hook-registry.js +12 -3
  135. package/src/router/transition/transition-service.js +4 -9
  136. package/src/router/transition/transition.js +3 -2
  137. package/src/router/url/url-service.js +2 -2
  138. package/src/router/view/view.js +3 -15
  139. package/src/router/view-scroll.js +2 -2
  140. package/src/services/{anchor-scroll.js → anchor-scroll/anchor-scroll.js} +4 -4
  141. package/src/services/exception/exception-handler.js +1 -1
  142. package/src/services/exception/interface.ts +1 -1
  143. package/src/services/http/http.js +200 -13
  144. package/src/services/http/http.spec.js +388 -9
  145. package/src/services/http/interface.ts +13 -0
  146. package/src/services/location/location.js +1 -1
  147. package/src/services/sce/sce.js +18 -13
  148. package/src/services/template-cache/template-cache.js +2 -2
  149. package/src/services/template-request/interface.ts +23 -0
  150. package/src/services/{template-request.js → template-request/template-request.js} +6 -6
  151. package/src/shared/common.js +7 -80
  152. package/src/shared/hof.js +23 -17
  153. package/typedoc.json +1 -1
  154. package/@types/services/cookie-reader.d.ts +0 -4
  155. package/@types/services/http-backend/http-backend.d.ts +0 -58
  156. package/@types/services/template-cache/interface.d.ts +0 -10
  157. package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
  158. package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
  159. package/docs/static/typedoc/interfaces/Controller.html +0 -12
  160. package/docs/static/typedoc/interfaces/Directive.html +0 -37
  161. package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
  162. package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
  163. package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
  164. package/docs/static/typedoc/interfaces/Provider.html +0 -34
  165. package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
  166. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
  167. package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
  168. package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
  169. package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
  170. package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
  171. package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
  172. package/docs/static/typedoc/types/DirectiveController.html +0 -2
  173. package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
  174. package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
  175. package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
  176. package/docs/static/typedoc/types/ExpandoStore.html +0 -2
  177. package/docs/static/typedoc/types/FilterFactory.html +0 -2
  178. package/docs/static/typedoc/types/FilterFn.html +0 -2
  179. package/docs/static/typedoc/types/Injectable.html +0 -4
  180. package/docs/static/typedoc/types/InjectableClass.html +0 -1
  181. package/docs/static/typedoc/types/InjectableFactory.html +0 -1
  182. package/docs/static/typedoc/types/OnChangesObject.html +0 -2
  183. package/docs/static/typedoc/types/SwapModeType.html +0 -2
  184. package/docs/static/typedoc/types/TController.html +0 -2
  185. package/docs/static/typedoc/variables/SwapMode.html +0 -11
  186. package/src/filters/limit-to.md +0 -19
  187. package/src/filters/order-by.md +0 -83
  188. package/src/router/state/README.md +0 -21
  189. package/src/services/cookie-reader.js +0 -48
  190. package/src/services/http/http.md +0 -413
  191. package/src/services/http-backend/http-backend.js +0 -158
  192. package/src/services/http-backend/http-backend.spec.js +0 -389
  193. package/src/services/sce/sce.md +0 -300
  194. package/src/services/template-cache/interface.ts +0 -10
  195. /package/src/services/{anchor-scroll.html → anchor-scroll/anchor-scroll.html} +0 -0
@@ -1,4 +1,4 @@
1
- /* Version: 0.9.3 - October 9, 2025 19:24:11 */
1
+ /* Version: 0.9.4 - October 22, 2025 23:02:02 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -1798,11 +1798,11 @@
1798
1798
  $aria: "$aria",
1799
1799
  $compile: "$compile",
1800
1800
  $controller: "$controller",
1801
+ $document: "$document",
1801
1802
  $eventBus: "$eventBus",
1802
1803
  $exceptionHandler: "$exceptionHandler",
1803
1804
  $filter: "$filter",
1804
1805
  $http: "$http",
1805
- $httpBackend: "$httpBackend",
1806
1806
  $httpParamSerializer: "$httpParamSerializer",
1807
1807
  $interpolate: "$interpolate",
1808
1808
  $location: "$location",
@@ -1816,6 +1816,8 @@
1816
1816
  $sceDelegate: "$sceDelegate",
1817
1817
  $state: "$state",
1818
1818
  $stateRegistry: "$stateRegistry",
1819
+ $$sanitizeUri: "$$sanitizeUri",
1820
+ $$sanitizeUriProvider: "$$sanitizeUriProvider",
1819
1821
  $templateCache: "$templateCache",
1820
1822
  $templateFactory: "$templateFactory",
1821
1823
  $templateRequest: "$templateRequest",
@@ -1823,6 +1825,7 @@
1823
1825
  $urlConfig: "$urlConfig",
1824
1826
  $url: "$url",
1825
1827
  $view: "$view",
1828
+ $window: "$window",
1826
1829
  // provide literals
1827
1830
  $provide: "$provide",
1828
1831
  $injector: "$injector",
@@ -1865,7 +1868,7 @@
1865
1868
  /**
1866
1869
  * @param {string} name - Name of the module
1867
1870
  * @param {Array<string>} requires - List of modules which the injector will load before the current module
1868
- * @param {import("../../interface.js").Injectable} [configFn]
1871
+ * @param {import("../../interface.js").Injectable<any>} [configFn]
1869
1872
  */
1870
1873
  constructor(name, requires, configFn) {
1871
1874
  assert(isString(name), "name required");
@@ -1891,12 +1894,14 @@
1891
1894
  /** @type {!Array<Array<*>>} */
1892
1895
  this.configBlocks = [];
1893
1896
 
1894
- /** @type {!Array.<import("../../interface.js").Injectable>} */
1897
+ /** @type {!Array.<import("../../interface.js").Injectable<any>>} */
1895
1898
  this.runBlocks = [];
1896
1899
 
1897
1900
  if (configFn) {
1898
1901
  this.config(configFn);
1899
1902
  }
1903
+
1904
+ this.services = [];
1900
1905
  }
1901
1906
 
1902
1907
  /**
@@ -1921,7 +1926,7 @@
1921
1926
 
1922
1927
  /**
1923
1928
  *
1924
- * @param {import("../../interface.js").Injectable} configFn
1929
+ * @param {import("../../interface.ts").Injectable<any>} configFn
1925
1930
  * @returns {NgModule}
1926
1931
  */
1927
1932
  config(configFn) {
@@ -1930,7 +1935,7 @@
1930
1935
  }
1931
1936
 
1932
1937
  /**
1933
- * @param {import("../../interface.js").Injectable} block
1938
+ * @param {import("../../interface.ts").Injectable<any>} block
1934
1939
  * @returns {NgModule}
1935
1940
  */
1936
1941
  run(block) {
@@ -1940,7 +1945,7 @@
1940
1945
 
1941
1946
  /**
1942
1947
  * @param {string} name
1943
- * @param {import("../../interface.js").ComponentOptions} options
1948
+ * @param {import("../../interface.ts").Component} options
1944
1949
  * @returns {NgModule}
1945
1950
  */
1946
1951
  component(name, options) {
@@ -1953,7 +1958,7 @@
1953
1958
 
1954
1959
  /**
1955
1960
  * @param {string} name
1956
- * @param {import("../../interface.js").Injectable} providerFunction
1961
+ * @param {import("../../interface.ts").Injectable<any>} providerFunction
1957
1962
  * @returns {NgModule}
1958
1963
  */
1959
1964
  factory(name, providerFunction) {
@@ -1966,20 +1971,21 @@
1966
1971
 
1967
1972
  /**
1968
1973
  * @param {string} name
1969
- * @param {import("../../interface.js").Injectable} serviceFunction
1974
+ * @param {import("../../interface.ts").Injectable<any>} serviceFunction
1970
1975
  * @returns {NgModule}
1971
1976
  */
1972
1977
  service(name, serviceFunction) {
1973
1978
  if (serviceFunction && isFunction(serviceFunction)) {
1974
1979
  serviceFunction["$$moduleName"] = name;
1975
1980
  }
1981
+ this.services.push(name);
1976
1982
  this.invokeQueue.push([$injectTokens.$provide, "service", [name, serviceFunction]]);
1977
1983
  return this;
1978
1984
  }
1979
1985
 
1980
1986
  /**
1981
1987
  * @param {string} name
1982
- * @param {import("../../interface.js").Injectable} providerType
1988
+ * @param {import("../../interface.ts").Injectable<any>} providerType
1983
1989
  * @returns {NgModule}
1984
1990
  */
1985
1991
  provider(name, providerType) {
@@ -1992,7 +1998,7 @@
1992
1998
 
1993
1999
  /**
1994
2000
  * @param {string} name
1995
- * @param {import("../../interface.js").Injectable} decorFn
2001
+ * @param {import("../../interface.js").Injectable<any>} decorFn
1996
2002
  * @returns {NgModule}
1997
2003
  */
1998
2004
  decorator(name, decorFn) {
@@ -2005,7 +2011,7 @@
2005
2011
 
2006
2012
  /**
2007
2013
  * @param {string} name
2008
- * @param {import("../../interface.js").Injectable} directiveFactory
2014
+ * @param {import("../../interface.js").Injectable<any>} directiveFactory
2009
2015
  * @returns {NgModule}
2010
2016
  */
2011
2017
  directive(name, directiveFactory) {
@@ -2022,7 +2028,7 @@
2022
2028
 
2023
2029
  /**
2024
2030
  * @param {string} name
2025
- * @param {import("../../interface.js").Injectable} animationFactory
2031
+ * @param {import("../../interface.js").Injectable<any>} animationFactory
2026
2032
  * @returns {NgModule}
2027
2033
  */
2028
2034
  animation(name, animationFactory) {
@@ -2039,7 +2045,7 @@
2039
2045
 
2040
2046
  /**
2041
2047
  * @param {string} name
2042
- * @param {import("../../interface.js").Injectable} filterFn
2048
+ * @param {import("../../interface.js").Injectable<any>} filterFn
2043
2049
  * @return {NgModule}
2044
2050
  */
2045
2051
  filter(name, filterFn) {
@@ -2052,7 +2058,7 @@
2052
2058
 
2053
2059
  /**
2054
2060
  * @param {string} name
2055
- * @param {import("../../interface.js").Injectable} ctlFn
2061
+ * @param {import("../../interface.js").Injectable<any>} ctlFn
2056
2062
  * @returns {NgModule}
2057
2063
  */
2058
2064
  controller(name, ctlFn) {
@@ -2236,6 +2242,8 @@
2236
2242
  this.path.join(" <- "),
2237
2243
  );
2238
2244
  }
2245
+
2246
+ loadNewModules() {}
2239
2247
  }
2240
2248
 
2241
2249
  /**
@@ -2407,7 +2415,7 @@
2407
2415
  /**
2408
2416
  * Registers a provider.
2409
2417
  * @param {string} name
2410
- * @param {import('../../interface.ts').ServiceProvider | import('../../interface.ts').InjectableFactory} provider
2418
+ * @param {import('../../interface.ts').ServiceProvider | import('../../interface.ts').Injectable<any>} provider
2411
2419
  * @returns {import('../../interface.ts').ServiceProvider}
2412
2420
  */
2413
2421
  function provider(name, provider) {
@@ -2926,7 +2934,7 @@
2926
2934
 
2927
2935
  /**
2928
2936
  * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
2929
- * @returns {Function} A service function that creates controllers.
2937
+ * @returns {import("./interface.js").ControllerService} A service function that creates controllers.
2930
2938
  */
2931
2939
  ($injector) => {
2932
2940
  return (expression, locals, later, ident) => {
@@ -2937,7 +2945,7 @@
2937
2945
  later = later === true;
2938
2946
 
2939
2947
  if (isString(expression)) {
2940
- match = expression.match(CNTRL_REG);
2948
+ match = /** @type {string} */ (expression).match(CNTRL_REG);
2941
2949
  if (!match) {
2942
2950
  throw $controllerMinErr(
2943
2951
  "ctrlfmt",
@@ -2974,7 +2982,7 @@
2974
2982
  locals,
2975
2983
  identifier,
2976
2984
  instance,
2977
- constructor || expression.name,
2985
+ constructor || /** @type {any} */ (expression).name,
2978
2986
  );
2979
2987
  }
2980
2988
 
@@ -2997,7 +3005,7 @@
2997
3005
  locals,
2998
3006
  identifier,
2999
3007
  instance,
3000
- constructor || expression.name,
3008
+ constructor || /** @type {any} */ (expression).name,
3001
3009
  );
3002
3010
  }
3003
3011
  }
@@ -3006,14 +3014,18 @@
3006
3014
  }.bind(this, { instance, identifier });
3007
3015
  }
3008
3016
 
3009
- instance = $injector.instantiate(expression, locals, constructor);
3017
+ instance = $injector.instantiate(
3018
+ /** @type {any} */ (expression),
3019
+ locals,
3020
+ constructor,
3021
+ );
3010
3022
 
3011
3023
  if (identifier) {
3012
3024
  this.addIdentifier(
3013
3025
  locals,
3014
3026
  identifier,
3015
3027
  instance,
3016
- constructor || expression.name,
3028
+ constructor || /** @type {any} */ (expression).name,
3017
3029
  );
3018
3030
  }
3019
3031
 
@@ -3164,8 +3176,6 @@
3164
3176
  return url.replace(/#$/, "");
3165
3177
  }
3166
3178
 
3167
- /** @typedef {import("../exception/interface.ts").Interface } ErrorHandler */
3168
-
3169
3179
  const $sceMinErr = minErr("$sce");
3170
3180
 
3171
3181
  const SCE_CONTEXTS = {
@@ -3455,14 +3465,14 @@
3455
3465
  };
3456
3466
 
3457
3467
  this.$get = [
3458
- "$injector",
3459
- "$$sanitizeUri",
3460
- "$exceptionHandler",
3468
+ $injectTokens.$injector,
3469
+ $injectTokens.$$sanitizeUri,
3470
+ $injectTokens.$exceptionHandler,
3461
3471
  /**
3462
3472
  *
3463
- * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
3473
+ * @param {ng.InjectorService} $injector
3464
3474
  * @param {*} $$sanitizeUri
3465
- * @param {ErrorHandler} $exceptionHandler
3475
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
3466
3476
  * @returns
3467
3477
  */
3468
3478
  function ($injector, $$sanitizeUri, $exceptionHandler) {
@@ -3481,7 +3491,7 @@
3481
3491
 
3482
3492
  /**
3483
3493
  * @param {string|RegExp} matcher
3484
- * @param {import("../../shared/url-utils/interface").ParsedUrl} parsedUrl
3494
+ * @param {import("../../shared/url-utils/interface.ts").ParsedUrl} parsedUrl
3485
3495
  * @return {boolean}
3486
3496
  */
3487
3497
  function matchUrl(matcher, parsedUrl) {
@@ -3736,9 +3746,15 @@
3736
3746
  };
3737
3747
 
3738
3748
  this.$get = [
3739
- "$parse",
3740
- "$sceDelegate",
3741
- function ($parse, $sceDelegate) {
3749
+ $injectTokens.$parse,
3750
+ $injectTokens.$sceDelegate,
3751
+ /**
3752
+ *
3753
+ * @param {ng.ParseService} $parse
3754
+ * @param $sceDelegate
3755
+ * @return {*}
3756
+ */
3757
+ ($parse, $sceDelegate) => {
3742
3758
  const sce = shallowCopy(SCE_CONTEXTS);
3743
3759
 
3744
3760
  /**
@@ -3772,14 +3788,14 @@
3772
3788
  *
3773
3789
  * @param {string} type The SCE context in which this result will be used.
3774
3790
  * @param {string} expr String expression to compile.
3775
- * @return {function(context, locals)} A function which represents the compiled expression:
3791
+ * @return {import("../../core/parse/interface.js").CompiledExpression} A function which represents the compiled expression:
3776
3792
  *
3777
3793
  * * `context` – `{object}` – an object against which any expressions embedded in the
3778
3794
  * strings are evaluated against (typically a scope object).
3779
3795
  * * `locals` – `{object=}` – local variables context object, useful for overriding values
3780
3796
  * in `context`.
3781
3797
  */
3782
- sce.parseAs = function sceParseAs(type, expr) {
3798
+ sce.parseAs = (type, expr) => {
3783
3799
  const parsed = $parse(expr);
3784
3800
  if (parsed.literal && parsed.constant) {
3785
3801
  return parsed;
@@ -4517,7 +4533,7 @@
4517
4533
  const DirectiveSuffix = "Directive";
4518
4534
 
4519
4535
  class CompileProvider {
4520
- /* @ignore */ static $inject = ["$provide", "$$sanitizeUriProvider"];
4536
+ /* @ignore */ static $inject = [$injectTokens.$provide, $injectTokens.$$sanitizeUriProvider];
4521
4537
 
4522
4538
  /**
4523
4539
  * @param {import('../../interface.js').Provider} $provide
@@ -4711,7 +4727,7 @@
4711
4727
  /**
4712
4728
  * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
4713
4729
  * or an object map of components where the keys are the names and the values are the component definition objects.
4714
- * @param {import("../../interface.js").ComponentOptions} options Component definition object (a simplified
4730
+ * @param {import("../../interface.js").Component} options Component definition object (a simplified
4715
4731
  * {directive definition object}),
4716
4732
  * with the following properties (all optional):
4717
4733
  *
@@ -10625,7 +10641,7 @@
10625
10641
  scriptDirective.$inject = ["$templateCache"];
10626
10642
 
10627
10643
  /**
10628
- * @param {import('../../services/template-cache/interface.ts').TemplateCache} $templateCache
10644
+ * @param {ng.TemplateCacheService} $templateCache
10629
10645
  * @returns {import('../../interface.ts').Directive}
10630
10646
  */
10631
10647
  function scriptDirective($templateCache) {
@@ -11642,9 +11658,9 @@
11642
11658
  /**
11643
11659
  *
11644
11660
  * @param {*} $templateRequest
11645
- * @param {import("../../services/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
11661
+ * @param {import("../../services/anchor-scroll/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
11646
11662
  * @param {*} $animate
11647
- * @param {import('../../services/exception/interface.ts').Interface} $exceptionHandler
11663
+ * @param {import('../../services/exception/interface.ts').ErrorHandler} $exceptionHandler
11648
11664
  * @returns {import('../../interface.js').Directive}
11649
11665
  */
11650
11666
  function ngIncludeDirective(
@@ -13484,8 +13500,8 @@
13484
13500
  $injectTokens.$rootScope,
13485
13501
  /**
13486
13502
  *
13487
- * @param {import('../services/location/location.js').Location} $location
13488
- * @param {import('../core/scope/scope.js').Scope} $rootScope
13503
+ * @param {import('../../services/location/location.js').Location} $location
13504
+ * @param {import('../../core/scope/scope.js').Scope} $rootScope
13489
13505
  * @returns
13490
13506
  */
13491
13507
  function ($location, $rootScope) {
@@ -14032,7 +14048,7 @@
14032
14048
  * ```
14033
14049
  *
14034
14050
  * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).
14035
- * @param {import("../interface.ts").Injectable} factory The factory function that will be executed to return the animation
14051
+ * @param {import("../interface.ts").Injectable<any>} factory The factory function that will be executed to return the animation
14036
14052
  * object.
14037
14053
  */
14038
14054
  this.register = function (name, factory) {
@@ -14700,11 +14716,11 @@
14700
14716
  */
14701
14717
  class TemplateCacheProvider {
14702
14718
  constructor() {
14703
- /** @type {import('./interface.ts').TemplateCache} */
14719
+ /** @type {ng.TemplateCacheService} */
14704
14720
  this.cache = new Map();
14705
14721
  }
14706
14722
  /**
14707
- * @returns {import('./interface.ts').TemplateCache}
14723
+ * @returns {ng.TemplateCacheService}
14708
14724
  */
14709
14725
  $get() {
14710
14726
  return this.cache;
@@ -14757,7 +14773,7 @@
14757
14773
 
14758
14774
  /** @typedef {import('../log/interface.ts').LogService} LogService */
14759
14775
 
14760
- /** @typedef {import("./interface.ts").Interface} ErrorHandler */
14776
+ /** @typedef {import("./interface.ts").ErrorHandler} ErrorHandler */
14761
14777
 
14762
14778
  /**
14763
14779
  * Provider for `$exceptionHandler` service. Delegates uncaught exceptions to `$log.error()` by default.
@@ -14788,7 +14804,7 @@
14788
14804
  }
14789
14805
 
14790
14806
  /**
14791
- * @returns {import('../interface.ts').FilterFn}
14807
+ * @returns {ng.FilterFn}
14792
14808
  */
14793
14809
  function filterFilter() {
14794
14810
  /**
@@ -14992,7 +15008,7 @@
14992
15008
  }
14993
15009
 
14994
15010
  /**
14995
- * @returns {import('../interface.ts').FilterFn}
15011
+ * @returns {ng.FilterFn}
14996
15012
  */
14997
15013
  function jsonFilter() {
14998
15014
  return function (object, spacing) {
@@ -15004,7 +15020,7 @@
15004
15020
  }
15005
15021
 
15006
15022
  /**
15007
- * @returns {import('../interface.ts').FilterFn}
15023
+ * @returns {ng.FilterFn}
15008
15024
  */
15009
15025
  function limitToFilter() {
15010
15026
  /**
@@ -15054,7 +15070,7 @@
15054
15070
  orderByFilter.$inject = [$injectTokens.$parse];
15055
15071
 
15056
15072
  /**
15057
- * @returns {import('../interface.ts').FilterFn}
15073
+ * @returns {ng.FilterFn}
15058
15074
  */
15059
15075
  function orderByFilter($parse) {
15060
15076
  return function (array, sortPredicate, reverseOrder, compareFn) {
@@ -15236,7 +15252,7 @@
15236
15252
  * ```
15237
15253
  *
15238
15254
  * @param {import('./state/state-service.js').StateProvider} $state
15239
- * @returns {import('../interface.ts').FilterFn}
15255
+ * @returns {ng.FilterFn}
15240
15256
  */
15241
15257
  function $IsStateFilter($state) {
15242
15258
  const isFilter = (state, params, options) =>
@@ -15258,7 +15274,7 @@
15258
15274
  * ```
15259
15275
  *
15260
15276
  * @param {import('./state/state-service.js').StateProvider} $state
15261
- * @returns {import('../interface.ts').FilterFn}
15277
+ * @returns {ng.FilterFn}
15262
15278
  */
15263
15279
  function $IncludedByStateFilter($state) {
15264
15280
  const includesFilter = function (state, params, options) {
@@ -15289,8 +15305,8 @@
15289
15305
  }
15290
15306
 
15291
15307
  /**
15292
- * @param {string|Record<string, import('../../interface.ts').FilterFactory>} name
15293
- * @param {import('../../interface.ts').FilterFactory} [factory]
15308
+ * @param {string|Record<string, ng.FilterFn>} name
15309
+ * @param {ng.FilterService} [factory]
15294
15310
  * @return {import('../../interface.ts').Provider}
15295
15311
  */
15296
15312
  register(name, factory) {
@@ -15306,7 +15322,7 @@
15306
15322
  $injectTokens.$injector,
15307
15323
  /**
15308
15324
  * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
15309
- * @returns {import('../../interface.ts').FilterFn}
15325
+ * @returns {ng.FilterService}
15310
15326
  */
15311
15327
  ($injector) => (/** @type {string} */ name) => $injector.get(name + SUFFIX),
15312
15328
  ];
@@ -17568,13 +17584,13 @@
17568
17584
  }
17569
17585
 
17570
17586
  $get = [
17571
- "$parse",
17572
- "$sce",
17587
+ $injectTokens.$parse,
17588
+ $injectTokens.$sce,
17573
17589
  /**
17574
17590
  *
17575
- * @param {import("../parse/interface.ts").ParseService} $parse
17591
+ * @param {ng.ParseService} $parse
17576
17592
  * @param {*} $sce
17577
- * @returns
17593
+ * @returns {ng.InterpolateService}
17578
17594
  */
17579
17595
  function ($parse, $sce) {
17580
17596
  /** @type {InterpolateProvider} */
@@ -17823,7 +17839,7 @@
17823
17839
  return concat.join("");
17824
17840
  };
17825
17841
 
17826
- return extend(
17842
+ return /**@type {import("./interface.js").InterpolationFunction} */ extend(
17827
17843
  (context, cb) => {
17828
17844
  let i = 0;
17829
17845
  const ii = expressions.length;
@@ -17917,6 +17933,7 @@
17917
17933
  return provider.endSymbol;
17918
17934
  };
17919
17935
 
17936
+ // @ts-ignore
17920
17937
  return $interpolate;
17921
17938
  },
17922
17939
  ];
@@ -17924,51 +17941,6 @@
17924
17941
 
17925
17942
  let lastCookies = {};
17926
17943
  let lastCookieString = "";
17927
-
17928
- /**
17929
- * @returns {Object<String, String>} List of all cookies
17930
- */
17931
- function getCookies() {
17932
- let cookieArray;
17933
- let cookie;
17934
- let i;
17935
- let index;
17936
- let name;
17937
- const currentCookieString = document.cookie;
17938
-
17939
- if (currentCookieString !== lastCookieString) {
17940
- lastCookieString = currentCookieString;
17941
- cookieArray = lastCookieString.split("; ");
17942
- lastCookies = {};
17943
-
17944
- for (i = 0; i < cookieArray.length; i++) {
17945
- cookie = cookieArray[i];
17946
- index = cookie.indexOf("=");
17947
- if (index > 0) {
17948
- // ignore nameless cookies
17949
- name = safeDecodeURIComponent(cookie.substring(0, index));
17950
- // the first value that is seen for a cookie is the most
17951
- // specific one. values for the same cookie name that
17952
- // follow are for less specific paths.
17953
- if (isUndefined(lastCookies[name])) {
17954
- lastCookies[name] = safeDecodeURIComponent(
17955
- cookie.substring(index + 1),
17956
- );
17957
- }
17958
- }
17959
- }
17960
- }
17961
- return lastCookies;
17962
- }
17963
-
17964
- function safeDecodeURIComponent(str) {
17965
- try {
17966
- return decodeURIComponent(str);
17967
- } catch {
17968
- return str;
17969
- }
17970
- }
17971
-
17972
17944
  const APPLICATION_JSON = "application/json";
17973
17945
  const CONTENT_TYPE_APPLICATION_JSON = {
17974
17946
  "Content-Type": `${APPLICATION_JSON};charset=utf-8`,
@@ -18000,8 +17972,12 @@
18000
17972
  * Note that serializer will sort the request parameters alphabetically.
18001
17973
  */
18002
17974
  function HttpParamSerializerProvider() {
18003
- this.$get = function () {
18004
- return function ngParamSerializer(params) {
17975
+ /**
17976
+ * @returns {import('./interface.ts').HttpParamSerializer}
17977
+ * A function that serializes parameters into a query string.
17978
+ */
17979
+ this.$get = () => {
17980
+ return (params) => {
18005
17981
  if (!params) return "";
18006
17982
  const parts = [];
18007
17983
  Object.keys(params)
@@ -18327,17 +18303,15 @@
18327
18303
  });
18328
18304
 
18329
18305
  this.$get = [
18330
- "$httpBackend",
18331
- "$injector",
18332
- "$sce",
18306
+ $injectTokens.$injector,
18307
+ $injectTokens.$sce,
18333
18308
  /**
18334
18309
  *
18335
- * @param {*} $httpBackend
18336
18310
  * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
18337
18311
  * @param {*} $sce
18338
18312
  * @returns
18339
18313
  */
18340
- function ($httpBackend, $injector, $sce) {
18314
+ function ($injector, $sce) {
18341
18315
  /**
18342
18316
  * @type {Map<string, string>}
18343
18317
  */
@@ -18673,7 +18647,7 @@
18673
18647
  * Makes the request.
18674
18648
  *
18675
18649
  * !!! ACCESSES CLOSURE VARS:
18676
- * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
18650
+ * defaults, $log, $rootScope, defaultCache, $http.pendingRequests
18677
18651
  */
18678
18652
  function sendReq(config, reqData) {
18679
18653
  const { promise, resolve, reject } = Promise.withResolvers();
@@ -18744,7 +18718,7 @@
18744
18718
  xsrfValue;
18745
18719
  }
18746
18720
 
18747
- $httpBackend(
18721
+ http(
18748
18722
  config.method,
18749
18723
  url,
18750
18724
  reqData,
@@ -18760,6 +18734,10 @@
18760
18734
 
18761
18735
  return promise;
18762
18736
 
18737
+ /**
18738
+ * @param eventHandlers
18739
+ * @return {Record<string, EventListener>}
18740
+ */
18763
18741
  function createApplyHandlers(eventHandlers) {
18764
18742
  if (eventHandlers) {
18765
18743
  const applyHandlers = {};
@@ -18776,12 +18754,14 @@
18776
18754
  }
18777
18755
  };
18778
18756
  });
18779
- return applyHandlers;
18757
+ return /** @type {Record<string, EventListener>} */ (applyHandlers);
18758
+ } else {
18759
+ return {};
18780
18760
  }
18781
18761
  }
18782
18762
 
18783
18763
  /**
18784
- * Callback registered to $httpBackend():
18764
+ * Callback registered to http():
18785
18765
  * - caches the response if desired
18786
18766
  * - resolves the raw $http promise
18787
18767
  * - calls $apply
@@ -18869,159 +18849,177 @@
18869
18849
  }
18870
18850
 
18871
18851
  /**
18872
- * HTTP backend used by the `$http` that delegates to
18873
- * XMLHttpRequest object and deals with browser incompatibilities.
18874
- * You should never need to use this service directly.
18875
- */
18876
- class HttpBackendProvider {
18877
- constructor() {
18878
- this.$get = () => createHttpBackend();
18879
- }
18880
- }
18881
-
18882
- /**
18883
- * @returns
18852
+ * Makes an HTTP request using XMLHttpRequest with flexible options.
18853
+ *
18854
+ * @param {string} method - The HTTP method (e.g., "GET", "POST").
18855
+ * @param {string} [url] - The URL to send the request to. Defaults to the current page URL.
18856
+ * @param {*} [post] - The body to send with the request, if any.
18857
+ * @param {function(number, any, string|null, string, string): void} [callback] - Callback invoked when the request completes.
18858
+ * @param {Object<string, string|undefined>} [headers] - Headers to set on the request.
18859
+ * @param {number|Promise<any>} [timeout] - Timeout in ms or a cancellable promise.
18860
+ * @param {boolean} [withCredentials] - Whether to send credentials with the request.
18861
+ * @param {XMLHttpRequestResponseType} [responseType] - The type of data expected in the response.
18862
+ * @param {Record<string, EventListener>} [eventHandlers] - Event listeners for the XMLHttpRequest object.
18863
+ * @param {Record<string, EventListener>} [uploadEventHandlers] - Event listeners for the XMLHttpRequest.upload object.
18864
+ * @returns {void}
18884
18865
  */
18885
- function createHttpBackend() {
18886
- /**
18887
- * Makes an HTTP request using XMLHttpRequest with flexible options.
18888
- *
18889
- * @param {string} method - The HTTP method (e.g., "GET", "POST").
18890
- * @param {string} [url] - The URL to send the request to. Defaults to the current page URL.
18891
- * @param {*} [post] - The body to send with the request, if any.
18892
- * @param {function(number, any, string|null, string, string): void} [callback] - Callback invoked when the request completes.
18893
- * @param {Object<string, string|undefined>} [headers] - Headers to set on the request.
18894
- * @param {number|Promise<any>} [timeout] - Timeout in ms or a cancellable promise.
18895
- * @param {boolean} [withCredentials] - Whether to send credentials with the request.
18896
- * @param {XMLHttpRequestResponseType} [responseType] - The type of data expected in the response.
18897
- * @param {Object<string, EventListener>} [eventHandlers] - Event listeners for the XMLHttpRequest object.
18898
- * @param {Object<string, EventListener>} [uploadEventHandlers] - Event listeners for the XMLHttpRequest.upload object.
18899
- * @returns {void}
18900
- */
18901
- return function (
18902
- method,
18903
- url,
18904
- post,
18905
- callback,
18906
- headers,
18907
- timeout,
18908
- withCredentials,
18909
- responseType,
18910
- eventHandlers,
18911
- uploadEventHandlers,
18912
- ) {
18913
- url = url || trimEmptyHash(window.location.href);
18866
+ function http(
18867
+ method,
18868
+ url,
18869
+ post,
18870
+ callback,
18871
+ headers,
18872
+ timeout,
18873
+ withCredentials,
18874
+ responseType,
18875
+ eventHandlers,
18876
+ uploadEventHandlers,
18877
+ ) {
18878
+ url = url || trimEmptyHash(window.location.href);
18914
18879
 
18915
- const xhr = new XMLHttpRequest();
18916
- let abortedByTimeout = false;
18917
- let timeoutId;
18880
+ const xhr = new XMLHttpRequest();
18881
+ let abortedByTimeout = false;
18882
+ let timeoutId;
18918
18883
 
18919
- xhr.open(method, url, true);
18884
+ xhr.open(method, url, true);
18920
18885
 
18921
- if (headers) {
18922
- for (const [key, value] of Object.entries(headers)) {
18923
- if (isDefined(value)) {
18924
- xhr.setRequestHeader(key, value);
18925
- }
18886
+ if (headers) {
18887
+ for (const [key, value] of Object.entries(headers)) {
18888
+ if (isDefined(value)) {
18889
+ xhr.setRequestHeader(key, value);
18926
18890
  }
18927
18891
  }
18892
+ }
18928
18893
 
18929
- xhr.onload = () => {
18930
- let status = xhr.status || 0;
18931
- const statusText = xhr.statusText || "";
18894
+ xhr.onload = () => {
18895
+ let status = xhr.status || 0;
18896
+ const statusText = xhr.statusText || "";
18932
18897
 
18933
- if (status === 0) {
18934
- status = xhr.response
18935
- ? 200
18936
- : new URL(url).protocol === "file:"
18937
- ? 404
18938
- : 0;
18939
- }
18898
+ if (status === 0) {
18899
+ status = xhr.response ? 200 : new URL(url).protocol === "file:" ? 404 : 0;
18900
+ }
18940
18901
 
18941
- completeRequest(
18942
- status,
18943
- xhr.response,
18944
- xhr.getAllResponseHeaders(),
18945
- statusText,
18946
- "complete",
18947
- );
18948
- };
18902
+ completeRequest(
18903
+ status,
18904
+ xhr.response,
18905
+ xhr.getAllResponseHeaders(),
18906
+ statusText,
18907
+ "complete",
18908
+ );
18909
+ };
18949
18910
 
18950
- xhr.onerror = () => completeRequest(-1, null, null, "", "error");
18951
- xhr.ontimeout = () => completeRequest(-1, null, null, "", "timeout");
18911
+ xhr.onerror = () => completeRequest(-1, null, null, "", "error");
18912
+ xhr.ontimeout = () => completeRequest(-1, null, null, "", "timeout");
18952
18913
 
18953
- xhr.onabort = () => {
18954
- completeRequest(
18955
- -1,
18956
- null,
18957
- null,
18958
- "",
18959
- abortedByTimeout ? "timeout" : "abort",
18960
- );
18961
- };
18914
+ xhr.onabort = () => {
18915
+ completeRequest(-1, null, null, "", abortedByTimeout ? "timeout" : "abort");
18916
+ };
18962
18917
 
18963
- if (eventHandlers) {
18964
- for (const [key, handler] of Object.entries(eventHandlers)) {
18965
- xhr.addEventListener(key, handler);
18966
- }
18918
+ if (eventHandlers) {
18919
+ for (const [key, handler] of Object.entries(eventHandlers)) {
18920
+ xhr.addEventListener(key, handler);
18967
18921
  }
18922
+ }
18968
18923
 
18969
- if (uploadEventHandlers) {
18970
- for (const [key, handler] of Object.entries(uploadEventHandlers)) {
18971
- xhr.upload.addEventListener(key, handler);
18972
- }
18924
+ if (uploadEventHandlers) {
18925
+ for (const [key, handler] of Object.entries(uploadEventHandlers)) {
18926
+ xhr.upload.addEventListener(key, handler);
18973
18927
  }
18928
+ }
18974
18929
 
18975
- if (withCredentials) {
18976
- xhr.withCredentials = true;
18977
- }
18930
+ if (withCredentials) {
18931
+ xhr.withCredentials = true;
18932
+ }
18978
18933
 
18979
- if (responseType) {
18980
- try {
18981
- xhr.responseType = responseType;
18982
- } catch (e) {
18983
- if (responseType !== "json") throw e;
18984
- }
18934
+ if (responseType) {
18935
+ try {
18936
+ xhr.responseType = responseType;
18937
+ } catch (e) {
18938
+ if (responseType !== "json") throw e;
18985
18939
  }
18940
+ }
18986
18941
 
18987
- xhr.send(isUndefined(post) ? null : post);
18942
+ xhr.send(isUndefined(post) ? null : post);
18988
18943
 
18989
- if (typeof timeout === "number" && timeout > 0) {
18990
- timeoutId = setTimeout(() => timeoutRequest("timeout"), timeout);
18991
- } else if (isPromiseLike(timeout)) {
18992
- /** @type {Promise} */ (timeout).then(() => {
18993
- timeoutRequest(isDefined(timeout["$$timeoutId"]) ? "timeout" : "abort");
18994
- });
18995
- }
18944
+ if (typeof timeout === "number" && timeout > 0) {
18945
+ timeoutId = setTimeout(() => timeoutRequest("timeout"), timeout);
18946
+ } else if (isPromiseLike(timeout)) {
18947
+ /** @type {Promise} */ (timeout).then(() => {
18948
+ timeoutRequest(isDefined(timeout["$$timeoutId"]) ? "timeout" : "abort");
18949
+ });
18950
+ }
18996
18951
 
18997
- /**
18998
- * @param {"timeout"|"abort"} reason
18999
- */
19000
- function timeoutRequest(reason) {
19001
- abortedByTimeout = reason === "timeout";
19002
- if (xhr) xhr.abort();
18952
+ /**
18953
+ * @param {"timeout"|"abort"} reason
18954
+ */
18955
+ function timeoutRequest(reason) {
18956
+ abortedByTimeout = reason === "timeout";
18957
+ if (xhr) xhr.abort();
18958
+ }
18959
+
18960
+ /**
18961
+ * @param {number} status - HTTP status code or -1 for network errors.
18962
+ * @param {*} response - The parsed or raw response from the server.
18963
+ * @param {string|null} headersString - The raw response headers as a string.
18964
+ * @param {string} statusText - The status text returned by the server.
18965
+ * @param {"complete"|"error"|"timeout"|"abort"} xhrStatus - Final status of the request.
18966
+ */
18967
+ function completeRequest(
18968
+ status,
18969
+ response,
18970
+ headersString,
18971
+ statusText,
18972
+ xhrStatus,
18973
+ ) {
18974
+ if (isDefined(timeoutId)) {
18975
+ clearTimeout(timeoutId);
19003
18976
  }
18977
+ callback(status, response, headersString, statusText, xhrStatus);
18978
+ }
18979
+ }
19004
18980
 
19005
- /**
19006
- * @param {number} status - HTTP status code or -1 for network errors.
19007
- * @param {*} response - The parsed or raw response from the server.
19008
- * @param {string|null} headersString - The raw response headers as a string.
19009
- * @param {string} statusText - The status text returned by the server.
19010
- * @param {"complete"|"error"|"timeout"|"abort"} xhrStatus - Final status of the request.
19011
- */
19012
- function completeRequest(
19013
- status,
19014
- response,
19015
- headersString,
19016
- statusText,
19017
- xhrStatus,
19018
- ) {
19019
- if (isDefined(timeoutId)) {
19020
- clearTimeout(timeoutId);
18981
+ /**
18982
+ * @returns {Object<String, String>} List of all cookies
18983
+ */
18984
+ function getCookies() {
18985
+ let cookieArray;
18986
+ let cookie;
18987
+ let i;
18988
+ let index;
18989
+ let name;
18990
+ const currentCookieString = document.cookie;
18991
+
18992
+ if (currentCookieString !== lastCookieString) {
18993
+ lastCookieString = currentCookieString;
18994
+ cookieArray = lastCookieString.split("; ");
18995
+ lastCookies = {};
18996
+
18997
+ for (i = 0; i < cookieArray.length; i++) {
18998
+ cookie = cookieArray[i];
18999
+ index = cookie.indexOf("=");
19000
+ if (index > 0) {
19001
+ // ignore nameless cookies
19002
+ name = safeDecodeURIComponent(cookie.substring(0, index));
19003
+ // the first value that is seen for a cookie is the most
19004
+ // specific one. values for the same cookie name that
19005
+ // follow are for less specific paths.
19006
+ if (isUndefined(lastCookies[name])) {
19007
+ lastCookies[name] = safeDecodeURIComponent(
19008
+ cookie.substring(index + 1),
19009
+ );
19010
+ }
19021
19011
  }
19022
- callback(status, response, headersString, statusText, xhrStatus);
19023
19012
  }
19024
- };
19013
+ }
19014
+ return lastCookies;
19015
+ }
19016
+
19017
+ function safeDecodeURIComponent(str) {
19018
+ try {
19019
+ return decodeURIComponent(str);
19020
+ } catch {
19021
+ return str;
19022
+ }
19025
19023
  }
19026
19024
 
19027
19025
  const PATH_MATCH = /^([^?#]*)(\?([^#]*))?(#(.*))?$/;
@@ -19532,7 +19530,7 @@
19532
19530
  $injectTokens.$rootElement,
19533
19531
  /**
19534
19532
  *
19535
- * @param {import('../../core/scope/scope.js').Scope} $rootScope
19533
+ * @param {ng.Scope} $rootScope
19536
19534
  * @param {Element} $rootElement
19537
19535
  * @returns {Location}
19538
19536
  */
@@ -20098,7 +20096,7 @@
20098
20096
  }
20099
20097
 
20100
20098
  /**
20101
- * @type {import('../parse/interface.ts').ParseService}
20099
+ * @type {ng.ParseService}
20102
20100
  */
20103
20101
  let $parse;
20104
20102
 
@@ -21197,6 +21195,9 @@
21197
21195
  return this.$root == /** @type {Scope} */ (this);
21198
21196
  }
21199
21197
 
21198
+ /**
21199
+ * @param {Function} fn
21200
+ */
21200
21201
  $postUpdate(fn) {
21201
21202
  $postUpdateQueue.push(fn);
21202
21203
  }
@@ -21379,11 +21380,11 @@
21379
21380
  "$sce",
21380
21381
  /**
21381
21382
  *
21382
- * @param {import('./exception/exception-handler.js').ErrorHandler} $exceptionHandler
21383
- * @param {import('../services/template-cache/interface.ts').TemplateCache} $templateCache
21384
- * @param {import("interface.ts").HttpService} $http
21383
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
21384
+ * @param {ng.TemplateCacheService} $templateCache
21385
+ * @param {ng.HttpService} $http
21385
21386
  * @param {*} $sce
21386
- * @returns
21387
+ * @returns {ng.TemplateRequestService}
21387
21388
  */
21388
21389
  function ($exceptionHandler, $templateCache, $http, $sce) {
21389
21390
  function handleRequestFn(tpl, ignoreRequestError) {
@@ -24361,14 +24362,14 @@
24361
24362
  }
24362
24363
 
24363
24364
  this.$get = [
24364
- "$rootScope",
24365
- "$injector",
24366
- "$$AnimateRunner",
24367
- "$$rAFScheduler",
24368
- "$$animateCache",
24365
+ $injectTokens.$rootScope,
24366
+ $injectTokens.$injector,
24367
+ $injectTokens.$$AnimateRunner,
24368
+ $injectTokens.$$rAFScheduler,
24369
+ $injectTokens.$$animateCache,
24369
24370
  /**
24370
24371
  *
24371
- * @param {*} $rootScope
24372
+ * @param {ng.RootScopeService} $rootScope
24372
24373
  * @param {import("../core/di/internal-injector").InjectorService} $injector
24373
24374
  * @param {*} $$AnimateRunner
24374
24375
  * @param {import("./raf-scheduler").RafScheduler} $$rAFScheduler
@@ -24534,7 +24535,6 @@
24534
24535
  // block. This way we can group animations for all the animations that
24535
24536
  // were apart of the same postDigest flush call.
24536
24537
  if (animationQueue.length > 1) return runner;
24537
-
24538
24538
  $rootScope.$postUpdate(() => {
24539
24539
  const animations = [];
24540
24540
  animationQueue.forEach((entry) => {
@@ -25424,158 +25424,6 @@
25424
25424
  };
25425
25425
  }
25426
25426
 
25427
- /**
25428
- * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.
25429
- *
25430
- * Given a function with N parameters, returns a new function that supports partial application.
25431
- * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,
25432
- * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to
25433
- * accept more parameters until all N parameters have been supplied.
25434
- *
25435
- *
25436
- * This contrived example uses a partially applied function as an predicate, which returns true
25437
- * if an object is found in both arrays.
25438
- * @example
25439
- * ```
25440
- * // returns true if an object is in both of the two arrays
25441
- * function inBoth(array1, array2, object) {
25442
- * return array1.indexOf(object) !== -1 &&
25443
- * array2.indexOf(object) !== 1;
25444
- * }
25445
- * let obj1, obj2, obj3, obj4, obj5, obj6, obj7
25446
- * let foos = [obj1, obj3]
25447
- * let bars = [obj3, obj4, obj5]
25448
- *
25449
- * // A curried "copy" of inBoth
25450
- * let curriedInBoth = curry(inBoth);
25451
- * // Partially apply both the array1 and array2
25452
- * let inFoosAndBars = curriedInBoth(foos, bars);
25453
- *
25454
- * // Supply the final argument; since all arguments are
25455
- * // supplied, the original inBoth function is then called.
25456
- * let obj1InBoth = inFoosAndBars(obj1); // false
25457
- *
25458
- * // Use the inFoosAndBars as a predicate.
25459
- * // Filter, on each iteration, supplies the final argument
25460
- * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];
25461
- * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]
25462
- *
25463
- * ```
25464
- *
25465
- * @param fn
25466
- * @returns {*|function(): (*|any)}
25467
- */
25468
- function curry(fn) {
25469
- return function curried() {
25470
- if (arguments.length >= fn.length) {
25471
- return fn.apply(this, arguments);
25472
- }
25473
- const args = Array.prototype.slice.call(arguments);
25474
- return curried.bind(this, ...args);
25475
- };
25476
- }
25477
- /**
25478
- * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left
25479
- * given: f(x), g(x), h(x)
25480
- * let composed = compose(f,g,h)
25481
- * then, composed is: f(g(h(x)))
25482
- */
25483
- function compose() {
25484
- const args = arguments;
25485
- const start = args.length - 1;
25486
- return function () {
25487
- let i = start,
25488
- result = args[start].apply(this, arguments);
25489
- while (i--) result = args[i].call(this, result);
25490
- return result;
25491
- };
25492
- }
25493
- /**
25494
- * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right
25495
- * given: f(x), g(x), h(x)
25496
- * let piped = pipe(f,g,h);
25497
- * then, piped is: h(g(f(x)))
25498
- */
25499
- function pipe() {
25500
- return compose.apply(null, [].slice.call(arguments).reverse());
25501
- }
25502
-
25503
- /**
25504
- * Given a property name and a value, returns a function that returns a boolean based on whether
25505
- * the passed object has a property that matches the value
25506
- * let obj = { foo: 1, name: "blarg" };
25507
- * let getName = propEq("name", "blarg");
25508
- * getName(obj) === true
25509
- */
25510
- const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
25511
- /**
25512
- * Given a dotted property name, returns a function that returns a nested property from an object, or undefined
25513
- * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, };
25514
- * let getName = prop("nestedObj.name");
25515
- * getName(obj) === "blarg"
25516
- * let propNotFound = prop("this.property.doesnt.exist");
25517
- * propNotFound(obj) === undefined
25518
- */
25519
- const parse = (name) =>
25520
- pipe.apply(
25521
- null,
25522
- name.split(".").map((name) => (obj) => obj && obj[name]),
25523
- );
25524
-
25525
- /** Given a class, returns a Predicate function that returns true if the object is of that class */
25526
- const is = (ctor) => (obj) =>
25527
- (obj != null && obj.constructor === ctor) || obj instanceof ctor;
25528
-
25529
- /** Given a value, returns a function which returns the value */
25530
- const val = (v) => () => v;
25531
- /**
25532
- * Sorta like Pattern Matching (a functional programming conditional construct)
25533
- *
25534
- * See http://c2.com/cgi/wiki?PatternMatching
25535
- *
25536
- * This is a conditional construct which allows a series of predicates and output functions
25537
- * to be checked and then applied. Each predicate receives the input. If the predicate
25538
- * returns truthy, then its matching output function (mapping function) is provided with
25539
- * the input and, then the result is returned.
25540
- *
25541
- * Each combination (2-tuple) of predicate + output function should be placed in an array
25542
- * of size 2: [ predicate, mapFn ]
25543
- *
25544
- * These 2-tuples should be put in an outer array.
25545
- *
25546
- * @example
25547
- * ```
25548
- *
25549
- * // Here's a 2-tuple where the first element is the isString predicate
25550
- * // and the second element is a function that returns a description of the input
25551
- * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];
25552
- *
25553
- * // Second tuple: predicate "isNumber", mapfn returns a description
25554
- * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];
25555
- *
25556
- * let third = [ (input) => input === null, (input) => `Oh, null...` ];
25557
- *
25558
- * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];
25559
- *
25560
- * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);
25561
- *
25562
- * console.log(descriptionOf(undefined)); // 'notdefined'
25563
- * console.log(descriptionOf(55)); // '(55) That's a number!'
25564
- * console.log(descriptionOf("foo")); // 'Here's your string foo'
25565
- * ```
25566
- *
25567
- * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,
25568
- * with a Predicate and a mapping/output function
25569
- * @returns {function(any): *}
25570
- */
25571
- function pattern(struct) {
25572
- return function (x) {
25573
- for (let i = 0; i < struct.length; i++) {
25574
- if (struct[i][0](x)) return struct[i][1](x);
25575
- }
25576
- };
25577
- }
25578
-
25579
25427
  function equals(o1, o2) {
25580
25428
  if (o1 === o2) return true;
25581
25429
  if (o1 === null || o2 === null) return false;
@@ -25602,81 +25450,7 @@
25602
25450
  }
25603
25451
  return true;
25604
25452
  }
25605
- /**
25606
- * Builds proxy functions on the `to` object which pass through to the `from` object.
25607
- *
25608
- * For each key in `fnNames`, creates a proxy function on the `to` object.
25609
- * The proxy function calls the real function on the `from` object.
25610
- *
25611
- *
25612
- * #### Example:
25613
- * This example creates an new class instance whose functions are prebound to the new'd object.
25614
- * ```js
25615
- * class Foo {
25616
- * constructor(data) {
25617
- * // Binds all functions from Foo.prototype to 'this',
25618
- * // then copies them to 'this'
25619
- * bindFunctions(Foo.prototype, this, this);
25620
- * this.data = data;
25621
- * }
25622
- *
25623
- * log() {
25624
- * console.log(this.data);
25625
- * }
25626
- * }
25627
- *
25628
- * let myFoo = new Foo([1,2,3]);
25629
- * var logit = myFoo.log;
25630
- * logit(); // logs [1, 2, 3] from the myFoo 'this' instance
25631
- * ```
25632
- *
25633
- * #### Example:
25634
- * This example creates a bound version of a service function, and copies it to another object
25635
- * ```
25636
- *
25637
- * var SomeService = {
25638
- * this.data = [3, 4, 5];
25639
- * this.log = function() {
25640
- * console.log(this.data);
25641
- * }
25642
- * }
25643
- *
25644
- * // Constructor fn
25645
- * function OtherThing() {
25646
- * // Binds all functions from SomeService to SomeService,
25647
- * // then copies them to 'this'
25648
- * bindFunctions(SomeService, this, SomeService);
25649
- * }
25650
- *
25651
- * let myOtherThing = new OtherThing();
25652
- * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'
25653
- * ```
25654
- *
25655
- * @param source A function that returns the source object which contains the original functions to be bound
25656
- * @param target A function that returns the target object which will receive the bound functions
25657
- * @param bind A function that returns the object which the functions will be bound to
25658
- * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
25659
- * @param latebind If true, the binding of the function is delayed until the first time it's invoked
25660
- */
25661
- function createProxyFunctions(
25662
- source,
25663
- target,
25664
- bind,
25665
- fnNames,
25666
- latebind = false,
25667
- ) {
25668
- const bindFunction = (fnName) => source()[fnName].bind(bind());
25669
- const makeLateRebindFn = (fnName) =>
25670
- function lateRebindFunction() {
25671
- target[fnName] = bindFunction(fnName);
25672
- return target[fnName].apply(null, arguments);
25673
- };
25674
- fnNames = fnNames || Object.keys(source());
25675
- return fnNames.reduce((acc, name) => {
25676
- acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);
25677
- return acc;
25678
- }, target);
25679
- }
25453
+
25680
25454
  /**
25681
25455
  * prototypal inheritance helper.
25682
25456
  * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
@@ -25701,11 +25475,13 @@
25701
25475
  /**
25702
25476
  * Given an array, and an item, if the item is found in the array, it removes it (in-place).
25703
25477
  * The same array is returned
25478
+ * @param {Array} array
25479
+ * @param {any} obj
25480
+ * @returns {Array}
25704
25481
  */
25705
- const removeFrom = curry(_removeFrom);
25706
- function _removeFrom(array, obj) {
25707
- const idx = array.indexOf(obj);
25708
- if (idx >= 0) array.splice(idx, 1);
25482
+ function removeFrom(array, obj) {
25483
+ const i = array.indexOf(obj);
25484
+ if (i !== -1) array.splice(i, 1);
25709
25485
  return array;
25710
25486
  }
25711
25487
 
@@ -25988,6 +25764,148 @@
25988
25764
  const silentRejection = (error) =>
25989
25765
  silenceUncaughtInPromise(Promise.reject(error));
25990
25766
 
25767
+ /**
25768
+ * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.
25769
+ *
25770
+ * Given a function with N parameters, returns a new function that supports partial application.
25771
+ * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,
25772
+ * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to
25773
+ * accept more parameters until all N parameters have been supplied.
25774
+ *
25775
+ *
25776
+ * This contrived example uses a partially applied function as an predicate, which returns true
25777
+ * if an object is found in both arrays.
25778
+ * @example
25779
+ * ```
25780
+ * // returns true if an object is in both of the two arrays
25781
+ * function inBoth(array1, array2, object) {
25782
+ * return array1.indexOf(object) !== -1 &&
25783
+ * array2.indexOf(object) !== 1;
25784
+ * }
25785
+ * let obj1, obj2, obj3, obj4, obj5, obj6, obj7
25786
+ * let foos = [obj1, obj3]
25787
+ * let bars = [obj3, obj4, obj5]
25788
+ *
25789
+ * // A curried "copy" of inBoth
25790
+ * let curriedInBoth = curry(inBoth);
25791
+ * // Partially apply both the array1 and array2
25792
+ * let inFoosAndBars = curriedInBoth(foos, bars);
25793
+ *
25794
+ * // Supply the final argument; since all arguments are
25795
+ * // supplied, the original inBoth function is then called.
25796
+ * let obj1InBoth = inFoosAndBars(obj1); // false
25797
+ *
25798
+ * // Use the inFoosAndBars as a predicate.
25799
+ * // Filter, on each iteration, supplies the final argument
25800
+ * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];
25801
+ * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]
25802
+ *
25803
+ * ```
25804
+ *
25805
+ * @param fn
25806
+ * @returns {*|function(): (*|any)}
25807
+ */
25808
+ function curry(fn) {
25809
+ return function curried() {
25810
+ if (arguments.length >= fn.length) {
25811
+ return fn.apply(this, arguments);
25812
+ }
25813
+ const args = Array.prototype.slice.call(arguments);
25814
+ return curried.bind(this, ...args);
25815
+ };
25816
+ }
25817
+
25818
+ /**
25819
+ * Given a property name and a value, returns a function that returns a boolean based on whether
25820
+ * the passed object has a property that matches the value
25821
+ * let obj = { foo: 1, name: "blarg" };
25822
+ * let getName = propEq("name", "blarg");
25823
+ * getName(obj) === true
25824
+ */
25825
+ const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
25826
+ /**
25827
+ * Given a dotted property name, returns a function that returns a nested property from an object, or undefined
25828
+ * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, };
25829
+ * let getName = prop("nestedObj.name");
25830
+ * getName(obj) === "blarg"
25831
+ * let propNotFound = prop("this.property.doesnt.exist");
25832
+ * propNotFound(obj) === undefined
25833
+ */
25834
+ const parse = (path) => {
25835
+ const parts = path.split(".");
25836
+ return (obj) => parts.reduce((acc, key) => acc && acc[key], obj);
25837
+ };
25838
+
25839
+ /**
25840
+ * Given a class constructor, returns a predicate function that checks
25841
+ * whether a given object is an instance of that class.
25842
+ *
25843
+ * @param {new (...args: any[]) => any} ctor - The class constructor to check against.
25844
+ * @returns {(obj: any) => boolean} A predicate function that returns true if the object is of the given class.
25845
+ */
25846
+ function is(ctor) {
25847
+ /**
25848
+ * Checks if the provided object is an instance of the given constructor.
25849
+ *
25850
+ * @param {any} obj - The object to test.
25851
+ * @returns {boolean} True if the object is an instance of the given class.
25852
+ */
25853
+ return function (obj) {
25854
+ return (obj != null && obj.constructor === ctor) || obj instanceof ctor;
25855
+ };
25856
+ }
25857
+
25858
+ /** Given a value, returns a function which returns the value */
25859
+ const val = (v) => () => v;
25860
+
25861
+ /**
25862
+ * Sorta like Pattern Matching (a functional programming conditional construct)
25863
+ *
25864
+ * See http://c2.com/cgi/wiki?PatternMatching
25865
+ *
25866
+ * This is a conditional construct which allows a series of predicates and output functions
25867
+ * to be checked and then applied. Each predicate receives the input. If the predicate
25868
+ * returns truthy, then its matching output function (mapping function) is provided with
25869
+ * the input and, then the result is returned.
25870
+ *
25871
+ * Each combination (2-tuple) of predicate + output function should be placed in an array
25872
+ * of size 2: [ predicate, mapFn ]
25873
+ *
25874
+ * These 2-tuples should be put in an outer array.
25875
+ *
25876
+ * @example
25877
+ * ```
25878
+ *
25879
+ * // Here's a 2-tuple where the first element is the isString predicate
25880
+ * // and the second element is a function that returns a description of the input
25881
+ * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];
25882
+ *
25883
+ * // Second tuple: predicate "isNumber", mapfn returns a description
25884
+ * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];
25885
+ *
25886
+ * let third = [ (input) => input === null, (input) => `Oh, null...` ];
25887
+ *
25888
+ * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];
25889
+ *
25890
+ * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);
25891
+ *
25892
+ * console.log(descriptionOf(undefined)); // 'notdefined'
25893
+ * console.log(descriptionOf(55)); // '(55) That's a number!'
25894
+ * console.log(descriptionOf("foo")); // 'Here's your string foo'
25895
+ * ```
25896
+ *
25897
+ * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,
25898
+ * with a Predicate and a mapping/output function
25899
+ * @returns {function(any): *}
25900
+ */
25901
+ function pattern(struct) {
25902
+ return function (x) {
25903
+ for (let i = 0; i < struct.length; i++) {
25904
+ if (struct[i][0](x)) return struct[i][1](x);
25905
+ }
25906
+ };
25907
+ }
25908
+
25991
25909
  /**
25992
25910
  * An internal class which implements [[ParamTypeDefinition]].
25993
25911
  *
@@ -28182,23 +28100,11 @@
28182
28100
  constructor() {
28183
28101
  this._ngViews = [];
28184
28102
  this._viewConfigs = [];
28185
- this._viewConfigFactories = {};
28186
28103
  this._listeners = [];
28187
- this._pluginapi = {
28188
- _registeredUIView: (id) => {
28189
- return find(this._ngViews, (view) => view.id === id);
28190
- },
28191
- _registeredUIViews: () => this._ngViews,
28192
- _activeViewConfigs: () => this._viewConfigs,
28193
- _onSync: (listener) => {
28194
- this._listeners.push(listener);
28195
- return () => removeFrom(this._listeners, listener);
28196
- },
28197
- };
28198
28104
  this.viewConfigFactory(getViewConfigFactory());
28199
28105
  }
28200
28106
 
28201
- $get = [() => this];
28107
+ $get = () => this;
28202
28108
 
28203
28109
  /**
28204
28110
  * @param {?import('../state/state-object.js').StateObject} context
@@ -28336,7 +28242,7 @@
28336
28242
  return;
28337
28243
  }
28338
28244
  trace.traceViewServiceUIViewEvent("<- Deregistering", ngView);
28339
- removeFrom(ngViews)(ngView);
28245
+ removeFrom(ngViews, ngView);
28340
28246
  };
28341
28247
  }
28342
28248
  /**
@@ -29248,6 +29154,14 @@
29248
29154
  * The registration data for a registered transition hook
29249
29155
  */
29250
29156
  class RegisteredHook {
29157
+ /**
29158
+ * @param {import("./transition-service.js").TransitionProvider} tranSvc
29159
+ * @param eventType
29160
+ * @param callback
29161
+ * @param matchCriteria
29162
+ * @param removeHookFromRegistry
29163
+ * @param options
29164
+ */
29251
29165
  constructor(
29252
29166
  tranSvc,
29253
29167
  eventType,
@@ -29256,6 +29170,7 @@
29256
29170
  removeHookFromRegistry,
29257
29171
  options = {},
29258
29172
  ) {
29173
+ /** @type {import("./transition-service.js").TransitionProvider} */
29259
29174
  this.tranSvc = tranSvc;
29260
29175
  this.eventType = eventType;
29261
29176
  this.callback = callback;
@@ -29304,7 +29219,7 @@
29304
29219
  * }
29305
29220
  */
29306
29221
  _getDefaultMatchCriteria() {
29307
- return map(this.tranSvc._pluginapi._getPathTypes(), () => true);
29222
+ return map(this.tranSvc._getPathTypes(), () => true);
29308
29223
  }
29309
29224
  /**
29310
29225
  * Gets matching nodes as [[IMatchingNodes]]
@@ -29326,7 +29241,7 @@
29326
29241
  this._getDefaultMatchCriteria(),
29327
29242
  this.matchCriteria,
29328
29243
  );
29329
- const paths = Object.values(this.tranSvc._pluginapi._getPathTypes());
29244
+ const paths = Object.values(this.tranSvc._getPathTypes());
29330
29245
  return paths.reduce((mn, pathtype) => {
29331
29246
  // STATE scope criteria matches against every node in the path.
29332
29247
  // TRANSITION scope criteria matches against only the last node in the path
@@ -29364,7 +29279,7 @@
29364
29279
  const _registeredHooks = (registry._registeredHooks =
29365
29280
  registry._registeredHooks || {});
29366
29281
  const hooks = (_registeredHooks[eventType.name] = []);
29367
- const removeHookFn = removeFrom(hooks);
29282
+ const removeHookFn = (x) => removeFrom(hooks, x);
29368
29283
  // Create hook registration function on the IHookRegistry for the event
29369
29284
  registry[eventType.name] = hookRegistrationFn;
29370
29285
  function hookRegistrationFn(matchObject, callback, options = {}) {
@@ -29396,6 +29311,9 @@
29396
29311
  * in the Transition class, so we must also provide the Transition's _treeChanges)
29397
29312
  */
29398
29313
  class HookBuilder {
29314
+ /**
29315
+ * @param {import("./transition.js").Transition} transition
29316
+ */
29399
29317
  constructor(transition) {
29400
29318
  this.transition = transition;
29401
29319
  }
@@ -29405,7 +29323,7 @@
29405
29323
  * @returns
29406
29324
  */
29407
29325
  buildHooksForPhase(phase) {
29408
- return this.transition.transitionService._pluginapi
29326
+ return this.transition.transitionService
29409
29327
  ._getEvents(phase)
29410
29328
  .map((type) => this.buildHooks(type))
29411
29329
  .reduce(unnestR, [])
@@ -29593,7 +29511,7 @@
29593
29511
  * (which can then be used to register hooks)
29594
29512
  */
29595
29513
  createTransitionHookRegFns() {
29596
- this.transitionService._pluginapi
29514
+ this.transitionService
29597
29515
  ._getEvents()
29598
29516
  .filter((type) => type.hookPhase !== TransitionHookPhase.CREATE)
29599
29517
  .forEach((type) => makeEvent(this, this.transitionService, type));
@@ -30008,6 +29926,7 @@
30008
29926
  )
30009
29927
  return "SameAsCurrent";
30010
29928
  }
29929
+
30011
29930
  /**
30012
29931
  * Runs the transition
30013
29932
  *
@@ -30015,7 +29934,7 @@
30015
29934
  *
30016
29935
  * @internal
30017
29936
  *
30018
- * @returns a promise for a successful transition.
29937
+ * @returns {Promise} a promise for a successful transition.
30019
29938
  */
30020
29939
  run() {
30021
29940
  // Gets transition hooks array for the given phase
@@ -30652,13 +30571,6 @@
30652
30571
  this.globals = globals;
30653
30572
  this.$view = viewService;
30654
30573
  this._deregisterHookFns = {};
30655
- this._pluginapi = createProxyFunctions(val(this), {}, val(this), [
30656
- "_definePathType",
30657
- "_defineEvent",
30658
- "_getPathTypes",
30659
- "_getEvents",
30660
- "getHooks",
30661
- ]);
30662
30574
  this._defineCorePaths();
30663
30575
  this._defineCoreEvents();
30664
30576
  this._registerCoreTransitionHooks();
@@ -30816,6 +30728,10 @@
30816
30728
  makeEvent(this, this, eventType);
30817
30729
  }
30818
30730
 
30731
+ /**
30732
+ * @param {TransitionHookPhase} [phase]
30733
+ * @return {any[]}
30734
+ */
30819
30735
  _getEvents(phase) {
30820
30736
  const transitionHookTypes = isDefined(phase)
30821
30737
  ? this._eventTypes.filter((type) => type.hookPhase === phase)
@@ -30907,7 +30823,7 @@
30907
30823
  return this.globals.$current;
30908
30824
  }
30909
30825
 
30910
- static $inject = ["$routerProvider", "$transitionsProvider"];
30826
+ /* @ignore */ static $inject = ["$routerProvider", "$transitionsProvider"];
30911
30827
 
30912
30828
  /**
30913
30829
  *
@@ -30932,16 +30848,6 @@
30932
30848
  throw new Error($error$);
30933
30849
  }
30934
30850
  };
30935
- const getters = ["current", "$current", "params", "transition"];
30936
- const boundFns = Object.keys(StateProvider.prototype).filter(
30937
- (x) => !getters.includes(x),
30938
- );
30939
- createProxyFunctions(
30940
- val(StateProvider.prototype),
30941
- this,
30942
- val(this),
30943
- boundFns,
30944
- );
30945
30851
 
30946
30852
  EventBus.subscribe("$stateService:defaultErrorHandler", (err) =>
30947
30853
  this.defaultErrorHandler()(err),
@@ -31141,7 +31047,7 @@
31141
31047
  onInvalid(callback) {
31142
31048
  this.invalidCallbacks.push(callback);
31143
31049
  return function deregisterListener() {
31144
- removeFrom(this.invalidCallbacks)(callback);
31050
+ removeFrom(this.invalidCallbacks, callback);
31145
31051
  }.bind(this);
31146
31052
  }
31147
31053
  /**
@@ -31566,8 +31472,8 @@
31566
31472
  $get = [
31567
31473
  $injectTokens.$anchorScroll,
31568
31474
  /**
31569
- * @param {import('../services/anchor-scroll.js').AnchorScrollObject} $anchorScroll
31570
- * @returns {import('../services/anchor-scroll.js').AnchorScrollObject|Function}
31475
+ * @param {import('../services/anchor-scroll/anchor-scroll.js').AnchorScrollObject} $anchorScroll
31476
+ * @returns {import('../services/anchor-scroll/anchor-scroll.js').AnchorScrollObject|Function}
31571
31477
  */
31572
31478
  ($anchorScroll) => {
31573
31479
  if (this.enabled) {
@@ -31608,7 +31514,7 @@
31608
31514
  $injectTokens.$injector,
31609
31515
  /**
31610
31516
  * @param {import("interface.ts").HttpService} $http
31611
- * @param {import("../services/template-cache/interface.ts").TemplateCache} $templateCache
31517
+ * @param {ng.TemplateCacheService} $templateCache
31612
31518
  * @param {any} $templateRequest
31613
31519
  * @param {import("../core/di/internal-injector.js").InjectorService} $injector
31614
31520
  * @returns
@@ -31720,7 +31626,7 @@
31720
31626
  /**
31721
31627
  * Creates a template by invoking an injectable provider function.
31722
31628
  *
31723
- * @param {import('../interface.ts').Injectable} provider Function to invoke via `locals`
31629
+ * @param {import('../interface.ts').Injectable<any>} provider Function to invoke via `locals`
31724
31630
  * @param {Function} params a function used to invoke the template provider
31725
31631
  * @param {import("./resolve/resolve-context.js").ResolveContext} context
31726
31632
  * @return {string|Promise.<string>} The template html as a string, or a promise
@@ -31735,7 +31641,7 @@
31735
31641
  /**
31736
31642
  * Creates a component's template by invoking an injectable provider function.
31737
31643
  *
31738
- * @param {import('../interface.ts').Injectable} provider Function to invoke via `locals`
31644
+ * @param {import('../interface.ts').Injectable<any>} provider Function to invoke via `locals`
31739
31645
  * @return {Promise<any>} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
31740
31646
  */
31741
31647
  fromComponentProvider(provider, context) {
@@ -33051,7 +32957,7 @@
33051
32957
  * API for URL management
33052
32958
  */
33053
32959
  class UrlService {
33054
- static $inject = provider([
32960
+ /* @ignore */ static $inject = provider([
33055
32961
  $injectTokens.$location,
33056
32962
  $injectTokens.$state,
33057
32963
  $injectTokens.$router,
@@ -33232,7 +33138,7 @@
33232
33138
  */
33233
33139
  onChange(callback) {
33234
33140
  this._urlListeners.push(callback);
33235
- return () => removeFrom(this._urlListeners)(callback);
33141
+ return () => removeFrom(this._urlListeners, callback);
33236
33142
  }
33237
33143
 
33238
33144
  /**
@@ -33738,12 +33644,12 @@
33738
33644
  ]);
33739
33645
  const tuple2Resolvable = pattern([
33740
33646
  [
33741
- pipe((x) => x.val, isString),
33647
+ (x) => isString(x.val),
33742
33648
  (tuple) =>
33743
33649
  new Resolvable(tuple.token, (x) => x, [tuple.val], tuple.policy),
33744
33650
  ],
33745
33651
  [
33746
- pipe((x) => x.val, Array.isArray),
33652
+ (x) => Array.isArray(x.val),
33747
33653
  (tuple) =>
33748
33654
  new Resolvable(
33749
33655
  tuple.token,
@@ -33753,7 +33659,7 @@
33753
33659
  ),
33754
33660
  ],
33755
33661
  [
33756
- pipe((x) => x.val, isFunction),
33662
+ (x) => isFunction(x.val),
33757
33663
  (tuple) =>
33758
33664
  new Resolvable(
33759
33665
  tuple.token,
@@ -34005,7 +33911,12 @@
34005
33911
  *
34006
33912
  */
34007
33913
  class StateRegistryProvider {
34008
- static $inject = provider([$injectTokens.$url, $injectTokens.$state, $injectTokens.$router, $injectTokens.$view]);
33914
+ /* @ignore */ static $inject = provider([
33915
+ $injectTokens.$url,
33916
+ $injectTokens.$state,
33917
+ $injectTokens.$router,
33918
+ $injectTokens.$view,
33919
+ ]);
34009
33920
 
34010
33921
  /**
34011
33922
  * @param urlService
@@ -34134,7 +34045,7 @@
34134
34045
  onStatesChanged(listener) {
34135
34046
  this.listeners.push(listener);
34136
34047
  return function deregisterListener() {
34137
- removeFrom(this.listeners)(listener);
34048
+ removeFrom(this.listeners, listener);
34138
34049
  }.bind(this);
34139
34050
  }
34140
34051
  /**
@@ -34597,7 +34508,7 @@
34597
34508
  };
34598
34509
  states.push(stateInfo);
34599
34510
  return function removeState() {
34600
- removeFrom(states)(stateInfo);
34511
+ removeFrom(states, stateInfo);
34601
34512
  };
34602
34513
  }
34603
34514
  // Update route state
@@ -35141,8 +35052,8 @@
35141
35052
  ngSetterDirective.$inject = [$injectTokens.$parse, $injectTokens.$log];
35142
35053
 
35143
35054
  /**
35144
- * @param {import('../../core/parse/interface.ts').ParseService} $parse
35145
- * @param {import('../../services/log/interface.ts').LogService} $log
35055
+ * @param {ng.ParseService} $parse
35056
+ * @param {ng.LogService} $log
35146
35057
  * @returns {import('interface.ts').Directive}
35147
35058
  */
35148
35059
  function ngSetterDirective($parse, $log) {
@@ -35198,7 +35109,7 @@
35198
35109
 
35199
35110
  /**
35200
35111
  * @param {"get" | "delete" | "post" | "put"} method
35201
- * @returns {import('../../interface.ts').DirectiveFactory}
35112
+ * @returns {ng.DirectiveFactory}
35202
35113
  */
35203
35114
  function defineDirective(method) {
35204
35115
  const attrName = "ng" + method.charAt(0).toUpperCase() + method.slice(1);
@@ -35207,16 +35118,16 @@
35207
35118
  return directive;
35208
35119
  }
35209
35120
 
35210
- /** @type {import('../../interface.ts').DirectiveFactory} */
35121
+ /** @type {ng.DirectiveFactory} */
35211
35122
  const ngGetDirective = defineDirective("get");
35212
35123
 
35213
- /** @type {import('../../interface.ts').DirectiveFactory} */
35124
+ /** @type {ng.DirectiveFactory} */
35214
35125
  const ngDeleteDirective = defineDirective("delete");
35215
35126
 
35216
- /** @type {import('../../interface.ts').DirectiveFactory} */
35127
+ /** @type {ng.DirectiveFactory} */
35217
35128
  const ngPostDirective = defineDirective("post");
35218
35129
 
35219
- /** @type {import('../../interface.ts').DirectiveFactory} */
35130
+ /** @type {ng.DirectiveFactory} */
35220
35131
  const ngPutDirective = defineDirective("put");
35221
35132
 
35222
35133
  /**
@@ -35243,10 +35154,10 @@
35243
35154
  * Handles DOM manipulation based on a swap strategy and server-rendered HTML.
35244
35155
  *
35245
35156
  * @param {string} html - The HTML string returned from the server.
35246
- * @param {import("../../interface.ts").SwapModeType} swap
35157
+ * @param {import("./interface.ts").SwapModeType} swap
35247
35158
  * @param {Element} target - The target DOM element to apply the swap to.
35248
- * @param {import('../../core/scope/scope.js').Scope} scope
35249
- * @param {import('../../core/compile/compile.js').CompileFn} $compile
35159
+ * @param {ng.Scope} scope
35160
+ * @param {ng.CompileService} $compile
35250
35161
  */
35251
35162
  function handleSwapResponse(html, swap, target, scope, $compile) {
35252
35163
  let nodes = [];
@@ -35327,16 +35238,16 @@
35327
35238
  *
35328
35239
  * @param {"get" | "delete" | "post" | "put"} method - HTTP method to use.
35329
35240
  * @param {string} attrName - Attribute name containing the URL.
35330
- * @returns {import('../../interface.ts').DirectiveFactory}
35241
+ * @returns {ng.DirectiveFactory}
35331
35242
  */
35332
35243
  function createHttpDirective(method, attrName) {
35333
35244
  /**
35334
- * @param {import("interface.ts").HttpService} $http
35335
- * @param {import("../../core/compile/compile.js").CompileFn} $compile
35336
- * @param {import("../../services/log/interface.ts").LogService} $log
35337
- * @param {import("../../core/parse/interface.ts").ParseService} $parse
35338
- * @param {import("../../router/state/state-service.js").StateProvider} $state
35339
- * @returns {import('../../interface.ts').Directive}
35245
+ * @param {ng.HttpService} $http
35246
+ * @param {ng.CompileService} $compile
35247
+ * @param {ng.LogService} $log
35248
+ * @param {ng.ParseService} $parse
35249
+ * @param {ng.StateService} $state
35250
+ * @returns {ng.Directive}
35340
35251
  */
35341
35252
  return function ($http, $compile, $log, $parse, $state) {
35342
35253
  /**
@@ -35475,7 +35386,7 @@
35475
35386
 
35476
35387
  handleSwapResponse(
35477
35388
  html,
35478
- /** @type {import("../../interface.ts").SwapModeType} */ (swap),
35389
+ /** @type {import("./interface.ts").SwapModeType} */ (swap),
35479
35390
  target,
35480
35391
  scope,
35481
35392
  $compile,
@@ -35530,6 +35441,40 @@
35530
35441
  };
35531
35442
  }
35532
35443
 
35444
+ ngInjectDirective.$inject = [$injectTokens.$log, $injectTokens.$injector];
35445
+
35446
+ /**
35447
+ * @param {ng.LogService} $log
35448
+ * @param {ng.InjectorService} $injector
35449
+ * @returns {import('interface.ts').Directive}
35450
+ */
35451
+ function ngInjectDirective($log, $injector) {
35452
+ return {
35453
+ restrict: "A",
35454
+ link(scope, _element, attrs) {
35455
+ const expr = attrs["ngInject"];
35456
+
35457
+ if (!expr) return;
35458
+ // Match any identifier that starts with $, or ends with Service/Factory
35459
+ // Example matches: $http, userService, authFactory
35460
+ const replacedExpr = expr.replace(
35461
+ /(\$[\w]+|[\w]+(?:Service|Factory))/g,
35462
+ (match, name) => {
35463
+ try {
35464
+ const service = $injector.get(name);
35465
+ scope.$target[name] = service;
35466
+ return name;
35467
+ } catch {
35468
+ $log.warn(`Injectable ${name} not found in $injector`);
35469
+ return match;
35470
+ }
35471
+ },
35472
+ );
35473
+ scope.$apply(replacedExpr);
35474
+ },
35475
+ };
35476
+ }
35477
+
35533
35478
  /**
35534
35479
  * Initializes core `ng` module.
35535
35480
  * @param {import('./angular.js').Angular} angular
@@ -35548,6 +35493,8 @@
35548
35493
  $provide.provider({
35549
35494
  $$sanitizeUri: SanitizeUriProvider,
35550
35495
  });
35496
+ $provide.value("$window", window);
35497
+ $provide.value("$document", document);
35551
35498
  $provide
35552
35499
  .provider($injectTokens.$compile, CompileProvider)
35553
35500
  .directive({
@@ -35572,6 +35519,7 @@
35572
35519
  ngHide: ngHideDirective,
35573
35520
  ngIf: ngIfDirective,
35574
35521
  ngInclude: ngIncludeDirective,
35522
+ ngInject: ngInjectDirective,
35575
35523
  ngInit: ngInitDirective,
35576
35524
  ngMessages: ngMessagesDirective,
35577
35525
  ngMessage: ngMessageDirective,
@@ -35649,7 +35597,6 @@
35649
35597
  $interpolate: InterpolateProvider,
35650
35598
  $http: HttpProvider,
35651
35599
  $httpParamSerializer: HttpParamSerializerProvider,
35652
- $httpBackend: HttpBackendProvider,
35653
35600
  $location: LocationProvider,
35654
35601
  $log: LogProvider,
35655
35602
  $parse: ParseProvider,
@@ -35690,13 +35637,6 @@
35690
35637
  /** @type {Object.<string, NgModule>} */
35691
35638
  const modules = {};
35692
35639
 
35693
- /**
35694
- * Configuration option for AngularTS bootstrap process.
35695
- *
35696
- * @typedef {Object} AngularBootstrapConfig
35697
- * @property {boolean} [strictDi] - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
35698
- */
35699
-
35700
35640
  class Angular {
35701
35641
  constructor() {
35702
35642
  this.$cache = Cache;
@@ -35707,7 +35647,7 @@
35707
35647
  /**
35708
35648
  * @type {string} `version` from `package.json`
35709
35649
  */
35710
- this.version = "0.9.3"; //inserted via rollup plugin
35650
+ this.version = "0.9.4"; //inserted via rollup plugin
35711
35651
 
35712
35652
  /** @type {!Array<string|any>} */
35713
35653
  this.bootsrappedModules = [];
@@ -35762,7 +35702,7 @@
35762
35702
  * Each item in the array should be the name of a predefined module or a (DI annotated)
35763
35703
  * function that will be invoked by the injector as a `config` block.
35764
35704
  * See: {@link angular.module modules}
35765
- * @param {AngularBootstrapConfig} [config]
35705
+ * @param {import("./interface.ts").AngularBootstrapConfig} [config]
35766
35706
  * @returns {import('./core/di/internal-injector.js').InjectorService} The created injector instance for this application.
35767
35707
  */
35768
35708
  bootstrap(element, modules, config) {
@@ -35930,7 +35870,7 @@
35930
35870
  * @param {string} name The name of the module to create or retrieve.
35931
35871
  * @param {Array.<string>} [requires] If specified then new module is being created. If
35932
35872
  * unspecified then the module is being retrieved for further configuration.
35933
- * @param {import("./interface.js").Injectable} [configFn] Optional configuration function for the module that gets
35873
+ * @param {import("./interface.js").Injectable<any>} [configFn] Optional configuration function for the module that gets
35934
35874
  * passed to {@link NgModule.config NgModule.config()}.
35935
35875
  * @returns {NgModule} A newly registered module.
35936
35876
  */