@vc-shell/framework 1.1.46 → 1.1.47

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 (360) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/core/plugins/modularity/loader.ts +126 -97
  3. package/dist/assets/042c75b764bc78a7.svg +1 -0
  4. package/dist/assets/0ba156439a339f2a.svg +1 -0
  5. package/dist/assets/0be560bfb22d0e72.woff2 +0 -0
  6. package/dist/assets/0f590f8a94577092.svg +1 -0
  7. package/dist/assets/0fc5820f8be53a1b.svg +1 -0
  8. package/dist/assets/10768e2cc79fc60b.svg +1 -0
  9. package/dist/assets/11b3d25a56fd9a21.woff2 +0 -0
  10. package/dist/assets/157b8721e0600ea8.svg +1 -0
  11. package/dist/assets/15e91cdd649cde9a.svg +1 -0
  12. package/dist/assets/1a3e84b2457f709a.woff +0 -0
  13. package/dist/assets/1de63eb118636cce.svg +1 -0
  14. package/dist/assets/1ea01de36eb5491b.svg +1 -0
  15. package/dist/assets/204eaf512fde2023.svg +1 -0
  16. package/dist/assets/2088983edf42e153.svg +1 -0
  17. package/dist/assets/208f810a9321a327.svg +1 -0
  18. package/dist/assets/21220a9d10e6c558.svg +1 -0
  19. package/dist/assets/220db345a102045d.woff2 +0 -0
  20. package/dist/assets/225da11d23968333.svg +1 -0
  21. package/dist/assets/226f862dd81bdc13.woff2 +0 -0
  22. package/dist/assets/23a2d53395ddb14f.woff +0 -0
  23. package/dist/assets/259e6ad461a52ad7.svg +1 -0
  24. package/dist/assets/261e6dec4d53b9ac.woff +0 -0
  25. package/dist/assets/262f46a0b6d94bb6.svg +1 -0
  26. package/dist/assets/2857c513073467da.svg +1 -0
  27. package/dist/assets/2b3be7889467d98f.woff +0 -0
  28. package/dist/assets/2d4e6190eec72737.svg +1 -0
  29. package/dist/assets/2eba973185078bc8.woff +0 -0
  30. package/dist/assets/327511cd4a7ba7f9.woff +0 -0
  31. package/dist/assets/334d3f6bc766c516.woff +0 -0
  32. package/dist/assets/34ff7dd0c2285956.svg +1 -0
  33. package/dist/assets/3d26b7c1ab78bbe2.woff +0 -0
  34. package/dist/assets/3f8c4cc8099e34b6.woff2 +0 -0
  35. package/dist/assets/40a0e53b79ce63c6.woff2 +0 -0
  36. package/dist/assets/41275bcb979cb650.svg +1 -0
  37. package/dist/assets/42df4e2d6fa3fd2a.woff2 +0 -0
  38. package/dist/assets/434f7982590e462f.woff +0 -0
  39. package/dist/assets/4ae5f23e0ca888e7.woff2 +0 -0
  40. package/dist/assets/4d7a77b0e5373992.svg +1 -0
  41. package/dist/assets/4e43c74354534fb3.svg +1 -0
  42. package/dist/assets/4fe75f5117100705.svg +1 -0
  43. package/dist/assets/52610491f372cb0c.woff2 +0 -0
  44. package/dist/assets/52e261a005074e1b.woff +0 -0
  45. package/dist/assets/5304c3d05a5f9789.woff2 +0 -0
  46. package/dist/assets/572bb1bb4156a9c1.svg +1 -0
  47. package/dist/assets/5b3661be8be679d0.woff2 +0 -0
  48. package/dist/assets/5d96cfcc5bedd917.woff2 +0 -0
  49. package/dist/assets/6075995d7e74da46.woff2 +0 -0
  50. package/dist/assets/617c4736236e199e.woff +0 -0
  51. package/dist/assets/6619e9e10beea0e7.woff2 +0 -0
  52. package/dist/assets/67230f05dc94a265.svg +1 -0
  53. package/dist/assets/6798e4dd4add9b48.svg +1 -0
  54. package/dist/assets/698ec6c722d4cb05.woff2 +0 -0
  55. package/dist/assets/6a3e73faf406cf33.svg +1 -0
  56. package/dist/assets/72de3a63bc0b70dd.svg +1 -0
  57. package/dist/assets/74c6a6ab81bb6340.woff2 +0 -0
  58. package/dist/assets/74ed5f8a78e71106.svg +1 -0
  59. package/dist/assets/7ce0c166fd6a1204.woff +0 -0
  60. package/dist/assets/7d55399c2a7bc985.svg +1 -0
  61. package/dist/assets/7d970675c69fca1d.woff +0 -0
  62. package/dist/assets/7eda727273fd98d3.svg +1 -0
  63. package/dist/assets/7f6ebfd707b76ca2.woff +0 -0
  64. package/dist/assets/7fa898d213fcc7bc.woff2 +0 -0
  65. package/dist/assets/861e6b7192b3b6c7.woff +0 -0
  66. package/dist/assets/8bbcde81ba21ecb2.woff2 +0 -0
  67. package/dist/assets/8f6657e5e0b8d3e4.woff +0 -0
  68. package/dist/assets/910b0d99b9e26568.svg +1 -0
  69. package/dist/assets/91eee1aa81f72683.woff +0 -0
  70. package/dist/assets/92508f8707159b51.svg +1 -0
  71. package/dist/assets/9392bf1d591e1abb.svg +1 -0
  72. package/dist/assets/97e8d4984ba0713a.woff2 +0 -0
  73. package/dist/assets/9cb83236f6bb7ab1.svg +1 -0
  74. package/dist/assets/9d37314695c0b68d.woff +0 -0
  75. package/dist/assets/a18404194e3f9047.svg +1 -0
  76. package/dist/assets/a2017fe7f0a26510.svg +1 -0
  77. package/dist/assets/a47034e65dbcc3d7.woff +0 -0
  78. package/dist/assets/a617e11804bbacb7.woff +0 -0
  79. package/dist/assets/ab6e7190bb1492d5.woff2 +0 -0
  80. package/dist/assets/abf88f301a0730f4.svg +1 -0
  81. package/dist/assets/aed17cb6fdad2ada.woff2 +0 -0
  82. package/dist/assets/b1a596e31ad1185a.svg +1 -0
  83. package/dist/assets/b27767411c8427be.woff +0 -0
  84. package/dist/assets/b291dc35a17511f7.woff +0 -0
  85. package/dist/assets/b325adcae33bbe7a.svg +1 -0
  86. package/dist/assets/b372390551ca2fa1.svg +1 -0
  87. package/dist/assets/b5bb1e8fc975decd.svg +1 -0
  88. package/dist/assets/b645a4a2181b9dc1.svg +1 -0
  89. package/dist/assets/b6499ddce0a4ef7d.svg +1 -0
  90. package/dist/assets/b94421fadd23b0f2.svg +1 -0
  91. package/dist/assets/bb28fb0f27f1c11b.svg +1 -0
  92. package/dist/assets/bfbe205759295eca.woff2 +0 -0
  93. package/dist/assets/ca791c5ca5848a03.svg +1 -0
  94. package/dist/assets/cb32840ce330103f.woff +0 -0
  95. package/dist/assets/d084bda16abe8a56.svg +1 -0
  96. package/dist/assets/d32b129cae2fffd6.svg +1 -0
  97. package/dist/assets/d35a4c7113315758.woff2 +0 -0
  98. package/dist/assets/d3f792f54ae4c307.svg +1 -0
  99. package/dist/assets/d5a5b8630120073d.svg +1 -0
  100. package/dist/assets/d5f9664ebbfb104b.svg +1 -0
  101. package/dist/assets/d80b05788e407de7.woff2 +0 -0
  102. package/dist/assets/d84247b59449dd88.woff2 +0 -0
  103. package/dist/assets/dd05d43ff0df2fc7.svg +1 -0
  104. package/dist/assets/e38acaa1757232e0.svg +1 -0
  105. package/dist/assets/e4a8550f1c7ffe36.svg +1 -0
  106. package/dist/assets/e5adb5ae3a3698f6.svg +1 -0
  107. package/dist/assets/e61a1889bac955f4.woff2 +0 -0
  108. package/dist/assets/e72bb11356af94c7.svg +1 -0
  109. package/dist/assets/e98196a9f8dcb2f0.svg +1 -0
  110. package/dist/assets/ebec912a42ad49ff.woff +0 -0
  111. package/dist/assets/f09d89268e4c0317.svg +1 -0
  112. package/dist/assets/f276d55184e05a07.woff +0 -0
  113. package/dist/assets/f5722262b6e7214e.woff2 +0 -0
  114. package/dist/assets/f7fc8bf46089d8b2.svg +1 -0
  115. package/dist/assets/fcb1c1ffb5640194.woff +0 -0
  116. package/dist/assets/fe141d99763f5d2b.woff +0 -0
  117. package/dist/assets/fed13b0d59903483.svg +1 -0
  118. package/dist/assets/fed757d2c2344ead.woff2 +0 -0
  119. package/dist/assets/ffc438f20e79ce73.woff +0 -0
  120. package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
  121. package/dist/framework.js +16544 -25878
  122. package/dist/index.css +1 -1
  123. package/dist/index.d.ts +5 -8
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/tsconfig.tsbuildinfo +1 -1
  126. package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
  127. package/dist/vendor-boolbase-Bgn9I6iN.js +21 -0
  128. package/dist/vendor-cheerio-CleDsuQZ.js +1053 -0
  129. package/dist/vendor-cheerio-select-CVkYl3Z-.js +191 -0
  130. package/dist/vendor-css-select-CtIzVIiG.js +622 -0
  131. package/dist/vendor-css-what-CZZaquJM.js +267 -0
  132. package/dist/vendor-cypress-signalr-mock-CdKwIhWw.js +769 -0
  133. package/dist/vendor-date-fns-CdFbeoHV.js +2989 -0
  134. package/dist/vendor-dom-serializer-CugO0RdN.js +213 -0
  135. package/dist/vendor-dom7-wvIUV9pT.js +529 -0
  136. package/dist/vendor-domelementtype-B3sFIGaC.js +21 -0
  137. package/dist/vendor-domhandler-CL40eeX9.js +311 -0
  138. package/dist/vendor-dompurify-eYFoHPwR.js +528 -0
  139. package/dist/vendor-domutils-D3Y2YQFR.js +386 -0
  140. package/dist/vendor-entities-v26HW8wW.js +363 -0
  141. package/dist/vendor-floating-ui-core-C9uEvi1M.js +349 -0
  142. package/dist/vendor-floating-ui-dom-CZkYGmv4.js +393 -0
  143. package/dist/vendor-floating-ui-utils-Bx3BTd6_.js +259 -0
  144. package/dist/vendor-floating-ui-vue-CLOiVYP7.js +107 -0
  145. package/dist/vendor-headlessui-vue-Dg0Llidi.js +961 -0
  146. package/dist/vendor-htmlparser2-CXL_uhMI.js +735 -0
  147. package/dist/vendor-iconify-vue-D4fihzvl.js +1205 -0
  148. package/dist/vendor-intlify-core-base-Bvt2vJFV.js +1129 -0
  149. package/dist/vendor-intlify-message-compiler-1VxNzq21.js +945 -0
  150. package/dist/vendor-intlify-shared-D7kiPMOG.js +130 -0
  151. package/dist/vendor-iso-639-1-dVGfSUIM.js +781 -0
  152. package/dist/vendor-linkify-it-LzoUhj6C.js +199 -0
  153. package/dist/vendor-linkifyjs-DTu7SY_Y.js +705 -0
  154. package/dist/vendor-lodash-es-CrYlgAi8.js +4816 -0
  155. package/dist/vendor-markdown-it-4AJoRTAg.js +2263 -0
  156. package/dist/vendor-markdown-it-task-lists-Byg1-ms9.js +69 -0
  157. package/dist/vendor-mdurl-DZFDNdqC.js +192 -0
  158. package/dist/vendor-microsoft-applicationinsights-analytics-js-DA-ctcAL.js +1105 -0
  159. package/dist/vendor-microsoft-applicationinsights-cfgsync-js-COfRj-2q.js +261 -0
  160. package/dist/vendor-microsoft-applicationinsights-channel-js-MTPYhH-I.js +1809 -0
  161. package/dist/vendor-microsoft-applicationinsights-common-CDVnJ6MR.js +1921 -0
  162. package/dist/vendor-microsoft-applicationinsights-core-js-D7Aicf8S.js +4127 -0
  163. package/dist/vendor-microsoft-applicationinsights-dependencies-js-CvQWWraU.js +1399 -0
  164. package/dist/vendor-microsoft-applicationinsights-properties-js-C0Iv1cZE.js +572 -0
  165. package/dist/vendor-microsoft-applicationinsights-shims-CxtPYiwp.js +43 -0
  166. package/dist/vendor-microsoft-applicationinsights-web-BRuQAzjU.js +487 -0
  167. package/dist/vendor-microsoft-dynamicproto-js-DSkQkH3T.js +147 -0
  168. package/dist/vendor-microsoft-signalr-qIrag5xx.js +1761 -0
  169. package/dist/vendor-moment-CwOqp704.js +2589 -0
  170. package/dist/vendor-nevware21-ts-async-FAyg3c9V.js +260 -0
  171. package/dist/vendor-nevware21-ts-utils-Dy41wRhA.js +853 -0
  172. package/dist/vendor-nth-check-BE7AeBMg.js +45 -0
  173. package/dist/vendor-orderedmap-B3SOk52B.js +103 -0
  174. package/dist/vendor-parse5-DqztJOGh.js +5747 -0
  175. package/dist/vendor-parse5-htmlparser2-tree-adapter-CNubfdOP.js +143 -0
  176. package/dist/vendor-popperjs-core-LGjf7Wza.js +905 -0
  177. package/dist/vendor-prettier-D8C9GG-0.js +4858 -0
  178. package/dist/vendor-prosemirror-commands-BqYcdumy.js +344 -0
  179. package/dist/vendor-prosemirror-dropcursor-zknUsW5x.js +86 -0
  180. package/dist/vendor-prosemirror-gapcursor-DjOZhP78.js +200 -0
  181. package/dist/vendor-prosemirror-history-l8l3CFac.js +248 -0
  182. package/dist/vendor-prosemirror-keymap-C17r08p-.js +62 -0
  183. package/dist/vendor-prosemirror-markdown-WJEDhc-w.js +650 -0
  184. package/dist/vendor-prosemirror-model-BN5TnJD_.js +2736 -0
  185. package/dist/vendor-prosemirror-schema-list-CR0gi7aY.js +87 -0
  186. package/dist/vendor-prosemirror-state-B0bFP8WI.js +821 -0
  187. package/dist/vendor-prosemirror-tables-B1txTKlC.js +1711 -0
  188. package/dist/vendor-prosemirror-transform-Bo7kNPme.js +1507 -0
  189. package/dist/vendor-prosemirror-view--C7TZvmQ.js +3746 -0
  190. package/dist/vendor-punycode-js-CNI-zL6U.js +133 -0
  191. package/dist/vendor-rope-sequence-sEGCUMi8.js +100 -0
  192. package/dist/vendor-semver-BoKYtkQw.js +1021 -0
  193. package/dist/vendor-ssr-window-D4k3p53c.js +133 -0
  194. package/dist/vendor-swiper-CMVLTGu0.js +2825 -0
  195. package/dist/vendor-tippy-js-BGdgwGX-.js +812 -0
  196. package/dist/vendor-tiptap-core-BRY37Sb2.js +2806 -0
  197. package/dist/vendor-tiptap-extension-blockquote-CPd5qv-9.js +43 -0
  198. package/dist/vendor-tiptap-extension-bold-B0GwBNks.js +71 -0
  199. package/dist/vendor-tiptap-extension-bubble-menu-B0sZZld7.js +128 -0
  200. package/dist/vendor-tiptap-extension-bullet-list-CQm4ReOu.js +53 -0
  201. package/dist/vendor-tiptap-extension-code-C8cy6bRj.js +51 -0
  202. package/dist/vendor-tiptap-extension-code-block-BqTchNEf.js +133 -0
  203. package/dist/vendor-tiptap-extension-document-Dka1Uu0g.js +9 -0
  204. package/dist/vendor-tiptap-extension-dropcursor-CFSh-BuE.js +20 -0
  205. package/dist/vendor-tiptap-extension-floating-menu-H8PB4zeI.js +99 -0
  206. package/dist/vendor-tiptap-extension-gapcursor-CzwfD_IT.js +24 -0
  207. package/dist/vendor-tiptap-extension-hard-break-Rm6aVcrK.js +55 -0
  208. package/dist/vendor-tiptap-extension-heading-CavI6u1v.js +54 -0
  209. package/dist/vendor-tiptap-extension-history-WEN1_74D.js +35 -0
  210. package/dist/vendor-tiptap-extension-horizontal-rule-DZkUEL6s.js +58 -0
  211. package/dist/vendor-tiptap-extension-image-B67_mxGM.js +64 -0
  212. package/dist/vendor-tiptap-extension-italic-BshxBFou.js +70 -0
  213. package/dist/vendor-tiptap-extension-link-CJAQIgui.js +262 -0
  214. package/dist/vendor-tiptap-extension-list-item-DF-iMpqO.js +33 -0
  215. package/dist/vendor-tiptap-extension-ordered-list-CN8MF-kN.js +71 -0
  216. package/dist/vendor-tiptap-extension-paragraph-DI577lM5.js +33 -0
  217. package/dist/vendor-tiptap-extension-placeholder-DwAtlfAF.js +52 -0
  218. package/dist/vendor-tiptap-extension-strike-CIty09KN.js +61 -0
  219. package/dist/vendor-tiptap-extension-table-C5nv-GUb.js +213 -0
  220. package/dist/vendor-tiptap-extension-table-cell-DXbBhJW3.js +40 -0
  221. package/dist/vendor-tiptap-extension-table-header-rtggsYXA.js +40 -0
  222. package/dist/vendor-tiptap-extension-table-row-67khjMDt.js +22 -0
  223. package/dist/vendor-tiptap-extension-text-D1OHb_a1.js +8 -0
  224. package/dist/vendor-tiptap-extension-underline-IqWixw3m.js +40 -0
  225. package/dist/vendor-tiptap-markdown-DVxB1hbO.js +825 -0
  226. package/dist/vendor-tiptap-starter-kit-CPH9gu2X.js +29 -0
  227. package/dist/vendor-tiptap-vue-3-CkBe4_xM.js +225 -0
  228. package/dist/vendor-truncate-html-Bx1HJzRq.js +145 -0
  229. package/dist/vendor-uc-micro-4lbSaZOs.js +17 -0
  230. package/dist/vendor-vee-validate-i18n-zT8NxX3R.js +93 -0
  231. package/dist/vendor-vee-validate-rules-DDeNM2Gc.js +314 -0
  232. package/dist/vendor-vue-currency-input-DxWnS-HB.js +315 -0
  233. package/dist/vendor-vue-devtools-api-aVYGocXp.js +93 -0
  234. package/dist/vendor-vue-i18n-DPtOLen3.js +1359 -0
  235. package/dist/vendor-vue3-application-insights-dAGGfA_M.js +69 -0
  236. package/dist/vendor-vue3-touch-events-8Pa3HHlV.js +169 -0
  237. package/dist/vendor-vuepic-vue-datepicker-DglsiNYa.js +4997 -0
  238. package/dist/vendor-vueuse-components-DtK_mxpP.js +219 -0
  239. package/dist/vendor-vueuse-core-cB-c7DzH.js +5129 -0
  240. package/dist/vendor-vueuse-shared-Dg7PMM0z.js +1169 -0
  241. package/dist/vendor-w3c-keyname-CLxH8j-f.js +92 -0
  242. package/dist/vendor-whatwg-fetch-l0sNRNKZ.js +1 -0
  243. package/package.json +5 -4
  244. package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +2 -1
  245. package/dist/vendor-boolbase-Cp9L0GAZ.js +0 -25
  246. package/dist/vendor-cheerio-HN9zIPZn.js +0 -3135
  247. package/dist/vendor-cheerio-select-5Ry0HvBq.js +0 -306
  248. package/dist/vendor-css-select-DRIZ9kfZ.js +0 -966
  249. package/dist/vendor-css-what-DuPJ1HEF.js +0 -448
  250. package/dist/vendor-cypress-signalr-mock-BKdBJpdt.js +0 -778
  251. package/dist/vendor-date-fns-515YWkk-.js +0 -6724
  252. package/dist/vendor-dom-serializer-nQMsqjYW.js +0 -286
  253. package/dist/vendor-dom7-CJLPMwy5.js +0 -941
  254. package/dist/vendor-domelementtype-CjSzQey5.js +0 -53
  255. package/dist/vendor-domhandler-9z8cS16a.js +0 -484
  256. package/dist/vendor-dompurify-CRFzu7ib.js +0 -1336
  257. package/dist/vendor-domutils-Bc-Opz-v.js +0 -981
  258. package/dist/vendor-entities-Bfsx4xOQ.js +0 -636
  259. package/dist/vendor-floating-ui-core-wV8u8QP4.js +0 -511
  260. package/dist/vendor-floating-ui-dom-DDnRPs17.js +0 -706
  261. package/dist/vendor-floating-ui-utils-OMIFy1QU.js +0 -296
  262. package/dist/vendor-floating-ui-vue-D-tCDAMm.js +0 -167
  263. package/dist/vendor-fontsource-plus-jakarta-sans.css +0 -1
  264. package/dist/vendor-headlessui-vue-CY9FRgTb.js +0 -83
  265. package/dist/vendor-htmlparser2-B1dhFPOs.js +0 -1426
  266. package/dist/vendor-iconify-vue-DfRGgyNu.js +0 -1840
  267. package/dist/vendor-intlify-core-base-BuknsFQe.js +0 -1876
  268. package/dist/vendor-intlify-message-compiler-CuOQDWx1.js +0 -1508
  269. package/dist/vendor-intlify-shared-Cz4YRMuC.js +0 -241
  270. package/dist/vendor-iso-639-1-BJCk9DvE.js +0 -819
  271. package/dist/vendor-linkify-it-CKUf4vsc.js +0 -830
  272. package/dist/vendor-linkifyjs-BfyGgbCh.js +0 -1756
  273. package/dist/vendor-lodash-es-BySUOlwf.js +0 -18333
  274. package/dist/vendor-markdown-it-D-apazHa.js +0 -6000
  275. package/dist/vendor-markdown-it-task-lists-rxMVH6Ku.js +0 -131
  276. package/dist/vendor-mdurl-BNh2CCgT.js +0 -537
  277. package/dist/vendor-microsoft-applicationinsights-analytics-js-kG3lLg8X.js +0 -1275
  278. package/dist/vendor-microsoft-applicationinsights-cfgsync-js-C0uQkiQq.js +0 -591
  279. package/dist/vendor-microsoft-applicationinsights-channel-js-Dyd_PXA3.js +0 -2153
  280. package/dist/vendor-microsoft-applicationinsights-common-CfmP1_Qr.js +0 -2470
  281. package/dist/vendor-microsoft-applicationinsights-core-js-Cq4YSEvZ.js +0 -6589
  282. package/dist/vendor-microsoft-applicationinsights-dependencies-js-C56OBFr4.js +0 -1510
  283. package/dist/vendor-microsoft-applicationinsights-properties-js-CBJTBawx.js +0 -761
  284. package/dist/vendor-microsoft-applicationinsights-shims-CX8sJgar.js +0 -70
  285. package/dist/vendor-microsoft-applicationinsights-web-pim2ri-g.js +0 -667
  286. package/dist/vendor-microsoft-dynamicproto-js-CFBBUu9p.js +0 -520
  287. package/dist/vendor-microsoft-signalr-dUnlRsGm.js +0 -3339
  288. package/dist/vendor-moment-Mki5YqAR.js +0 -5679
  289. package/dist/vendor-nevware21-ts-async-CLMApQ9E.js +0 -395
  290. package/dist/vendor-nevware21-ts-utils-e8v8Jty3.js +0 -1160
  291. package/dist/vendor-nth-check-Bx8TxtJt.js +0 -157
  292. package/dist/vendor-orderedmap-dGG6uMFJ.js +0 -137
  293. package/dist/vendor-parse5-Bt2NhSzR.js +0 -8432
  294. package/dist/vendor-parse5-htmlparser2-tree-adapter-BUUtKzf8.js +0 -216
  295. package/dist/vendor-popperjs-core-Cr2byIky.js +0 -1790
  296. package/dist/vendor-prettier-B4PaeWRQ.js +0 -98
  297. package/dist/vendor-prosemirror-commands-BH9lWGpW.js +0 -561
  298. package/dist/vendor-prosemirror-dropcursor-CeyPcxrA.js +0 -146
  299. package/dist/vendor-prosemirror-gapcursor-U8UoUJII.js +0 -236
  300. package/dist/vendor-prosemirror-history-BDaJkvNx.js +0 -414
  301. package/dist/vendor-prosemirror-keymap-BbWvIWmH.js +0 -128
  302. package/dist/vendor-prosemirror-markdown-gB0PXBbz.js +0 -866
  303. package/dist/vendor-prosemirror-model-BZu3WVcD.js +0 -3463
  304. package/dist/vendor-prosemirror-schema-list-Bl9NpKA7.js +0 -158
  305. package/dist/vendor-prosemirror-state-BvL9Pxph.js +0 -1003
  306. package/dist/vendor-prosemirror-tables-17qAnviK.js +0 -2159
  307. package/dist/vendor-prosemirror-transform-CE9VV3qg.js +0 -2156
  308. package/dist/vendor-prosemirror-view-CU2WTHT7.js +0 -5811
  309. package/dist/vendor-punycode-js-iAs5RxMf.js +0 -441
  310. package/dist/vendor-rope-sequence-BdXDKoGt.js +0 -207
  311. package/dist/vendor-semver-CVLMK-S4.js +0 -2702
  312. package/dist/vendor-ssr-window-s6OpKa3O.js +0 -150
  313. package/dist/vendor-swiper-CdiyNHVt.js +0 -5679
  314. package/dist/vendor-tippy-js-DWFe2TfK.js +0 -1647
  315. package/dist/vendor-tiptap-core-NfwGfaQk.js +0 -4910
  316. package/dist/vendor-tiptap-extension-blockquote-jmWBTtsI.js +0 -57
  317. package/dist/vendor-tiptap-extension-bold-p5frh4ak.js +0 -97
  318. package/dist/vendor-tiptap-extension-bubble-menu-KUhZSfrs.js +0 -218
  319. package/dist/vendor-tiptap-extension-bullet-list-COmZRoSB.js +0 -73
  320. package/dist/vendor-tiptap-extension-code-block-DyTARZss.js +0 -221
  321. package/dist/vendor-tiptap-extension-code-jVv6CXpX.js +0 -75
  322. package/dist/vendor-tiptap-extension-document-DssuotYs.js +0 -13
  323. package/dist/vendor-tiptap-extension-dropcursor-BoO0Qv91.js +0 -26
  324. package/dist/vendor-tiptap-extension-floating-menu-CrO8CN5w.js +0 -165
  325. package/dist/vendor-tiptap-extension-gapcursor-KpsWEoMD.js +0 -30
  326. package/dist/vendor-tiptap-extension-hard-break-ldOzhSvf.js +0 -68
  327. package/dist/vendor-tiptap-extension-heading-CKz2llX0.js +0 -77
  328. package/dist/vendor-tiptap-extension-history-DeKZ2VQ9.js +0 -48
  329. package/dist/vendor-tiptap-extension-horizontal-rule-CAjWRyDS.js +0 -92
  330. package/dist/vendor-tiptap-extension-image-ZagcEYuk.js +0 -76
  331. package/dist/vendor-tiptap-extension-italic-CM4xdznY.js +0 -96
  332. package/dist/vendor-tiptap-extension-link-Z-AMC4Ri.js +0 -414
  333. package/dist/vendor-tiptap-extension-list-item-BJi5QpXc.js +0 -37
  334. package/dist/vendor-tiptap-extension-ordered-list-C_TMrfBE.js +0 -97
  335. package/dist/vendor-tiptap-extension-paragraph-CQw0E0Au.js +0 -39
  336. package/dist/vendor-tiptap-extension-placeholder-BBNVKfa_.js +0 -66
  337. package/dist/vendor-tiptap-extension-strike-DUyMYX1Z.js +0 -79
  338. package/dist/vendor-tiptap-extension-table-cell-CoDIMPA5.js +0 -47
  339. package/dist/vendor-tiptap-extension-table-header-DvbGHnmw.js +0 -47
  340. package/dist/vendor-tiptap-extension-table-row-D1uqN5Aj.js +0 -26
  341. package/dist/vendor-tiptap-extension-table-tKS4MOM4.js +0 -354
  342. package/dist/vendor-tiptap-extension-text-DtRBhKB2.js +0 -12
  343. package/dist/vendor-tiptap-extension-underline-DqaSFp_P.js +0 -50
  344. package/dist/vendor-tiptap-markdown-7-PCADTU.js +0 -1017
  345. package/dist/vendor-tiptap-starter-kit-CDSV_Zuu.js +0 -88
  346. package/dist/vendor-tiptap-vue-3-DZg2fjq_.js +0 -268
  347. package/dist/vendor-truncate-html-3qQY0Djo.js +0 -196
  348. package/dist/vendor-uc-micro-jjt6LQ65.js +0 -23
  349. package/dist/vendor-vee-validate-i18n-v_gHjRmD.js +0 -154
  350. package/dist/vendor-vee-validate-rules-DzV3VY3N.js +0 -536
  351. package/dist/vendor-vue-currency-input-DGAkEFBO.js +0 -545
  352. package/dist/vendor-vue-devtools-api-DXYR8qBG.js +0 -169
  353. package/dist/vendor-vue-i18n-Co752uk3.js +0 -1897
  354. package/dist/vendor-vue3-application-insights-CYWFCr_J.js +0 -119
  355. package/dist/vendor-vue3-touch-events-BJEAiSa3.js +0 -416
  356. package/dist/vendor-vuepic-vue-datepicker-BSWXRSiu.js +0 -5019
  357. package/dist/vendor-vueuse-components-l1bL12mE.js +0 -339
  358. package/dist/vendor-vueuse-core-DGcJOmwG.js +0 -7743
  359. package/dist/vendor-vueuse-shared-_mOXsFuM.js +0 -1568
  360. package/dist/vendor-w3c-keyname-BOm2dtJm.js +0 -121
@@ -1,2470 +0,0 @@
1
- import { K as strTrim, L as asString, M as strSubstring, x as objForEachKey, A as isObject, N as strSubstr, g as getDocument, w as isString, h as strIndexOf, d as arrForEach, F as arrIndexOf, i as isNullOrUndefined, a as getPerformance, u as utcNow, B as getGlobal, J as getInst, e as dumpObj, I as mathMin, m as mathFloor, O as arrReduce, P as objKeys, Q as strEndsWith, R as arrMap, k as getWindow, v as isArray, S as objFreeze, r as isFunction, j as isError, T as mathRound, t as throwError, f as getNavigator, b as isUndefined } from './vendor-nevware21-ts-utils-e8v8Jty3.js';
2
- import { M as createValueMap, _ as _throwInternal, h as hasJSON, c as getJSON, N as isValidSpanId, O as isValidTraceId, P as createEnumStyle, a as getExceptionName, s as safeGetLogger, o as onConfigChange, Q as isNotNullOrUndefined, R as randomValue, x as toISOString, T as createClassFromInterface, m as mergeEvtNamespace, e as createUniqueNamespace, j as eventOn, f as eventOff } from './vendor-microsoft-applicationinsights-core-js-Cq4YSEvZ.js';
3
- import { a as __assignFn, _ as __extendsFn } from './vendor-microsoft-applicationinsights-shims-CX8sJgar.js';
4
-
5
- /*
6
- * Application Insights JavaScript SDK - Common, 3.3.9
7
- * Copyright (c) Microsoft and contributors. All rights reserved.
8
- */
9
-
10
-
11
- /**
12
- * This is an internal property used to cause internal (reporting) requests to be ignored from reporting
13
- * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will
14
- * also be ignored for future requests even when this property is not provided.
15
- * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK
16
- * @ignore
17
- */
18
- var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
19
- var SampleRate = "sampleRate";
20
- var ProcessLegacy = "ProcessLegacy";
21
- var HttpMethod = "http.method";
22
- var DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
23
- var DEFAULT_BREEZE_PATH = "/v2/track";
24
- var strNotSpecified = "not_specified";
25
- var strIkey = "iKey";
26
-
27
- /*
28
- * Application Insights JavaScript SDK - Common, 3.3.9
29
- * Copyright (c) Microsoft and contributors. All rights reserved.
30
- */
31
-
32
- var RequestHeaders = createValueMap({
33
- requestContextHeader: [0 /* eRequestHeaders.requestContextHeader */, "Request-Context"],
34
- requestContextTargetKey: [1 /* eRequestHeaders.requestContextTargetKey */, "appId"],
35
- requestContextAppIdFormat: [2 /* eRequestHeaders.requestContextAppIdFormat */, "appId=cid-v1:"],
36
- requestIdHeader: [3 /* eRequestHeaders.requestIdHeader */, "Request-Id"],
37
- traceParentHeader: [4 /* eRequestHeaders.traceParentHeader */, "traceparent"],
38
- traceStateHeader: [5 /* eRequestHeaders.traceStateHeader */, "tracestate"],
39
- sdkContextHeader: [6 /* eRequestHeaders.sdkContextHeader */, "Sdk-Context"],
40
- sdkContextHeaderAppIdRequest: [7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */, "appId"],
41
- requestContextHeaderLowerCase: [8 /* eRequestHeaders.requestContextHeaderLowerCase */, "request-context"]
42
- });
43
-
44
- /*
45
- * Application Insights JavaScript SDK - Common, 3.3.9
46
- * Copyright (c) Microsoft and contributors. All rights reserved.
47
- */
48
-
49
-
50
- // @skip-file-minify
51
- // ##############################################################
52
- // AUTO GENERATED FILE: This file is Auto Generated during build.
53
- // ##############################################################
54
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
55
- // Note: DON'T Export these const from the package as we are still targeting ES5 which can result in a mutable variables that someone could change!!!
56
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
57
- var _DYN_SPLIT = "split"; // Count: 6
58
- var _DYN_LENGTH = "length"; // Count: 46
59
- var _DYN_TO_LOWER_CASE = "toLowerCase"; // Count: 6
60
- var _DYN_INGESTIONENDPOINT = "ingestionendpoint"; // Count: 6
61
- var _DYN_TO_STRING = "toString"; // Count: 8
62
- var _DYN_REMOVE_ITEM = "removeItem"; // Count: 3
63
- var _DYN_MESSAGE = "message"; // Count: 5
64
- var _DYN_COUNT = "count"; // Count: 6
65
- var _DYN_PRE_TRIGGER_DATE = "preTriggerDate"; // Count: 4
66
- var _DYN_GET_UTCDATE = "getUTCDate"; // Count: 3
67
- var _DYN_STRINGIFY = "stringify"; // Count: 4
68
- var _DYN_PATHNAME = "pathname"; // Count: 4
69
- var _DYN_MATCH = "match"; // Count: 5
70
- var _DYN_CORRELATION_HEADER_E0 = "correlationHeaderExcludePatterns"; // Count: 2
71
- var _DYN_NAME = "name"; // Count: 10
72
- var _DYN_PROPERTIES = "properties"; // Count: 10
73
- var _DYN_MEASUREMENTS = "measurements"; // Count: 9
74
- var _DYN_SIZE_IN_BYTES = "sizeInBytes"; // Count: 4
75
- var _DYN_TYPE_NAME = "typeName"; // Count: 5
76
- var _DYN_EXCEPTIONS = "exceptions"; // Count: 5
77
- var _DYN_SEVERITY_LEVEL = "severityLevel"; // Count: 5
78
- var _DYN_PROBLEM_GROUP = "problemGroup"; // Count: 3
79
- var _DYN_PARSED_STACK = "parsedStack"; // Count: 6
80
- var _DYN_HAS_FULL_STACK = "hasFullStack"; // Count: 5
81
- var _DYN_ASSEMBLY = "assembly"; // Count: 4
82
- var _DYN_FILE_NAME = "fileName"; // Count: 9
83
- var _DYN_LINE = "line"; // Count: 6
84
- var _DYN_AI_DATA_CONTRACT = "aiDataContract"; // Count: 4
85
- var _DYN_DURATION = "duration"; // Count: 4
86
-
87
- /*
88
- * Application Insights JavaScript SDK - Common, 3.3.9
89
- * Copyright (c) Microsoft and contributors. All rights reserved.
90
- */
91
-
92
- function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
93
- var origLength = key[_DYN_LENGTH /* @min:%2elength */];
94
- var field = dataSanitizeKey(logger, key);
95
- // validation truncated the length. We need to add uniqueness
96
- if (field[_DYN_LENGTH /* @min:%2elength */] !== origLength) {
97
- var i = 0;
98
- var uniqueField = field;
99
- while (map[uniqueField] !== undefined) {
100
- i++;
101
- uniqueField = strSubstring(field, 0, 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ - 3) + dsPadNumber(i);
102
- }
103
- field = uniqueField;
104
- }
105
- return field;
106
- }
107
- function dataSanitizeKey(logger, name) {
108
- var nameTrunc;
109
- if (name) {
110
- // Remove any leading or trailing whitespace
111
- name = strTrim(asString(name));
112
- // truncate the string to 150 chars
113
- if (name[_DYN_LENGTH /* @min:%2elength */] > 150 /* DataSanitizerValues.MAX_NAME_LENGTH */) {
114
- nameTrunc = strSubstring(name, 0, 150 /* DataSanitizerValues.MAX_NAME_LENGTH */);
115
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 57 /* _eInternalMessageId.NameTooLong */, "name is too long. It has been truncated to " + 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ + " characters.", { name: name }, true);
116
- }
117
- }
118
- return nameTrunc || name;
119
- }
120
- function dataSanitizeString(logger, value, maxLength) {
121
- if (maxLength === void 0) { maxLength = 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */; }
122
- var valueTrunc;
123
- if (value) {
124
- maxLength = maxLength ? maxLength : 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */; // in case default parameters dont work
125
- value = strTrim(asString(value));
126
- if (value[_DYN_LENGTH /* @min:%2elength */] > maxLength) {
127
- valueTrunc = strSubstring(value, 0, maxLength);
128
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 61 /* _eInternalMessageId.StringValueTooLong */, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
129
- }
130
- }
131
- return valueTrunc || value;
132
- }
133
- function dataSanitizeUrl(logger, url) {
134
- return dataSanitizeInput(logger, url, 2048 /* DataSanitizerValues.MAX_URL_LENGTH */, 66 /* _eInternalMessageId.UrlTooLong */);
135
- }
136
- function dataSanitizeMessage(logger, message) {
137
- var messageTrunc;
138
- if (message) {
139
- if (message[_DYN_LENGTH /* @min:%2elength */] > 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */) {
140
- messageTrunc = strSubstring(message, 0, 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */);
141
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 56 /* _eInternalMessageId.MessageTruncated */, "message is too long, it has been truncated to " + 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */ + " characters.", { message: message }, true);
142
- }
143
- }
144
- return messageTrunc || message;
145
- }
146
- function dataSanitizeException(logger, exception) {
147
- var exceptionTrunc;
148
- if (exception) {
149
- // Make surte its a string
150
- var value = "" + exception;
151
- if (value[_DYN_LENGTH /* @min:%2elength */] > 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */) {
152
- exceptionTrunc = strSubstring(value, 0, 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */);
153
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 52 /* _eInternalMessageId.ExceptionTruncated */, "exception is too long, it has been truncated to " + 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */ + " characters.", { exception: exception }, true);
154
- }
155
- }
156
- return exceptionTrunc || exception;
157
- }
158
- function dataSanitizeProperties(logger, properties) {
159
- if (properties) {
160
- var tempProps_1 = {};
161
- objForEachKey(properties, function (prop, value) {
162
- if (isObject(value) && hasJSON()) {
163
- // Stringify any part C properties
164
- try {
165
- value = getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](value);
166
- }
167
- catch (e) {
168
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 49 /* _eInternalMessageId.CannotSerializeObjectNonSerializable */, "custom property is not valid", { exception: e }, true);
169
- }
170
- }
171
- value = dataSanitizeString(logger, value, 8192 /* DataSanitizerValues.MAX_PROPERTY_LENGTH */);
172
- prop = dataSanitizeKeyAndAddUniqueness(logger, prop, tempProps_1);
173
- tempProps_1[prop] = value;
174
- });
175
- properties = tempProps_1;
176
- }
177
- return properties;
178
- }
179
- function dataSanitizeMeasurements(logger, measurements) {
180
- if (measurements) {
181
- var tempMeasurements_1 = {};
182
- objForEachKey(measurements, function (measure, value) {
183
- measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);
184
- tempMeasurements_1[measure] = value;
185
- });
186
- measurements = tempMeasurements_1;
187
- }
188
- return measurements;
189
- }
190
- function dataSanitizeId(logger, id) {
191
- return id ? dataSanitizeInput(logger, id, 128 /* DataSanitizerValues.MAX_ID_LENGTH */, 69 /* _eInternalMessageId.IdTooLong */)[_DYN_TO_STRING /* @min:%2etoString */]() : id;
192
- }
193
- function dataSanitizeInput(logger, input, maxLength, _msgId) {
194
- var inputTrunc;
195
- if (input) {
196
- input = strTrim(asString(input));
197
- if (input[_DYN_LENGTH /* @min:%2elength */] > maxLength) {
198
- inputTrunc = strSubstring(input, 0, maxLength);
199
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
200
- }
201
- }
202
- return inputTrunc || input;
203
- }
204
- function dsPadNumber(num) {
205
- var s = "00" + num;
206
- return strSubstr(s, s[_DYN_LENGTH /* @min:%2elength */] - 3);
207
- }
208
-
209
- /*
210
- * Application Insights JavaScript SDK - Common, 3.3.9
211
- * Copyright (c) Microsoft and contributors. All rights reserved.
212
- */
213
-
214
- var _document = getDocument() || {};
215
- var _htmlAnchorIdx = 0;
216
- // Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs
217
- // Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates
218
- var _htmlAnchorElement = [null, null, null, null, null];
219
- function urlParseUrl(url) {
220
- var anchorIdx = _htmlAnchorIdx;
221
- var anchorCache = _htmlAnchorElement;
222
- var tempAnchor = anchorCache[anchorIdx];
223
- if (!_document.createElement) {
224
- // Always create the temp instance if createElement is not available
225
- tempAnchor = { host: urlParseHost(url) };
226
- }
227
- else if (!anchorCache[anchorIdx]) {
228
- // Create and cache the unattached anchor instance
229
- tempAnchor = anchorCache[anchorIdx] = _document.createElement("a");
230
- }
231
- tempAnchor.href = url;
232
- // Move the cache index forward
233
- anchorIdx++;
234
- if (anchorIdx >= anchorCache[_DYN_LENGTH /* @min:%2elength */]) {
235
- anchorIdx = 0;
236
- }
237
- _htmlAnchorIdx = anchorIdx;
238
- return tempAnchor;
239
- }
240
- function urlGetAbsoluteUrl(url) {
241
- var result;
242
- var a = urlParseUrl(url);
243
- if (a) {
244
- result = a.href;
245
- }
246
- return result;
247
- }
248
- function urlGetCompleteUrl(method, absoluteUrl) {
249
- if (method) {
250
- return method.toUpperCase() + " " + absoluteUrl;
251
- }
252
- return absoluteUrl;
253
- }
254
- // Fallback method to grab host from url if document.createElement method is not available
255
- function urlParseHost(url, inclPort) {
256
- var fullHost = urlParseFullHost(url) || "";
257
- if (fullHost) {
258
- var match = fullHost[_DYN_MATCH /* @min:%2ematch */](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);
259
- if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 3 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {
260
- return match[2] + (match[3] || "");
261
- }
262
- }
263
- return fullHost;
264
- }
265
- function urlParseFullHost(url, inclPort) {
266
- var result = null;
267
- if (url) {
268
- var match = url[_DYN_MATCH /* @min:%2ematch */](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);
269
- if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 2 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {
270
- result = match[2] || "";
271
- if (match[_DYN_LENGTH /* @min:%2elength */] > 2) {
272
- var protocol = (match[1] || "")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();
273
- var port = match[3] || "";
274
- // IE includes the standard port so pass it off if it's the same as the protocol
275
- if (protocol === "http" && port === ":80") {
276
- port = "";
277
- }
278
- else if (protocol === "https" && port === ":443") {
279
- port = "";
280
- }
281
- result += port;
282
- }
283
- }
284
- }
285
- return result;
286
- }
287
-
288
- /*
289
- * Application Insights JavaScript SDK - Common, 3.3.9
290
- * Copyright (c) Microsoft and contributors. All rights reserved.
291
- */
292
-
293
- // listing only non-geo specific locations
294
- var _internalEndpoints = [
295
- DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH,
296
- "https://breeze.aimon.applicationinsights.io" + DEFAULT_BREEZE_PATH,
297
- "https://dc-int.services.visualstudio.com" + DEFAULT_BREEZE_PATH
298
- ];
299
- var _correlationIdPrefix = "cid-v1:";
300
- function isInternalApplicationInsightsEndpoint(endpointUrl) {
301
- return arrIndexOf(_internalEndpoints, endpointUrl[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]()) !== -1;
302
- }
303
- /**
304
- * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.
305
- * Headers are always included if the current domain matches the request domain. If they do not match (CORS),
306
- * they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.
307
- * Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must
308
- * manually supply domains to include correlation headers on. Else, no headers will be included at all.
309
- */
310
- function correlationIdCanIncludeCorrelationHeader(config, requestUrl, currentHost) {
311
- if (!requestUrl || (config && config.disableCorrelationHeaders)) {
312
- return false;
313
- }
314
- if (config && config[_DYN_CORRELATION_HEADER_E0 /* @min:%2ecorrelationHeaderExcludePatterns */]) {
315
- for (var i = 0; i < config.correlationHeaderExcludePatterns[_DYN_LENGTH /* @min:%2elength */]; i++) {
316
- if (config[_DYN_CORRELATION_HEADER_E0 /* @min:%2ecorrelationHeaderExcludePatterns */][i].test(requestUrl)) {
317
- return false;
318
- }
319
- }
320
- }
321
- var requestHost = urlParseUrl(requestUrl).host[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();
322
- if (requestHost && (strIndexOf(requestHost, ":443") !== -1 || strIndexOf(requestHost, ":80") !== -1)) {
323
- // [Bug #1260] IE can include the port even for http and https URLs so if present
324
- // try and parse it to remove if it matches the default protocol port
325
- requestHost = (urlParseFullHost(requestUrl) || "")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();
326
- }
327
- if ((!config || !config.enableCorsCorrelation) && (requestHost && requestHost !== currentHost)) {
328
- return false;
329
- }
330
- var includedDomains = config && config.correlationHeaderDomains;
331
- if (includedDomains) {
332
- var matchExists_1;
333
- arrForEach(includedDomains, function (domain) {
334
- var regex = new RegExp(domain.toLowerCase().replace(/\\/g, "\\\\").replace(/\./g, "\\.").replace(/\*/g, ".*"));
335
- matchExists_1 = matchExists_1 || regex.test(requestHost);
336
- });
337
- if (!matchExists_1) {
338
- return false;
339
- }
340
- }
341
- var excludedDomains = config && config.correlationHeaderExcludedDomains;
342
- if (!excludedDomains || excludedDomains[_DYN_LENGTH /* @min:%2elength */] === 0) {
343
- return true;
344
- }
345
- for (var i = 0; i < excludedDomains[_DYN_LENGTH /* @min:%2elength */]; i++) {
346
- var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\/g, "\\\\").replace(/\./g, "\\.").replace(/\*/g, ".*"));
347
- if (regex.test(requestHost)) {
348
- return false;
349
- }
350
- }
351
- // if we don't know anything about the requestHost, require the user to use included/excludedDomains.
352
- // Previously we always returned false for a falsy requestHost
353
- return requestHost && requestHost[_DYN_LENGTH /* @min:%2elength */] > 0;
354
- }
355
- /**
356
- * Combines target appId and target role name from response header.
357
- */
358
- function correlationIdGetCorrelationContext(responseHeader) {
359
- if (responseHeader) {
360
- var correlationId = correlationIdGetCorrelationContextValue(responseHeader, RequestHeaders[1 /* eRequestHeaders.requestContextTargetKey */]);
361
- if (correlationId && correlationId !== _correlationIdPrefix) {
362
- return correlationId;
363
- }
364
- }
365
- }
366
- /**
367
- * Gets key from correlation response header
368
- */
369
- function correlationIdGetCorrelationContextValue(responseHeader, key) {
370
- if (responseHeader) {
371
- var keyValues = responseHeader[_DYN_SPLIT /* @min:%2esplit */](",");
372
- for (var i = 0; i < keyValues[_DYN_LENGTH /* @min:%2elength */]; ++i) {
373
- var keyValue = keyValues[i][_DYN_SPLIT /* @min:%2esplit */]("=");
374
- if (keyValue[_DYN_LENGTH /* @min:%2elength */] === 2 && keyValue[0] === key) {
375
- return keyValue[1];
376
- }
377
- }
378
- }
379
- }
380
- function AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName) {
381
- var target, name = commandName, data = commandName;
382
- if (absoluteUrl && absoluteUrl[_DYN_LENGTH /* @min:%2elength */] > 0) {
383
- var parsedUrl = urlParseUrl(absoluteUrl);
384
- target = parsedUrl.host;
385
- if (!name) {
386
- if (parsedUrl[_DYN_PATHNAME /* @min:%2epathname */] != null) {
387
- var pathName = (parsedUrl.pathname[_DYN_LENGTH /* @min:%2elength */] === 0) ? "/" : parsedUrl[_DYN_PATHNAME /* @min:%2epathname */];
388
- if (pathName.charAt(0) !== "/") {
389
- pathName = "/" + pathName;
390
- }
391
- data = parsedUrl[_DYN_PATHNAME /* @min:%2epathname */];
392
- name = dataSanitizeString(logger, method ? method + " " + pathName : pathName);
393
- }
394
- else {
395
- name = dataSanitizeString(logger, absoluteUrl);
396
- }
397
- }
398
- }
399
- else {
400
- target = commandName;
401
- name = commandName;
402
- }
403
- return {
404
- target: target,
405
- name: name,
406
- data: data
407
- };
408
- }
409
- function dateTimeUtilsNow() {
410
- // returns the window or webworker performance object
411
- var perf = getPerformance();
412
- if (perf && perf.now && perf.timing) {
413
- var now = perf.now() + perf.timing.navigationStart;
414
- // Known issue with IE where this calculation can be negative, so if it is then ignore and fallback
415
- if (now > 0) {
416
- return now;
417
- }
418
- }
419
- return utcNow();
420
- }
421
- function dateTimeUtilsDuration(start, end) {
422
- var result = null;
423
- if (start !== 0 && end !== 0 && !isNullOrUndefined(start) && !isNullOrUndefined(end)) {
424
- result = end - start;
425
- }
426
- return result;
427
- }
428
- /**
429
- * Creates a IDistributedTraceContext from an optional telemetryTrace
430
- * @param telemetryTrace - The telemetryTrace instance that is being wrapped
431
- * @param parentCtx - An optional parent distributed trace instance, almost always undefined as this scenario is only used in the case of multiple property handlers.
432
- * @returns A new IDistributedTraceContext instance that is backed by the telemetryTrace or temporary object
433
- */
434
- function createDistributedTraceContextFromTrace(telemetryTrace, parentCtx) {
435
- var trace = telemetryTrace || {};
436
- return {
437
- getName: function () {
438
- return trace[_DYN_NAME /* @min:%2ename */];
439
- },
440
- setName: function (newValue) {
441
- parentCtx && parentCtx.setName(newValue);
442
- trace[_DYN_NAME /* @min:%2ename */] = newValue;
443
- },
444
- getTraceId: function () {
445
- return trace.traceID;
446
- },
447
- setTraceId: function (newValue) {
448
- parentCtx && parentCtx.setTraceId(newValue);
449
- if (isValidTraceId(newValue)) {
450
- trace.traceID = newValue;
451
- }
452
- },
453
- getSpanId: function () {
454
- return trace.parentID;
455
- },
456
- setSpanId: function (newValue) {
457
- parentCtx && parentCtx.setSpanId(newValue);
458
- if (isValidSpanId(newValue)) {
459
- trace.parentID = newValue;
460
- }
461
- },
462
- getTraceFlags: function () {
463
- return trace.traceFlags;
464
- },
465
- setTraceFlags: function (newTraceFlags) {
466
- parentCtx && parentCtx.setTraceFlags(newTraceFlags);
467
- trace.traceFlags = newTraceFlags;
468
- }
469
- };
470
- }
471
-
472
- /*
473
- * Application Insights JavaScript SDK - Common, 3.3.9
474
- * Copyright (c) Microsoft and contributors. All rights reserved.
475
- */
476
-
477
- var StorageType = createEnumStyle({
478
- LocalStorage: 0 /* eStorageType.LocalStorage */,
479
- SessionStorage: 1 /* eStorageType.SessionStorage */
480
- });
481
-
482
- /*
483
- * Application Insights JavaScript SDK - Common, 3.3.9
484
- * Copyright (c) Microsoft and contributors. All rights reserved.
485
- */
486
-
487
- var _canUseLocalStorage = undefined;
488
- var _canUseSessionStorage = undefined;
489
- var _storagePrefix = "";
490
- /**
491
- * Gets the localStorage object if available
492
- * @returns {Storage} - Returns the storage object if available else returns null
493
- */
494
- function _getLocalStorageObject() {
495
- if (utlCanUseLocalStorage()) {
496
- return _getVerifiedStorageObject(StorageType.LocalStorage);
497
- }
498
- return null;
499
- }
500
- /**
501
- * Tests storage object (localStorage or sessionStorage) to verify that it is usable
502
- * More details here: https://mathiasbynens.be/notes/localstorage-pattern
503
- * @param storageType - Type of storage
504
- * @returns {Storage} Returns storage object verified that it is usable
505
- */
506
- function _getVerifiedStorageObject(storageType) {
507
- try {
508
- if (isNullOrUndefined(getGlobal())) {
509
- return null;
510
- }
511
- var uid = (new Date)[_DYN_TO_STRING /* @min:%2etoString */]();
512
- var storage = getInst(storageType === StorageType.LocalStorage ? "localStorage" : "sessionStorage");
513
- var name_1 = _storagePrefix + uid;
514
- storage.setItem(name_1, uid);
515
- var fail = storage.getItem(name_1) !== uid;
516
- storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name_1);
517
- if (!fail) {
518
- return storage;
519
- }
520
- }
521
- catch (exception) {
522
- // eslint-disable-next-line no-empty
523
- }
524
- return null;
525
- }
526
- /**
527
- * Gets the sessionStorage object if available
528
- * @returns {Storage} - Returns the storage object if available else returns null
529
- */
530
- function _getSessionStorageObject() {
531
- if (utlCanUseSessionStorage()) {
532
- return _getVerifiedStorageObject(StorageType.SessionStorage);
533
- }
534
- return null;
535
- }
536
- /**
537
- * Disables the global SDK usage of local or session storage if available
538
- */
539
- function utlDisableStorage() {
540
- _canUseLocalStorage = false;
541
- _canUseSessionStorage = false;
542
- }
543
- function utlSetStoragePrefix(storagePrefix) {
544
- _storagePrefix = storagePrefix || "";
545
- }
546
- /**
547
- * Re-enables the global SDK usage of local or session storage if available
548
- */
549
- function utlEnableStorage() {
550
- _canUseLocalStorage = utlCanUseLocalStorage(true);
551
- _canUseSessionStorage = utlCanUseSessionStorage(true);
552
- }
553
- /**
554
- * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
555
- * any previous disable calls.
556
- * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
557
- */
558
- function utlCanUseLocalStorage(reset) {
559
- if (reset || _canUseLocalStorage === undefined) {
560
- _canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
561
- }
562
- return _canUseLocalStorage;
563
- }
564
- function utlGetLocalStorage(logger, name) {
565
- var storage = _getLocalStorageObject();
566
- if (storage !== null) {
567
- try {
568
- return storage.getItem(name);
569
- }
570
- catch (e) {
571
- _canUseLocalStorage = false;
572
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 1 /* _eInternalMessageId.BrowserCannotReadLocalStorage */, "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
573
- }
574
- }
575
- return null;
576
- }
577
- function utlSetLocalStorage(logger, name, data) {
578
- var storage = _getLocalStorageObject();
579
- if (storage !== null) {
580
- try {
581
- storage.setItem(name, data);
582
- return true;
583
- }
584
- catch (e) {
585
- _canUseLocalStorage = false;
586
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 3 /* _eInternalMessageId.BrowserCannotWriteLocalStorage */, "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
587
- }
588
- }
589
- return false;
590
- }
591
- function utlRemoveStorage(logger, name) {
592
- var storage = _getLocalStorageObject();
593
- if (storage !== null) {
594
- try {
595
- storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name);
596
- return true;
597
- }
598
- catch (e) {
599
- _canUseLocalStorage = false;
600
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 5 /* _eInternalMessageId.BrowserFailedRemovalFromLocalStorage */, "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
601
- }
602
- }
603
- return false;
604
- }
605
- function utlCanUseSessionStorage(reset) {
606
- if (reset || _canUseSessionStorage === undefined) {
607
- _canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);
608
- }
609
- return _canUseSessionStorage;
610
- }
611
- function utlGetSessionStorage(logger, name) {
612
- var storage = _getSessionStorageObject();
613
- if (storage !== null) {
614
- try {
615
- return storage.getItem(name);
616
- }
617
- catch (e) {
618
- _canUseSessionStorage = false;
619
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 2 /* _eInternalMessageId.BrowserCannotReadSessionStorage */, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
620
- }
621
- }
622
- return null;
623
- }
624
- function utlSetSessionStorage(logger, name, data) {
625
- var storage = _getSessionStorageObject();
626
- if (storage !== null) {
627
- try {
628
- storage.setItem(name, data);
629
- return true;
630
- }
631
- catch (e) {
632
- _canUseSessionStorage = false;
633
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 4 /* _eInternalMessageId.BrowserCannotWriteSessionStorage */, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
634
- }
635
- }
636
- return false;
637
- }
638
- function utlRemoveSessionStorage(logger, name) {
639
- var storage = _getSessionStorageObject();
640
- if (storage !== null) {
641
- try {
642
- storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name);
643
- return true;
644
- }
645
- catch (e) {
646
- _canUseSessionStorage = false;
647
- _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 6 /* _eInternalMessageId.BrowserFailedRemovalFromSessionStorage */, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
648
- }
649
- }
650
- return false;
651
- }
652
-
653
- /*
654
- * Application Insights JavaScript SDK - Common, 3.3.9
655
- * Copyright (c) Microsoft and contributors. All rights reserved.
656
- */
657
- var THROTTLE_STORAGE_PREFIX = "appInsightsThrottle";
658
- var ThrottleMgr = /** @class */ (function () {
659
- function ThrottleMgr(core, namePrefix) {
660
- var _self = this;
661
- var _canUseLocalStorage;
662
- var _logger;
663
- var _config;
664
- var _localStorageObj;
665
- var _isTriggered; //_isTriggered is to make sure that we only trigger throttle once a day
666
- var _namePrefix;
667
- var _queue;
668
- var _isReady = false;
669
- var _isSpecificDaysGiven = false;
670
- _initConfig();
671
- // Special internal method to allow the unit tests and DebugPlugin to hook embedded objects
672
- _self["_getDbgPlgTargets"] = function () {
673
- return [_queue];
674
- };
675
- _self.getConfig = function () {
676
- return _config;
677
- };
678
- /**
679
- * Check if it is the correct day to send message.
680
- * If _isTriggered is true, even if canThrottle returns true, message will not be sent,
681
- * because we only allow triggering sendMessage() once a day.
682
- * @returns if the current date is the valid date to send message
683
- */
684
- _self.canThrottle = function (msgId) {
685
- var localObj = _getLocalStorageObjByKey(msgId);
686
- var cfg = _getCfgByKey(msgId);
687
- return _canThrottle(cfg, _canUseLocalStorage, localObj);
688
- };
689
- /**
690
- * Check if throttle is triggered on current day(UTC)
691
- * if canThrottle returns false, isTriggered will return false
692
- * @returns if throttle is triggered on current day(UTC)
693
- */
694
- _self.isTriggered = function (msgId) {
695
- return _isTrigger(msgId);
696
- };
697
- /**
698
- * Before isReady set to true, all message will be stored in queue.
699
- * Message will only be sent out after isReady set to true.
700
- * Initial and default value: false
701
- * @returns isReady state
702
- */
703
- _self.isReady = function () {
704
- return _isReady;
705
- };
706
- /**
707
- * Flush all message with given message key in queue with isReady state set to true.
708
- * @returns if message queue is flushed
709
- */
710
- _self.flush = function (msgId) {
711
- try {
712
- var queue = _getQueueByKey(msgId);
713
- if (queue && queue[_DYN_LENGTH /* @min:%2elength */] > 0) {
714
- var items = queue.slice(0);
715
- _queue[msgId] = [];
716
- arrForEach(items, function (item) {
717
- _flushMessage(item.msgID, item[_DYN_MESSAGE /* @min:%2emessage */], item.severity, false);
718
- });
719
- return true;
720
- }
721
- }
722
- catch (err) {
723
- // eslint-disable-next-line no-empty
724
- }
725
- return false;
726
- };
727
- /**
728
- * Flush all message in queue with isReady state set to true.
729
- * @returns if message queue is flushed
730
- */
731
- _self.flushAll = function () {
732
- try {
733
- if (_queue) {
734
- var result_1 = true;
735
- objForEachKey(_queue, function (key) {
736
- var isFlushed = _self.flush(parseInt(key));
737
- result_1 = result_1 && isFlushed;
738
- });
739
- return result_1;
740
- }
741
- }
742
- catch (err) {
743
- // eslint-disable-next-line no-empty
744
- }
745
- return false;
746
- };
747
- /**
748
- * Set isReady State
749
- * if isReady set to true, message queue will be flushed automatically.
750
- * @param isReady - isReady State
751
- * @pa
752
- * @returns if message queue is flushed
753
- */
754
- _self.onReadyState = function (isReady, flushAll) {
755
- if (flushAll === void 0) { flushAll = true; }
756
- _isReady = isNullOrUndefined(isReady) ? true : isReady;
757
- if (_isReady && flushAll) {
758
- return _self.flushAll();
759
- }
760
- return null;
761
- };
762
- _self.sendMessage = function (msgID, message, severity) {
763
- return _flushMessage(msgID, message, severity, true);
764
- };
765
- function _flushMessage(msgID, message, severity, saveUnsentMsg) {
766
- if (_isReady) {
767
- var isSampledIn = _canSampledIn(msgID);
768
- if (!isSampledIn) {
769
- return;
770
- }
771
- var cfg = _getCfgByKey(msgID);
772
- var localStorageObj = _getLocalStorageObjByKey(msgID);
773
- var canThrottle = _canThrottle(cfg, _canUseLocalStorage, localStorageObj);
774
- var throttled = false;
775
- var number = 0;
776
- var isTriggered = _isTrigger(msgID);
777
- try {
778
- if (canThrottle && !isTriggered) {
779
- number = mathMin(cfg.limit.maxSendNumber, localStorageObj[_DYN_COUNT /* @min:%2ecount */] + 1);
780
- localStorageObj[_DYN_COUNT /* @min:%2ecount */] = 0;
781
- throttled = true;
782
- _isTriggered[msgID] = true;
783
- localStorageObj[_DYN_PRE_TRIGGER_DATE /* @min:%2epreTriggerDate */] = new Date();
784
- }
785
- else {
786
- _isTriggered[msgID] = canThrottle;
787
- localStorageObj[_DYN_COUNT /* @min:%2ecount */] += 1;
788
- }
789
- var localStorageName = _getLocalStorageName(msgID);
790
- _resetLocalStorage(_logger, localStorageName, localStorageObj);
791
- for (var i = 0; i < number; i++) {
792
- _sendMessage(msgID, _logger, message, severity);
793
- }
794
- }
795
- catch (e) {
796
- // eslint-disable-next-line no-empty
797
- }
798
- return {
799
- isThrottled: throttled,
800
- throttleNum: number
801
- };
802
- }
803
- else {
804
- if (!!saveUnsentMsg) {
805
- var queue = _getQueueByKey(msgID);
806
- queue.push({
807
- msgID: msgID,
808
- message: message,
809
- severity: severity
810
- });
811
- }
812
- }
813
- return null;
814
- }
815
- function _initConfig() {
816
- _logger = safeGetLogger(core);
817
- _isTriggered = {};
818
- _localStorageObj = {};
819
- _queue = {};
820
- _config = {};
821
- _setCfgByKey(109 /* _eInternalMessageId.DefaultThrottleMsgKey */);
822
- _namePrefix = isNotNullOrUndefined(namePrefix) ? namePrefix : "";
823
- core.addUnloadHook(onConfigChange(core.config, function (details) {
824
- var coreConfig = details.cfg;
825
- _canUseLocalStorage = utlCanUseLocalStorage();
826
- var configMgr = coreConfig.throttleMgrCfg || {};
827
- objForEachKey(configMgr, function (key, cfg) {
828
- _setCfgByKey(parseInt(key), cfg);
829
- });
830
- }));
831
- }
832
- function _getCfgByKey(msgID) {
833
- return _config[msgID] || _config[109 /* _eInternalMessageId.DefaultThrottleMsgKey */];
834
- }
835
- function _setCfgByKey(msgID, config) {
836
- var _a, _b;
837
- try {
838
- var cfg = config || {};
839
- var curCfg = {};
840
- curCfg.disabled = !!cfg.disabled;
841
- var configInterval = cfg.interval || {};
842
- _isSpecificDaysGiven = (configInterval === null || configInterval === void 0 ? void 0 : configInterval.daysOfMonth) && (configInterval === null || configInterval === void 0 ? void 0 : configInterval.daysOfMonth[_DYN_LENGTH /* @min:%2elength */]) > 0;
843
- curCfg.interval = _getIntervalConfig(configInterval);
844
- var limit = {
845
- samplingRate: ((_a = cfg.limit) === null || _a === void 0 ? void 0 : _a.samplingRate) || 100,
846
- // dafault: every time sent only 1 event
847
- maxSendNumber: ((_b = cfg.limit) === null || _b === void 0 ? void 0 : _b.maxSendNumber) || 1
848
- };
849
- curCfg.limit = limit;
850
- _config[msgID] = curCfg;
851
- }
852
- catch (e) {
853
- // eslint-disable-next-line no-empty
854
- }
855
- }
856
- function _getIntervalConfig(interval) {
857
- interval = interval || {};
858
- var monthInterval = interval === null || interval === void 0 ? void 0 : interval.monthInterval;
859
- var dayInterval = interval === null || interval === void 0 ? void 0 : interval.dayInterval;
860
- // default: send data every 3 month each year
861
- if (isNullOrUndefined(monthInterval) && isNullOrUndefined(dayInterval)) {
862
- interval.monthInterval = 3;
863
- if (!_isSpecificDaysGiven) {
864
- // default: send data on 28th
865
- interval.daysOfMonth = [28];
866
- _isSpecificDaysGiven = true;
867
- }
868
- }
869
- interval = {
870
- // dafault: sent every three months
871
- monthInterval: interval === null || interval === void 0 ? void 0 : interval.monthInterval,
872
- dayInterval: interval === null || interval === void 0 ? void 0 : interval.dayInterval,
873
- daysOfMonth: interval === null || interval === void 0 ? void 0 : interval.daysOfMonth
874
- };
875
- return interval;
876
- }
877
- function _canThrottle(config, canUseLocalStorage, localStorageObj) {
878
- if (config && !config.disabled && canUseLocalStorage && isNotNullOrUndefined(localStorageObj)) {
879
- var curDate = _getThrottleDate();
880
- var date = localStorageObj.date;
881
- var interval = config.interval;
882
- var monthCheck = 1;
883
- if (interval === null || interval === void 0 ? void 0 : interval.monthInterval) {
884
- var monthExpand = (curDate.getUTCFullYear() - date.getUTCFullYear()) * 12 + curDate.getUTCMonth() - date.getUTCMonth();
885
- monthCheck = _checkInterval(interval.monthInterval, 0, monthExpand);
886
- }
887
- var dayCheck = 1;
888
- if (_isSpecificDaysGiven) {
889
- dayCheck = arrIndexOf(interval.daysOfMonth, curDate[_DYN_GET_UTCDATE /* @min:%2egetUTCDate */]());
890
- }
891
- else if (interval === null || interval === void 0 ? void 0 : interval.dayInterval) {
892
- var daySpan = mathFloor((curDate.getTime() - date.getTime()) / 86400000);
893
- dayCheck = _checkInterval(interval.dayInterval, 0, daySpan);
894
- }
895
- return monthCheck >= 0 && dayCheck >= 0;
896
- }
897
- return false;
898
- }
899
- function _getLocalStorageName(msgKey, prefix) {
900
- var fix = isNotNullOrUndefined(prefix) ? prefix : "";
901
- if (msgKey) {
902
- return THROTTLE_STORAGE_PREFIX + fix + "-" + msgKey;
903
- }
904
- return null;
905
- }
906
- // returns if throttle is triggered on current Date
907
- function _isTriggeredOnCurDate(preTriggerDate) {
908
- try {
909
- if (preTriggerDate) {
910
- var curDate = new Date();
911
- return preTriggerDate.getUTCFullYear() === curDate.getUTCFullYear() &&
912
- preTriggerDate.getUTCMonth() === curDate.getUTCMonth() &&
913
- preTriggerDate[_DYN_GET_UTCDATE /* @min:%2egetUTCDate */]() === curDate[_DYN_GET_UTCDATE /* @min:%2egetUTCDate */]();
914
- }
915
- }
916
- catch (e) {
917
- // eslint-disable-next-line no-empty
918
- }
919
- return false;
920
- }
921
- // transfer local storage string value to object that identifies start date, current count and preTriggerDate
922
- function _getLocalStorageObj(value, logger, storageName) {
923
- try {
924
- var storageObj = {
925
- date: _getThrottleDate(),
926
- count: 0
927
- };
928
- if (value) {
929
- var obj = JSON.parse(value);
930
- var curObj = {
931
- date: _getThrottleDate(obj.date) || storageObj.date,
932
- count: obj[_DYN_COUNT /* @min:%2ecount */] || storageObj[_DYN_COUNT /* @min:%2ecount */],
933
- preTriggerDate: obj.preTriggerDate ? _getThrottleDate(obj[_DYN_PRE_TRIGGER_DATE /* @min:%2epreTriggerDate */]) : undefined
934
- };
935
- return curObj;
936
- }
937
- else {
938
- _resetLocalStorage(logger, storageName, storageObj);
939
- return storageObj;
940
- }
941
- }
942
- catch (e) {
943
- // eslint-disable-next-line no-empty
944
- }
945
- return null;
946
- }
947
- // if datestr is not defined, current date will be returned
948
- function _getThrottleDate(dateStr) {
949
- // if new Date() can't be created through the provided dateStr, null will be returned.
950
- try {
951
- if (dateStr) {
952
- var date = new Date(dateStr);
953
- //make sure it is a valid Date Object
954
- if (!isNaN(date.getDate())) {
955
- return date;
956
- }
957
- }
958
- else {
959
- return new Date();
960
- }
961
- }
962
- catch (e) {
963
- // eslint-disable-next-line no-empty
964
- }
965
- return null;
966
- }
967
- function _resetLocalStorage(logger, storageName, obj) {
968
- try {
969
- return utlSetLocalStorage(logger, storageName, strTrim(JSON[_DYN_STRINGIFY /* @min:%2estringify */](obj)));
970
- }
971
- catch (e) {
972
- // eslint-disable-next-line no-empty
973
- }
974
- return false;
975
- }
976
- function _checkInterval(interval, start, current) {
977
- if (interval <= 0) {
978
- return 1;
979
- }
980
- // count from start year
981
- return (current >= start) && (current - start) % interval == 0 ? mathFloor((current - start) / interval) + 1 : -1;
982
- }
983
- function _sendMessage(msgID, logger, message, severity) {
984
- _throwInternal(logger, severity || 1 /* eLoggingSeverity.CRITICAL */, msgID, message);
985
- }
986
- // NOTE: config.limit.samplingRate is set to 4 decimal places,
987
- // so config.limit.samplingRate = 1 means 0.0001%
988
- function _canSampledIn(msgID) {
989
- try {
990
- var cfg = _getCfgByKey(msgID);
991
- return randomValue(1000000) <= cfg.limit.samplingRate;
992
- }
993
- catch (e) {
994
- // eslint-disable-next-line no-empty
995
- }
996
- return false;
997
- }
998
- function _getLocalStorageObjByKey(key) {
999
- try {
1000
- var curObj = _localStorageObj[key];
1001
- if (!curObj) {
1002
- var localStorageName = _getLocalStorageName(key, _namePrefix);
1003
- curObj = _getLocalStorageObj(utlGetLocalStorage(_logger, localStorageName), _logger, localStorageName);
1004
- _localStorageObj[key] = curObj;
1005
- }
1006
- return _localStorageObj[key];
1007
- }
1008
- catch (e) {
1009
- // eslint-disable-next-line no-empty
1010
- }
1011
- return null;
1012
- }
1013
- function _isTrigger(key) {
1014
- var isTrigger = _isTriggered[key];
1015
- if (isNullOrUndefined(isTrigger)) {
1016
- isTrigger = false;
1017
- var localStorageObj = _getLocalStorageObjByKey(key);
1018
- if (localStorageObj) {
1019
- isTrigger = _isTriggeredOnCurDate(localStorageObj[_DYN_PRE_TRIGGER_DATE /* @min:%2epreTriggerDate */]);
1020
- }
1021
- _isTriggered[key] = isTrigger;
1022
- }
1023
- return _isTriggered[key];
1024
- }
1025
- function _getQueueByKey(key) {
1026
- _queue = _queue || {};
1027
- if (isNullOrUndefined(_queue[key])) {
1028
- _queue[key] = [];
1029
- }
1030
- return _queue[key];
1031
- }
1032
- }
1033
- return ThrottleMgr;
1034
- }());
1035
-
1036
- /*
1037
- * Application Insights JavaScript SDK - Common, 3.3.9
1038
- * Copyright (c) Microsoft and contributors. All rights reserved.
1039
- */
1040
-
1041
- var _FIELDS_SEPARATOR = ";";
1042
- var _FIELD_KEY_VALUE_SEPARATOR = "=";
1043
- function parseConnectionString(connectionString) {
1044
- if (!connectionString) {
1045
- return {};
1046
- }
1047
- var kvPairs = connectionString[_DYN_SPLIT /* @min:%2esplit */](_FIELDS_SEPARATOR);
1048
- var result = arrReduce(kvPairs, function (fields, kv) {
1049
- var kvParts = kv[_DYN_SPLIT /* @min:%2esplit */](_FIELD_KEY_VALUE_SEPARATOR);
1050
- if (kvParts[_DYN_LENGTH /* @min:%2elength */] === 2) { // only save fields with valid formats
1051
- var key = kvParts[0][_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();
1052
- var value = kvParts[1];
1053
- fields[key] = value;
1054
- }
1055
- return fields;
1056
- }, {});
1057
- if (objKeys(result)[_DYN_LENGTH /* @min:%2elength */] > 0) {
1058
- // this is a valid connection string, so parse the results
1059
- if (result.endpointsuffix) {
1060
- // apply the default endpoints
1061
- var locationPrefix = result.location ? result.location + "." : "";
1062
- result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
1063
- }
1064
- // apply user override endpoint or the default endpoints
1065
- result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || DEFAULT_BREEZE_ENDPOINT;
1066
- if (strEndsWith(result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */], "/")) {
1067
- result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */].slice(0, -1);
1068
- }
1069
- }
1070
- return result;
1071
- }
1072
-
1073
- /*
1074
- * Application Insights JavaScript SDK - Common, 3.3.9
1075
- * Copyright (c) Microsoft and contributors. All rights reserved.
1076
- */
1077
-
1078
- var Envelope = /** @class */ (function () {
1079
- /**
1080
- * Constructs a new instance of telemetry data.
1081
- */
1082
- function Envelope(logger, data, name) {
1083
- var _this = this;
1084
- var _self = this;
1085
- _self.ver = 1;
1086
- _self.sampleRate = 100.0;
1087
- _self.tags = {};
1088
- _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;
1089
- _self.data = data;
1090
- _self.time = toISOString(new Date());
1091
- _self[_DYN_AI_DATA_CONTRACT /* @min:%2eaiDataContract */] = {
1092
- time: 1 /* FieldType.Required */,
1093
- iKey: 1 /* FieldType.Required */,
1094
- name: 1 /* FieldType.Required */,
1095
- sampleRate: function () {
1096
- return (_this.sampleRate === 100) ? 4 /* FieldType.Hidden */ : 1 /* FieldType.Required */;
1097
- },
1098
- tags: 1 /* FieldType.Required */,
1099
- data: 1 /* FieldType.Required */
1100
- };
1101
- }
1102
- return Envelope;
1103
- }());
1104
-
1105
- /*
1106
- * Application Insights JavaScript SDK - Common, 3.3.9
1107
- * Copyright (c) Microsoft and contributors. All rights reserved.
1108
- */
1109
-
1110
- var Event$1 = /** @class */ (function () {
1111
- /**
1112
- * Constructs a new instance of the EventTelemetry object
1113
- */
1114
- function Event(logger, name, properties, measurements) {
1115
- this.aiDataContract = {
1116
- ver: 1 /* FieldType.Required */,
1117
- name: 1 /* FieldType.Required */,
1118
- properties: 0 /* FieldType.Default */,
1119
- measurements: 0 /* FieldType.Default */
1120
- };
1121
- var _self = this;
1122
- _self.ver = 2;
1123
- _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;
1124
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);
1125
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);
1126
- }
1127
- Event.envelopeType = "Microsoft.ApplicationInsights.{0}.Event";
1128
- Event.dataType = "EventData";
1129
- return Event;
1130
- }());
1131
-
1132
- /*
1133
- * Application Insights JavaScript SDK - Common, 3.3.9
1134
- * Copyright (c) Microsoft and contributors. All rights reserved.
1135
- */
1136
-
1137
- // These Regex covers the following patterns
1138
- // 1. Chrome/Firefox/IE/Edge:
1139
- // at functionName (filename:lineNumber:columnNumber)
1140
- // at functionName (filename:lineNumber)
1141
- // at filename:lineNumber:columnNumber
1142
- // at filename:lineNumber
1143
- // at functionName@filename:lineNumber:columnNumber
1144
- // 2. Safari / Opera:
1145
- // functionName@filename:lineNumber:columnNumber
1146
- // functionName@filename:lineNumber
1147
- // filename:lineNumber:columnNumber
1148
- // filename:lineNumber
1149
- // Line ## of scriptname script filename:lineNumber:columnNumber
1150
- // Line ## of scriptname script filename
1151
- // 3. IE/Edge (Additional formats)
1152
- // at functionName@filename:lineNumber
1153
- var STACKFRAME_BASE_SIZE = 58; // '{"method":"","level":,"assembly":"","fileName":"","line":}'.length
1154
- /**
1155
- * Check if the string conforms to what looks like a stack frame line and not just a general message
1156
- * comment or other non-stack related info.
1157
- *
1158
- * This should be used to filter out any leading "message" lines from a stack trace, before attempting to parse
1159
- * the individual stack frames. Once you have estabilsted the start of the stack frames you can then use the
1160
- * FULL_STACK_FRAME_1, FULL_STACK_FRAME_2, FULL_STACK_FRAME_3, and EXTRACT_FILENAME to parse the individual
1161
- * stack frames to extract the method, filename, line number, and column number.
1162
- * These may still provide invalid matches, so the sequence of execution is important to avoid providing
1163
- * an invalid parsed stack.
1164
- */
1165
- var IS_FRAME = /^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/;
1166
- /**
1167
- * Parse a well formed stack frame with both the line and column numbers
1168
- * ----------------------------------
1169
- * **Primary focus of the matching**
1170
- * - at functionName (filename:lineNumber:columnNumber)
1171
- * - at filename:lineNumber:columnNumber
1172
- * - at functionName@filename:lineNumber:columnNumber
1173
- * - functionName (filename:lineNumber:columnNumber)
1174
- * - filename:lineNumber:columnNumber
1175
- * - functionName@filename:lineNumber:columnNumber
1176
- */
1177
- var FULL_STACK_FRAME_1 = /^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/;
1178
- /**
1179
- * Parse a well formed stack frame with only a line number.
1180
- * ----------------------------------
1181
- * > Note: this WILL also match with line and column number, but the line number is included with the filename
1182
- * > you should attempt to match with FULL_STACK_FRAME_1 first.
1183
- *
1184
- * **Primary focus of the matching (run FULL_STACK_FRAME_1 first)**
1185
- * - at functionName (filename:lineNumber)
1186
- * - at filename:lineNumber
1187
- * - at functionName@filename:lineNumber
1188
- * - functionName (filename:lineNumber)
1189
- * - filename:lineNumber
1190
- * - functionName@filename:lineNumber
1191
- *
1192
- * **Secondary matches**
1193
- * - at functionName (filename:lineNumber:columnNumber)
1194
- * - at filename:lineNumber:columnNumber
1195
- * - at functionName@filename:lineNumber:columnNumber
1196
- * - functionName (filename:lineNumber:columnNumber)
1197
- * - filename:lineNumber:columnNumber
1198
- * - functionName@filename:lineNumber:columnNumber
1199
- */
1200
- var FULL_STACK_FRAME_2 = /^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/;
1201
- /**
1202
- * Attempt to Parse a frame that doesn't include a line or column number.
1203
- * ----------------------------------
1204
- * > Note: this WILL also match lines with a line or line and column number, you should attempt to match with
1205
- * both FULL_STACK_FRAME_1 and FULL_STACK_FRAME_2 first to avoid false positives.
1206
- *
1207
- * **Unexpected Invalid Matches** (Matches that should be avoided -- by using the FULL_STACK_FRAME_1 and FULL_STACK_FRAME_2 first)
1208
- * - at https://localhost:44365/static/node_bundles/@microsoft/blah/js/bundle.js:144112:27
1209
- * - at https://localhost:44365/static/node_bundles/@microsoft/blah/js/bundle.js:144112:27
1210
- *
1211
- * **Primary focus of the matching (run FULL_STACK_FRAME_1 first)**
1212
- * - at functionName@filename
1213
- * - at functionName (filename)
1214
- * - at functionName filename
1215
- * - at filename <- Will actuall match this as the "method" and not the filename (care should be taken to avoid this)
1216
- * - functionName@filename
1217
- * - functionName (filename)
1218
- * - functionName filename
1219
- * - functionName
1220
- *
1221
- * **Secondary matches** (The line and column numbers will be included with the matched filename)
1222
- * - at functionName (filename:lineNumber:columnNumber)
1223
- * - at functionName (filename:lineNumber)
1224
- * - at filename:lineNumber:columnNumber
1225
- * - at filename:lineNumber
1226
- * - at functionName@filename:lineNumber:columnNumber
1227
- * - at functionName@filename:lineNumber
1228
- * - functionName (filename:lineNumber:columnNumber)
1229
- * - functionName (filename:lineNumber)
1230
- * - filename:lineNumber:columnNumber
1231
- * - filename:lineNumber
1232
- * - functionName@filename:lineNumber:columnNumber
1233
- * - functionName@filename:lineNumber
1234
- */
1235
- var FULL_STACK_FRAME_3 = /^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/;
1236
- /**
1237
- * Attempt to extract the filename (with or without line and column numbers) from a string.
1238
- * ----------------------------------
1239
- * > Note: this will only match the filename (with any line or column numbers) and will
1240
- * > return what looks like the filename, however, it will also match random strings that
1241
- * > look like a filename, so care should be taken to ensure that the filename is actually
1242
- * > a filename before using it.
1243
- * >
1244
- * > It is recommended to use this in conjunction with the FULL_STACK_FRAME_1, FULL_STACK_FRAME_2, and FULL_STACK_FRAME_3
1245
- * > to ensure first to reduce false matches, if all of these fail then you can use this to extract the filename from a random
1246
- * > strings to identify any potential filename from a known stack frame line.
1247
- *
1248
- * **Known Invalid matching**
1249
- *
1250
- * This regex will basically match any "final" string of a line or one that is trailed by a comma, so this should not
1251
- * be used as the "only" matching regex, but rather as a final fallback to extract the filename from a string.
1252
- * If you are certain that the string line is a stack frame and not part of the exception message (lines before the stack)
1253
- * or trailing comments, then you can use this to extract the filename and then further parse with PARSE_FILENAME_LINE_COL
1254
- * and PARSE_FILENAME_LINE_ONLY to extract any potential the line and column numbers.
1255
- *
1256
- * **Primary focus of the matching**
1257
- * - at (anonymous) @ VM60:1
1258
- * - Line 21 of linked script file://localhost/C:/Temp/stacktrace.js
1259
- * - Line 11 of inline#1 script in http://localhost:3000/static/js/main.206f4846.js:2:296748
1260
- * - Line 68 of inline#2 script in file://localhost/teststack.html
1261
- * - at Global code (http://example.com/stacktrace.js:11:1)
1262
- */
1263
- var EXTRACT_FILENAME = /(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/;
1264
- /**
1265
- * Attempt to extract the filename, line number, and column number from a string.
1266
- */
1267
- var PARSE_FILENAME_LINE_COL = /([^\(\s\n]+):([0-9]+):([0-9]+)$/;
1268
- /**
1269
- * Attempt to extract the filename and line number from a string.
1270
- */
1271
- var PARSE_FILENAME_LINE_ONLY = /([^\(\s\n]+):([0-9]+)$/;
1272
- var NoMethod = "<no_method>";
1273
- var strError = "error";
1274
- var strStack = "stack";
1275
- var strStackDetails = "stackDetails";
1276
- var strErrorSrc = "errorSrc";
1277
- var strMessage = "message";
1278
- var strDescription = "description";
1279
- var _parseSequence = [
1280
- { re: FULL_STACK_FRAME_1, len: 5, m: 1, fn: 2, ln: 3, col: 4 },
1281
- { chk: _ignoreNative, pre: _scrubAnonymous, re: FULL_STACK_FRAME_2, len: 4, m: 1, fn: 2, ln: 3 },
1282
- { re: FULL_STACK_FRAME_3, len: 3, m: 1, fn: 2, hdl: _handleFilename },
1283
- { re: EXTRACT_FILENAME, len: 2, fn: 1, hdl: _handleFilename }
1284
- ];
1285
- function _scrubAnonymous(frame) {
1286
- return frame.replace(/(\(anonymous\))/, "<anonymous>");
1287
- }
1288
- function _ignoreNative(frame) {
1289
- return strIndexOf(frame, "[native") < 0;
1290
- }
1291
- function _stringify(value, convertToString) {
1292
- var result = value;
1293
- if (result && !isString(result)) {
1294
- if (JSON && JSON[_DYN_STRINGIFY /* @min:%2estringify */]) {
1295
- result = JSON[_DYN_STRINGIFY /* @min:%2estringify */](value);
1296
- if (convertToString && (!result || result === "{}")) {
1297
- if (isFunction(value[_DYN_TO_STRING /* @min:%2etoString */])) {
1298
- result = value[_DYN_TO_STRING /* @min:%2etoString */]();
1299
- }
1300
- else {
1301
- result = "" + value;
1302
- }
1303
- }
1304
- }
1305
- else {
1306
- result = "" + value + " - (Missing JSON.stringify)";
1307
- }
1308
- }
1309
- return result || "";
1310
- }
1311
- function _formatMessage(theEvent, errorType) {
1312
- var evtMessage = theEvent;
1313
- if (theEvent) {
1314
- if (evtMessage && !isString(evtMessage)) {
1315
- evtMessage = theEvent[strMessage] || theEvent[strDescription] || evtMessage;
1316
- }
1317
- // Make sure the message is a string
1318
- if (evtMessage && !isString(evtMessage)) {
1319
- // tslint:disable-next-line: prefer-conditional-expression
1320
- evtMessage = _stringify(evtMessage, true);
1321
- }
1322
- if (theEvent["filename"]) {
1323
- // Looks like an event object with filename
1324
- evtMessage = evtMessage + " @" + (theEvent["filename"] || "") + ":" + (theEvent["lineno"] || "?") + ":" + (theEvent["colno"] || "?");
1325
- }
1326
- }
1327
- // Automatically add the error type to the message if it does already appear to be present
1328
- if (errorType && errorType !== "String" && errorType !== "Object" && errorType !== "Error" && strIndexOf(evtMessage || "", errorType) === -1) {
1329
- evtMessage = errorType + ": " + evtMessage;
1330
- }
1331
- return evtMessage || "";
1332
- }
1333
- function _isExceptionDetailsInternal(value) {
1334
- try {
1335
- if (isObject(value)) {
1336
- return "hasFullStack" in value && "typeName" in value;
1337
- }
1338
- }
1339
- catch (e) {
1340
- // This can happen with some native browser objects, but should not happen for the type we are checking for
1341
- }
1342
- return false;
1343
- }
1344
- function _isExceptionInternal(value) {
1345
- try {
1346
- if (isObject(value)) {
1347
- return ("ver" in value && "exceptions" in value && "properties" in value);
1348
- }
1349
- }
1350
- catch (e) {
1351
- // This can happen with some native browser objects, but should not happen for the type we are checking for
1352
- }
1353
- return false;
1354
- }
1355
- function _isStackDetails(details) {
1356
- return details && details.src && isString(details.src) && details.obj && isArray(details.obj);
1357
- }
1358
- function _convertStackObj(errorStack) {
1359
- var src = errorStack || "";
1360
- if (!isString(src)) {
1361
- if (isString(src[strStack])) {
1362
- src = src[strStack];
1363
- }
1364
- else {
1365
- src = "" + src;
1366
- }
1367
- }
1368
- var items = src[_DYN_SPLIT /* @min:%2esplit */]("\n");
1369
- return {
1370
- src: src,
1371
- obj: items
1372
- };
1373
- }
1374
- function _getOperaStack(errorMessage) {
1375
- var stack = [];
1376
- var lines = errorMessage[_DYN_SPLIT /* @min:%2esplit */]("\n");
1377
- for (var lp = 0; lp < lines[_DYN_LENGTH /* @min:%2elength */]; lp++) {
1378
- var entry = lines[lp];
1379
- if (lines[lp + 1]) {
1380
- entry += "@" + lines[lp + 1];
1381
- lp++;
1382
- }
1383
- stack.push(entry);
1384
- }
1385
- return {
1386
- src: errorMessage,
1387
- obj: stack
1388
- };
1389
- }
1390
- function _getStackFromErrorObj(errorObj) {
1391
- var details = null;
1392
- if (errorObj) {
1393
- try {
1394
- /* Using bracket notation is support older browsers (IE 7/8 -- dont remember the version) that throw when using dot
1395
- notation for undefined objects and we don't want to loose the error from being reported */
1396
- if (errorObj[strStack]) {
1397
- // Chrome/Firefox
1398
- details = _convertStackObj(errorObj[strStack]);
1399
- }
1400
- else if (errorObj[strError] && errorObj[strError][strStack]) {
1401
- // Edge error event provides the stack and error object
1402
- details = _convertStackObj(errorObj[strError][strStack]);
1403
- }
1404
- else if (errorObj["exception"] && errorObj.exception[strStack]) {
1405
- details = _convertStackObj(errorObj.exception[strStack]);
1406
- }
1407
- else if (_isStackDetails(errorObj)) {
1408
- details = errorObj;
1409
- }
1410
- else if (_isStackDetails(errorObj[strStackDetails])) {
1411
- details = errorObj[strStackDetails];
1412
- }
1413
- else if (getWindow() && getWindow()["opera"] && errorObj[strMessage]) {
1414
- // Opera
1415
- details = _getOperaStack(errorObj[_DYN_MESSAGE /* @min:%2emessage */]);
1416
- }
1417
- else if (errorObj["reason"] && errorObj.reason[strStack]) {
1418
- // UnhandledPromiseRejection
1419
- details = _convertStackObj(errorObj.reason[strStack]);
1420
- }
1421
- else if (isString(errorObj)) {
1422
- details = _convertStackObj(errorObj);
1423
- }
1424
- else {
1425
- var evtMessage = errorObj[strMessage] || errorObj[strDescription] || "";
1426
- if (isString(errorObj[strErrorSrc])) {
1427
- if (evtMessage) {
1428
- evtMessage += "\n";
1429
- }
1430
- evtMessage += " from " + errorObj[strErrorSrc];
1431
- }
1432
- if (evtMessage) {
1433
- details = _convertStackObj(evtMessage);
1434
- }
1435
- }
1436
- }
1437
- catch (e) {
1438
- // something unexpected happened so to avoid failing to report any error lets swallow the exception
1439
- // and fallback to the callee/caller method
1440
- details = _convertStackObj(e);
1441
- }
1442
- }
1443
- return details || {
1444
- src: "",
1445
- obj: null
1446
- };
1447
- }
1448
- function _formatStackTrace(stackDetails) {
1449
- var stack = "";
1450
- if (stackDetails) {
1451
- if (stackDetails.obj) {
1452
- stack = stackDetails.obj.join("\n");
1453
- }
1454
- else {
1455
- stack = stackDetails.src || "";
1456
- }
1457
- }
1458
- return stack;
1459
- }
1460
- function _parseStack(stack) {
1461
- var parsedStack;
1462
- var frames = stack.obj;
1463
- if (frames && frames[_DYN_LENGTH /* @min:%2elength */] > 0) {
1464
- parsedStack = [];
1465
- var level_1 = 0;
1466
- var foundStackStart_1 = false;
1467
- var totalSizeInBytes_1 = 0;
1468
- arrForEach(frames, function (frame) {
1469
- if (foundStackStart_1 || _isStackFrame(frame)) {
1470
- var theFrame = asString(frame);
1471
- // Once we have found the first stack frame we treat the rest of the lines as part of the stack
1472
- foundStackStart_1 = true;
1473
- var parsedFrame = _extractStackFrame(theFrame, level_1);
1474
- if (parsedFrame) {
1475
- totalSizeInBytes_1 += parsedFrame[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];
1476
- parsedStack.push(parsedFrame);
1477
- level_1++;
1478
- }
1479
- }
1480
- });
1481
- // DP Constraint - exception parsed stack must be < 32KB
1482
- // remove frames from the middle to meet the threshold
1483
- var exceptionParsedStackThreshold = 32 * 1024;
1484
- if (totalSizeInBytes_1 > exceptionParsedStackThreshold) {
1485
- var left = 0;
1486
- var right = parsedStack[_DYN_LENGTH /* @min:%2elength */] - 1;
1487
- var size = 0;
1488
- var acceptedLeft = left;
1489
- var acceptedRight = right;
1490
- while (left < right) {
1491
- // check size
1492
- var lSize = parsedStack[left][_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];
1493
- var rSize = parsedStack[right][_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];
1494
- size += lSize + rSize;
1495
- if (size > exceptionParsedStackThreshold) {
1496
- // remove extra frames from the middle
1497
- var howMany = acceptedRight - acceptedLeft + 1;
1498
- parsedStack.splice(acceptedLeft, howMany);
1499
- break;
1500
- }
1501
- // update pointers
1502
- acceptedLeft = left;
1503
- acceptedRight = right;
1504
- left++;
1505
- right--;
1506
- }
1507
- }
1508
- }
1509
- return parsedStack;
1510
- }
1511
- function _getErrorType(errorType) {
1512
- // Gets the Error Type by passing the constructor (used to get the true type of native error object).
1513
- var typeName = "";
1514
- if (errorType) {
1515
- typeName = errorType.typeName || errorType[_DYN_NAME /* @min:%2ename */] || "";
1516
- if (!typeName) {
1517
- try {
1518
- var funcNameRegex = /function (.{1,200})\(/;
1519
- var results = (funcNameRegex).exec((errorType).constructor[_DYN_TO_STRING /* @min:%2etoString */]());
1520
- typeName = (results && results[_DYN_LENGTH /* @min:%2elength */] > 1) ? results[1] : "";
1521
- }
1522
- catch (e) {
1523
- // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do
1524
- }
1525
- }
1526
- }
1527
- return typeName;
1528
- }
1529
- /**
1530
- * Formats the provided errorObj for display and reporting, it may be a String, Object, integer or undefined depending on the browser.
1531
- * @param errorObj - The supplied errorObj
1532
- */
1533
- function _formatErrorCode(errorObj) {
1534
- if (errorObj) {
1535
- try {
1536
- if (!isString(errorObj)) {
1537
- var errorType = _getErrorType(errorObj);
1538
- var result = _stringify(errorObj, false);
1539
- if (!result || result === "{}") {
1540
- if (errorObj[strError]) {
1541
- // Looks like an MS Error Event
1542
- errorObj = errorObj[strError];
1543
- errorType = _getErrorType(errorObj);
1544
- }
1545
- result = _stringify(errorObj, true);
1546
- }
1547
- if (strIndexOf(result, errorType) !== 0 && errorType !== "String") {
1548
- return errorType + ":" + result;
1549
- }
1550
- return result;
1551
- }
1552
- }
1553
- catch (e) {
1554
- // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do
1555
- }
1556
- }
1557
- // Fallback to just letting the object format itself into a string
1558
- return "" + (errorObj || "");
1559
- }
1560
- var Exception = /** @class */ (function () {
1561
- /**
1562
- * Constructs a new instance of the ExceptionTelemetry object
1563
- */
1564
- function Exception(logger, exception, properties, measurements, severityLevel, id) {
1565
- this.aiDataContract = {
1566
- ver: 1 /* FieldType.Required */,
1567
- exceptions: 1 /* FieldType.Required */,
1568
- severityLevel: 0 /* FieldType.Default */,
1569
- properties: 0 /* FieldType.Default */,
1570
- measurements: 0 /* FieldType.Default */
1571
- };
1572
- var _self = this;
1573
- _self.ver = 2; // TODO: handle the CS"4.0" ==> breeze 2 conversion in a better way
1574
- if (!_isExceptionInternal(exception)) {
1575
- if (!properties) {
1576
- properties = {};
1577
- }
1578
- if (id) {
1579
- properties.id = id;
1580
- }
1581
- _self[_DYN_EXCEPTIONS /* @min:%2eexceptions */] = [_createExceptionDetails(logger, exception, properties)];
1582
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);
1583
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);
1584
- if (severityLevel) {
1585
- _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = severityLevel;
1586
- }
1587
- if (id) {
1588
- _self.id = id;
1589
- }
1590
- }
1591
- else {
1592
- _self[_DYN_EXCEPTIONS /* @min:%2eexceptions */] = exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */] || [];
1593
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = exception[_DYN_PROPERTIES /* @min:%2eproperties */];
1594
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = exception[_DYN_MEASUREMENTS /* @min:%2emeasurements */];
1595
- if (exception[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */]) {
1596
- _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = exception[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */];
1597
- }
1598
- if (exception.id) {
1599
- _self.id = exception.id;
1600
- exception[_DYN_PROPERTIES /* @min:%2eproperties */].id = exception.id;
1601
- }
1602
- if (exception[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */]) {
1603
- _self[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */] = exception[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */];
1604
- }
1605
- // bool/int types, use isNullOrUndefined
1606
- if (!isNullOrUndefined(exception.isManual)) {
1607
- _self.isManual = exception.isManual;
1608
- }
1609
- }
1610
- }
1611
- Exception.CreateAutoException = function (message, url, lineNumber, columnNumber, error, evt, stack, errorSrc) {
1612
- var errorType = _getErrorType(error || evt || message);
1613
- return {
1614
- message: _formatMessage(message, errorType),
1615
- url: url,
1616
- lineNumber: lineNumber,
1617
- columnNumber: columnNumber,
1618
- error: _formatErrorCode(error || evt || message),
1619
- evt: _formatErrorCode(evt || message),
1620
- typeName: errorType,
1621
- stackDetails: _getStackFromErrorObj(stack || error || evt),
1622
- errorSrc: errorSrc
1623
- };
1624
- };
1625
- Exception.CreateFromInterface = function (logger, exception, properties, measurements) {
1626
- var exceptions = exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */]
1627
- && arrMap(exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */], function (ex) { return _createExDetailsFromInterface(logger, ex); });
1628
- var exceptionData = new Exception(logger, __assignFn(__assignFn({}, exception), { exceptions: exceptions }), properties, measurements);
1629
- return exceptionData;
1630
- };
1631
- Exception.prototype.toInterface = function () {
1632
- var _a = this, exceptions = _a.exceptions, properties = _a.properties, measurements = _a.measurements, severityLevel = _a.severityLevel, problemGroup = _a.problemGroup, id = _a.id, isManual = _a.isManual;
1633
- var exceptionDetailsInterface = exceptions instanceof Array
1634
- && arrMap(exceptions, function (exception) { return exception.toInterface(); })
1635
- || undefined;
1636
- return {
1637
- ver: "4.0",
1638
- exceptions: exceptionDetailsInterface,
1639
- severityLevel: severityLevel,
1640
- properties: properties,
1641
- measurements: measurements,
1642
- problemGroup: problemGroup,
1643
- id: id,
1644
- isManual: isManual
1645
- };
1646
- };
1647
- /**
1648
- * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.
1649
- */
1650
- Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line) {
1651
- var _a;
1652
- return {
1653
- exceptions: [
1654
- (_a = {},
1655
- _a[_DYN_HAS_FULL_STACK /* @min:hasFullStack */] = true,
1656
- _a.message = message,
1657
- _a.stack = details,
1658
- _a.typeName = typeName,
1659
- _a)
1660
- ]
1661
- };
1662
- };
1663
- Exception.envelopeType = "Microsoft.ApplicationInsights.{0}.Exception";
1664
- Exception.dataType = "ExceptionData";
1665
- Exception.formatError = _formatErrorCode;
1666
- return Exception;
1667
- }());
1668
- var exDetailsAiDataContract = objFreeze({
1669
- id: 0 /* FieldType.Default */,
1670
- outerId: 0 /* FieldType.Default */,
1671
- typeName: 1 /* FieldType.Required */,
1672
- message: 1 /* FieldType.Required */,
1673
- hasFullStack: 0 /* FieldType.Default */,
1674
- stack: 0 /* FieldType.Default */,
1675
- parsedStack: 2 /* FieldType.Array */
1676
- });
1677
- function _toInterface() {
1678
- var _self = this;
1679
- var parsedStack = isArray(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */])
1680
- && arrMap(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) { return _parsedFrameToInterface(frame); });
1681
- var exceptionDetailsInterface = {
1682
- id: _self.id,
1683
- outerId: _self.outerId,
1684
- typeName: _self[_DYN_TYPE_NAME /* @min:%2etypeName */],
1685
- message: _self[_DYN_MESSAGE /* @min:%2emessage */],
1686
- hasFullStack: _self[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */],
1687
- stack: _self[strStack],
1688
- parsedStack: parsedStack || undefined
1689
- };
1690
- return exceptionDetailsInterface;
1691
- }
1692
- function _createExceptionDetails(logger, exception, properties) {
1693
- var _a;
1694
- var id;
1695
- var outerId;
1696
- var typeName;
1697
- var message;
1698
- var hasFullStack;
1699
- var theStack;
1700
- var parsedStack;
1701
- if (!_isExceptionDetailsInternal(exception)) {
1702
- var error = exception;
1703
- var evt = error && error.evt;
1704
- if (!isError(error)) {
1705
- error = error[strError] || evt || error;
1706
- }
1707
- typeName = dataSanitizeString(logger, _getErrorType(error)) || strNotSpecified;
1708
- message = dataSanitizeMessage(logger, _formatMessage(exception || error, typeName)) || strNotSpecified;
1709
- var stack = exception[strStackDetails] || _getStackFromErrorObj(exception);
1710
- parsedStack = _parseStack(stack);
1711
- // after parsedStack is inited, iterate over each frame object, sanitize its assembly field
1712
- if (isArray(parsedStack)) {
1713
- arrMap(parsedStack, function (frame) {
1714
- frame[_DYN_ASSEMBLY /* @min:%2eassembly */] = dataSanitizeString(logger, frame[_DYN_ASSEMBLY /* @min:%2eassembly */]);
1715
- frame[_DYN_FILE_NAME /* @min:%2efileName */] = dataSanitizeString(logger, frame[_DYN_FILE_NAME /* @min:%2efileName */]);
1716
- });
1717
- }
1718
- theStack = dataSanitizeException(logger, _formatStackTrace(stack));
1719
- hasFullStack = isArray(parsedStack) && parsedStack[_DYN_LENGTH /* @min:%2elength */] > 0;
1720
- if (properties) {
1721
- properties[_DYN_TYPE_NAME /* @min:%2etypeName */] = properties[_DYN_TYPE_NAME /* @min:%2etypeName */] || typeName;
1722
- }
1723
- }
1724
- else {
1725
- typeName = exception[_DYN_TYPE_NAME /* @min:%2etypeName */];
1726
- message = exception[_DYN_MESSAGE /* @min:%2emessage */];
1727
- theStack = exception[strStack];
1728
- parsedStack = exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */] || [];
1729
- hasFullStack = exception[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */];
1730
- }
1731
- return _a = {},
1732
- _a[_DYN_AI_DATA_CONTRACT /* @min:aiDataContract */] = exDetailsAiDataContract,
1733
- _a.id = id,
1734
- _a.outerId = outerId,
1735
- _a.typeName = typeName,
1736
- _a.message = message,
1737
- _a[_DYN_HAS_FULL_STACK /* @min:hasFullStack */] = hasFullStack,
1738
- _a.stack = theStack,
1739
- _a.parsedStack = parsedStack,
1740
- _a.toInterface = _toInterface,
1741
- _a;
1742
- }
1743
- function _createExDetailsFromInterface(logger, exception) {
1744
- var parsedStack = (isArray(exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */])
1745
- && arrMap(exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) { return _stackFrameFromInterface(frame); }))
1746
- || exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */];
1747
- var exceptionDetails = _createExceptionDetails(logger, __assignFn(__assignFn({}, exception), { parsedStack: parsedStack }));
1748
- return exceptionDetails;
1749
- }
1750
- function _parseFilename(theFrame, fileName) {
1751
- var lineCol = fileName[_DYN_MATCH /* @min:%2ematch */](PARSE_FILENAME_LINE_COL);
1752
- if (lineCol && lineCol[_DYN_LENGTH /* @min:%2elength */] >= 4) {
1753
- theFrame[_DYN_FILE_NAME /* @min:%2efileName */] = lineCol[1];
1754
- theFrame[_DYN_LINE /* @min:%2eline */] = parseInt(lineCol[2]);
1755
- }
1756
- else {
1757
- var lineNo = fileName[_DYN_MATCH /* @min:%2ematch */](PARSE_FILENAME_LINE_ONLY);
1758
- if (lineNo && lineNo[_DYN_LENGTH /* @min:%2elength */] >= 3) {
1759
- theFrame[_DYN_FILE_NAME /* @min:%2efileName */] = lineNo[1];
1760
- theFrame[_DYN_LINE /* @min:%2eline */] = parseInt(lineNo[2]);
1761
- }
1762
- else {
1763
- theFrame[_DYN_FILE_NAME /* @min:%2efileName */] = fileName;
1764
- }
1765
- }
1766
- }
1767
- function _handleFilename(theFrame, sequence, matches) {
1768
- var filename = theFrame[_DYN_FILE_NAME /* @min:%2efileName */];
1769
- if (sequence.fn && matches && matches[_DYN_LENGTH /* @min:%2elength */] > sequence.fn) {
1770
- if (sequence.ln && matches[_DYN_LENGTH /* @min:%2elength */] > sequence.ln) {
1771
- filename = strTrim(matches[sequence.fn] || "");
1772
- theFrame[_DYN_LINE /* @min:%2eline */] = parseInt(strTrim(matches[sequence.ln] || "")) || 0;
1773
- }
1774
- else {
1775
- filename = strTrim(matches[sequence.fn] || "");
1776
- }
1777
- }
1778
- if (filename) {
1779
- _parseFilename(theFrame, filename);
1780
- }
1781
- }
1782
- function _isStackFrame(frame) {
1783
- var result = false;
1784
- if (frame && isString(frame)) {
1785
- var trimmedFrame = strTrim(frame);
1786
- if (trimmedFrame) {
1787
- result = IS_FRAME.test(trimmedFrame);
1788
- }
1789
- }
1790
- return result;
1791
- }
1792
- var stackFrameAiDataContract = objFreeze({
1793
- level: 1 /* FieldType.Required */,
1794
- method: 1 /* FieldType.Required */,
1795
- assembly: 0 /* FieldType.Default */,
1796
- fileName: 0 /* FieldType.Default */,
1797
- line: 0 /* FieldType.Default */
1798
- });
1799
- function _extractStackFrame(frame, level) {
1800
- var _a;
1801
- var theFrame;
1802
- if (frame && isString(frame) && strTrim(frame)) {
1803
- theFrame = (_a = {},
1804
- _a[_DYN_AI_DATA_CONTRACT /* @min:aiDataContract */] = stackFrameAiDataContract,
1805
- _a.level = level,
1806
- _a.assembly = strTrim(frame),
1807
- _a.method = NoMethod,
1808
- _a.fileName = "",
1809
- _a.line = 0,
1810
- _a.sizeInBytes = 0,
1811
- _a);
1812
- var idx = 0;
1813
- while (idx < _parseSequence[_DYN_LENGTH /* @min:%2elength */]) {
1814
- var sequence = _parseSequence[idx];
1815
- if (sequence.chk && !sequence.chk(frame)) {
1816
- break;
1817
- }
1818
- if (sequence.pre) {
1819
- frame = sequence.pre(frame);
1820
- }
1821
- // Attempt to "parse" the stack frame
1822
- var matches = frame[_DYN_MATCH /* @min:%2ematch */](sequence.re);
1823
- if (matches && matches[_DYN_LENGTH /* @min:%2elength */] >= sequence.len) {
1824
- if (sequence.m) {
1825
- theFrame.method = strTrim(matches[sequence.m] || NoMethod);
1826
- }
1827
- if (sequence.hdl) {
1828
- // Run any custom handler
1829
- sequence.hdl(theFrame, sequence, matches);
1830
- }
1831
- else if (sequence.fn) {
1832
- if (sequence.ln) {
1833
- theFrame[_DYN_FILE_NAME /* @min:%2efileName */] = strTrim(matches[sequence.fn] || "");
1834
- theFrame[_DYN_LINE /* @min:%2eline */] = parseInt(strTrim(matches[sequence.ln] || "")) || 0;
1835
- }
1836
- else {
1837
- _parseFilename(theFrame, matches[sequence.fn] || "");
1838
- }
1839
- }
1840
- // We found a match so stop looking
1841
- break;
1842
- }
1843
- idx++;
1844
- }
1845
- }
1846
- return _populateFrameSizeInBytes(theFrame);
1847
- }
1848
- function _stackFrameFromInterface(frame) {
1849
- var _a;
1850
- var parsedFrame = (_a = {},
1851
- _a[_DYN_AI_DATA_CONTRACT /* @min:aiDataContract */] = stackFrameAiDataContract,
1852
- _a.level = frame.level,
1853
- _a.method = frame.method,
1854
- _a.assembly = frame[_DYN_ASSEMBLY /* @min:%2eassembly */],
1855
- _a.fileName = frame[_DYN_FILE_NAME /* @min:%2efileName */],
1856
- _a.line = frame[_DYN_LINE /* @min:%2eline */],
1857
- _a.sizeInBytes = 0,
1858
- _a);
1859
- return _populateFrameSizeInBytes(parsedFrame);
1860
- }
1861
- function _populateFrameSizeInBytes(frame) {
1862
- var sizeInBytes = STACKFRAME_BASE_SIZE;
1863
- if (frame) {
1864
- sizeInBytes += frame.method[_DYN_LENGTH /* @min:%2elength */];
1865
- sizeInBytes += frame.assembly[_DYN_LENGTH /* @min:%2elength */];
1866
- sizeInBytes += frame.fileName[_DYN_LENGTH /* @min:%2elength */];
1867
- sizeInBytes += frame.level.toString()[_DYN_LENGTH /* @min:%2elength */];
1868
- sizeInBytes += frame.line.toString()[_DYN_LENGTH /* @min:%2elength */];
1869
- frame[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */] = sizeInBytes;
1870
- }
1871
- return frame;
1872
- }
1873
- function _parsedFrameToInterface(frame) {
1874
- return {
1875
- level: frame.level,
1876
- method: frame.method,
1877
- assembly: frame[_DYN_ASSEMBLY /* @min:%2eassembly */],
1878
- fileName: frame[_DYN_FILE_NAME /* @min:%2efileName */],
1879
- line: frame[_DYN_LINE /* @min:%2eline */]
1880
- };
1881
- }
1882
-
1883
- /*
1884
- * Application Insights JavaScript SDK - Common, 3.3.9
1885
- * Copyright (c) Microsoft and contributors. All rights reserved.
1886
- */
1887
-
1888
-
1889
- var DataPoint = /** @class */ (function () {
1890
- function DataPoint() {
1891
- /**
1892
- * The data contract for serializing this object.
1893
- */
1894
- this.aiDataContract = {
1895
- name: 1 /* FieldType.Required */,
1896
- kind: 0 /* FieldType.Default */,
1897
- value: 1 /* FieldType.Required */,
1898
- count: 0 /* FieldType.Default */,
1899
- min: 0 /* FieldType.Default */,
1900
- max: 0 /* FieldType.Default */,
1901
- stdDev: 0 /* FieldType.Default */
1902
- };
1903
- /**
1904
- * Metric type. Single measurement or the aggregated value.
1905
- */
1906
- this.kind = 0 /* DataPointType.Measurement */;
1907
- }
1908
- return DataPoint;
1909
- }());
1910
-
1911
- /*
1912
- * Application Insights JavaScript SDK - Common, 3.3.9
1913
- * Copyright (c) Microsoft and contributors. All rights reserved.
1914
- */
1915
-
1916
- var Metric = /** @class */ (function () {
1917
- /**
1918
- * Constructs a new instance of the MetricTelemetry object
1919
- */
1920
- function Metric(logger, name, value, count, min, max, stdDev, properties, measurements) {
1921
- this.aiDataContract = {
1922
- ver: 1 /* FieldType.Required */,
1923
- metrics: 1 /* FieldType.Required */,
1924
- properties: 0 /* FieldType.Default */
1925
- };
1926
- var _self = this;
1927
- _self.ver = 2;
1928
- var dataPoint = new DataPoint();
1929
- dataPoint[_DYN_COUNT /* @min:%2ecount */] = count > 0 ? count : undefined;
1930
- dataPoint.max = isNaN(max) || max === null ? undefined : max;
1931
- dataPoint.min = isNaN(min) || min === null ? undefined : min;
1932
- dataPoint[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;
1933
- dataPoint.value = value;
1934
- dataPoint.stdDev = isNaN(stdDev) || stdDev === null ? undefined : stdDev;
1935
- _self.metrics = [dataPoint];
1936
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);
1937
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);
1938
- }
1939
- Metric.envelopeType = "Microsoft.ApplicationInsights.{0}.Metric";
1940
- Metric.dataType = "MetricData";
1941
- return Metric;
1942
- }());
1943
-
1944
- /*
1945
- * Application Insights JavaScript SDK - Common, 3.3.9
1946
- * Copyright (c) Microsoft and contributors. All rights reserved.
1947
- */
1948
-
1949
- var strEmpty = "";
1950
- /**
1951
- * Convert ms to c# time span format
1952
- */
1953
- function msToTimeSpan(totalms) {
1954
- if (isNaN(totalms) || totalms < 0) {
1955
- totalms = 0;
1956
- }
1957
- totalms = mathRound(totalms);
1958
- var ms = strEmpty + totalms % 1000;
1959
- var sec = strEmpty + mathFloor(totalms / 1000) % 60;
1960
- var min = strEmpty + mathFloor(totalms / (1000 * 60)) % 60;
1961
- var hour = strEmpty + mathFloor(totalms / (1000 * 60 * 60)) % 24;
1962
- var days = mathFloor(totalms / (1000 * 60 * 60 * 24));
1963
- ms = ms[_DYN_LENGTH /* @min:%2elength */] === 1 ? "00" + ms : ms[_DYN_LENGTH /* @min:%2elength */] === 2 ? "0" + ms : ms;
1964
- sec = sec[_DYN_LENGTH /* @min:%2elength */] < 2 ? "0" + sec : sec;
1965
- min = min[_DYN_LENGTH /* @min:%2elength */] < 2 ? "0" + min : min;
1966
- hour = hour[_DYN_LENGTH /* @min:%2elength */] < 2 ? "0" + hour : hour;
1967
- return (days > 0 ? days + "." : strEmpty) + hour + ":" + min + ":" + sec + "." + ms;
1968
- }
1969
- function isCrossOriginError(message, url, lineNumber, columnNumber, error) {
1970
- return !error && isString(message) && (message === "Script error." || message === "Script error");
1971
- }
1972
-
1973
- /*
1974
- * Application Insights JavaScript SDK - Common, 3.3.9
1975
- * Copyright (c) Microsoft and contributors. All rights reserved.
1976
- */
1977
-
1978
- var PageView = /** @class */ (function () {
1979
- /**
1980
- * Constructs a new instance of the PageEventTelemetry object
1981
- */
1982
- function PageView(logger, name, url, durationMs, properties, measurements, id) {
1983
- this.aiDataContract = {
1984
- ver: 1 /* FieldType.Required */,
1985
- name: 0 /* FieldType.Default */,
1986
- url: 0 /* FieldType.Default */,
1987
- duration: 0 /* FieldType.Default */,
1988
- properties: 0 /* FieldType.Default */,
1989
- measurements: 0 /* FieldType.Default */,
1990
- id: 0 /* FieldType.Default */
1991
- };
1992
- var _self = this;
1993
- _self.ver = 2;
1994
- _self.id = dataSanitizeId(logger, id);
1995
- _self.url = dataSanitizeUrl(logger, url);
1996
- _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;
1997
- if (!isNaN(durationMs)) {
1998
- _self[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(durationMs);
1999
- }
2000
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);
2001
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);
2002
- }
2003
- PageView.envelopeType = "Microsoft.ApplicationInsights.{0}.Pageview";
2004
- PageView.dataType = "PageviewData";
2005
- return PageView;
2006
- }());
2007
-
2008
- /*
2009
- * Application Insights JavaScript SDK - Common, 3.3.9
2010
- * Copyright (c) Microsoft and contributors. All rights reserved.
2011
- */
2012
-
2013
- var RemoteDependencyData = /** @class */ (function () {
2014
- /**
2015
- * Constructs a new instance of the RemoteDependencyData object
2016
- */
2017
- function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {
2018
- if (requestAPI === void 0) { requestAPI = "Ajax"; }
2019
- this.aiDataContract = {
2020
- id: 1 /* FieldType.Required */,
2021
- ver: 1 /* FieldType.Required */,
2022
- name: 0 /* FieldType.Default */,
2023
- resultCode: 0 /* FieldType.Default */,
2024
- duration: 0 /* FieldType.Default */,
2025
- success: 0 /* FieldType.Default */,
2026
- data: 0 /* FieldType.Default */,
2027
- target: 0 /* FieldType.Default */,
2028
- type: 0 /* FieldType.Default */,
2029
- properties: 0 /* FieldType.Default */,
2030
- measurements: 0 /* FieldType.Default */,
2031
- kind: 0 /* FieldType.Default */,
2032
- value: 0 /* FieldType.Default */,
2033
- count: 0 /* FieldType.Default */,
2034
- min: 0 /* FieldType.Default */,
2035
- max: 0 /* FieldType.Default */,
2036
- stdDev: 0 /* FieldType.Default */,
2037
- dependencyKind: 0 /* FieldType.Default */,
2038
- dependencySource: 0 /* FieldType.Default */,
2039
- commandName: 0 /* FieldType.Default */,
2040
- dependencyTypeName: 0 /* FieldType.Default */
2041
- };
2042
- var _self = this;
2043
- _self.ver = 2;
2044
- _self.id = id;
2045
- _self[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(value);
2046
- _self.success = success;
2047
- _self.resultCode = resultCode + "";
2048
- _self.type = dataSanitizeString(logger, requestAPI);
2049
- var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
2050
- _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available
2051
- _self.target = dataSanitizeString(logger, dependencyFields.target);
2052
- if (correlationContext) {
2053
- _self.target = "".concat(_self.target, " | ").concat(correlationContext);
2054
- }
2055
- _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, dependencyFields[_DYN_NAME /* @min:%2ename */]);
2056
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);
2057
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);
2058
- }
2059
- RemoteDependencyData.envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency";
2060
- RemoteDependencyData.dataType = "RemoteDependencyData";
2061
- return RemoteDependencyData;
2062
- }());
2063
-
2064
- /*
2065
- * Application Insights JavaScript SDK - Common, 3.3.9
2066
- * Copyright (c) Microsoft and contributors. All rights reserved.
2067
- */
2068
-
2069
- var Trace = /** @class */ (function () {
2070
- /**
2071
- * Constructs a new instance of the TraceTelemetry object
2072
- */
2073
- function Trace(logger, message, severityLevel, properties, measurements) {
2074
- this.aiDataContract = {
2075
- ver: 1 /* FieldType.Required */,
2076
- message: 1 /* FieldType.Required */,
2077
- severityLevel: 0 /* FieldType.Default */,
2078
- properties: 0 /* FieldType.Default */
2079
- };
2080
- var _self = this;
2081
- _self.ver = 2;
2082
- message = message || strNotSpecified;
2083
- _self[_DYN_MESSAGE /* @min:%2emessage */] = dataSanitizeMessage(logger, message);
2084
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);
2085
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);
2086
- if (severityLevel) {
2087
- _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = severityLevel;
2088
- }
2089
- }
2090
- Trace.envelopeType = "Microsoft.ApplicationInsights.{0}.Message";
2091
- Trace.dataType = "MessageData";
2092
- return Trace;
2093
- }());
2094
-
2095
- /*
2096
- * Application Insights JavaScript SDK - Common, 3.3.9
2097
- * Copyright (c) Microsoft and contributors. All rights reserved.
2098
- */
2099
-
2100
- var PageViewPerformance = /** @class */ (function () {
2101
- /**
2102
- * Constructs a new instance of the PageEventTelemetry object
2103
- */
2104
- function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {
2105
- this.aiDataContract = {
2106
- ver: 1 /* FieldType.Required */,
2107
- name: 0 /* FieldType.Default */,
2108
- url: 0 /* FieldType.Default */,
2109
- duration: 0 /* FieldType.Default */,
2110
- perfTotal: 0 /* FieldType.Default */,
2111
- networkConnect: 0 /* FieldType.Default */,
2112
- sentRequest: 0 /* FieldType.Default */,
2113
- receivedResponse: 0 /* FieldType.Default */,
2114
- domProcessing: 0 /* FieldType.Default */,
2115
- properties: 0 /* FieldType.Default */,
2116
- measurements: 0 /* FieldType.Default */
2117
- };
2118
- var _self = this;
2119
- _self.ver = 2;
2120
- _self.url = dataSanitizeUrl(logger, url);
2121
- _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;
2122
- _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);
2123
- _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);
2124
- if (cs4BaseData) {
2125
- _self.domProcessing = cs4BaseData.domProcessing;
2126
- _self[_DYN_DURATION /* @min:%2eduration */] = cs4BaseData[_DYN_DURATION /* @min:%2eduration */];
2127
- _self.networkConnect = cs4BaseData.networkConnect;
2128
- _self.perfTotal = cs4BaseData.perfTotal;
2129
- _self.receivedResponse = cs4BaseData.receivedResponse;
2130
- _self.sentRequest = cs4BaseData.sentRequest;
2131
- }
2132
- }
2133
- PageViewPerformance.envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance";
2134
- PageViewPerformance.dataType = "PageviewPerformanceData";
2135
- return PageViewPerformance;
2136
- }());
2137
-
2138
- /*
2139
- * Application Insights JavaScript SDK - Common, 3.3.9
2140
- * Copyright (c) Microsoft and contributors. All rights reserved.
2141
- */
2142
-
2143
-
2144
- var Data = /** @class */ (function () {
2145
- /**
2146
- * Constructs a new instance of telemetry data.
2147
- */
2148
- function Data(baseType, data) {
2149
- /**
2150
- * The data contract for serializing this object.
2151
- */
2152
- this.aiDataContract = {
2153
- baseType: 1 /* FieldType.Required */,
2154
- baseData: 1 /* FieldType.Required */
2155
- };
2156
- this.baseType = baseType;
2157
- this.baseData = data;
2158
- }
2159
- return Data;
2160
- }());
2161
-
2162
- /*
2163
- * Application Insights JavaScript SDK - Common, 3.3.9
2164
- * Copyright (c) Microsoft and contributors. All rights reserved.
2165
- */
2166
-
2167
- function _aiNameFunc(baseName) {
2168
- var aiName = "ai." + baseName + ".";
2169
- return function (name) {
2170
- return aiName + name;
2171
- };
2172
- }
2173
- var _aiApplication = _aiNameFunc("application");
2174
- var _aiDevice = _aiNameFunc("device");
2175
- var _aiLocation = _aiNameFunc("location");
2176
- var _aiOperation = _aiNameFunc("operation");
2177
- var _aiSession = _aiNameFunc("session");
2178
- var _aiUser = _aiNameFunc("user");
2179
- var _aiCloud = _aiNameFunc("cloud");
2180
- var _aiInternal = _aiNameFunc("internal");
2181
- var ContextTagKeys = /** @class */ (function (_super) {
2182
- __extendsFn(ContextTagKeys, _super);
2183
- function ContextTagKeys() {
2184
- return _super.call(this) || this;
2185
- }
2186
- return ContextTagKeys;
2187
- }(createClassFromInterface({
2188
- applicationVersion: _aiApplication("ver"),
2189
- applicationBuild: _aiApplication("build"),
2190
- applicationTypeId: _aiApplication("typeId"),
2191
- applicationId: _aiApplication("applicationId"),
2192
- applicationLayer: _aiApplication("layer"),
2193
- deviceId: _aiDevice("id"),
2194
- deviceIp: _aiDevice("ip"),
2195
- deviceLanguage: _aiDevice("language"),
2196
- deviceLocale: _aiDevice("locale"),
2197
- deviceModel: _aiDevice("model"),
2198
- deviceFriendlyName: _aiDevice("friendlyName"),
2199
- deviceNetwork: _aiDevice("network"),
2200
- deviceNetworkName: _aiDevice("networkName"),
2201
- deviceOEMName: _aiDevice("oemName"),
2202
- deviceOS: _aiDevice("os"),
2203
- deviceOSVersion: _aiDevice("osVersion"),
2204
- deviceRoleInstance: _aiDevice("roleInstance"),
2205
- deviceRoleName: _aiDevice("roleName"),
2206
- deviceScreenResolution: _aiDevice("screenResolution"),
2207
- deviceType: _aiDevice("type"),
2208
- deviceMachineName: _aiDevice("machineName"),
2209
- deviceVMName: _aiDevice("vmName"),
2210
- deviceBrowser: _aiDevice("browser"),
2211
- deviceBrowserVersion: _aiDevice("browserVersion"),
2212
- locationIp: _aiLocation("ip"),
2213
- locationCountry: _aiLocation("country"),
2214
- locationProvince: _aiLocation("province"),
2215
- locationCity: _aiLocation("city"),
2216
- operationId: _aiOperation("id"),
2217
- operationName: _aiOperation("name"),
2218
- operationParentId: _aiOperation("parentId"),
2219
- operationRootId: _aiOperation("rootId"),
2220
- operationSyntheticSource: _aiOperation("syntheticSource"),
2221
- operationCorrelationVector: _aiOperation("correlationVector"),
2222
- sessionId: _aiSession("id"),
2223
- sessionIsFirst: _aiSession("isFirst"),
2224
- sessionIsNew: _aiSession("isNew"),
2225
- userAccountAcquisitionDate: _aiUser("accountAcquisitionDate"),
2226
- userAccountId: _aiUser("accountId"),
2227
- userAgent: _aiUser("userAgent"),
2228
- userId: _aiUser("id"),
2229
- userStoreRegion: _aiUser("storeRegion"),
2230
- userAuthUserId: _aiUser("authUserId"),
2231
- userAnonymousUserAcquisitionDate: _aiUser("anonUserAcquisitionDate"),
2232
- userAuthenticatedUserAcquisitionDate: _aiUser("authUserAcquisitionDate"),
2233
- cloudName: _aiCloud("name"),
2234
- cloudRole: _aiCloud("role"),
2235
- cloudRoleVer: _aiCloud("roleVer"),
2236
- cloudRoleInstance: _aiCloud("roleInstance"),
2237
- cloudEnvironment: _aiCloud("environment"),
2238
- cloudLocation: _aiCloud("location"),
2239
- cloudDeploymentUnit: _aiCloud("deploymentUnit"),
2240
- internalNodeName: _aiInternal("nodeName"),
2241
- internalSdkVersion: _aiInternal("sdkVersion"),
2242
- internalAgentVersion: _aiInternal("agentVersion"),
2243
- internalSnippet: _aiInternal("snippet"),
2244
- internalSdkSrc: _aiInternal("sdkSrc")
2245
- })));
2246
-
2247
- /*
2248
- * Application Insights JavaScript SDK - Common, 3.3.9
2249
- * Copyright (c) Microsoft and contributors. All rights reserved.
2250
- */
2251
-
2252
- /**
2253
- * Create a telemetry item that the 1DS channel understands
2254
- * @param item - domain specific properties; part B
2255
- * @param baseType - telemetry item type. ie PageViewData
2256
- * @param envelopeName - Name of the envelope, e.g., `Microsoft.ApplicationInsights.\<instrumentation key\>.PageView`.
2257
- * @param customProperties - user defined custom properties; part C
2258
- * @param systemProperties - system properties that are added to the context; part A
2259
- * @returns ITelemetryItem that is sent to channel
2260
- */
2261
- function createTelemetryItem(item, baseType, envelopeName, logger, customProperties, systemProperties) {
2262
- envelopeName = dataSanitizeString(logger, envelopeName) || strNotSpecified;
2263
- if (isNullOrUndefined(item) ||
2264
- isNullOrUndefined(baseType) ||
2265
- isNullOrUndefined(envelopeName)) {
2266
- throwError("Input doesn't contain all required fields");
2267
- }
2268
- var iKey = "";
2269
- if (item[strIkey]) {
2270
- iKey = item[strIkey];
2271
- delete item[strIkey];
2272
- }
2273
- var telemetryItem = {
2274
- name: envelopeName,
2275
- time: toISOString(new Date()),
2276
- iKey: iKey,
2277
- ext: systemProperties ? systemProperties : {},
2278
- tags: [],
2279
- data: {},
2280
- baseType: baseType,
2281
- baseData: item // Part B
2282
- };
2283
- // Part C
2284
- if (!isNullOrUndefined(customProperties)) {
2285
- objForEachKey(customProperties, function (prop, value) {
2286
- telemetryItem.data[prop] = value;
2287
- });
2288
- }
2289
- return telemetryItem;
2290
- }
2291
-
2292
- /*
2293
- * Application Insights JavaScript SDK - Common, 3.3.9
2294
- * Copyright (c) Microsoft and contributors. All rights reserved.
2295
- */
2296
- var Extensions = {
2297
- UserExt: "user",
2298
- DeviceExt: "device",
2299
- TraceExt: "trace",
2300
- WebExt: "web",
2301
- AppExt: "app",
2302
- OSExt: "os"};
2303
- var CtxTagKeys = new ContextTagKeys();
2304
-
2305
- /*
2306
- * Application Insights JavaScript SDK - Common, 3.3.9
2307
- * Copyright (c) Microsoft and contributors. All rights reserved.
2308
- */
2309
-
2310
- function createDomEvent(eventName) {
2311
- var event = null;
2312
- if (isFunction(Event)) { // Use Event constructor when available
2313
- event = new Event(eventName);
2314
- }
2315
- else { // Event has no constructor in IE
2316
- var doc = getDocument();
2317
- if (doc && doc.createEvent) {
2318
- event = doc.createEvent("Event");
2319
- event.initEvent(eventName, true, true);
2320
- }
2321
- }
2322
- return event;
2323
- }
2324
-
2325
- /*
2326
- * Application Insights JavaScript SDK - Common, 3.3.9
2327
- * Copyright (c) Microsoft and contributors. All rights reserved.
2328
- */
2329
- function _disableEvents(target, evtNamespace) {
2330
- eventOff(target, null, null, evtNamespace);
2331
- }
2332
- /**
2333
- * Create a new OfflineListener instance to monitor browser online / offline events
2334
- * @param parentEvtNamespace - The parent event namespace to append to any specific events for this instance
2335
- */
2336
- function createOfflineListener(parentEvtNamespace) {
2337
- var _document = getDocument();
2338
- var _navigator = getNavigator(); // Gets the window.navigator or workerNavigator depending on the global
2339
- var _isListening = false;
2340
- var listenerList = [];
2341
- // Set the initial state
2342
- // rState is changed by the browser, both via events and when we check the navigator.onLine property
2343
- var rState = 1 /* eOfflineValue.Online */;
2344
- if (_navigator && !isNullOrUndefined(_navigator.onLine) && !_navigator.onLine) { // navigator.onLine is undefined in react-native
2345
- rState = 2 /* eOfflineValue.Offline */;
2346
- }
2347
- // ustate is changed by the user calling setOnlineState
2348
- var uState = 0 /* eOfflineValue.Unknown */;
2349
- // current state would be updated each time rState or uState is changed
2350
- // it is a resolved value of rState and uState
2351
- var _currentState = calCurrentState();
2352
- var _evtNamespace = mergeEvtNamespace(createUniqueNamespace("OfflineListener"), parentEvtNamespace);
2353
- try {
2354
- if (_enableEvents(getWindow())) {
2355
- _isListening = true;
2356
- }
2357
- if (_document) {
2358
- // Also attach to the document.body or document
2359
- var target = _document.body || _document;
2360
- if (target.ononline) {
2361
- if (_enableEvents(target)) {
2362
- _isListening = true;
2363
- }
2364
- }
2365
- }
2366
- }
2367
- catch (e) {
2368
- // this makes react-native less angry
2369
- _isListening = false;
2370
- }
2371
- function _enableEvents(target) {
2372
- var enabled = false;
2373
- if (target) {
2374
- enabled = eventOn(target, "online", _setOnline, _evtNamespace);
2375
- if (enabled) {
2376
- eventOn(target, "offline", _setOffline, _evtNamespace);
2377
- }
2378
- }
2379
- return enabled;
2380
- }
2381
- function _isOnline() {
2382
- return _currentState;
2383
- }
2384
- function calCurrentState() {
2385
- if (uState === 2 /* eOfflineValue.Offline */ || rState === 2 /* eOfflineValue.Offline */) {
2386
- return false;
2387
- }
2388
- return true; // if both unknown, then we assume the network is good
2389
- }
2390
- function listnerNoticeCheck() {
2391
- // we were offline and are now online or we were online and now offline
2392
- var newState = calCurrentState();
2393
- if (_currentState !== newState) {
2394
- _currentState = newState; // use the resolved state to update
2395
- // send all the callbacks with the current state
2396
- arrForEach(listenerList, function (callback) {
2397
- var offlineState = {
2398
- isOnline: _currentState,
2399
- rState: rState,
2400
- uState: uState
2401
- };
2402
- try {
2403
- callback(offlineState);
2404
- }
2405
- catch (e) {
2406
- // Do nothing, just making sure we run all of the callbacks
2407
- }
2408
- });
2409
- }
2410
- }
2411
- function setOnlineState(newState) {
2412
- uState = newState;
2413
- listnerNoticeCheck();
2414
- }
2415
- function _setOnline() {
2416
- rState = 1 /* eOfflineValue.Online */;
2417
- listnerNoticeCheck();
2418
- }
2419
- function _setOffline() {
2420
- rState = 2 /* eOfflineValue.Offline */;
2421
- listnerNoticeCheck();
2422
- }
2423
- function _unload() {
2424
- var win = getWindow();
2425
- if (win && _isListening) {
2426
- _disableEvents(win, _evtNamespace);
2427
- if (_document) {
2428
- // Also attach to the document.body or document
2429
- var target = _document.body || _document;
2430
- if (!isUndefined(target.ononline)) {
2431
- _disableEvents(target, _evtNamespace);
2432
- }
2433
- }
2434
- _isListening = false;
2435
- }
2436
- }
2437
- function addListener(callback) {
2438
- listenerList.push(callback);
2439
- // Define rm as an instance of IUnloadHook
2440
- return {
2441
- rm: function () {
2442
- var index = listenerList.indexOf(callback);
2443
- if (index > -1) {
2444
- return listenerList.splice(index, 1);
2445
- }
2446
- else {
2447
- return;
2448
- }
2449
- }
2450
- };
2451
- }
2452
- return {
2453
- isOnline: _isOnline,
2454
- isListening: function () { return _isListening; },
2455
- unload: _unload,
2456
- addListener: addListener,
2457
- setOnlineState: setOnlineState
2458
- };
2459
- }
2460
-
2461
- /*
2462
- * Application Insights JavaScript SDK - Common, 3.3.9
2463
- * Copyright (c) Microsoft and contributors. All rights reserved.
2464
- */
2465
-
2466
- var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
2467
- var BreezeChannelIdentifier = "AppInsightsChannelPlugin";
2468
- var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
2469
-
2470
- export { AnalyticsPluginIdentifier as A, BreezeChannelIdentifier as B, CtxTagKeys as C, DisabledPropertyName as D, Event$1 as E, DEFAULT_BREEZE_PATH as F, urlGetAbsoluteUrl as G, HttpMethod as H, dataSanitizeUrl as I, urlGetCompleteUrl as J, Extensions as K, correlationIdCanIncludeCorrelationHeader as L, Metric as M, dateTimeUtilsNow as N, correlationIdGetCorrelationContext as O, PageView as P, utlGetLocalStorage as Q, RemoteDependencyData as R, SampleRate as S, Trace as T, utlCanUseLocalStorage as U, utlSetLocalStorage as V, utlRemoveStorage as W, parseConnectionString as X, ThrottleMgr as Y, utlGetSessionStorage as a, utlSetSessionStorage as b, utlRemoveSessionStorage as c, dateTimeUtilsDuration as d, createTelemetryItem as e, PageViewPerformance as f, Exception as g, utlEnableStorage as h, isCrossOriginError as i, utlDisableStorage as j, utlSetStoragePrefix as k, createDomEvent as l, msToTimeSpan as m, dataSanitizeString as n, PropertiesPluginIdentifier as o, createDistributedTraceContextFromTrace as p, Envelope as q, Data as r, strNotSpecified as s, ContextTagKeys as t, utlCanUseSessionStorage as u, createOfflineListener as v, isInternalApplicationInsightsEndpoint as w, ProcessLegacy as x, RequestHeaders as y, DEFAULT_BREEZE_ENDPOINT as z };