@sap/cds-dk 10.1.2 → 10.2.0

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 (849) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/bin/add.js +7 -2
  3. package/bin/bind.js +0 -2
  4. package/bin/bindings.js +35 -0
  5. package/bin/build.js +11 -6
  6. package/bin/compile/index.js +1 -0
  7. package/bin/completion/index.js +10 -448
  8. package/bin/completion/scripts/cds.fish +24 -16
  9. package/bin/completion/scripts/cds.ps1 +26 -25
  10. package/bin/completion/scripts/cds.sh +22 -19
  11. package/bin/completion/scripts/cds.zsh +22 -19
  12. package/bin/deploy/index.js +1 -1
  13. package/bin/deploy/to-hana/hana.js +5 -4
  14. package/bin/env.js +0 -1
  15. package/bin/eval.js +9 -5
  16. package/bin/export.js +6 -4
  17. package/bin/help/export.md +28 -4
  18. package/bin/import.js +6 -5
  19. package/bin/inspect.js +0 -1
  20. package/bin/login.js +28 -3
  21. package/bin/repl.js +82 -26
  22. package/bin/run.js +6 -7
  23. package/bin/serve.js +6 -7
  24. package/bin/up.js +7 -2
  25. package/bin/upgrade/steps/install.js +6 -6
  26. package/bin/watch/index.js +1 -0
  27. package/lib/build/index.js +11 -7
  28. package/lib/build/plugins/featureToggles.js +2 -2
  29. package/lib/build/plugins/hana/index.js +1 -1
  30. package/lib/build/plugins/helm/files/subcharts/web-application/Chart.yaml +1 -1
  31. package/lib/build/plugins/helm/files/subcharts/web-application/templates/_helpers.tpl +7 -0
  32. package/lib/build/plugins/helm/files/subcharts/web-application/templates/api-rule.yaml +1 -0
  33. package/lib/build/plugins/helm/files/subcharts/web-application/templates/service-binding.yaml +4 -4
  34. package/lib/build/plugins/helm/files/subcharts/web-application/values.schema.json +13 -0
  35. package/lib/build/plugins/helm/files/subcharts/web-application/values.yaml +7 -1
  36. package/lib/build/plugins/java/index.js +5 -1
  37. package/lib/build/plugins/nodejs/index.js +5 -1
  38. package/lib/build/util.js +4 -5
  39. package/lib/env/schemas/cds-rc.js +5 -0
  40. package/lib/import/importapi.js +2 -3
  41. package/lib/init/constants.js +1 -1
  42. package/lib/init/index.js +8 -3
  43. package/lib/init/plugin.js +1 -1
  44. package/lib/init/projectReader.js +13 -10
  45. package/lib/init/registries/mta.js +0 -6
  46. package/lib/init/template/ai/index.js +4 -4
  47. package/lib/init/template/ams/files/extensionDeveloper.dcl +6 -0
  48. package/lib/init/template/ams/files/mta.yaml.hbs +6 -0
  49. package/lib/init/template/ams/files/sidecar.package.json.hbs +5 -0
  50. package/lib/init/template/ams/index.js +42 -40
  51. package/lib/init/template/app-frontend/files/mta.yaml.hbs +2 -0
  52. package/lib/init/template/app-frontend/files/ui5.yaml.hbs +0 -4
  53. package/lib/init/template/app-frontend/index.js +29 -24
  54. package/lib/init/template/application-logging/index.js +6 -6
  55. package/lib/init/template/approuter/files/xs-app.json.hbs +22 -0
  56. package/lib/init/template/approuter/index.js +20 -13
  57. package/lib/init/template/attachments/index.js +3 -3
  58. package/lib/init/template/audit-logging/index.js +4 -4
  59. package/lib/init/template/cloud-logging/index.js +12 -6
  60. package/lib/init/template/completion/completionSetup.js +19 -6
  61. package/lib/init/template/connectivity/index.js +3 -3
  62. package/lib/init/template/data/as-csv.js +7 -4
  63. package/lib/init/template/data/as-json.js +77 -20
  64. package/lib/init/template/destination/index.js +12 -9
  65. package/lib/init/template/dynatrace/index.js +5 -5
  66. package/lib/init/template/enterprise-messaging/index.js +6 -6
  67. package/lib/init/template/enterprise-messaging-shared/index.js +4 -4
  68. package/lib/init/template/extensibility/index.js +2 -2
  69. package/lib/init/template/extension/index.js +26 -0
  70. package/lib/init/template/github-actions/index.js +3 -3
  71. package/lib/init/template/hana/files/package.json.hbs +3 -2
  72. package/lib/init/template/hana/index.js +5 -5
  73. package/lib/init/template/hana-serverless/index.js +3 -3
  74. package/lib/init/template/html5-repo/files/mta.yaml.hbs +2 -0
  75. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +0 -4
  76. package/lib/init/template/html5-repo/index.js +68 -40
  77. package/lib/init/template/http/index.js +1 -1
  78. package/lib/init/template/ias/index.js +7 -7
  79. package/lib/init/template/initial/files/.gitignore.hbs +1 -0
  80. package/lib/init/template/kafka/index.js +3 -3
  81. package/lib/init/template/kyma/index.js +7 -9
  82. package/lib/init/template/malware-scanner/index.js +3 -3
  83. package/lib/init/template/mta/index.js +6 -3
  84. package/lib/init/template/multitenancy/index.js +6 -7
  85. package/lib/init/template/notifications/index.js +2 -2
  86. package/lib/init/template/portal/index.js +16 -10
  87. package/lib/init/template/postgres/index.js +5 -5
  88. package/lib/init/template/react/files/index.html.hbs +1 -1
  89. package/lib/init/template/react/files/package.json.hbs +3 -2
  90. package/lib/init/template/react/files/src/{App.jsx.hbs → App.{{jsxExtension}}.hbs} +8 -2
  91. package/lib/init/template/react/files/src/{main.jsx → main.{{jsxExtension}}.hbs} +2 -2
  92. package/lib/init/template/react/index.js +23 -4
  93. package/lib/init/template/react/typescript/src/vite-env.d.ts +1 -0
  94. package/lib/init/template/react/typescript/tsconfig.json.hbs +16 -0
  95. package/lib/init/template/redis/index.js +2 -2
  96. package/lib/init/template/side-by-side-extensibility/index.js +6 -3
  97. package/lib/init/template/typescript/files/tsconfig.json +3 -1
  98. package/lib/init/template/vue/files/index.html.hbs +1 -1
  99. package/lib/init/template/vue/files/package.json.hbs +2 -1
  100. package/lib/init/template/vue/files/src/App.vue.hbs +8 -2
  101. package/lib/init/template/vue/index.js +20 -4
  102. package/lib/init/template/vue/typescript/tsconfig.json +11 -0
  103. package/lib/init/template/workzone-standard/files/mta.yaml.hbs +2 -2
  104. package/lib/init/template/workzone-standard/index.js +29 -27
  105. package/lib/init/template/xsuaa/files/mta.yaml.hbs +1 -1
  106. package/lib/init/template/xsuaa/files/values.yaml.hbs +1 -1
  107. package/lib/init/template/xsuaa/index.js +34 -22
  108. package/lib/mtx/auth_manager.js +8 -2
  109. package/lib/mtx/browser_login.js +181 -0
  110. package/lib/mtx/params.js +6 -0
  111. package/lib/mtx/settings_manager.js +29 -4
  112. package/lib/util/cf.js +44 -8
  113. package/lib/util/fs.js +2 -2
  114. package/node_modules/@cap-js/db-service/CHANGELOG.md +10 -0
  115. package/node_modules/@cap-js/db-service/lib/cqn2pql.js +4 -0
  116. package/node_modules/@cap-js/db-service/lib/cqn2sql.js +3 -0
  117. package/node_modules/@cap-js/db-service/lib/cqn4sql.js +8 -23
  118. package/node_modules/@cap-js/db-service/lib/infer/index.js +20 -27
  119. package/node_modules/@cap-js/db-service/package.json +1 -1
  120. package/node_modules/@cap-js/openapi/cds-plugin.js +12 -0
  121. package/node_modules/@cap-js/openapi/index.js +3 -1
  122. package/node_modules/@cap-js/openapi/lib/compile/csdl2openapi.js +652 -413
  123. package/node_modules/@cap-js/openapi/lib/compile/diagram.js +16 -13
  124. package/node_modules/@cap-js/openapi/lib/compile/index.js +10 -7
  125. package/node_modules/@cap-js/openapi/lib/compile/property-util.js +51 -0
  126. package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/importOpenAPI.js +12 -9
  127. package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/index.js +4 -3
  128. package/node_modules/@cap-js/openapi/package.json +71 -3
  129. package/node_modules/@cap-js/sqlite/CHANGELOG.md +9 -0
  130. package/node_modules/@cap-js/sqlite/package.json +3 -3
  131. package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
  132. package/node_modules/@isaacs/fs-minipass/README.md +71 -0
  133. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
  134. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
  135. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
  136. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
  137. package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
  138. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
  139. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
  140. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
  141. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
  142. package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
  143. package/node_modules/@isaacs/fs-minipass/package.json +72 -0
  144. package/node_modules/@sap/cds/CHANGELOG.md +52 -1
  145. package/node_modules/@sap/cds/_i18n/messages_ar.properties +1 -0
  146. package/node_modules/@sap/cds/_i18n/messages_bg.properties +1 -0
  147. package/node_modules/@sap/cds/_i18n/messages_cs.properties +1 -0
  148. package/node_modules/@sap/cds/_i18n/messages_da.properties +1 -0
  149. package/node_modules/@sap/cds/_i18n/messages_de.properties +1 -0
  150. package/node_modules/@sap/cds/_i18n/messages_el.properties +1 -0
  151. package/node_modules/@sap/cds/_i18n/messages_en.properties +1 -0
  152. package/node_modules/@sap/cds/_i18n/messages_es.properties +1 -0
  153. package/node_modules/@sap/cds/_i18n/messages_es_MX.properties +1 -0
  154. package/node_modules/@sap/cds/_i18n/messages_fi.properties +1 -0
  155. package/node_modules/@sap/cds/_i18n/messages_fr.properties +1 -0
  156. package/node_modules/@sap/cds/_i18n/messages_he.properties +1 -0
  157. package/node_modules/@sap/cds/_i18n/messages_hr.properties +1 -0
  158. package/node_modules/@sap/cds/_i18n/messages_hu.properties +1 -0
  159. package/node_modules/@sap/cds/_i18n/messages_it.properties +1 -0
  160. package/node_modules/@sap/cds/_i18n/messages_ja.properties +1 -0
  161. package/node_modules/@sap/cds/_i18n/messages_kk.properties +1 -0
  162. package/node_modules/@sap/cds/_i18n/messages_ko.properties +1 -0
  163. package/node_modules/@sap/cds/_i18n/messages_ms.properties +1 -0
  164. package/node_modules/@sap/cds/_i18n/messages_nl.properties +1 -0
  165. package/node_modules/@sap/cds/_i18n/messages_no.properties +1 -0
  166. package/node_modules/@sap/cds/_i18n/messages_pl.properties +1 -0
  167. package/node_modules/@sap/cds/_i18n/messages_pt.properties +1 -0
  168. package/node_modules/@sap/cds/_i18n/messages_ro.properties +1 -0
  169. package/node_modules/@sap/cds/_i18n/messages_ru.properties +1 -0
  170. package/node_modules/@sap/cds/_i18n/messages_sh.properties +1 -0
  171. package/node_modules/@sap/cds/_i18n/messages_sk.properties +1 -0
  172. package/node_modules/@sap/cds/_i18n/messages_sl.properties +1 -0
  173. package/node_modules/@sap/cds/_i18n/messages_sv.properties +1 -0
  174. package/node_modules/@sap/cds/_i18n/messages_th.properties +1 -0
  175. package/node_modules/@sap/cds/_i18n/messages_tr.properties +1 -0
  176. package/node_modules/@sap/cds/_i18n/messages_uk.properties +1 -0
  177. package/node_modules/@sap/cds/_i18n/messages_vi.properties +1 -0
  178. package/node_modules/@sap/cds/_i18n/messages_zh_CN.properties +1 -0
  179. package/node_modules/@sap/cds/_i18n/messages_zh_TW.properties +1 -0
  180. package/node_modules/@sap/cds/app/index-client.js +164 -0
  181. package/node_modules/@sap/cds/app/index.css +598 -87
  182. package/node_modules/@sap/cds/app/index.html +54 -30
  183. package/node_modules/@sap/cds/app/index.js +311 -67
  184. package/node_modules/@sap/cds/app/table.html +226 -0
  185. package/node_modules/@sap/cds/app/table.js +302 -0
  186. package/node_modules/@sap/cds/bin/serve.js +3 -2
  187. package/node_modules/@sap/cds/eslint.config.mjs +2 -0
  188. package/node_modules/@sap/cds/lib/compile/cdsc.js +7 -0
  189. package/node_modules/@sap/cds/lib/compile/for/embeddings.js +27 -0
  190. package/node_modules/@sap/cds/lib/compile/load.js +2 -2
  191. package/node_modules/@sap/cds/lib/compile/minify.js +17 -4
  192. package/node_modules/@sap/cds/lib/compile/parse.js +3 -0
  193. package/node_modules/@sap/cds/lib/compile/resolve.js +16 -14
  194. package/node_modules/@sap/cds/lib/core/classes.js +1 -0
  195. package/node_modules/@sap/cds/lib/dbs/cds-deploy.js +4 -5
  196. package/node_modules/@sap/cds/lib/env/cds-env.js +132 -70
  197. package/node_modules/@sap/cds/lib/env/cds-requires/auth-strategies.js +62 -0
  198. package/node_modules/@sap/cds/lib/env/cds-requires/databases.js +49 -0
  199. package/node_modules/@sap/cds/lib/env/cds-requires/embeddings.js +8 -0
  200. package/node_modules/@sap/cds/lib/env/cds-requires/index.js +27 -0
  201. package/node_modules/@sap/cds/lib/env/cds-requires/messaging.js +82 -0
  202. package/node_modules/@sap/cds/lib/env/cds-requires/platform.js +23 -0
  203. package/node_modules/@sap/cds/lib/env/cds-requires/queues.js +34 -0
  204. package/node_modules/@sap/cds/lib/env/cds-requires/services.js +32 -0
  205. package/node_modules/@sap/cds/lib/env/defaults.js +9 -1
  206. package/node_modules/@sap/cds/lib/i18n/files.js +4 -4
  207. package/node_modules/@sap/cds/lib/i18n/locale.js +1 -1
  208. package/node_modules/@sap/cds/lib/index.js +9 -9
  209. package/node_modules/@sap/cds/lib/log/cds-log.js +3 -3
  210. package/node_modules/@sap/cds/lib/ql/SELECT.js +2 -0
  211. package/node_modules/@sap/cds/lib/ql/UPDATE.js +1 -1
  212. package/node_modules/@sap/cds/lib/ql/cds.ql-Query.js +4 -1
  213. package/node_modules/@sap/cds/lib/ql/core/@types/cqn.d.ts +146 -0
  214. package/node_modules/@sap/cds/lib/ql/core/@types/exprs.d.ts +51 -0
  215. package/node_modules/@sap/cds/lib/ql/core/@types/index.d.ts +29 -0
  216. package/node_modules/@sap/cds/lib/ql/core/@types/package.json +7 -0
  217. package/node_modules/@sap/cds/lib/ql/core/@types/ql/delete.d.ts +8 -0
  218. package/node_modules/@sap/cds/lib/ql/core/@types/ql/insert.d.ts +19 -0
  219. package/node_modules/@sap/cds/lib/ql/core/@types/ql/select.d.ts +24 -0
  220. package/node_modules/@sap/cds/lib/ql/core/@types/ql/update.d.ts +10 -0
  221. package/node_modules/@sap/cds/lib/ql/core/@types/query.d.ts +18 -0
  222. package/node_modules/@sap/cds/lib/ql/core/cql/parser.min.js +1 -0
  223. package/node_modules/@sap/cds/lib/ql/core/lib/index.js +69 -0
  224. package/node_modules/@sap/cds/lib/ql/core/lib/ql/cache.js +34 -0
  225. package/node_modules/@sap/cds/lib/ql/core/lib/ql/call-action.js +6 -0
  226. package/node_modules/@sap/cds/lib/ql/core/lib/ql/delete.js +8 -0
  227. package/node_modules/@sap/cds/lib/ql/core/lib/ql/insert.js +26 -0
  228. package/node_modules/@sap/cds/lib/ql/core/lib/ql/select.js +22 -0
  229. package/node_modules/@sap/cds/lib/ql/core/lib/ql/update.js +26 -0
  230. package/node_modules/@sap/cds/lib/ql/core/lib/query.js +85 -0
  231. package/node_modules/@sap/cds/lib/ql/core/lib/xl/fluent.js +47 -0
  232. package/node_modules/@sap/cds/lib/ql/core/lib/xl/ttl.js +24 -0
  233. package/node_modules/@sap/cds/lib/ql/core/license +201 -0
  234. package/node_modules/@sap/cds/lib/ql/core/package.json +24 -0
  235. package/node_modules/@sap/cds/lib/ql/core/readme.md +99 -0
  236. package/node_modules/@sap/cds/lib/ql/core/upstream.json +5 -0
  237. package/node_modules/@sap/cds/lib/req/spawn.js +1 -1
  238. package/node_modules/@sap/cds/lib/srv/bindings.js +111 -115
  239. package/node_modules/@sap/cds/lib/srv/cds-connect.js +11 -10
  240. package/node_modules/@sap/cds/lib/srv/cds-serve.js +16 -7
  241. package/node_modules/@sap/cds/lib/srv/cds.Service.js +13 -7
  242. package/node_modules/@sap/cds/lib/srv/factory.js +8 -10
  243. package/node_modules/@sap/cds/lib/srv/middlewares/auth/ias-auth.js +35 -32
  244. package/node_modules/@sap/cds/lib/srv/middlewares/auth/jwt-auth.js +5 -1
  245. package/node_modules/@sap/cds/lib/srv/middlewares/auth/mocked-users.js +1 -1
  246. package/node_modules/@sap/cds/lib/srv/protocols/hcql.js +230 -79
  247. package/node_modules/@sap/cds/lib/srv/protocols/http.js +7 -3
  248. package/node_modules/@sap/cds/lib/srv/protocols/index.js +7 -2
  249. package/node_modules/@sap/cds/lib/srv/srv-dispatch.js +2 -2
  250. package/node_modules/@sap/cds/lib/utils/cds-utils.js +37 -0
  251. package/node_modules/@sap/cds/lib/utils/csv-reader.js +2 -2
  252. package/node_modules/@sap/cds/libx/_runtime/common/generic/assert.js +18 -27
  253. package/node_modules/@sap/cds/libx/_runtime/common/generic/crud.js +1 -1
  254. package/node_modules/@sap/cds/libx/_runtime/common/utils/rewriteAsterisks.js +1 -1
  255. package/node_modules/@sap/cds/libx/_runtime/fiori/lean-draft.js +121 -84
  256. package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/authorizedRequest.js +24 -1
  257. package/node_modules/@sap/cds/libx/_runtime/remote/Service.js +2 -2
  258. package/node_modules/@sap/cds/libx/_runtime/remote/utils/client.js +3 -2
  259. package/node_modules/@sap/cds/libx/_runtime/remote/utils/query.js +11 -6
  260. package/node_modules/@sap/cds/libx/odata/middleware/create.js +4 -0
  261. package/node_modules/@sap/cds/libx/odata/middleware/metadata.js +1 -1
  262. package/node_modules/@sap/cds/libx/odata/middleware/operation.js +3 -0
  263. package/node_modules/@sap/cds/libx/odata/middleware/parse.js +9 -0
  264. package/node_modules/@sap/cds/libx/odata/middleware/read.js +6 -0
  265. package/node_modules/@sap/cds/libx/odata/middleware/update.js +5 -1
  266. package/node_modules/@sap/cds/libx/odata/parse/afterburner.js +3 -3
  267. package/node_modules/@sap/cds/libx/odata/parse/multipartToJson.js +1 -1
  268. package/node_modules/@sap/cds/libx/odata/utils/ieee754.js +20 -0
  269. package/node_modules/@sap/cds/libx/queue/api.js +1 -1
  270. package/node_modules/@sap/cds/libx/queue/index.js +3 -1
  271. package/node_modules/@sap/cds/libx/queue/processing.js +5 -0
  272. package/node_modules/@sap/cds/libx/rest/RestAdapter.js +1 -0
  273. package/node_modules/@sap/cds/package.json +2 -2
  274. package/node_modules/@sap/cds/server.js +1 -0
  275. package/node_modules/@sap/cds/srv/ucl-service.cds +1 -0
  276. package/node_modules/@sap/cds-compiler/CHANGELOG.md +83 -0
  277. package/node_modules/@sap/cds-compiler/bin/cdsse.js +1 -1
  278. package/node_modules/@sap/cds-compiler/doc/EffectiveCSN.md +3314 -0
  279. package/node_modules/@sap/cds-compiler/lib/api/main.js +9 -6
  280. package/node_modules/@sap/cds-compiler/lib/api/options.js +3 -3
  281. package/node_modules/@sap/cds-compiler/lib/{model → base}/csnUtils.js +5 -5
  282. package/node_modules/@sap/cds-compiler/lib/base/message-registry.js +54 -6
  283. package/node_modules/@sap/cds-compiler/lib/base/optionProcessor.js +4 -4
  284. package/node_modules/@sap/cds-compiler/lib/{model → base}/sortViews.js +1 -1
  285. package/node_modules/@sap/cds-compiler/lib/checks/assocOutsideService.js +1 -1
  286. package/node_modules/@sap/cds-compiler/lib/checks/checkForTypes.js +1 -1
  287. package/node_modules/@sap/cds-compiler/lib/checks/checkPathsInStoredCalcElement.js +1 -1
  288. package/node_modules/@sap/cds-compiler/lib/checks/elements.js +37 -3
  289. package/node_modules/@sap/cds-compiler/lib/checks/enricher.js +1 -1
  290. package/node_modules/@sap/cds-compiler/lib/checks/existsInForbiddenPlaces.js +1 -1
  291. package/node_modules/@sap/cds-compiler/lib/checks/hasPersistedElements.js +1 -1
  292. package/node_modules/@sap/cds-compiler/lib/checks/manyExpand.js +1 -1
  293. package/node_modules/@sap/cds-compiler/lib/checks/manyNavigations.js +1 -1
  294. package/node_modules/@sap/cds-compiler/lib/checks/onConditions.js +1 -1
  295. package/node_modules/@sap/cds-compiler/lib/checks/parameters.js +1 -1
  296. package/node_modules/@sap/cds-compiler/lib/checks/queryNoDbArtifacts.js +1 -1
  297. package/node_modules/@sap/cds-compiler/lib/checks/selectItems.js +1 -1
  298. package/node_modules/@sap/cds-compiler/lib/checks/structuredAnnoExpressions.js +1 -1
  299. package/node_modules/@sap/cds-compiler/lib/checks/typeParameters.js +1 -1
  300. package/node_modules/@sap/cds-compiler/lib/checks/types.js +1 -1
  301. package/node_modules/@sap/cds-compiler/lib/checks/validator.js +1 -1
  302. package/node_modules/@sap/cds-compiler/lib/compiler/assert-consistency.js +20 -12
  303. package/node_modules/@sap/cds-compiler/lib/compiler/builtins.js +9 -4
  304. package/node_modules/@sap/cds-compiler/lib/compiler/checks.js +50 -0
  305. package/node_modules/@sap/cds-compiler/lib/compiler/define.js +303 -323
  306. package/node_modules/@sap/cds-compiler/lib/compiler/dictionaries.js +5 -0
  307. package/node_modules/@sap/cds-compiler/lib/compiler/extend.js +1015 -1177
  308. package/node_modules/@sap/cds-compiler/lib/compiler/generate.js +55 -42
  309. package/node_modules/@sap/cds-compiler/lib/compiler/populate.js +74 -45
  310. package/node_modules/@sap/cds-compiler/lib/compiler/propagator.js +1 -0
  311. package/node_modules/@sap/cds-compiler/lib/compiler/resolve.js +6 -4
  312. package/node_modules/@sap/cds-compiler/lib/compiler/shared.js +30 -49
  313. package/node_modules/@sap/cds-compiler/lib/compiler/utils.js +32 -18
  314. package/node_modules/@sap/cds-compiler/lib/edm/annotations/edmJson.js +3 -3
  315. package/node_modules/@sap/cds-compiler/lib/edm/annotations/genericTranslation.js +2 -2
  316. package/node_modules/@sap/cds-compiler/lib/edm/annotations/preprocessAnnotations.js +2 -3
  317. package/node_modules/@sap/cds-compiler/lib/edm/csn2edm.js +1 -1
  318. package/node_modules/@sap/cds-compiler/lib/edm/edm.js +6 -7
  319. package/node_modules/@sap/cds-compiler/lib/edm/edmAnnoPreprocessor.js +1 -1
  320. package/node_modules/@sap/cds-compiler/lib/edm/edmInboundChecks.js +1 -1
  321. package/node_modules/@sap/cds-compiler/lib/edm/edmPreprocessor.js +1 -1
  322. package/node_modules/@sap/cds-compiler/lib/edm/edmUtils.js +12 -7
  323. package/node_modules/@sap/cds-compiler/lib/gen/CdlGrammar.checksum +1 -1
  324. package/node_modules/@sap/cds-compiler/lib/gen/CdlParser.js +15 -15
  325. package/node_modules/@sap/cds-compiler/lib/gen/Dictionary.json +7 -0
  326. package/node_modules/@sap/cds-compiler/lib/json/from-csn.js +30 -30
  327. package/node_modules/@sap/cds-compiler/lib/json/to-csn.js +2 -1
  328. package/node_modules/@sap/cds-compiler/lib/main.js +4 -1
  329. package/node_modules/@sap/cds-compiler/lib/parsers/AstBuildingParser.js +42 -15
  330. package/node_modules/@sap/cds-compiler/lib/render/DuplicateChecker.js +37 -11
  331. package/node_modules/@sap/cds-compiler/lib/render/manageConstraints.js +1 -1
  332. package/node_modules/@sap/cds-compiler/lib/render/toCdl.js +11 -6
  333. package/node_modules/@sap/cds-compiler/lib/render/toRename.js +1 -1
  334. package/node_modules/@sap/cds-compiler/lib/render/toSql.js +74 -24
  335. package/node_modules/@sap/cds-compiler/lib/render/utils/common.js +1 -1
  336. package/node_modules/@sap/cds-compiler/lib/render/utils/operators.js +81 -0
  337. package/node_modules/@sap/cds-compiler/lib/render/utils/sql.js +17 -10
  338. package/node_modules/@sap/cds-compiler/lib/transform/db/assertUnique.js +1 -1
  339. package/node_modules/@sap/cds-compiler/lib/transform/db/associations.js +3 -4
  340. package/node_modules/@sap/cds-compiler/lib/transform/db/assocsToQueries/transformExists.js +1 -1
  341. package/node_modules/@sap/cds-compiler/lib/transform/db/backlinks.js +2 -2
  342. package/node_modules/@sap/cds-compiler/lib/transform/db/cdsPersistence.js +1 -1
  343. package/node_modules/@sap/cds-compiler/lib/transform/db/constraints.js +6 -5
  344. package/node_modules/@sap/cds-compiler/lib/transform/db/expansion.js +7 -1
  345. package/node_modules/@sap/cds-compiler/lib/transform/db/flattening.js +2 -2
  346. package/node_modules/@sap/cds-compiler/lib/{modelCompare/compare.js → transform/db/migration/diffModels.js} +5 -5
  347. package/node_modules/@sap/cds-compiler/lib/{modelCompare/utils/filter.js → transform/db/migration/filterDiff.js} +2 -2
  348. package/node_modules/@sap/cds-compiler/lib/transform/db/processSqlServices.js +1 -1
  349. package/node_modules/@sap/cds-compiler/lib/transform/db/rewriteCalculatedElements.js +1 -1
  350. package/node_modules/@sap/cds-compiler/lib/transform/db/temporal.js +1 -1
  351. package/node_modules/@sap/cds-compiler/lib/transform/db/views.js +2 -6
  352. package/node_modules/@sap/cds-compiler/lib/transform/draft/db.js +1 -1
  353. package/node_modules/@sap/cds-compiler/lib/transform/draft/odata.js +1 -1
  354. package/node_modules/@sap/cds-compiler/lib/transform/effective/annotations.js +1 -1
  355. package/node_modules/@sap/cds-compiler/lib/transform/effective/associations.js +1 -1
  356. package/node_modules/@sap/cds-compiler/lib/transform/effective/flattening.js +1 -1
  357. package/node_modules/@sap/cds-compiler/lib/transform/effective/main.js +3 -2
  358. package/node_modules/@sap/cds-compiler/lib/transform/effective/misc.js +2 -1
  359. package/node_modules/@sap/cds-compiler/lib/transform/effective/queries.js +1 -1
  360. package/node_modules/@sap/cds-compiler/lib/transform/effective/types.js +1 -1
  361. package/node_modules/@sap/cds-compiler/lib/transform/forOdata.js +1 -1
  362. package/node_modules/@sap/cds-compiler/lib/transform/forRelationalDB.js +9 -4
  363. package/node_modules/@sap/cds-compiler/lib/transform/localized.js +1 -1
  364. package/node_modules/@sap/cds-compiler/lib/transform/odata/adaptAnnotationRefs.js +5 -11
  365. package/node_modules/@sap/cds-compiler/lib/transform/odata/createForeignKeys.js +1 -1
  366. package/node_modules/@sap/cds-compiler/lib/transform/odata/flattening.js +4 -4
  367. package/node_modules/@sap/cds-compiler/lib/transform/odata/foreignKeyRefsInXprAnnos.js +5 -3
  368. package/node_modules/@sap/cds-compiler/lib/transform/odata/toFinalBaseType.js +29 -5
  369. package/node_modules/@sap/cds-compiler/lib/transform/odata/typesExposure.js +13 -3
  370. package/node_modules/@sap/cds-compiler/lib/transform/odata/utils.js +9 -0
  371. package/node_modules/@sap/cds-compiler/lib/transform/transformUtils.js +2 -2
  372. package/node_modules/@sap/cds-compiler/lib/transform/translateAssocsToJoins.js +1 -1
  373. package/node_modules/@sap/cds-compiler/lib/transform/tupleExpansion.js +1 -1
  374. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/coreComputed.js +1 -1
  375. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/universalCsnEnricher.js +1 -1
  376. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/utils.js +1 -1
  377. package/node_modules/@sap/cds-compiler/package.json +1 -1
  378. package/node_modules/@sap/cds-mtxs/CHANGELOG.md +47 -0
  379. package/node_modules/@sap/cds-mtxs/bin/cds-mtx-migrate.js +4 -6
  380. package/node_modules/@sap/cds-mtxs/bin/cds-mtx.js +5 -4
  381. package/node_modules/@sap/cds-mtxs/cds-plugin.js +38 -2
  382. package/node_modules/@sap/cds-mtxs/db/t0.cds +7 -0
  383. package/node_modules/@sap/cds-mtxs/lib/utils.js +129 -20
  384. package/node_modules/@sap/cds-mtxs/package.json +15 -14
  385. package/node_modules/@sap/cds-mtxs/srv/cf/abstract-provisioning-service.js +13 -12
  386. package/node_modules/@sap/cds-mtxs/srv/cf/saas-provisioning-service.cds +1 -0
  387. package/node_modules/@sap/cds-mtxs/srv/cf/sms-provisioning-service.cds +1 -0
  388. package/node_modules/@sap/cds-mtxs/srv/extensibility/compat/update.js +5 -2
  389. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/config.js +1 -2
  390. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/csv-allowlist.js +64 -0
  391. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/index.js +4 -2
  392. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/protected-namespace.js +67 -5
  393. package/node_modules/@sap/cds-mtxs/srv/extensibility-service.js +179 -15
  394. package/node_modules/@sap/cds-mtxs/srv/jobs-service.js +12 -3
  395. package/node_modules/@sap/cds-mtxs/srv/plugins/common.js +33 -12
  396. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/ctnr-mgr-base.js +24 -6
  397. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-ctnr-mgr.js +3 -1
  398. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-native.js +752 -0
  399. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/serverless.js +17 -20
  400. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr-v2.js +511 -0
  401. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr.js +11 -4
  402. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/tms.js +8 -0
  403. package/node_modules/@sap/cds-mtxs/srv/plugins/hana.js +27 -18
  404. package/node_modules/@sap/cds-mtxs/srv/worker/job-worker-pool.js +1 -1
  405. package/node_modules/@sap/cds-mtxs/srv/worker/job-worker.js +1 -1
  406. package/node_modules/chownr/LICENSE.md +63 -0
  407. package/node_modules/chownr/README.md +3 -0
  408. package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
  409. package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
  410. package/node_modules/chownr/dist/commonjs/index.js +93 -0
  411. package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
  412. package/node_modules/chownr/dist/commonjs/package.json +3 -0
  413. package/node_modules/chownr/dist/esm/index.d.ts +3 -0
  414. package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
  415. package/node_modules/chownr/dist/esm/index.js +85 -0
  416. package/node_modules/chownr/dist/esm/index.js.map +1 -0
  417. package/node_modules/chownr/dist/esm/package.json +3 -0
  418. package/node_modules/chownr/package.json +69 -0
  419. package/node_modules/content-disposition/README.md +105 -35
  420. package/node_modules/content-disposition/dist/index.d.ts +72 -0
  421. package/node_modules/content-disposition/dist/index.js +388 -0
  422. package/node_modules/content-disposition/dist/index.js.map +1 -0
  423. package/node_modules/content-disposition/package.json +31 -19
  424. package/node_modules/content-type/README.md +34 -57
  425. package/node_modules/content-type/package.json +35 -25
  426. package/node_modules/express/Readme.md +15 -9
  427. package/node_modules/express/lib/application.js +2 -2
  428. package/node_modules/express/lib/request.js +32 -19
  429. package/node_modules/express/lib/response.js +27 -30
  430. package/node_modules/express/package.json +10 -10
  431. package/node_modules/handlebars/bin/handlebars +1 -1
  432. package/node_modules/handlebars/dist/amd/handlebars/base.js +2 -2
  433. package/node_modules/handlebars/dist/amd/handlebars/compiler/base.js +2 -59
  434. package/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js +68 -5
  435. package/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js +160 -19
  436. package/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +23 -7
  437. package/node_modules/handlebars/dist/amd/handlebars/compiler/node-types.js +12 -0
  438. package/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js +26 -7
  439. package/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js +9 -4
  440. package/node_modules/handlebars/dist/amd/handlebars/exception.js +8 -4
  441. package/node_modules/handlebars/dist/amd/handlebars/helpers/each.js +40 -14
  442. package/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js +21 -1
  443. package/node_modules/handlebars/dist/amd/handlebars/runtime.js +24 -4
  444. package/node_modules/handlebars/dist/amd/handlebars/utils.js +4 -3
  445. package/node_modules/handlebars/dist/amd/precompiler.js +13 -7
  446. package/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
  447. package/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +1 -60
  448. package/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +64 -4
  449. package/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +161 -18
  450. package/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +23 -7
  451. package/node_modules/handlebars/dist/cjs/handlebars/compiler/node-types.js +10 -0
  452. package/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +29 -6
  453. package/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +9 -4
  454. package/node_modules/handlebars/dist/cjs/handlebars/exception.js +8 -4
  455. package/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +40 -14
  456. package/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +21 -1
  457. package/node_modules/handlebars/dist/cjs/handlebars/runtime.js +24 -4
  458. package/node_modules/handlebars/dist/cjs/handlebars/utils.js +4 -3
  459. package/node_modules/handlebars/dist/cjs/precompiler.js +14 -6
  460. package/node_modules/handlebars/dist/handlebars.amd.js +401 -130
  461. package/node_modules/handlebars/dist/handlebars.amd.min.js +4 -4
  462. package/node_modules/handlebars/dist/handlebars.js +396 -125
  463. package/node_modules/handlebars/dist/handlebars.min.js +4 -4
  464. package/node_modules/handlebars/dist/handlebars.runtime.amd.js +100 -29
  465. package/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +2 -2
  466. package/node_modules/handlebars/dist/handlebars.runtime.js +94 -23
  467. package/node_modules/handlebars/dist/handlebars.runtime.min.js +2 -2
  468. package/node_modules/handlebars/lib/handlebars/base.js +1 -1
  469. package/node_modules/handlebars/lib/handlebars/compiler/base.js +0 -67
  470. package/node_modules/handlebars/lib/handlebars/compiler/code-gen.js +65 -11
  471. package/node_modules/handlebars/lib/handlebars/compiler/compiler.js +164 -23
  472. package/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +23 -7
  473. package/node_modules/handlebars/lib/handlebars/compiler/node-types.js +24 -0
  474. package/node_modules/handlebars/lib/handlebars/compiler/visitor.js +29 -5
  475. package/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js +16 -5
  476. package/node_modules/handlebars/lib/handlebars/exception.js +7 -3
  477. package/node_modules/handlebars/lib/handlebars/helpers/each.js +39 -16
  478. package/node_modules/handlebars/lib/handlebars/internal/proto-access.js +22 -0
  479. package/node_modules/handlebars/lib/handlebars/runtime.js +36 -4
  480. package/node_modules/handlebars/lib/handlebars/utils.js +3 -2
  481. package/node_modules/handlebars/lib/precompiler.js +14 -5
  482. package/node_modules/handlebars/package.json +2 -2
  483. package/node_modules/handlebars/release-notes.md +20 -1
  484. package/node_modules/handlebars/types/index.d.ts +8 -0
  485. package/node_modules/hdb/cfg/VERSION +1 -1
  486. package/node_modules/hdb/lib/Client.js +6 -2
  487. package/node_modules/hdb/lib/protocol/ClientInfo.js +28 -15
  488. package/node_modules/hdb/lib/protocol/Connection.js +30 -3
  489. package/node_modules/hdb/lib/protocol/Writer.js +2 -2
  490. package/node_modules/hdb/lib/protocol/common/ConnectOption.js +2 -0
  491. package/node_modules/hdb/lib/protocol/common/ConnectOptionFlagSet1.js +18 -0
  492. package/node_modules/hdb/lib/protocol/common/ConnectOptionType.js +2 -0
  493. package/node_modules/hdb/lib/protocol/common/Constants.js +1 -0
  494. package/node_modules/hdb/lib/protocol/common/MessageType.js +3 -2
  495. package/node_modules/hdb/lib/protocol/common/PartKind.js +2 -1
  496. package/node_modules/hdb/lib/protocol/common/index.js +1 -0
  497. package/node_modules/hdb/lib/protocol/data/TextList.js +25 -17
  498. package/node_modules/hdb/lib/protocol/data/index.js +1 -0
  499. package/node_modules/hdb/lib/protocol/part/ConnectOptions.js +7 -0
  500. package/node_modules/hdb/lib/protocol/request/index.js +7 -0
  501. package/node_modules/hdb/package.json +1 -2
  502. package/node_modules/livereload-js/.github/workflows/main.yml +4 -4
  503. package/node_modules/livereload-js/README.md +3 -3
  504. package/node_modules/livereload-js/dist/livereload.js +839 -2742
  505. package/node_modules/livereload-js/dist/livereload.min.js +1 -1
  506. package/node_modules/livereload-js/package.json +11 -11
  507. package/node_modules/minipass/LICENSE.md +55 -0
  508. package/node_modules/minipass/README.md +825 -0
  509. package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
  510. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  511. package/node_modules/minipass/dist/commonjs/index.js +1038 -0
  512. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  513. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  514. package/node_modules/minipass/dist/esm/index.d.ts +545 -0
  515. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  516. package/node_modules/minipass/dist/esm/index.js +1020 -0
  517. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  518. package/node_modules/minipass/dist/esm/package.json +3 -0
  519. package/node_modules/minipass/package.json +77 -0
  520. package/node_modules/minizlib/LICENSE +26 -0
  521. package/node_modules/minizlib/README.md +64 -0
  522. package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
  523. package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
  524. package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
  525. package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
  526. package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
  527. package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
  528. package/node_modules/minizlib/dist/commonjs/index.js +416 -0
  529. package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
  530. package/node_modules/minizlib/dist/commonjs/package.json +3 -0
  531. package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
  532. package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
  533. package/node_modules/minizlib/dist/esm/constants.js +117 -0
  534. package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
  535. package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
  536. package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
  537. package/node_modules/minizlib/dist/esm/index.js +363 -0
  538. package/node_modules/minizlib/dist/esm/index.js.map +1 -0
  539. package/node_modules/minizlib/dist/esm/package.json +3 -0
  540. package/node_modules/minizlib/package.json +80 -0
  541. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  542. package/node_modules/qs/CHANGELOG.md +38 -14
  543. package/node_modules/qs/README.md +31 -3
  544. package/node_modules/qs/dist/qs.js +20 -20
  545. package/node_modules/qs/lib/parse.js +94 -4
  546. package/node_modules/qs/lib/stringify.js +4 -4
  547. package/node_modules/qs/lib/utils.js +130 -6
  548. package/node_modules/qs/package.json +4 -4
  549. package/node_modules/qs/test/parse.js +174 -0
  550. package/node_modules/qs/test/stringify.js +263 -33
  551. package/node_modules/qs/test/utils.js +184 -0
  552. package/node_modules/tar/LICENSE.md +55 -0
  553. package/node_modules/tar/README.md +1233 -0
  554. package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
  555. package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
  556. package/node_modules/tar/dist/commonjs/create.js +82 -0
  557. package/node_modules/tar/dist/commonjs/create.js.map +1 -0
  558. package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
  559. package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
  560. package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
  561. package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
  562. package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
  563. package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
  564. package/node_modules/tar/dist/commonjs/extract.js +88 -0
  565. package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
  566. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
  567. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
  568. package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
  569. package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
  570. package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
  571. package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
  572. package/node_modules/tar/dist/commonjs/header.js +348 -0
  573. package/node_modules/tar/dist/commonjs/header.js.map +1 -0
  574. package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
  575. package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
  576. package/node_modules/tar/dist/commonjs/index.js +64 -0
  577. package/node_modules/tar/dist/commonjs/index.js.map +1 -0
  578. package/node_modules/tar/dist/commonjs/index.min.js +4 -0
  579. package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
  580. package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
  581. package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
  582. package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
  583. package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
  584. package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
  585. package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
  586. package/node_modules/tar/dist/commonjs/list.js +153 -0
  587. package/node_modules/tar/dist/commonjs/list.js.map +1 -0
  588. package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
  589. package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
  590. package/node_modules/tar/dist/commonjs/make-command.js +52 -0
  591. package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
  592. package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
  593. package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
  594. package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
  595. package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
  596. package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
  597. package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
  598. package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
  599. package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
  600. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
  601. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
  602. package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
  603. package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
  604. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
  605. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
  606. package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
  607. package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
  608. package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
  609. package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
  610. package/node_modules/tar/dist/commonjs/options.js +66 -0
  611. package/node_modules/tar/dist/commonjs/options.js.map +1 -0
  612. package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
  613. package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
  614. package/node_modules/tar/dist/commonjs/pack.js +544 -0
  615. package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
  616. package/node_modules/tar/dist/commonjs/package.json +3 -0
  617. package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
  618. package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
  619. package/node_modules/tar/dist/commonjs/parse.js +655 -0
  620. package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
  621. package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
  622. package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
  623. package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
  624. package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
  625. package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
  626. package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
  627. package/node_modules/tar/dist/commonjs/pax.js +182 -0
  628. package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
  629. package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
  630. package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
  631. package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
  632. package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
  633. package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
  634. package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
  635. package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
  636. package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
  637. package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
  638. package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
  639. package/node_modules/tar/dist/commonjs/replace.js +227 -0
  640. package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
  641. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
  642. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
  643. package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
  644. package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
  645. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
  646. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
  647. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
  648. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
  649. package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
  650. package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
  651. package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
  652. package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
  653. package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
  654. package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
  655. package/node_modules/tar/dist/commonjs/types.js +70 -0
  656. package/node_modules/tar/dist/commonjs/types.js.map +1 -0
  657. package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
  658. package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
  659. package/node_modules/tar/dist/commonjs/unpack.js +932 -0
  660. package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
  661. package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
  662. package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
  663. package/node_modules/tar/dist/commonjs/update.js +33 -0
  664. package/node_modules/tar/dist/commonjs/update.js.map +1 -0
  665. package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
  666. package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
  667. package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
  668. package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
  669. package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
  670. package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
  671. package/node_modules/tar/dist/commonjs/winchars.js +14 -0
  672. package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
  673. package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
  674. package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
  675. package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
  676. package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
  677. package/node_modules/tar/dist/esm/create.d.ts +3 -0
  678. package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
  679. package/node_modules/tar/dist/esm/create.js +76 -0
  680. package/node_modules/tar/dist/esm/create.js.map +1 -0
  681. package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
  682. package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
  683. package/node_modules/tar/dist/esm/cwd-error.js +14 -0
  684. package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
  685. package/node_modules/tar/dist/esm/extract.d.ts +3 -0
  686. package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
  687. package/node_modules/tar/dist/esm/extract.js +49 -0
  688. package/node_modules/tar/dist/esm/extract.js.map +1 -0
  689. package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
  690. package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
  691. package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
  692. package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
  693. package/node_modules/tar/dist/esm/header.d.ts +53 -0
  694. package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
  695. package/node_modules/tar/dist/esm/header.js +311 -0
  696. package/node_modules/tar/dist/esm/header.js.map +1 -0
  697. package/node_modules/tar/dist/esm/index.d.ts +20 -0
  698. package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
  699. package/node_modules/tar/dist/esm/index.js +20 -0
  700. package/node_modules/tar/dist/esm/index.js.map +1 -0
  701. package/node_modules/tar/dist/esm/index.min.js +4 -0
  702. package/node_modules/tar/dist/esm/index.min.js.map +7 -0
  703. package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
  704. package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
  705. package/node_modules/tar/dist/esm/large-numbers.js +94 -0
  706. package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
  707. package/node_modules/tar/dist/esm/list.d.ts +7 -0
  708. package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
  709. package/node_modules/tar/dist/esm/list.js +113 -0
  710. package/node_modules/tar/dist/esm/list.js.map +1 -0
  711. package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
  712. package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
  713. package/node_modules/tar/dist/esm/make-command.js +48 -0
  714. package/node_modules/tar/dist/esm/make-command.js.map +1 -0
  715. package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
  716. package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
  717. package/node_modules/tar/dist/esm/mkdir.js +179 -0
  718. package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
  719. package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
  720. package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
  721. package/node_modules/tar/dist/esm/mode-fix.js +25 -0
  722. package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
  723. package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
  724. package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
  725. package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
  726. package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
  727. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
  728. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
  729. package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
  730. package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
  731. package/node_modules/tar/dist/esm/options.d.ts +604 -0
  732. package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
  733. package/node_modules/tar/dist/esm/options.js +54 -0
  734. package/node_modules/tar/dist/esm/options.js.map +1 -0
  735. package/node_modules/tar/dist/esm/pack.d.ts +105 -0
  736. package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
  737. package/node_modules/tar/dist/esm/pack.js +502 -0
  738. package/node_modules/tar/dist/esm/pack.js.map +1 -0
  739. package/node_modules/tar/dist/esm/package.json +3 -0
  740. package/node_modules/tar/dist/esm/parse.d.ts +92 -0
  741. package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
  742. package/node_modules/tar/dist/esm/parse.js +651 -0
  743. package/node_modules/tar/dist/esm/parse.js.map +1 -0
  744. package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
  745. package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
  746. package/node_modules/tar/dist/esm/path-reservations.js +166 -0
  747. package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
  748. package/node_modules/tar/dist/esm/pax.d.ts +26 -0
  749. package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
  750. package/node_modules/tar/dist/esm/pax.js +178 -0
  751. package/node_modules/tar/dist/esm/pax.js.map +1 -0
  752. package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
  753. package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
  754. package/node_modules/tar/dist/esm/process-umask.js +3 -0
  755. package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
  756. package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
  757. package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
  758. package/node_modules/tar/dist/esm/read-entry.js +132 -0
  759. package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
  760. package/node_modules/tar/dist/esm/replace.d.ts +2 -0
  761. package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
  762. package/node_modules/tar/dist/esm/replace.js +221 -0
  763. package/node_modules/tar/dist/esm/replace.js.map +1 -0
  764. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
  765. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
  766. package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
  767. package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
  768. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
  769. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
  770. package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
  771. package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
  772. package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
  773. package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
  774. package/node_modules/tar/dist/esm/symlink-error.js +15 -0
  775. package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
  776. package/node_modules/tar/dist/esm/types.d.ts +16 -0
  777. package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
  778. package/node_modules/tar/dist/esm/types.js +65 -0
  779. package/node_modules/tar/dist/esm/types.js.map +1 -0
  780. package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
  781. package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
  782. package/node_modules/tar/dist/esm/unpack.js +891 -0
  783. package/node_modules/tar/dist/esm/unpack.js.map +1 -0
  784. package/node_modules/tar/dist/esm/update.d.ts +2 -0
  785. package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
  786. package/node_modules/tar/dist/esm/update.js +30 -0
  787. package/node_modules/tar/dist/esm/update.js.map +1 -0
  788. package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
  789. package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
  790. package/node_modules/tar/dist/esm/warn-method.js +27 -0
  791. package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
  792. package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
  793. package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
  794. package/node_modules/tar/dist/esm/winchars.js +9 -0
  795. package/node_modules/tar/dist/esm/winchars.js.map +1 -0
  796. package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
  797. package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
  798. package/node_modules/tar/dist/esm/write-entry.js +656 -0
  799. package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
  800. package/node_modules/tar/package.json +298 -0
  801. package/node_modules/ws/lib/websocket.js +17 -3
  802. package/node_modules/ws/package.json +1 -1
  803. package/node_modules/yallist/LICENSE.md +63 -0
  804. package/node_modules/yallist/README.md +205 -0
  805. package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
  806. package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
  807. package/node_modules/yallist/dist/commonjs/index.js +384 -0
  808. package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
  809. package/node_modules/yallist/dist/commonjs/package.json +3 -0
  810. package/node_modules/yallist/dist/esm/index.d.ts +39 -0
  811. package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
  812. package/node_modules/yallist/dist/esm/index.js +379 -0
  813. package/node_modules/yallist/dist/esm/index.js.map +1 -0
  814. package/node_modules/yallist/dist/esm/package.json +3 -0
  815. package/node_modules/yallist/package.json +68 -0
  816. package/package.json +7 -1
  817. package/bin/completion/templates/cds-tmpl.fish +0 -65
  818. package/bin/completion/templates/cds-tmpl.ps1 +0 -217
  819. package/bin/completion/templates/cds-tmpl.sh +0 -93
  820. package/bin/completion/templates/cds-tmpl.zsh +0 -74
  821. package/node_modules/@cap-js/db-service/lib/recursion-guard.js +0 -40
  822. package/node_modules/@sap/cds/lib/env/cds-requires.js +0 -327
  823. package/node_modules/@sap/cds-mtxs/srv/bootstrap.cds +0 -2
  824. package/node_modules/@sap/cds-mtxs/srv/bootstrap.js +0 -33
  825. package/node_modules/body-parser/node_modules/content-type/LICENSE +0 -22
  826. package/node_modules/body-parser/node_modules/content-type/README.md +0 -71
  827. package/node_modules/body-parser/node_modules/content-type/package.json +0 -52
  828. package/node_modules/content-disposition/index.js +0 -536
  829. package/node_modules/content-type/HISTORY.md +0 -29
  830. package/node_modules/content-type/index.js +0 -225
  831. package/node_modules/negotiator/node_modules/content-type/LICENSE +0 -22
  832. package/node_modules/negotiator/node_modules/content-type/README.md +0 -71
  833. package/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +0 -46
  834. package/node_modules/negotiator/node_modules/content-type/dist/index.js +0 -176
  835. package/node_modules/negotiator/node_modules/content-type/dist/index.js.map +0 -1
  836. package/node_modules/negotiator/node_modules/content-type/package.json +0 -52
  837. package/node_modules/type-is/node_modules/content-type/LICENSE +0 -22
  838. package/node_modules/type-is/node_modules/content-type/README.md +0 -71
  839. package/node_modules/type-is/node_modules/content-type/dist/index.d.ts +0 -46
  840. package/node_modules/type-is/node_modules/content-type/dist/index.js +0 -176
  841. package/node_modules/type-is/node_modules/content-type/dist/index.js.map +0 -1
  842. package/node_modules/type-is/node_modules/content-type/package.json +0 -52
  843. /package/lib/init/template/react/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +0 -0
  844. /package/lib/init/template/vue/files/src/{main.js → main.{{extension}}.hbs} +0 -0
  845. /package/lib/init/template/vue/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +0 -0
  846. /package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/utilities.js +0 -0
  847. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.d.ts +0 -0
  848. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js +0 -0
  849. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js.map +0 -0
@@ -13,24 +13,14 @@ module.exports = function (key) {
13
13
  ArrayProto[UNSCOPABLES][key] = true;
14
14
  };
15
15
 
16
- },{"./_hide":27,"./_wks":81}],3:[function(require,module,exports){
17
- 'use strict';
18
- var at = require('./_string-at')(true);
19
-
20
- // `AdvanceStringIndex` abstract operation
21
- // https://tc39.github.io/ecma262/#sec-advancestringindex
22
- module.exports = function (S, index, unicode) {
23
- return index + (unicode ? at(S, index).length : 1);
24
- };
25
-
26
- },{"./_string-at":68}],4:[function(require,module,exports){
16
+ },{"./_hide":17,"./_wks":45}],3:[function(require,module,exports){
27
17
  var isObject = require('./_is-object');
28
18
  module.exports = function (it) {
29
19
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
30
20
  return it;
31
21
  };
32
22
 
33
- },{"./_is-object":34}],5:[function(require,module,exports){
23
+ },{"./_is-object":21}],4:[function(require,module,exports){
34
24
  // false -> Array#indexOf
35
25
  // true -> Array#includes
36
26
  var toIObject = require('./_to-iobject');
@@ -55,125 +45,18 @@ module.exports = function (IS_INCLUDES) {
55
45
  };
56
46
  };
57
47
 
58
- },{"./_to-absolute-index":72,"./_to-iobject":74,"./_to-length":75}],6:[function(require,module,exports){
59
- // 0 -> Array#forEach
60
- // 1 -> Array#map
61
- // 2 -> Array#filter
62
- // 3 -> Array#some
63
- // 4 -> Array#every
64
- // 5 -> Array#find
65
- // 6 -> Array#findIndex
66
- var ctx = require('./_ctx');
67
- var IObject = require('./_iobject');
68
- var toObject = require('./_to-object');
69
- var toLength = require('./_to-length');
70
- var asc = require('./_array-species-create');
71
- module.exports = function (TYPE, $create) {
72
- var IS_MAP = TYPE == 1;
73
- var IS_FILTER = TYPE == 2;
74
- var IS_SOME = TYPE == 3;
75
- var IS_EVERY = TYPE == 4;
76
- var IS_FIND_INDEX = TYPE == 6;
77
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
78
- var create = $create || asc;
79
- return function ($this, callbackfn, that) {
80
- var O = toObject($this);
81
- var self = IObject(O);
82
- var f = ctx(callbackfn, that, 3);
83
- var length = toLength(self.length);
84
- var index = 0;
85
- var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
86
- var val, res;
87
- for (;length > index; index++) if (NO_HOLES || index in self) {
88
- val = self[index];
89
- res = f(val, index, O);
90
- if (TYPE) {
91
- if (IS_MAP) result[index] = res; // map
92
- else if (res) switch (TYPE) {
93
- case 3: return true; // some
94
- case 5: return val; // find
95
- case 6: return index; // findIndex
96
- case 2: result.push(val); // filter
97
- } else if (IS_EVERY) return false; // every
98
- }
99
- }
100
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
101
- };
102
- };
103
-
104
- },{"./_array-species-create":8,"./_ctx":13,"./_iobject":31,"./_to-length":75,"./_to-object":76}],7:[function(require,module,exports){
105
- var isObject = require('./_is-object');
106
- var isArray = require('./_is-array');
107
- var SPECIES = require('./_wks')('species');
108
-
109
- module.exports = function (original) {
110
- var C;
111
- if (isArray(original)) {
112
- C = original.constructor;
113
- // cross-realm fallback
114
- if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
115
- if (isObject(C)) {
116
- C = C[SPECIES];
117
- if (C === null) C = undefined;
118
- }
119
- } return C === undefined ? Array : C;
120
- };
121
-
122
- },{"./_is-array":33,"./_is-object":34,"./_wks":81}],8:[function(require,module,exports){
123
- // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
124
- var speciesConstructor = require('./_array-species-constructor');
125
-
126
- module.exports = function (original, length) {
127
- return new (speciesConstructor(original))(length);
128
- };
129
-
130
- },{"./_array-species-constructor":7}],9:[function(require,module,exports){
131
- // getting tag from 19.1.3.6 Object.prototype.toString()
132
- var cof = require('./_cof');
133
- var TAG = require('./_wks')('toStringTag');
134
- // ES3 wrong here
135
- var ARG = cof(function () { return arguments; }()) == 'Arguments';
136
-
137
- // fallback for IE11 Script Access Denied error
138
- var tryGet = function (it, key) {
139
- try {
140
- return it[key];
141
- } catch (e) { /* empty */ }
142
- };
143
-
144
- module.exports = function (it) {
145
- var O, T, B;
146
- return it === undefined ? 'Undefined' : it === null ? 'Null'
147
- // @@toStringTag case
148
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
149
- // builtinTag case
150
- : ARG ? cof(O)
151
- // ES3 arguments fallback
152
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
153
- };
154
-
155
- },{"./_cof":10,"./_wks":81}],10:[function(require,module,exports){
48
+ },{"./_to-absolute-index":38,"./_to-iobject":40,"./_to-length":41}],5:[function(require,module,exports){
156
49
  var toString = {}.toString;
157
50
 
158
51
  module.exports = function (it) {
159
52
  return toString.call(it).slice(8, -1);
160
53
  };
161
54
 
162
- },{}],11:[function(require,module,exports){
55
+ },{}],6:[function(require,module,exports){
163
56
  var core = module.exports = { version: '2.6.12' };
164
57
  if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
165
58
 
166
- },{}],12:[function(require,module,exports){
167
- 'use strict';
168
- var $defineProperty = require('./_object-dp');
169
- var createDesc = require('./_property-desc');
170
-
171
- module.exports = function (object, index, value) {
172
- if (index in object) $defineProperty.f(object, index, createDesc(0, value));
173
- else object[index] = value;
174
- };
175
-
176
- },{"./_object-dp":45,"./_property-desc":57}],13:[function(require,module,exports){
59
+ },{}],7:[function(require,module,exports){
177
60
  // optional / simple context binding
178
61
  var aFunction = require('./_a-function');
179
62
  module.exports = function (fn, that, length) {
@@ -195,20 +78,20 @@ module.exports = function (fn, that, length) {
195
78
  };
196
79
  };
197
80
 
198
- },{"./_a-function":1}],14:[function(require,module,exports){
81
+ },{"./_a-function":1}],8:[function(require,module,exports){
199
82
  // 7.2.1 RequireObjectCoercible(argument)
200
83
  module.exports = function (it) {
201
84
  if (it == undefined) throw TypeError("Can't call method on " + it);
202
85
  return it;
203
86
  };
204
87
 
205
- },{}],15:[function(require,module,exports){
88
+ },{}],9:[function(require,module,exports){
206
89
  // Thank's IE8 for his funny defineProperty
207
90
  module.exports = !require('./_fails')(function () {
208
91
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
209
92
  });
210
93
 
211
- },{"./_fails":21}],16:[function(require,module,exports){
94
+ },{"./_fails":13}],10:[function(require,module,exports){
212
95
  var isObject = require('./_is-object');
213
96
  var document = require('./_global').document;
214
97
  // typeof document.createElement is 'object' in old IE
@@ -217,30 +100,13 @@ module.exports = function (it) {
217
100
  return is ? document.createElement(it) : {};
218
101
  };
219
102
 
220
- },{"./_global":25,"./_is-object":34}],17:[function(require,module,exports){
103
+ },{"./_global":15,"./_is-object":21}],11:[function(require,module,exports){
221
104
  // IE 8- don't enum bug keys
222
105
  module.exports = (
223
106
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
224
107
  ).split(',');
225
108
 
226
- },{}],18:[function(require,module,exports){
227
- // all enumerable object keys, includes symbols
228
- var getKeys = require('./_object-keys');
229
- var gOPS = require('./_object-gops');
230
- var pIE = require('./_object-pie');
231
- module.exports = function (it) {
232
- var result = getKeys(it);
233
- var getSymbols = gOPS.f;
234
- if (getSymbols) {
235
- var symbols = getSymbols(it);
236
- var isEnum = pIE.f;
237
- var i = 0;
238
- var key;
239
- while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
240
- } return result;
241
- };
242
-
243
- },{"./_object-gops":50,"./_object-keys":53,"./_object-pie":54}],19:[function(require,module,exports){
109
+ },{}],12:[function(require,module,exports){
244
110
  var global = require('./_global');
245
111
  var core = require('./_core');
246
112
  var hide = require('./_hide');
@@ -285,21 +151,7 @@ $export.U = 64; // safe
285
151
  $export.R = 128; // real proto method for `library`
286
152
  module.exports = $export;
287
153
 
288
- },{"./_core":11,"./_ctx":13,"./_global":25,"./_hide":27,"./_redefine":58}],20:[function(require,module,exports){
289
- var MATCH = require('./_wks')('match');
290
- module.exports = function (KEY) {
291
- var re = /./;
292
- try {
293
- '/./'[KEY](re);
294
- } catch (e) {
295
- try {
296
- re[MATCH] = false;
297
- return !'/./'[KEY](re);
298
- } catch (f) { /* empty */ }
299
- } return true;
300
- };
301
-
302
- },{"./_wks":81}],21:[function(require,module,exports){
154
+ },{"./_core":6,"./_ctx":7,"./_global":15,"./_hide":17,"./_redefine":34}],13:[function(require,module,exports){
303
155
  module.exports = function (exec) {
304
156
  try {
305
157
  return !!exec();
@@ -308,123 +160,10 @@ module.exports = function (exec) {
308
160
  }
309
161
  };
310
162
 
311
- },{}],22:[function(require,module,exports){
312
- 'use strict';
313
- require('./es6.regexp.exec');
314
- var redefine = require('./_redefine');
315
- var hide = require('./_hide');
316
- var fails = require('./_fails');
317
- var defined = require('./_defined');
318
- var wks = require('./_wks');
319
- var regexpExec = require('./_regexp-exec');
320
-
321
- var SPECIES = wks('species');
322
-
323
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
324
- // #replace needs built-in support for named groups.
325
- // #match works fine because it just return the exec results, even if it has
326
- // a "grops" property.
327
- var re = /./;
328
- re.exec = function () {
329
- var result = [];
330
- result.groups = { a: '7' };
331
- return result;
332
- };
333
- return ''.replace(re, '$<a>') !== '7';
334
- });
335
-
336
- var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
337
- // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
338
- var re = /(?:)/;
339
- var originalExec = re.exec;
340
- re.exec = function () { return originalExec.apply(this, arguments); };
341
- var result = 'ab'.split(re);
342
- return result.length === 2 && result[0] === 'a' && result[1] === 'b';
343
- })();
344
-
345
- module.exports = function (KEY, length, exec) {
346
- var SYMBOL = wks(KEY);
347
-
348
- var DELEGATES_TO_SYMBOL = !fails(function () {
349
- // String methods call symbol-named RegEp methods
350
- var O = {};
351
- O[SYMBOL] = function () { return 7; };
352
- return ''[KEY](O) != 7;
353
- });
354
-
355
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
356
- // Symbol-named RegExp methods call .exec
357
- var execCalled = false;
358
- var re = /a/;
359
- re.exec = function () { execCalled = true; return null; };
360
- if (KEY === 'split') {
361
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
362
- // a new one. We need to return the patched regex when creating the new one.
363
- re.constructor = {};
364
- re.constructor[SPECIES] = function () { return re; };
365
- }
366
- re[SYMBOL]('');
367
- return !execCalled;
368
- }) : undefined;
369
-
370
- if (
371
- !DELEGATES_TO_SYMBOL ||
372
- !DELEGATES_TO_EXEC ||
373
- (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
374
- (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
375
- ) {
376
- var nativeRegExpMethod = /./[SYMBOL];
377
- var fns = exec(
378
- defined,
379
- SYMBOL,
380
- ''[KEY],
381
- function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
382
- if (regexp.exec === regexpExec) {
383
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
384
- // The native String method already delegates to @@method (this
385
- // polyfilled function), leasing to infinite recursion.
386
- // We avoid it by directly calling the native @@method method.
387
- return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
388
- }
389
- return { done: true, value: nativeMethod.call(str, regexp, arg2) };
390
- }
391
- return { done: false };
392
- }
393
- );
394
- var strfn = fns[0];
395
- var rxfn = fns[1];
396
-
397
- redefine(String.prototype, KEY, strfn);
398
- hide(RegExp.prototype, SYMBOL, length == 2
399
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
400
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
401
- ? function (string, arg) { return rxfn.call(string, this, arg); }
402
- // 21.2.5.6 RegExp.prototype[@@match](string)
403
- // 21.2.5.9 RegExp.prototype[@@search](string)
404
- : function (string) { return rxfn.call(string, this); }
405
- );
406
- }
407
- };
408
-
409
- },{"./_defined":14,"./_fails":21,"./_hide":27,"./_redefine":58,"./_regexp-exec":60,"./_wks":81,"./es6.regexp.exec":93}],23:[function(require,module,exports){
410
- 'use strict';
411
- // 21.2.5.3 get RegExp.prototype.flags
412
- var anObject = require('./_an-object');
413
- module.exports = function () {
414
- var that = anObject(this);
415
- var result = '';
416
- if (that.global) result += 'g';
417
- if (that.ignoreCase) result += 'i';
418
- if (that.multiline) result += 'm';
419
- if (that.unicode) result += 'u';
420
- if (that.sticky) result += 'y';
421
- return result;
422
- };
423
-
424
- },{"./_an-object":4}],24:[function(require,module,exports){
163
+ },{}],14:[function(require,module,exports){
425
164
  module.exports = require('./_shared')('native-function-to-string', Function.toString);
426
165
 
427
- },{"./_shared":65}],25:[function(require,module,exports){
166
+ },{"./_shared":37}],15:[function(require,module,exports){
428
167
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
429
168
  var global = module.exports = typeof window != 'undefined' && window.Math == Math
430
169
  ? window : typeof self != 'undefined' && self.Math == Math ? self
@@ -432,13 +171,13 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat
432
171
  : Function('return this')();
433
172
  if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
434
173
 
435
- },{}],26:[function(require,module,exports){
174
+ },{}],16:[function(require,module,exports){
436
175
  var hasOwnProperty = {}.hasOwnProperty;
437
176
  module.exports = function (it, key) {
438
177
  return hasOwnProperty.call(it, key);
439
178
  };
440
179
 
441
- },{}],27:[function(require,module,exports){
180
+ },{}],17:[function(require,module,exports){
442
181
  var dP = require('./_object-dp');
443
182
  var createDesc = require('./_property-desc');
444
183
  module.exports = require('./_descriptors') ? function (object, key, value) {
@@ -448,27 +187,16 @@ module.exports = require('./_descriptors') ? function (object, key, value) {
448
187
  return object;
449
188
  };
450
189
 
451
- },{"./_descriptors":15,"./_object-dp":45,"./_property-desc":57}],28:[function(require,module,exports){
190
+ },{"./_descriptors":9,"./_object-dp":28,"./_property-desc":33}],18:[function(require,module,exports){
452
191
  var document = require('./_global').document;
453
192
  module.exports = document && document.documentElement;
454
193
 
455
- },{"./_global":25}],29:[function(require,module,exports){
194
+ },{"./_global":15}],19:[function(require,module,exports){
456
195
  module.exports = !require('./_descriptors') && !require('./_fails')(function () {
457
196
  return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;
458
197
  });
459
198
 
460
- },{"./_descriptors":15,"./_dom-create":16,"./_fails":21}],30:[function(require,module,exports){
461
- var isObject = require('./_is-object');
462
- var setPrototypeOf = require('./_set-proto').set;
463
- module.exports = function (that, target, C) {
464
- var S = target.constructor;
465
- var P;
466
- if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
467
- setPrototypeOf(that, P);
468
- } return that;
469
- };
470
-
471
- },{"./_is-object":34,"./_set-proto":61}],31:[function(require,module,exports){
199
+ },{"./_descriptors":9,"./_dom-create":10,"./_fails":13}],20:[function(require,module,exports){
472
200
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
473
201
  var cof = require('./_cof');
474
202
  // eslint-disable-next-line no-prototype-builtins
@@ -476,53 +204,12 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
476
204
  return cof(it) == 'String' ? it.split('') : Object(it);
477
205
  };
478
206
 
479
- },{"./_cof":10}],32:[function(require,module,exports){
480
- // check on default Array iterator
481
- var Iterators = require('./_iterators');
482
- var ITERATOR = require('./_wks')('iterator');
483
- var ArrayProto = Array.prototype;
484
-
485
- module.exports = function (it) {
486
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
487
- };
488
-
489
- },{"./_iterators":41,"./_wks":81}],33:[function(require,module,exports){
490
- // 7.2.2 IsArray(argument)
491
- var cof = require('./_cof');
492
- module.exports = Array.isArray || function isArray(arg) {
493
- return cof(arg) == 'Array';
494
- };
495
-
496
- },{"./_cof":10}],34:[function(require,module,exports){
207
+ },{"./_cof":5}],21:[function(require,module,exports){
497
208
  module.exports = function (it) {
498
209
  return typeof it === 'object' ? it !== null : typeof it === 'function';
499
210
  };
500
211
 
501
- },{}],35:[function(require,module,exports){
502
- // 7.2.8 IsRegExp(argument)
503
- var isObject = require('./_is-object');
504
- var cof = require('./_cof');
505
- var MATCH = require('./_wks')('match');
506
- module.exports = function (it) {
507
- var isRegExp;
508
- return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
509
- };
510
-
511
- },{"./_cof":10,"./_is-object":34,"./_wks":81}],36:[function(require,module,exports){
512
- // call something on iterator step with safe closing on error
513
- var anObject = require('./_an-object');
514
- module.exports = function (iterator, fn, value, entries) {
515
- try {
516
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
517
- // 7.4.6 IteratorClose(iterator, completion)
518
- } catch (e) {
519
- var ret = iterator['return'];
520
- if (ret !== undefined) anObject(ret.call(iterator));
521
- throw e;
522
- }
523
- };
524
-
525
- },{"./_an-object":4}],37:[function(require,module,exports){
212
+ },{}],22:[function(require,module,exports){
526
213
  'use strict';
527
214
  var create = require('./_object-create');
528
215
  var descriptor = require('./_property-desc');
@@ -537,7 +224,7 @@ module.exports = function (Constructor, NAME, next) {
537
224
  setToStringTag(Constructor, NAME + ' Iterator');
538
225
  };
539
226
 
540
- },{"./_hide":27,"./_object-create":44,"./_property-desc":57,"./_set-to-string-tag":63,"./_wks":81}],38:[function(require,module,exports){
227
+ },{"./_hide":17,"./_object-create":27,"./_property-desc":33,"./_set-to-string-tag":35,"./_wks":45}],23:[function(require,module,exports){
541
228
  'use strict';
542
229
  var LIBRARY = require('./_library');
543
230
  var $export = require('./_export');
@@ -608,97 +295,18 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE
608
295
  return methods;
609
296
  };
610
297
 
611
- },{"./_export":19,"./_hide":27,"./_iter-create":37,"./_iterators":41,"./_library":42,"./_object-gpo":51,"./_redefine":58,"./_set-to-string-tag":63,"./_wks":81}],39:[function(require,module,exports){
612
- var ITERATOR = require('./_wks')('iterator');
613
- var SAFE_CLOSING = false;
614
-
615
- try {
616
- var riter = [7][ITERATOR]();
617
- riter['return'] = function () { SAFE_CLOSING = true; };
618
- // eslint-disable-next-line no-throw-literal
619
- Array.from(riter, function () { throw 2; });
620
- } catch (e) { /* empty */ }
621
-
622
- module.exports = function (exec, skipClosing) {
623
- if (!skipClosing && !SAFE_CLOSING) return false;
624
- var safe = false;
625
- try {
626
- var arr = [7];
627
- var iter = arr[ITERATOR]();
628
- iter.next = function () { return { done: safe = true }; };
629
- arr[ITERATOR] = function () { return iter; };
630
- exec(arr);
631
- } catch (e) { /* empty */ }
632
- return safe;
633
- };
634
-
635
- },{"./_wks":81}],40:[function(require,module,exports){
298
+ },{"./_export":12,"./_hide":17,"./_iter-create":22,"./_iterators":25,"./_library":26,"./_object-gpo":30,"./_redefine":34,"./_set-to-string-tag":35,"./_wks":45}],24:[function(require,module,exports){
636
299
  module.exports = function (done, value) {
637
300
  return { value: value, done: !!done };
638
301
  };
639
302
 
640
- },{}],41:[function(require,module,exports){
303
+ },{}],25:[function(require,module,exports){
641
304
  module.exports = {};
642
305
 
643
- },{}],42:[function(require,module,exports){
306
+ },{}],26:[function(require,module,exports){
644
307
  module.exports = false;
645
308
 
646
- },{}],43:[function(require,module,exports){
647
- var META = require('./_uid')('meta');
648
- var isObject = require('./_is-object');
649
- var has = require('./_has');
650
- var setDesc = require('./_object-dp').f;
651
- var id = 0;
652
- var isExtensible = Object.isExtensible || function () {
653
- return true;
654
- };
655
- var FREEZE = !require('./_fails')(function () {
656
- return isExtensible(Object.preventExtensions({}));
657
- });
658
- var setMeta = function (it) {
659
- setDesc(it, META, { value: {
660
- i: 'O' + ++id, // object ID
661
- w: {} // weak collections IDs
662
- } });
663
- };
664
- var fastKey = function (it, create) {
665
- // return primitive with prefix
666
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
667
- if (!has(it, META)) {
668
- // can't set metadata to uncaught frozen object
669
- if (!isExtensible(it)) return 'F';
670
- // not necessary to add metadata
671
- if (!create) return 'E';
672
- // add missing metadata
673
- setMeta(it);
674
- // return object ID
675
- } return it[META].i;
676
- };
677
- var getWeak = function (it, create) {
678
- if (!has(it, META)) {
679
- // can't set metadata to uncaught frozen object
680
- if (!isExtensible(it)) return true;
681
- // not necessary to add metadata
682
- if (!create) return false;
683
- // add missing metadata
684
- setMeta(it);
685
- // return hash weak collections IDs
686
- } return it[META].w;
687
- };
688
- // add metadata on freeze-family methods calling
689
- var onFreeze = function (it) {
690
- if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
691
- return it;
692
- };
693
- var meta = module.exports = {
694
- KEY: META,
695
- NEED: false,
696
- fastKey: fastKey,
697
- getWeak: getWeak,
698
- onFreeze: onFreeze
699
- };
700
-
701
- },{"./_fails":21,"./_has":26,"./_is-object":34,"./_object-dp":45,"./_uid":78}],44:[function(require,module,exports){
309
+ },{}],27:[function(require,module,exports){
702
310
  // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
703
311
  var anObject = require('./_an-object');
704
312
  var dPs = require('./_object-dps');
@@ -741,7 +349,7 @@ module.exports = Object.create || function create(O, Properties) {
741
349
  return Properties === undefined ? result : dPs(result, Properties);
742
350
  };
743
351
 
744
- },{"./_an-object":4,"./_dom-create":16,"./_enum-bug-keys":17,"./_html":28,"./_object-dps":46,"./_shared-key":64}],45:[function(require,module,exports){
352
+ },{"./_an-object":3,"./_dom-create":10,"./_enum-bug-keys":11,"./_html":18,"./_object-dps":29,"./_shared-key":36}],28:[function(require,module,exports){
745
353
  var anObject = require('./_an-object');
746
354
  var IE8_DOM_DEFINE = require('./_ie8-dom-define');
747
355
  var toPrimitive = require('./_to-primitive');
@@ -759,7 +367,7 @@ exports.f = require('./_descriptors') ? Object.defineProperty : function defineP
759
367
  return O;
760
368
  };
761
369
 
762
- },{"./_an-object":4,"./_descriptors":15,"./_ie8-dom-define":29,"./_to-primitive":77}],46:[function(require,module,exports){
370
+ },{"./_an-object":3,"./_descriptors":9,"./_ie8-dom-define":19,"./_to-primitive":43}],29:[function(require,module,exports){
763
371
  var dP = require('./_object-dp');
764
372
  var anObject = require('./_an-object');
765
373
  var getKeys = require('./_object-keys');
@@ -774,58 +382,7 @@ module.exports = require('./_descriptors') ? Object.defineProperties : function
774
382
  return O;
775
383
  };
776
384
 
777
- },{"./_an-object":4,"./_descriptors":15,"./_object-dp":45,"./_object-keys":53}],47:[function(require,module,exports){
778
- var pIE = require('./_object-pie');
779
- var createDesc = require('./_property-desc');
780
- var toIObject = require('./_to-iobject');
781
- var toPrimitive = require('./_to-primitive');
782
- var has = require('./_has');
783
- var IE8_DOM_DEFINE = require('./_ie8-dom-define');
784
- var gOPD = Object.getOwnPropertyDescriptor;
785
-
786
- exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {
787
- O = toIObject(O);
788
- P = toPrimitive(P, true);
789
- if (IE8_DOM_DEFINE) try {
790
- return gOPD(O, P);
791
- } catch (e) { /* empty */ }
792
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
793
- };
794
-
795
- },{"./_descriptors":15,"./_has":26,"./_ie8-dom-define":29,"./_object-pie":54,"./_property-desc":57,"./_to-iobject":74,"./_to-primitive":77}],48:[function(require,module,exports){
796
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
797
- var toIObject = require('./_to-iobject');
798
- var gOPN = require('./_object-gopn').f;
799
- var toString = {}.toString;
800
-
801
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
802
- ? Object.getOwnPropertyNames(window) : [];
803
-
804
- var getWindowNames = function (it) {
805
- try {
806
- return gOPN(it);
807
- } catch (e) {
808
- return windowNames.slice();
809
- }
810
- };
811
-
812
- module.exports.f = function getOwnPropertyNames(it) {
813
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
814
- };
815
-
816
- },{"./_object-gopn":49,"./_to-iobject":74}],49:[function(require,module,exports){
817
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
818
- var $keys = require('./_object-keys-internal');
819
- var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');
820
-
821
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
822
- return $keys(O, hiddenKeys);
823
- };
824
-
825
- },{"./_enum-bug-keys":17,"./_object-keys-internal":52}],50:[function(require,module,exports){
826
- exports.f = Object.getOwnPropertySymbols;
827
-
828
- },{}],51:[function(require,module,exports){
385
+ },{"./_an-object":3,"./_descriptors":9,"./_object-dp":28,"./_object-keys":32}],30:[function(require,module,exports){
829
386
  // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
830
387
  var has = require('./_has');
831
388
  var toObject = require('./_to-object');
@@ -840,7 +397,7 @@ module.exports = Object.getPrototypeOf || function (O) {
840
397
  } return O instanceof Object ? ObjectProto : null;
841
398
  };
842
399
 
843
- },{"./_has":26,"./_shared-key":64,"./_to-object":76}],52:[function(require,module,exports){
400
+ },{"./_has":16,"./_shared-key":36,"./_to-object":42}],31:[function(require,module,exports){
844
401
  var has = require('./_has');
845
402
  var toIObject = require('./_to-iobject');
846
403
  var arrayIndexOf = require('./_array-includes')(false);
@@ -859,7 +416,7 @@ module.exports = function (object, names) {
859
416
  return result;
860
417
  };
861
418
 
862
- },{"./_array-includes":5,"./_has":26,"./_shared-key":64,"./_to-iobject":74}],53:[function(require,module,exports){
419
+ },{"./_array-includes":4,"./_has":16,"./_shared-key":36,"./_to-iobject":40}],32:[function(require,module,exports){
863
420
  // 19.1.2.14 / 15.2.3.14 Object.keys(O)
864
421
  var $keys = require('./_object-keys-internal');
865
422
  var enumBugKeys = require('./_enum-bug-keys');
@@ -868,34 +425,7 @@ module.exports = Object.keys || function keys(O) {
868
425
  return $keys(O, enumBugKeys);
869
426
  };
870
427
 
871
- },{"./_enum-bug-keys":17,"./_object-keys-internal":52}],54:[function(require,module,exports){
872
- exports.f = {}.propertyIsEnumerable;
873
-
874
- },{}],55:[function(require,module,exports){
875
- // most Object methods by ES6 should accept primitives
876
- var $export = require('./_export');
877
- var core = require('./_core');
878
- var fails = require('./_fails');
879
- module.exports = function (KEY, exec) {
880
- var fn = (core.Object || {})[KEY] || Object[KEY];
881
- var exp = {};
882
- exp[KEY] = exec(fn);
883
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
884
- };
885
-
886
- },{"./_core":11,"./_export":19,"./_fails":21}],56:[function(require,module,exports){
887
- // all object keys, includes non-enumerable and symbols
888
- var gOPN = require('./_object-gopn');
889
- var gOPS = require('./_object-gops');
890
- var anObject = require('./_an-object');
891
- var Reflect = require('./_global').Reflect;
892
- module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
893
- var keys = gOPN.f(anObject(it));
894
- var getSymbols = gOPS.f;
895
- return getSymbols ? keys.concat(getSymbols(it)) : keys;
896
- };
897
-
898
- },{"./_an-object":4,"./_global":25,"./_object-gopn":49,"./_object-gops":50}],57:[function(require,module,exports){
428
+ },{"./_enum-bug-keys":11,"./_object-keys-internal":31}],33:[function(require,module,exports){
899
429
  module.exports = function (bitmap, value) {
900
430
  return {
901
431
  enumerable: !(bitmap & 1),
@@ -905,7 +435,7 @@ module.exports = function (bitmap, value) {
905
435
  };
906
436
  };
907
437
 
908
- },{}],58:[function(require,module,exports){
438
+ },{}],34:[function(require,module,exports){
909
439
  var global = require('./_global');
910
440
  var hide = require('./_hide');
911
441
  var has = require('./_has');
@@ -938,132 +468,7 @@ require('./_core').inspectSource = function (it) {
938
468
  return typeof this == 'function' && this[SRC] || $toString.call(this);
939
469
  });
940
470
 
941
- },{"./_core":11,"./_function-to-string":24,"./_global":25,"./_has":26,"./_hide":27,"./_uid":78}],59:[function(require,module,exports){
942
- 'use strict';
943
-
944
- var classof = require('./_classof');
945
- var builtinExec = RegExp.prototype.exec;
946
-
947
- // `RegExpExec` abstract operation
948
- // https://tc39.github.io/ecma262/#sec-regexpexec
949
- module.exports = function (R, S) {
950
- var exec = R.exec;
951
- if (typeof exec === 'function') {
952
- var result = exec.call(R, S);
953
- if (typeof result !== 'object') {
954
- throw new TypeError('RegExp exec method returned something other than an Object or null');
955
- }
956
- return result;
957
- }
958
- if (classof(R) !== 'RegExp') {
959
- throw new TypeError('RegExp#exec called on incompatible receiver');
960
- }
961
- return builtinExec.call(R, S);
962
- };
963
-
964
- },{"./_classof":9}],60:[function(require,module,exports){
965
- 'use strict';
966
-
967
- var regexpFlags = require('./_flags');
968
-
969
- var nativeExec = RegExp.prototype.exec;
970
- // This always refers to the native implementation, because the
971
- // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
972
- // which loads this file before patching the method.
973
- var nativeReplace = String.prototype.replace;
974
-
975
- var patchedExec = nativeExec;
976
-
977
- var LAST_INDEX = 'lastIndex';
978
-
979
- var UPDATES_LAST_INDEX_WRONG = (function () {
980
- var re1 = /a/,
981
- re2 = /b*/g;
982
- nativeExec.call(re1, 'a');
983
- nativeExec.call(re2, 'a');
984
- return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
985
- })();
986
-
987
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
988
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
989
-
990
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
991
-
992
- if (PATCH) {
993
- patchedExec = function exec(str) {
994
- var re = this;
995
- var lastIndex, reCopy, match, i;
996
-
997
- if (NPCG_INCLUDED) {
998
- reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
999
- }
1000
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
1001
-
1002
- match = nativeExec.call(re, str);
1003
-
1004
- if (UPDATES_LAST_INDEX_WRONG && match) {
1005
- re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
1006
- }
1007
- if (NPCG_INCLUDED && match && match.length > 1) {
1008
- // Fix browsers whose `exec` methods don't consistently return `undefined`
1009
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1010
- // eslint-disable-next-line no-loop-func
1011
- nativeReplace.call(match[0], reCopy, function () {
1012
- for (i = 1; i < arguments.length - 2; i++) {
1013
- if (arguments[i] === undefined) match[i] = undefined;
1014
- }
1015
- });
1016
- }
1017
-
1018
- return match;
1019
- };
1020
- }
1021
-
1022
- module.exports = patchedExec;
1023
-
1024
- },{"./_flags":23}],61:[function(require,module,exports){
1025
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1026
- /* eslint-disable no-proto */
1027
- var isObject = require('./_is-object');
1028
- var anObject = require('./_an-object');
1029
- var check = function (O, proto) {
1030
- anObject(O);
1031
- if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
1032
- };
1033
- module.exports = {
1034
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
1035
- function (test, buggy, set) {
1036
- try {
1037
- set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);
1038
- set(test, []);
1039
- buggy = !(test instanceof Array);
1040
- } catch (e) { buggy = true; }
1041
- return function setPrototypeOf(O, proto) {
1042
- check(O, proto);
1043
- if (buggy) O.__proto__ = proto;
1044
- else set(O, proto);
1045
- return O;
1046
- };
1047
- }({}, false) : undefined),
1048
- check: check
1049
- };
1050
-
1051
- },{"./_an-object":4,"./_ctx":13,"./_is-object":34,"./_object-gopd":47}],62:[function(require,module,exports){
1052
- 'use strict';
1053
- var global = require('./_global');
1054
- var dP = require('./_object-dp');
1055
- var DESCRIPTORS = require('./_descriptors');
1056
- var SPECIES = require('./_wks')('species');
1057
-
1058
- module.exports = function (KEY) {
1059
- var C = global[KEY];
1060
- if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
1061
- configurable: true,
1062
- get: function () { return this; }
1063
- });
1064
- };
1065
-
1066
- },{"./_descriptors":15,"./_global":25,"./_object-dp":45,"./_wks":81}],63:[function(require,module,exports){
471
+ },{"./_core":6,"./_function-to-string":14,"./_global":15,"./_has":16,"./_hide":17,"./_uid":44}],35:[function(require,module,exports){
1067
472
  var def = require('./_object-dp').f;
1068
473
  var has = require('./_has');
1069
474
  var TAG = require('./_wks')('toStringTag');
@@ -1072,14 +477,14 @@ module.exports = function (it, tag, stat) {
1072
477
  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
1073
478
  };
1074
479
 
1075
- },{"./_has":26,"./_object-dp":45,"./_wks":81}],64:[function(require,module,exports){
480
+ },{"./_has":16,"./_object-dp":28,"./_wks":45}],36:[function(require,module,exports){
1076
481
  var shared = require('./_shared')('keys');
1077
482
  var uid = require('./_uid');
1078
483
  module.exports = function (key) {
1079
484
  return shared[key] || (shared[key] = uid(key));
1080
485
  };
1081
486
 
1082
- },{"./_shared":65,"./_uid":78}],65:[function(require,module,exports){
487
+ },{"./_shared":37,"./_uid":44}],37:[function(require,module,exports){
1083
488
  var core = require('./_core');
1084
489
  var global = require('./_global');
1085
490
  var SHARED = '__core-js_shared__';
@@ -1093,94 +498,7 @@ var store = global[SHARED] || (global[SHARED] = {});
1093
498
  copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
1094
499
  });
1095
500
 
1096
- },{"./_core":11,"./_global":25,"./_library":42}],66:[function(require,module,exports){
1097
- // 7.3.20 SpeciesConstructor(O, defaultConstructor)
1098
- var anObject = require('./_an-object');
1099
- var aFunction = require('./_a-function');
1100
- var SPECIES = require('./_wks')('species');
1101
- module.exports = function (O, D) {
1102
- var C = anObject(O).constructor;
1103
- var S;
1104
- return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
1105
- };
1106
-
1107
- },{"./_a-function":1,"./_an-object":4,"./_wks":81}],67:[function(require,module,exports){
1108
- 'use strict';
1109
- var fails = require('./_fails');
1110
-
1111
- module.exports = function (method, arg) {
1112
- return !!method && fails(function () {
1113
- // eslint-disable-next-line no-useless-call
1114
- arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
1115
- });
1116
- };
1117
-
1118
- },{"./_fails":21}],68:[function(require,module,exports){
1119
- var toInteger = require('./_to-integer');
1120
- var defined = require('./_defined');
1121
- // true -> String#at
1122
- // false -> String#codePointAt
1123
- module.exports = function (TO_STRING) {
1124
- return function (that, pos) {
1125
- var s = String(defined(that));
1126
- var i = toInteger(pos);
1127
- var l = s.length;
1128
- var a, b;
1129
- if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
1130
- a = s.charCodeAt(i);
1131
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
1132
- ? TO_STRING ? s.charAt(i) : a
1133
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
1134
- };
1135
- };
1136
-
1137
- },{"./_defined":14,"./_to-integer":73}],69:[function(require,module,exports){
1138
- // helper for String#{startsWith, endsWith, includes}
1139
- var isRegExp = require('./_is-regexp');
1140
- var defined = require('./_defined');
1141
-
1142
- module.exports = function (that, searchString, NAME) {
1143
- if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
1144
- return String(defined(that));
1145
- };
1146
-
1147
- },{"./_defined":14,"./_is-regexp":35}],70:[function(require,module,exports){
1148
- var $export = require('./_export');
1149
- var defined = require('./_defined');
1150
- var fails = require('./_fails');
1151
- var spaces = require('./_string-ws');
1152
- var space = '[' + spaces + ']';
1153
- var non = '\u200b\u0085';
1154
- var ltrim = RegExp('^' + space + space + '*');
1155
- var rtrim = RegExp(space + space + '*$');
1156
-
1157
- var exporter = function (KEY, exec, ALIAS) {
1158
- var exp = {};
1159
- var FORCE = fails(function () {
1160
- return !!spaces[KEY]() || non[KEY]() != non;
1161
- });
1162
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
1163
- if (ALIAS) exp[ALIAS] = fn;
1164
- $export($export.P + $export.F * FORCE, 'String', exp);
1165
- };
1166
-
1167
- // 1 -> String#trimLeft
1168
- // 2 -> String#trimRight
1169
- // 3 -> String#trim
1170
- var trim = exporter.trim = function (string, TYPE) {
1171
- string = String(defined(string));
1172
- if (TYPE & 1) string = string.replace(ltrim, '');
1173
- if (TYPE & 2) string = string.replace(rtrim, '');
1174
- return string;
1175
- };
1176
-
1177
- module.exports = exporter;
1178
-
1179
- },{"./_defined":14,"./_export":19,"./_fails":21,"./_string-ws":71}],71:[function(require,module,exports){
1180
- module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
1181
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1182
-
1183
- },{}],72:[function(require,module,exports){
501
+ },{"./_core":6,"./_global":15,"./_library":26}],38:[function(require,module,exports){
1184
502
  var toInteger = require('./_to-integer');
1185
503
  var max = Math.max;
1186
504
  var min = Math.min;
@@ -1189,7 +507,7 @@ module.exports = function (index, length) {
1189
507
  return index < 0 ? max(index + length, 0) : min(index, length);
1190
508
  };
1191
509
 
1192
- },{"./_to-integer":73}],73:[function(require,module,exports){
510
+ },{"./_to-integer":39}],39:[function(require,module,exports){
1193
511
  // 7.1.4 ToInteger
1194
512
  var ceil = Math.ceil;
1195
513
  var floor = Math.floor;
@@ -1197,7 +515,7 @@ module.exports = function (it) {
1197
515
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
1198
516
  };
1199
517
 
1200
- },{}],74:[function(require,module,exports){
518
+ },{}],40:[function(require,module,exports){
1201
519
  // to indexed object, toObject with fallback for non-array-like ES3 strings
1202
520
  var IObject = require('./_iobject');
1203
521
  var defined = require('./_defined');
@@ -1205,7 +523,7 @@ module.exports = function (it) {
1205
523
  return IObject(defined(it));
1206
524
  };
1207
525
 
1208
- },{"./_defined":14,"./_iobject":31}],75:[function(require,module,exports){
526
+ },{"./_defined":8,"./_iobject":20}],41:[function(require,module,exports){
1209
527
  // 7.1.15 ToLength
1210
528
  var toInteger = require('./_to-integer');
1211
529
  var min = Math.min;
@@ -1213,14 +531,14 @@ module.exports = function (it) {
1213
531
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
1214
532
  };
1215
533
 
1216
- },{"./_to-integer":73}],76:[function(require,module,exports){
534
+ },{"./_to-integer":39}],42:[function(require,module,exports){
1217
535
  // 7.1.13 ToObject(argument)
1218
536
  var defined = require('./_defined');
1219
537
  module.exports = function (it) {
1220
538
  return Object(defined(it));
1221
539
  };
1222
540
 
1223
- },{"./_defined":14}],77:[function(require,module,exports){
541
+ },{"./_defined":8}],43:[function(require,module,exports){
1224
542
  // 7.1.1 ToPrimitive(input [, PreferredType])
1225
543
  var isObject = require('./_is-object');
1226
544
  // instead of the ES6 spec version, we didn't implement @@toPrimitive case
@@ -1234,28 +552,14 @@ module.exports = function (it, S) {
1234
552
  throw TypeError("Can't convert object to primitive value");
1235
553
  };
1236
554
 
1237
- },{"./_is-object":34}],78:[function(require,module,exports){
555
+ },{"./_is-object":21}],44:[function(require,module,exports){
1238
556
  var id = 0;
1239
557
  var px = Math.random();
1240
558
  module.exports = function (key) {
1241
559
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
1242
560
  };
1243
561
 
1244
- },{}],79:[function(require,module,exports){
1245
- var global = require('./_global');
1246
- var core = require('./_core');
1247
- var LIBRARY = require('./_library');
1248
- var wksExt = require('./_wks-ext');
1249
- var defineProperty = require('./_object-dp').f;
1250
- module.exports = function (name) {
1251
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
1252
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
1253
- };
1254
-
1255
- },{"./_core":11,"./_global":25,"./_library":42,"./_object-dp":45,"./_wks-ext":80}],80:[function(require,module,exports){
1256
- exports.f = require('./_wks');
1257
-
1258
- },{"./_wks":81}],81:[function(require,module,exports){
562
+ },{}],45:[function(require,module,exports){
1259
563
  var store = require('./_shared')('wks');
1260
564
  var uid = require('./_uid');
1261
565
  var Symbol = require('./_global').Symbol;
@@ -1268,68 +572,7 @@ var $exports = module.exports = function (name) {
1268
572
 
1269
573
  $exports.store = store;
1270
574
 
1271
- },{"./_global":25,"./_shared":65,"./_uid":78}],82:[function(require,module,exports){
1272
- var classof = require('./_classof');
1273
- var ITERATOR = require('./_wks')('iterator');
1274
- var Iterators = require('./_iterators');
1275
- module.exports = require('./_core').getIteratorMethod = function (it) {
1276
- if (it != undefined) return it[ITERATOR]
1277
- || it['@@iterator']
1278
- || Iterators[classof(it)];
1279
- };
1280
-
1281
- },{"./_classof":9,"./_core":11,"./_iterators":41,"./_wks":81}],83:[function(require,module,exports){
1282
- 'use strict';
1283
- var $export = require('./_export');
1284
- var $filter = require('./_array-methods')(2);
1285
-
1286
- $export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {
1287
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
1288
- filter: function filter(callbackfn /* , thisArg */) {
1289
- return $filter(this, callbackfn, arguments[1]);
1290
- }
1291
- });
1292
-
1293
- },{"./_array-methods":6,"./_export":19,"./_strict-method":67}],84:[function(require,module,exports){
1294
- 'use strict';
1295
- var ctx = require('./_ctx');
1296
- var $export = require('./_export');
1297
- var toObject = require('./_to-object');
1298
- var call = require('./_iter-call');
1299
- var isArrayIter = require('./_is-array-iter');
1300
- var toLength = require('./_to-length');
1301
- var createProperty = require('./_create-property');
1302
- var getIterFn = require('./core.get-iterator-method');
1303
-
1304
- $export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {
1305
- // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
1306
- from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
1307
- var O = toObject(arrayLike);
1308
- var C = typeof this == 'function' ? this : Array;
1309
- var aLen = arguments.length;
1310
- var mapfn = aLen > 1 ? arguments[1] : undefined;
1311
- var mapping = mapfn !== undefined;
1312
- var index = 0;
1313
- var iterFn = getIterFn(O);
1314
- var length, result, step, iterator;
1315
- if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
1316
- // if object isn't iterable or it's array with default iterator - use simple case
1317
- if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
1318
- for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
1319
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
1320
- }
1321
- } else {
1322
- length = toLength(O.length);
1323
- for (result = new C(length); length > index; index++) {
1324
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
1325
- }
1326
- }
1327
- result.length = index;
1328
- return result;
1329
- }
1330
- });
1331
-
1332
- },{"./_create-property":12,"./_ctx":13,"./_export":19,"./_is-array-iter":32,"./_iter-call":36,"./_iter-detect":39,"./_to-length":75,"./_to-object":76,"./core.get-iterator-method":82}],85:[function(require,module,exports){
575
+ },{"./_global":15,"./_shared":37,"./_uid":44}],46:[function(require,module,exports){
1333
576
  'use strict';
1334
577
  var addToUnscopables = require('./_add-to-unscopables');
1335
578
  var step = require('./_iter-step');
@@ -1365,837 +608,17 @@ addToUnscopables('keys');
1365
608
  addToUnscopables('values');
1366
609
  addToUnscopables('entries');
1367
610
 
1368
- },{"./_add-to-unscopables":2,"./_iter-define":38,"./_iter-step":40,"./_iterators":41,"./_to-iobject":74}],86:[function(require,module,exports){
1369
- 'use strict';
1370
- var $export = require('./_export');
1371
- var $map = require('./_array-methods')(1);
1372
-
1373
- $export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', {
1374
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
1375
- map: function map(callbackfn /* , thisArg */) {
1376
- return $map(this, callbackfn, arguments[1]);
1377
- }
1378
- });
1379
-
1380
- },{"./_array-methods":6,"./_export":19,"./_strict-method":67}],87:[function(require,module,exports){
1381
- 'use strict';
1382
- var $export = require('./_export');
1383
- var html = require('./_html');
1384
- var cof = require('./_cof');
1385
- var toAbsoluteIndex = require('./_to-absolute-index');
1386
- var toLength = require('./_to-length');
1387
- var arraySlice = [].slice;
1388
-
1389
- // fallback for not array-like ES3 strings and DOM objects
1390
- $export($export.P + $export.F * require('./_fails')(function () {
1391
- if (html) arraySlice.call(html);
1392
- }), 'Array', {
1393
- slice: function slice(begin, end) {
1394
- var len = toLength(this.length);
1395
- var klass = cof(this);
1396
- end = end === undefined ? len : end;
1397
- if (klass == 'Array') return arraySlice.call(this, begin, end);
1398
- var start = toAbsoluteIndex(begin, len);
1399
- var upTo = toAbsoluteIndex(end, len);
1400
- var size = toLength(upTo - start);
1401
- var cloned = new Array(size);
1402
- var i = 0;
1403
- for (; i < size; i++) cloned[i] = klass == 'String'
1404
- ? this.charAt(start + i)
1405
- : this[start + i];
1406
- return cloned;
1407
- }
1408
- });
1409
-
1410
- },{"./_cof":10,"./_export":19,"./_fails":21,"./_html":28,"./_to-absolute-index":72,"./_to-length":75}],88:[function(require,module,exports){
1411
- 'use strict';
1412
- var global = require('./_global');
1413
- var has = require('./_has');
1414
- var cof = require('./_cof');
1415
- var inheritIfRequired = require('./_inherit-if-required');
1416
- var toPrimitive = require('./_to-primitive');
1417
- var fails = require('./_fails');
1418
- var gOPN = require('./_object-gopn').f;
1419
- var gOPD = require('./_object-gopd').f;
1420
- var dP = require('./_object-dp').f;
1421
- var $trim = require('./_string-trim').trim;
1422
- var NUMBER = 'Number';
1423
- var $Number = global[NUMBER];
1424
- var Base = $Number;
1425
- var proto = $Number.prototype;
1426
- // Opera ~12 has broken Object#toString
1427
- var BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER;
1428
- var TRIM = 'trim' in String.prototype;
1429
-
1430
- // 7.1.3 ToNumber(argument)
1431
- var toNumber = function (argument) {
1432
- var it = toPrimitive(argument, false);
1433
- if (typeof it == 'string' && it.length > 2) {
1434
- it = TRIM ? it.trim() : $trim(it, 3);
1435
- var first = it.charCodeAt(0);
1436
- var third, radix, maxCode;
1437
- if (first === 43 || first === 45) {
1438
- third = it.charCodeAt(2);
1439
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
1440
- } else if (first === 48) {
1441
- switch (it.charCodeAt(1)) {
1442
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
1443
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
1444
- default: return +it;
1445
- }
1446
- for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
1447
- code = digits.charCodeAt(i);
1448
- // parseInt parses a string to a first unavailable symbol
1449
- // but ToNumber should return NaN if a string contains unavailable symbols
1450
- if (code < 48 || code > maxCode) return NaN;
1451
- } return parseInt(digits, radix);
1452
- }
1453
- } return +it;
1454
- };
1455
-
1456
- if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
1457
- $Number = function Number(value) {
1458
- var it = arguments.length < 1 ? 0 : value;
1459
- var that = this;
1460
- return that instanceof $Number
1461
- // check on 1..constructor(foo) case
1462
- && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
1463
- ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
1464
- };
1465
- for (var keys = require('./_descriptors') ? gOPN(Base) : (
1466
- // ES3:
1467
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
1468
- // ES6 (in case, if modules with ES6 Number statics required before):
1469
- 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
1470
- 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
1471
- ).split(','), j = 0, key; keys.length > j; j++) {
1472
- if (has(Base, key = keys[j]) && !has($Number, key)) {
1473
- dP($Number, key, gOPD(Base, key));
1474
- }
1475
- }
1476
- $Number.prototype = proto;
1477
- proto.constructor = $Number;
1478
- require('./_redefine')(global, NUMBER, $Number);
1479
- }
1480
-
1481
- },{"./_cof":10,"./_descriptors":15,"./_fails":21,"./_global":25,"./_has":26,"./_inherit-if-required":30,"./_object-create":44,"./_object-dp":45,"./_object-gopd":47,"./_object-gopn":49,"./_redefine":58,"./_string-trim":70,"./_to-primitive":77}],89:[function(require,module,exports){
1482
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
1483
- var toIObject = require('./_to-iobject');
1484
- var $getOwnPropertyDescriptor = require('./_object-gopd').f;
1485
-
1486
- require('./_object-sap')('getOwnPropertyDescriptor', function () {
1487
- return function getOwnPropertyDescriptor(it, key) {
1488
- return $getOwnPropertyDescriptor(toIObject(it), key);
1489
- };
1490
- });
1491
-
1492
- },{"./_object-gopd":47,"./_object-sap":55,"./_to-iobject":74}],90:[function(require,module,exports){
1493
- // 19.1.2.14 Object.keys(O)
1494
- var toObject = require('./_to-object');
1495
- var $keys = require('./_object-keys');
1496
-
1497
- require('./_object-sap')('keys', function () {
1498
- return function keys(it) {
1499
- return $keys(toObject(it));
1500
- };
1501
- });
1502
-
1503
- },{"./_object-keys":53,"./_object-sap":55,"./_to-object":76}],91:[function(require,module,exports){
1504
- 'use strict';
1505
- // 19.1.3.6 Object.prototype.toString()
1506
- var classof = require('./_classof');
1507
- var test = {};
1508
- test[require('./_wks')('toStringTag')] = 'z';
1509
- if (test + '' != '[object z]') {
1510
- require('./_redefine')(Object.prototype, 'toString', function toString() {
1511
- return '[object ' + classof(this) + ']';
1512
- }, true);
1513
- }
1514
-
1515
- },{"./_classof":9,"./_redefine":58,"./_wks":81}],92:[function(require,module,exports){
1516
- var global = require('./_global');
1517
- var inheritIfRequired = require('./_inherit-if-required');
1518
- var dP = require('./_object-dp').f;
1519
- var gOPN = require('./_object-gopn').f;
1520
- var isRegExp = require('./_is-regexp');
1521
- var $flags = require('./_flags');
1522
- var $RegExp = global.RegExp;
1523
- var Base = $RegExp;
1524
- var proto = $RegExp.prototype;
1525
- var re1 = /a/g;
1526
- var re2 = /a/g;
1527
- // "new" creates a new object, old webkit buggy here
1528
- var CORRECT_NEW = new $RegExp(re1) !== re1;
1529
-
1530
- if (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () {
1531
- re2[require('./_wks')('match')] = false;
1532
- // RegExp constructor can alter flags and IsRegExp works correct with @@match
1533
- return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
1534
- }))) {
1535
- $RegExp = function RegExp(p, f) {
1536
- var tiRE = this instanceof $RegExp;
1537
- var piRE = isRegExp(p);
1538
- var fiU = f === undefined;
1539
- return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
1540
- : inheritIfRequired(CORRECT_NEW
1541
- ? new Base(piRE && !fiU ? p.source : p, f)
1542
- : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
1543
- , tiRE ? this : proto, $RegExp);
1544
- };
1545
- var proxy = function (key) {
1546
- key in $RegExp || dP($RegExp, key, {
1547
- configurable: true,
1548
- get: function () { return Base[key]; },
1549
- set: function (it) { Base[key] = it; }
1550
- });
1551
- };
1552
- for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
1553
- proto.constructor = $RegExp;
1554
- $RegExp.prototype = proto;
1555
- require('./_redefine')(global, 'RegExp', $RegExp);
1556
- }
1557
-
1558
- require('./_set-species')('RegExp');
1559
-
1560
- },{"./_descriptors":15,"./_fails":21,"./_flags":23,"./_global":25,"./_inherit-if-required":30,"./_is-regexp":35,"./_object-dp":45,"./_object-gopn":49,"./_redefine":58,"./_set-species":62,"./_wks":81}],93:[function(require,module,exports){
1561
- 'use strict';
1562
- var regexpExec = require('./_regexp-exec');
1563
- require('./_export')({
1564
- target: 'RegExp',
1565
- proto: true,
1566
- forced: regexpExec !== /./.exec
1567
- }, {
1568
- exec: regexpExec
1569
- });
1570
-
1571
- },{"./_export":19,"./_regexp-exec":60}],94:[function(require,module,exports){
1572
- 'use strict';
1573
-
1574
- var anObject = require('./_an-object');
1575
- var toLength = require('./_to-length');
1576
- var advanceStringIndex = require('./_advance-string-index');
1577
- var regExpExec = require('./_regexp-exec-abstract');
1578
-
1579
- // @@match logic
1580
- require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCallNative) {
1581
- return [
1582
- // `String.prototype.match` method
1583
- // https://tc39.github.io/ecma262/#sec-string.prototype.match
1584
- function match(regexp) {
1585
- var O = defined(this);
1586
- var fn = regexp == undefined ? undefined : regexp[MATCH];
1587
- return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
1588
- },
1589
- // `RegExp.prototype[@@match]` method
1590
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
1591
- function (regexp) {
1592
- var res = maybeCallNative($match, regexp, this);
1593
- if (res.done) return res.value;
1594
- var rx = anObject(regexp);
1595
- var S = String(this);
1596
- if (!rx.global) return regExpExec(rx, S);
1597
- var fullUnicode = rx.unicode;
1598
- rx.lastIndex = 0;
1599
- var A = [];
1600
- var n = 0;
1601
- var result;
1602
- while ((result = regExpExec(rx, S)) !== null) {
1603
- var matchStr = String(result[0]);
1604
- A[n] = matchStr;
1605
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1606
- n++;
1607
- }
1608
- return n === 0 ? null : A;
1609
- }
1610
- ];
1611
- });
1612
-
1613
- },{"./_advance-string-index":3,"./_an-object":4,"./_fix-re-wks":22,"./_regexp-exec-abstract":59,"./_to-length":75}],95:[function(require,module,exports){
1614
- 'use strict';
1615
-
1616
- var anObject = require('./_an-object');
1617
- var toObject = require('./_to-object');
1618
- var toLength = require('./_to-length');
1619
- var toInteger = require('./_to-integer');
1620
- var advanceStringIndex = require('./_advance-string-index');
1621
- var regExpExec = require('./_regexp-exec-abstract');
1622
- var max = Math.max;
1623
- var min = Math.min;
1624
- var floor = Math.floor;
1625
- var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
1626
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
1627
-
1628
- var maybeToString = function (it) {
1629
- return it === undefined ? it : String(it);
1630
- };
1631
-
1632
- // @@replace logic
1633
- require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
1634
- return [
1635
- // `String.prototype.replace` method
1636
- // https://tc39.github.io/ecma262/#sec-string.prototype.replace
1637
- function replace(searchValue, replaceValue) {
1638
- var O = defined(this);
1639
- var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
1640
- return fn !== undefined
1641
- ? fn.call(searchValue, O, replaceValue)
1642
- : $replace.call(String(O), searchValue, replaceValue);
1643
- },
1644
- // `RegExp.prototype[@@replace]` method
1645
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
1646
- function (regexp, replaceValue) {
1647
- var res = maybeCallNative($replace, regexp, this, replaceValue);
1648
- if (res.done) return res.value;
1649
-
1650
- var rx = anObject(regexp);
1651
- var S = String(this);
1652
- var functionalReplace = typeof replaceValue === 'function';
1653
- if (!functionalReplace) replaceValue = String(replaceValue);
1654
- var global = rx.global;
1655
- if (global) {
1656
- var fullUnicode = rx.unicode;
1657
- rx.lastIndex = 0;
1658
- }
1659
- var results = [];
1660
- while (true) {
1661
- var result = regExpExec(rx, S);
1662
- if (result === null) break;
1663
- results.push(result);
1664
- if (!global) break;
1665
- var matchStr = String(result[0]);
1666
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1667
- }
1668
- var accumulatedResult = '';
1669
- var nextSourcePosition = 0;
1670
- for (var i = 0; i < results.length; i++) {
1671
- result = results[i];
1672
- var matched = String(result[0]);
1673
- var position = max(min(toInteger(result.index), S.length), 0);
1674
- var captures = [];
1675
- // NOTE: This is equivalent to
1676
- // captures = result.slice(1).map(maybeToString)
1677
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1678
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1679
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1680
- for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
1681
- var namedCaptures = result.groups;
1682
- if (functionalReplace) {
1683
- var replacerArgs = [matched].concat(captures, position, S);
1684
- if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
1685
- var replacement = String(replaceValue.apply(undefined, replacerArgs));
1686
- } else {
1687
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1688
- }
1689
- if (position >= nextSourcePosition) {
1690
- accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
1691
- nextSourcePosition = position + matched.length;
1692
- }
1693
- }
1694
- return accumulatedResult + S.slice(nextSourcePosition);
1695
- }
1696
- ];
1697
-
1698
- // https://tc39.github.io/ecma262/#sec-getsubstitution
1699
- function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
1700
- var tailPos = position + matched.length;
1701
- var m = captures.length;
1702
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1703
- if (namedCaptures !== undefined) {
1704
- namedCaptures = toObject(namedCaptures);
1705
- symbols = SUBSTITUTION_SYMBOLS;
1706
- }
1707
- return $replace.call(replacement, symbols, function (match, ch) {
1708
- var capture;
1709
- switch (ch.charAt(0)) {
1710
- case '$': return '$';
1711
- case '&': return matched;
1712
- case '`': return str.slice(0, position);
1713
- case "'": return str.slice(tailPos);
1714
- case '<':
1715
- capture = namedCaptures[ch.slice(1, -1)];
1716
- break;
1717
- default: // \d\d?
1718
- var n = +ch;
1719
- if (n === 0) return match;
1720
- if (n > m) {
1721
- var f = floor(n / 10);
1722
- if (f === 0) return match;
1723
- if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
1724
- return match;
1725
- }
1726
- capture = captures[n - 1];
1727
- }
1728
- return capture === undefined ? '' : capture;
1729
- });
1730
- }
1731
- });
1732
-
1733
- },{"./_advance-string-index":3,"./_an-object":4,"./_fix-re-wks":22,"./_regexp-exec-abstract":59,"./_to-integer":73,"./_to-length":75,"./_to-object":76}],96:[function(require,module,exports){
1734
- 'use strict';
1735
-
1736
- var isRegExp = require('./_is-regexp');
1737
- var anObject = require('./_an-object');
1738
- var speciesConstructor = require('./_species-constructor');
1739
- var advanceStringIndex = require('./_advance-string-index');
1740
- var toLength = require('./_to-length');
1741
- var callRegExpExec = require('./_regexp-exec-abstract');
1742
- var regexpExec = require('./_regexp-exec');
1743
- var fails = require('./_fails');
1744
- var $min = Math.min;
1745
- var $push = [].push;
1746
- var $SPLIT = 'split';
1747
- var LENGTH = 'length';
1748
- var LAST_INDEX = 'lastIndex';
1749
- var MAX_UINT32 = 0xffffffff;
1750
-
1751
- // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
1752
- var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
1753
-
1754
- // @@split logic
1755
- require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
1756
- var internalSplit;
1757
- if (
1758
- 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
1759
- 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
1760
- 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
1761
- '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
1762
- '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
1763
- ''[$SPLIT](/.?/)[LENGTH]
1764
- ) {
1765
- // based on es5-shim implementation, need to rework it
1766
- internalSplit = function (separator, limit) {
1767
- var string = String(this);
1768
- if (separator === undefined && limit === 0) return [];
1769
- // If `separator` is not a regex, use native split
1770
- if (!isRegExp(separator)) return $split.call(string, separator, limit);
1771
- var output = [];
1772
- var flags = (separator.ignoreCase ? 'i' : '') +
1773
- (separator.multiline ? 'm' : '') +
1774
- (separator.unicode ? 'u' : '') +
1775
- (separator.sticky ? 'y' : '');
1776
- var lastLastIndex = 0;
1777
- var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
1778
- // Make `global` and avoid `lastIndex` issues by working with a copy
1779
- var separatorCopy = new RegExp(separator.source, flags + 'g');
1780
- var match, lastIndex, lastLength;
1781
- while (match = regexpExec.call(separatorCopy, string)) {
1782
- lastIndex = separatorCopy[LAST_INDEX];
1783
- if (lastIndex > lastLastIndex) {
1784
- output.push(string.slice(lastLastIndex, match.index));
1785
- if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
1786
- lastLength = match[0][LENGTH];
1787
- lastLastIndex = lastIndex;
1788
- if (output[LENGTH] >= splitLimit) break;
1789
- }
1790
- if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
1791
- }
1792
- if (lastLastIndex === string[LENGTH]) {
1793
- if (lastLength || !separatorCopy.test('')) output.push('');
1794
- } else output.push(string.slice(lastLastIndex));
1795
- return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
1796
- };
1797
- // Chakra, V8
1798
- } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
1799
- internalSplit = function (separator, limit) {
1800
- return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
1801
- };
1802
- } else {
1803
- internalSplit = $split;
1804
- }
1805
-
1806
- return [
1807
- // `String.prototype.split` method
1808
- // https://tc39.github.io/ecma262/#sec-string.prototype.split
1809
- function split(separator, limit) {
1810
- var O = defined(this);
1811
- var splitter = separator == undefined ? undefined : separator[SPLIT];
1812
- return splitter !== undefined
1813
- ? splitter.call(separator, O, limit)
1814
- : internalSplit.call(String(O), separator, limit);
1815
- },
1816
- // `RegExp.prototype[@@split]` method
1817
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
1818
- //
1819
- // NOTE: This cannot be properly polyfilled in engines that don't support
1820
- // the 'y' flag.
1821
- function (regexp, limit) {
1822
- var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
1823
- if (res.done) return res.value;
1824
-
1825
- var rx = anObject(regexp);
1826
- var S = String(this);
1827
- var C = speciesConstructor(rx, RegExp);
1828
-
1829
- var unicodeMatching = rx.unicode;
1830
- var flags = (rx.ignoreCase ? 'i' : '') +
1831
- (rx.multiline ? 'm' : '') +
1832
- (rx.unicode ? 'u' : '') +
1833
- (SUPPORTS_Y ? 'y' : 'g');
1834
-
1835
- // ^(? + rx + ) is needed, in combination with some S slicing, to
1836
- // simulate the 'y' flag.
1837
- var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
1838
- var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
1839
- if (lim === 0) return [];
1840
- if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
1841
- var p = 0;
1842
- var q = 0;
1843
- var A = [];
1844
- while (q < S.length) {
1845
- splitter.lastIndex = SUPPORTS_Y ? q : 0;
1846
- var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
1847
- var e;
1848
- if (
1849
- z === null ||
1850
- (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
1851
- ) {
1852
- q = advanceStringIndex(S, q, unicodeMatching);
1853
- } else {
1854
- A.push(S.slice(p, q));
1855
- if (A.length === lim) return A;
1856
- for (var i = 1; i <= z.length - 1; i++) {
1857
- A.push(z[i]);
1858
- if (A.length === lim) return A;
1859
- }
1860
- q = p = e;
1861
- }
1862
- }
1863
- A.push(S.slice(p));
1864
- return A;
1865
- }
1866
- ];
1867
- });
1868
-
1869
- },{"./_advance-string-index":3,"./_an-object":4,"./_fails":21,"./_fix-re-wks":22,"./_is-regexp":35,"./_regexp-exec":60,"./_regexp-exec-abstract":59,"./_species-constructor":66,"./_to-length":75}],97:[function(require,module,exports){
1870
- // 21.1.3.7 String.prototype.includes(searchString, position = 0)
1871
- 'use strict';
1872
- var $export = require('./_export');
1873
- var context = require('./_string-context');
1874
- var INCLUDES = 'includes';
1875
-
1876
- $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
1877
- includes: function includes(searchString /* , position = 0 */) {
1878
- return !!~context(this, searchString, INCLUDES)
1879
- .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
1880
- }
1881
- });
1882
-
1883
- },{"./_export":19,"./_fails-is-regexp":20,"./_string-context":69}],98:[function(require,module,exports){
1884
- 'use strict';
1885
- var $at = require('./_string-at')(true);
1886
-
1887
- // 21.1.3.27 String.prototype[@@iterator]()
1888
- require('./_iter-define')(String, 'String', function (iterated) {
1889
- this._t = String(iterated); // target
1890
- this._i = 0; // next index
1891
- // 21.1.5.2.1 %StringIteratorPrototype%.next()
1892
- }, function () {
1893
- var O = this._t;
1894
- var index = this._i;
1895
- var point;
1896
- if (index >= O.length) return { value: undefined, done: true };
1897
- point = $at(O, index);
1898
- this._i += point.length;
1899
- return { value: point, done: false };
1900
- });
1901
-
1902
- },{"./_iter-define":38,"./_string-at":68}],99:[function(require,module,exports){
1903
- 'use strict';
1904
- // ECMAScript 6 symbols shim
1905
- var global = require('./_global');
1906
- var has = require('./_has');
1907
- var DESCRIPTORS = require('./_descriptors');
1908
- var $export = require('./_export');
1909
- var redefine = require('./_redefine');
1910
- var META = require('./_meta').KEY;
1911
- var $fails = require('./_fails');
1912
- var shared = require('./_shared');
1913
- var setToStringTag = require('./_set-to-string-tag');
1914
- var uid = require('./_uid');
1915
- var wks = require('./_wks');
1916
- var wksExt = require('./_wks-ext');
1917
- var wksDefine = require('./_wks-define');
1918
- var enumKeys = require('./_enum-keys');
1919
- var isArray = require('./_is-array');
1920
- var anObject = require('./_an-object');
1921
- var isObject = require('./_is-object');
1922
- var toObject = require('./_to-object');
1923
- var toIObject = require('./_to-iobject');
1924
- var toPrimitive = require('./_to-primitive');
1925
- var createDesc = require('./_property-desc');
1926
- var _create = require('./_object-create');
1927
- var gOPNExt = require('./_object-gopn-ext');
1928
- var $GOPD = require('./_object-gopd');
1929
- var $GOPS = require('./_object-gops');
1930
- var $DP = require('./_object-dp');
1931
- var $keys = require('./_object-keys');
1932
- var gOPD = $GOPD.f;
1933
- var dP = $DP.f;
1934
- var gOPN = gOPNExt.f;
1935
- var $Symbol = global.Symbol;
1936
- var $JSON = global.JSON;
1937
- var _stringify = $JSON && $JSON.stringify;
1938
- var PROTOTYPE = 'prototype';
1939
- var HIDDEN = wks('_hidden');
1940
- var TO_PRIMITIVE = wks('toPrimitive');
1941
- var isEnum = {}.propertyIsEnumerable;
1942
- var SymbolRegistry = shared('symbol-registry');
1943
- var AllSymbols = shared('symbols');
1944
- var OPSymbols = shared('op-symbols');
1945
- var ObjectProto = Object[PROTOTYPE];
1946
- var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
1947
- var QObject = global.QObject;
1948
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
1949
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
1950
-
1951
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
1952
- var setSymbolDesc = DESCRIPTORS && $fails(function () {
1953
- return _create(dP({}, 'a', {
1954
- get: function () { return dP(this, 'a', { value: 7 }).a; }
1955
- })).a != 7;
1956
- }) ? function (it, key, D) {
1957
- var protoDesc = gOPD(ObjectProto, key);
1958
- if (protoDesc) delete ObjectProto[key];
1959
- dP(it, key, D);
1960
- if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
1961
- } : dP;
1962
-
1963
- var wrap = function (tag) {
1964
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
1965
- sym._k = tag;
1966
- return sym;
1967
- };
1968
-
1969
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
1970
- return typeof it == 'symbol';
1971
- } : function (it) {
1972
- return it instanceof $Symbol;
1973
- };
1974
-
1975
- var $defineProperty = function defineProperty(it, key, D) {
1976
- if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
1977
- anObject(it);
1978
- key = toPrimitive(key, true);
1979
- anObject(D);
1980
- if (has(AllSymbols, key)) {
1981
- if (!D.enumerable) {
1982
- if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
1983
- it[HIDDEN][key] = true;
1984
- } else {
1985
- if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
1986
- D = _create(D, { enumerable: createDesc(0, false) });
1987
- } return setSymbolDesc(it, key, D);
1988
- } return dP(it, key, D);
1989
- };
1990
- var $defineProperties = function defineProperties(it, P) {
1991
- anObject(it);
1992
- var keys = enumKeys(P = toIObject(P));
1993
- var i = 0;
1994
- var l = keys.length;
1995
- var key;
1996
- while (l > i) $defineProperty(it, key = keys[i++], P[key]);
1997
- return it;
1998
- };
1999
- var $create = function create(it, P) {
2000
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
2001
- };
2002
- var $propertyIsEnumerable = function propertyIsEnumerable(key) {
2003
- var E = isEnum.call(this, key = toPrimitive(key, true));
2004
- if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
2005
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
2006
- };
2007
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
2008
- it = toIObject(it);
2009
- key = toPrimitive(key, true);
2010
- if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
2011
- var D = gOPD(it, key);
2012
- if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
2013
- return D;
2014
- };
2015
- var $getOwnPropertyNames = function getOwnPropertyNames(it) {
2016
- var names = gOPN(toIObject(it));
2017
- var result = [];
2018
- var i = 0;
2019
- var key;
2020
- while (names.length > i) {
2021
- if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
2022
- } return result;
2023
- };
2024
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
2025
- var IS_OP = it === ObjectProto;
2026
- var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
2027
- var result = [];
2028
- var i = 0;
2029
- var key;
2030
- while (names.length > i) {
2031
- if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
2032
- } return result;
2033
- };
2034
-
2035
- // 19.4.1.1 Symbol([description])
2036
- if (!USE_NATIVE) {
2037
- $Symbol = function Symbol() {
2038
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
2039
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
2040
- var $set = function (value) {
2041
- if (this === ObjectProto) $set.call(OPSymbols, value);
2042
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
2043
- setSymbolDesc(this, tag, createDesc(1, value));
2044
- };
2045
- if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
2046
- return wrap(tag);
2047
- };
2048
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
2049
- return this._k;
2050
- });
2051
-
2052
- $GOPD.f = $getOwnPropertyDescriptor;
2053
- $DP.f = $defineProperty;
2054
- require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;
2055
- require('./_object-pie').f = $propertyIsEnumerable;
2056
- $GOPS.f = $getOwnPropertySymbols;
2057
-
2058
- if (DESCRIPTORS && !require('./_library')) {
2059
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
2060
- }
2061
-
2062
- wksExt.f = function (name) {
2063
- return wrap(wks(name));
2064
- };
2065
- }
2066
-
2067
- $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
2068
-
2069
- for (var es6Symbols = (
2070
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
2071
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
2072
- ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
2073
-
2074
- for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
2075
-
2076
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
2077
- // 19.4.2.1 Symbol.for(key)
2078
- 'for': function (key) {
2079
- return has(SymbolRegistry, key += '')
2080
- ? SymbolRegistry[key]
2081
- : SymbolRegistry[key] = $Symbol(key);
2082
- },
2083
- // 19.4.2.5 Symbol.keyFor(sym)
2084
- keyFor: function keyFor(sym) {
2085
- if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
2086
- for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
2087
- },
2088
- useSetter: function () { setter = true; },
2089
- useSimple: function () { setter = false; }
2090
- });
2091
-
2092
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
2093
- // 19.1.2.2 Object.create(O [, Properties])
2094
- create: $create,
2095
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
2096
- defineProperty: $defineProperty,
2097
- // 19.1.2.3 Object.defineProperties(O, Properties)
2098
- defineProperties: $defineProperties,
2099
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
2100
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
2101
- // 19.1.2.7 Object.getOwnPropertyNames(O)
2102
- getOwnPropertyNames: $getOwnPropertyNames,
2103
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
2104
- getOwnPropertySymbols: $getOwnPropertySymbols
2105
- });
2106
-
2107
- // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
2108
- // https://bugs.chromium.org/p/v8/issues/detail?id=3443
2109
- var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
2110
-
2111
- $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
2112
- getOwnPropertySymbols: function getOwnPropertySymbols(it) {
2113
- return $GOPS.f(toObject(it));
2114
- }
2115
- });
2116
-
2117
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
2118
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
2119
- var S = $Symbol();
2120
- // MS Edge converts symbol values to JSON as {}
2121
- // WebKit converts symbol values to JSON as null
2122
- // V8 throws on boxed symbols
2123
- return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
2124
- })), 'JSON', {
2125
- stringify: function stringify(it) {
2126
- var args = [it];
2127
- var i = 1;
2128
- var replacer, $replacer;
2129
- while (arguments.length > i) args.push(arguments[i++]);
2130
- $replacer = replacer = args[1];
2131
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
2132
- if (!isArray(replacer)) replacer = function (key, value) {
2133
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
2134
- if (!isSymbol(value)) return value;
2135
- };
2136
- args[1] = replacer;
2137
- return _stringify.apply($JSON, args);
2138
- }
2139
- });
2140
-
2141
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
2142
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
2143
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
2144
- setToStringTag($Symbol, 'Symbol');
2145
- // 20.2.1.9 Math[@@toStringTag]
2146
- setToStringTag(Math, 'Math', true);
2147
- // 24.3.3 JSON[@@toStringTag]
2148
- setToStringTag(global.JSON, 'JSON', true);
2149
-
2150
- },{"./_an-object":4,"./_descriptors":15,"./_enum-keys":18,"./_export":19,"./_fails":21,"./_global":25,"./_has":26,"./_hide":27,"./_is-array":33,"./_is-object":34,"./_library":42,"./_meta":43,"./_object-create":44,"./_object-dp":45,"./_object-gopd":47,"./_object-gopn":49,"./_object-gopn-ext":48,"./_object-gops":50,"./_object-keys":53,"./_object-pie":54,"./_property-desc":57,"./_redefine":58,"./_set-to-string-tag":63,"./_shared":65,"./_to-iobject":74,"./_to-object":76,"./_to-primitive":77,"./_uid":78,"./_wks":81,"./_wks-define":79,"./_wks-ext":80}],100:[function(require,module,exports){
2151
- 'use strict';
2152
- // https://github.com/tc39/Array.prototype.includes
2153
- var $export = require('./_export');
2154
- var $includes = require('./_array-includes')(true);
2155
-
2156
- $export($export.P, 'Array', {
2157
- includes: function includes(el /* , fromIndex = 0 */) {
2158
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2159
- }
2160
- });
2161
-
2162
- require('./_add-to-unscopables')('includes');
2163
-
2164
- },{"./_add-to-unscopables":2,"./_array-includes":5,"./_export":19}],101:[function(require,module,exports){
2165
- // https://github.com/tc39/proposal-object-getownpropertydescriptors
2166
- var $export = require('./_export');
2167
- var ownKeys = require('./_own-keys');
2168
- var toIObject = require('./_to-iobject');
2169
- var gOPD = require('./_object-gopd');
2170
- var createProperty = require('./_create-property');
2171
-
2172
- $export($export.S, 'Object', {
2173
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
2174
- var O = toIObject(object);
2175
- var getDesc = gOPD.f;
2176
- var keys = ownKeys(O);
2177
- var result = {};
2178
- var i = 0;
2179
- var key, desc;
2180
- while (keys.length > i) {
2181
- desc = getDesc(O, key = keys[i++]);
2182
- if (desc !== undefined) createProperty(result, key, desc);
2183
- }
2184
- return result;
2185
- }
2186
- });
2187
-
2188
- },{"./_create-property":12,"./_export":19,"./_object-gopd":47,"./_own-keys":56,"./_to-iobject":74}],102:[function(require,module,exports){
2189
- var $iterators = require('./es6.array.iterator');
2190
- var getKeys = require('./_object-keys');
2191
- var redefine = require('./_redefine');
2192
- var global = require('./_global');
2193
- var hide = require('./_hide');
2194
- var Iterators = require('./_iterators');
2195
- var wks = require('./_wks');
2196
- var ITERATOR = wks('iterator');
2197
- var TO_STRING_TAG = wks('toStringTag');
2198
- var ArrayValues = Iterators.Array;
611
+ },{"./_add-to-unscopables":2,"./_iter-define":23,"./_iter-step":24,"./_iterators":25,"./_to-iobject":40}],47:[function(require,module,exports){
612
+ var $iterators = require('./es6.array.iterator');
613
+ var getKeys = require('./_object-keys');
614
+ var redefine = require('./_redefine');
615
+ var global = require('./_global');
616
+ var hide = require('./_hide');
617
+ var Iterators = require('./_iterators');
618
+ var wks = require('./_wks');
619
+ var ITERATOR = wks('iterator');
620
+ var TO_STRING_TAG = wks('toStringTag');
621
+ var ArrayValues = Iterators.Array;
2199
622
 
2200
623
  var DOMIterables = {
2201
624
  CSSRuleList: true, // TODO: Not spec compliant, should be false.
@@ -2245,199 +668,153 @@ for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++
2245
668
  }
2246
669
  }
2247
670
 
2248
- },{"./_global":25,"./_hide":27,"./_iterators":41,"./_object-keys":53,"./_redefine":58,"./_wks":81,"./es6.array.iterator":85}],103:[function(require,module,exports){
671
+ },{"./_global":15,"./_hide":17,"./_iterators":25,"./_object-keys":32,"./_redefine":34,"./_wks":45,"./es6.array.iterator":46}],48:[function(require,module,exports){
2249
672
  "use strict";
2250
673
 
2251
- require("core-js/modules/es6.symbol.js");
2252
- require("core-js/modules/es6.number.constructor.js");
2253
- require("core-js/modules/es6.string.iterator.js");
2254
- require("core-js/modules/es6.object.to-string.js");
2255
- require("core-js/modules/es6.array.iterator.js");
2256
- require("core-js/modules/web.dom.iterable.js");
2257
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2258
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2259
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2260
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2261
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2262
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2263
- var _require = require('./protocol'),
2264
- Parser = _require.Parser,
2265
- PROTOCOL_6 = _require.PROTOCOL_6,
2266
- PROTOCOL_7 = _require.PROTOCOL_7;
2267
- var VERSION = "4.0.2";
2268
- var Connector = /*#__PURE__*/function () {
2269
- function Connector(options, WebSocket, Timer, handlers) {
2270
- var _this = this;
2271
- _classCallCheck(this, Connector);
674
+ const {
675
+ Parser,
676
+ PROTOCOL_6,
677
+ PROTOCOL_7
678
+ } = require('./protocol');
679
+ const VERSION = "4.0.3";
680
+ class Connector {
681
+ constructor(options, WebSocket, Timer, handlers) {
2272
682
  this.options = options;
2273
683
  this.WebSocket = WebSocket;
2274
684
  this.Timer = Timer;
2275
685
  this.handlers = handlers;
2276
- var path = this.options.path ? "".concat(this.options.path) : 'livereload';
2277
- var port = this.options.port ? ":".concat(this.options.port) : '';
2278
- this._uri = "ws".concat(this.options.https ? 's' : '', "://").concat(this.options.host).concat(port, "/").concat(path);
686
+ const path = this.options.path ? `${this.options.path}` : 'livereload';
687
+ const port = this.options.port ? `:${this.options.port}` : '';
688
+ this._uri = `ws${this.options.https ? 's' : ''}://${this.options.host}${port}/${path}`;
2279
689
  this._nextDelay = this.options.mindelay;
2280
690
  this._connectionDesired = false;
2281
691
  this.protocol = 0;
2282
692
  this.protocolParser = new Parser({
2283
- connected: function connected(protocol) {
2284
- _this.protocol = protocol;
2285
- _this._handshakeTimeout.stop();
2286
- _this._nextDelay = _this.options.mindelay;
2287
- _this._disconnectionReason = 'broken';
2288
- return _this.handlers.connected(_this.protocol);
693
+ connected: protocol => {
694
+ this.protocol = protocol;
695
+ this._handshakeTimeout.stop();
696
+ this._nextDelay = this.options.mindelay;
697
+ this._disconnectionReason = 'broken';
698
+ return this.handlers.connected(this.protocol);
2289
699
  },
2290
- error: function error(e) {
2291
- _this.handlers.error(e);
2292
- return _this._closeOnError();
700
+ error: e => {
701
+ this.handlers.error(e);
702
+ return this._closeOnError();
2293
703
  },
2294
- message: function message(_message) {
2295
- return _this.handlers.message(_message);
704
+ message: message => {
705
+ return this.handlers.message(message);
2296
706
  }
2297
707
  });
2298
- this._handshakeTimeout = new this.Timer(function () {
2299
- if (!_this._isSocketConnected()) {
708
+ this._handshakeTimeout = new this.Timer(() => {
709
+ if (!this._isSocketConnected()) {
2300
710
  return;
2301
711
  }
2302
- _this._disconnectionReason = 'handshake-timeout';
2303
- return _this.socket.close();
712
+ this._disconnectionReason = 'handshake-timeout';
713
+ return this.socket.close();
2304
714
  });
2305
- this._reconnectTimer = new this.Timer(function () {
2306
- if (!_this._connectionDesired) {
715
+ this._reconnectTimer = new this.Timer(() => {
716
+ if (!this._connectionDesired) {
2307
717
  // shouldn't hit this, but just in case
2308
718
  return;
2309
719
  }
2310
- return _this.connect();
720
+ return this.connect();
2311
721
  });
2312
722
  this.connect();
2313
723
  }
2314
- _createClass(Connector, [{
2315
- key: "_isSocketConnected",
2316
- value: function _isSocketConnected() {
2317
- return this.socket && this.socket.readyState === this.WebSocket.OPEN;
724
+ _isSocketConnected() {
725
+ return this.socket && this.socket.readyState === this.WebSocket.OPEN;
726
+ }
727
+ connect() {
728
+ this._connectionDesired = true;
729
+ if (this._isSocketConnected()) {
730
+ return;
2318
731
  }
2319
- }, {
2320
- key: "connect",
2321
- value: function connect() {
2322
- var _this2 = this;
2323
- this._connectionDesired = true;
2324
- if (this._isSocketConnected()) {
2325
- return;
2326
- }
2327
732
 
2328
- // prepare for a new connection
2329
- this._reconnectTimer.stop();
2330
- this._disconnectionReason = 'cannot-connect';
2331
- this.protocolParser.reset();
2332
- this.handlers.connecting();
2333
- this.socket = new this.WebSocket(this._uri);
2334
- this.socket.onopen = function (e) {
2335
- return _this2._onopen(e);
2336
- };
2337
- this.socket.onclose = function (e) {
2338
- return _this2._onclose(e);
2339
- };
2340
- this.socket.onmessage = function (e) {
2341
- return _this2._onmessage(e);
2342
- };
2343
- this.socket.onerror = function (e) {
2344
- return _this2._onerror(e);
2345
- };
2346
- }
2347
- }, {
2348
- key: "disconnect",
2349
- value: function disconnect() {
2350
- this._connectionDesired = false;
2351
- this._reconnectTimer.stop(); // in case it was running
733
+ // prepare for a new connection
734
+ this._reconnectTimer.stop();
735
+ this._disconnectionReason = 'cannot-connect';
736
+ this.protocolParser.reset();
737
+ this.handlers.connecting();
738
+ this.socket = new this.WebSocket(this._uri);
739
+ this.socket.onopen = e => this._onopen(e);
740
+ this.socket.onclose = e => this._onclose(e);
741
+ this.socket.onmessage = e => this._onmessage(e);
742
+ this.socket.onerror = e => this._onerror(e);
743
+ }
744
+ disconnect() {
745
+ this._connectionDesired = false;
746
+ this._reconnectTimer.stop(); // in case it was running
2352
747
 
2353
- if (!this._isSocketConnected()) {
2354
- return;
2355
- }
2356
- this._disconnectionReason = 'manual';
2357
- return this.socket.close();
2358
- }
2359
- }, {
2360
- key: "_scheduleReconnection",
2361
- value: function _scheduleReconnection() {
2362
- if (!this._connectionDesired) {
2363
- // don't reconnect after manual disconnection
2364
- return;
2365
- }
2366
- if (!this._reconnectTimer.running) {
2367
- this._reconnectTimer.start(this._nextDelay);
2368
- this._nextDelay = Math.min(this.options.maxdelay, this._nextDelay * 2);
2369
- }
748
+ if (!this._isSocketConnected()) {
749
+ return;
2370
750
  }
2371
- }, {
2372
- key: "sendCommand",
2373
- value: function sendCommand(command) {
2374
- if (!this.protocol) {
2375
- return;
2376
- }
2377
- return this._sendCommand(command);
751
+ this._disconnectionReason = 'manual';
752
+ return this.socket.close();
753
+ }
754
+ _scheduleReconnection() {
755
+ if (!this._connectionDesired) {
756
+ // don't reconnect after manual disconnection
757
+ return;
2378
758
  }
2379
- }, {
2380
- key: "_sendCommand",
2381
- value: function _sendCommand(command) {
2382
- return this.socket.send(JSON.stringify(command));
759
+ if (!this._reconnectTimer.running) {
760
+ this._reconnectTimer.start(this._nextDelay);
761
+ this._nextDelay = Math.min(this.options.maxdelay, this._nextDelay * 2);
2383
762
  }
2384
- }, {
2385
- key: "_closeOnError",
2386
- value: function _closeOnError() {
2387
- this._handshakeTimeout.stop();
2388
- this._disconnectionReason = 'error';
2389
- return this.socket.close();
763
+ }
764
+ sendCommand(command) {
765
+ if (!this.protocol) {
766
+ return;
2390
767
  }
2391
- }, {
2392
- key: "_onopen",
2393
- value: function _onopen(e) {
2394
- this.handlers.socketConnected();
2395
- this._disconnectionReason = 'handshake-failed';
2396
-
2397
- // start handshake
2398
- var hello = {
2399
- command: 'hello',
2400
- protocols: [PROTOCOL_6, PROTOCOL_7]
2401
- };
2402
- hello.ver = VERSION;
2403
- if (this.options.ext) {
2404
- hello.ext = this.options.ext;
2405
- }
2406
- if (this.options.extver) {
2407
- hello.extver = this.options.extver;
2408
- }
2409
- if (this.options.snipver) {
2410
- hello.snipver = this.options.snipver;
2411
- }
2412
- this._sendCommand(hello);
2413
- return this._handshakeTimeout.start(this.options.handshake_timeout);
768
+ return this._sendCommand(command);
769
+ }
770
+ _sendCommand(command) {
771
+ return this.socket.send(JSON.stringify(command));
772
+ }
773
+ _closeOnError() {
774
+ this._handshakeTimeout.stop();
775
+ this._disconnectionReason = 'error';
776
+ return this.socket.close();
777
+ }
778
+ _onopen(e) {
779
+ this.handlers.socketConnected();
780
+ this._disconnectionReason = 'handshake-failed';
781
+
782
+ // start handshake
783
+ const hello = {
784
+ command: 'hello',
785
+ protocols: [PROTOCOL_6, PROTOCOL_7]
786
+ };
787
+ hello.ver = VERSION;
788
+ if (this.options.ext) {
789
+ hello.ext = this.options.ext;
2414
790
  }
2415
- }, {
2416
- key: "_onclose",
2417
- value: function _onclose(e) {
2418
- this.protocol = 0;
2419
- this.handlers.disconnected(this._disconnectionReason, this._nextDelay);
2420
- return this._scheduleReconnection();
791
+ if (this.options.extver) {
792
+ hello.extver = this.options.extver;
2421
793
  }
2422
- }, {
2423
- key: "_onerror",
2424
- value: function _onerror(e) {}
2425
- }, {
2426
- key: "_onmessage",
2427
- value: function _onmessage(e) {
2428
- return this.protocolParser.process(e.data);
794
+ if (this.options.snipver) {
795
+ hello.snipver = this.options.snipver;
2429
796
  }
2430
- }]);
2431
- return Connector;
2432
- }();
797
+ this._sendCommand(hello);
798
+ return this._handshakeTimeout.start(this.options.handshake_timeout);
799
+ }
800
+ _onclose(e) {
801
+ this.protocol = 0;
802
+ this.handlers.disconnected(this._disconnectionReason, this._nextDelay);
803
+ return this._scheduleReconnection();
804
+ }
805
+ _onerror(e) {}
806
+ _onmessage(e) {
807
+ return this.protocolParser.process(e.data);
808
+ }
809
+ }
2433
810
  ;
2434
811
  exports.Connector = Connector;
2435
812
 
2436
- },{"./protocol":108,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/web.dom.iterable.js":102}],104:[function(require,module,exports){
813
+ },{"./protocol":53}],49:[function(require,module,exports){
2437
814
  "use strict";
2438
815
 
2439
- var CustomEvents = {
2440
- bind: function bind(element, eventName, handler) {
816
+ const CustomEvents = {
817
+ bind(element, eventName, handler) {
2441
818
  if (element.addEventListener) {
2442
819
  return element.addEventListener(eventName, handler, false);
2443
820
  }
@@ -2449,11 +826,11 @@ var CustomEvents = {
2449
826
  }
2450
827
  });
2451
828
  }
2452
- throw new Error("Attempt to attach custom event ".concat(eventName, " to something which isn't a DOMElement"));
829
+ throw new Error(`Attempt to attach custom event ${eventName} to something which isn't a DOMElement`);
2453
830
  },
2454
- fire: function fire(element, eventName) {
831
+ fire(element, eventName) {
2455
832
  if (element.addEventListener) {
2456
- var event = document.createEvent('HTMLEvents');
833
+ const event = document.createEvent('HTMLEvents');
2457
834
  event.initEvent(eventName, true, true);
2458
835
  return document.dispatchEvent(event);
2459
836
  } else if (element.attachEvent) {
@@ -2461,126 +838,87 @@ var CustomEvents = {
2461
838
  return element[eventName]++;
2462
839
  }
2463
840
  } else {
2464
- throw new Error("Attempt to fire custom event ".concat(eventName, " on something which isn't a DOMElement"));
841
+ throw new Error(`Attempt to fire custom event ${eventName} on something which isn't a DOMElement`);
2465
842
  }
2466
843
  }
2467
844
  };
2468
845
  exports.bind = CustomEvents.bind;
2469
846
  exports.fire = CustomEvents.fire;
2470
847
 
2471
- },{}],105:[function(require,module,exports){
848
+ },{}],50:[function(require,module,exports){
2472
849
  "use strict";
2473
850
 
2474
- require("core-js/modules/es6.regexp.match.js");
2475
- require("core-js/modules/es6.symbol.js");
2476
- require("core-js/modules/es6.array.from.js");
2477
- require("core-js/modules/es6.string.iterator.js");
2478
- require("core-js/modules/es6.object.to-string.js");
2479
- require("core-js/modules/es6.array.iterator.js");
2480
851
  require("core-js/modules/web.dom.iterable.js");
2481
- require("core-js/modules/es6.number.constructor.js");
2482
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2483
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2484
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2485
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2486
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2487
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2488
- var LessPlugin = /*#__PURE__*/function () {
2489
- function LessPlugin(window, host) {
2490
- _classCallCheck(this, LessPlugin);
852
+ class LessPlugin {
853
+ constructor(window, host) {
2491
854
  this.window = window;
2492
855
  this.host = host;
2493
856
  }
2494
- _createClass(LessPlugin, [{
2495
- key: "reload",
2496
- value: function reload(path, options) {
2497
- if (this.window.less && this.window.less.refresh) {
2498
- if (path.match(/\.less$/i)) {
2499
- return this.reloadLess(path);
2500
- }
2501
- if (options.originalPath.match(/\.less$/i)) {
2502
- return this.reloadLess(options.originalPath);
2503
- }
857
+ reload(path, options) {
858
+ if (this.window.less && this.window.less.refresh) {
859
+ if (path.match(/\.less$/i)) {
860
+ return this.reloadLess(path);
861
+ }
862
+ if (options.originalPath.match(/\.less$/i)) {
863
+ return this.reloadLess(options.originalPath);
2504
864
  }
2505
- return false;
2506
865
  }
2507
- }, {
2508
- key: "reloadLess",
2509
- value: function reloadLess(path) {
2510
- var link;
2511
- var links = function () {
2512
- var result = [];
2513
- for (var _i = 0, _Array$from = Array.from(document.getElementsByTagName('link')); _i < _Array$from.length; _i++) {
2514
- link = _Array$from[_i];
2515
- if (link.href && link.rel.match(/^stylesheet\/less$/i) || link.rel.match(/stylesheet/i) && link.type.match(/^text\/(x-)?less$/i)) {
2516
- result.push(link);
2517
- }
866
+ return false;
867
+ }
868
+ reloadLess(path) {
869
+ let link;
870
+ const links = (() => {
871
+ const result = [];
872
+ for (link of Array.from(document.getElementsByTagName('link'))) {
873
+ if (link.href && link.rel.match(/^stylesheet\/less$/i) || link.rel.match(/stylesheet/i) && link.type.match(/^text\/(x-)?less$/i)) {
874
+ result.push(link);
2518
875
  }
2519
- return result;
2520
- }();
2521
- if (links.length === 0) {
2522
- return false;
2523
876
  }
2524
- for (var _i2 = 0, _Array$from2 = Array.from(links); _i2 < _Array$from2.length; _i2++) {
2525
- link = _Array$from2[_i2];
2526
- link.href = this.host.generateCacheBustUrl(link.href);
2527
- }
2528
- this.host.console.log('LiveReload is asking LESS to recompile all stylesheets');
2529
- this.window.less.refresh(true);
2530
- return true;
877
+ return result;
878
+ })();
879
+ if (links.length === 0) {
880
+ return false;
2531
881
  }
2532
- }, {
2533
- key: "analyze",
2534
- value: function analyze() {
2535
- return {
2536
- disable: !!(this.window.less && this.window.less.refresh)
2537
- };
882
+ for (link of Array.from(links)) {
883
+ link.href = this.host.generateCacheBustUrl(link.href);
2538
884
  }
2539
- }]);
2540
- return LessPlugin;
2541
- }();
885
+ this.host.console.log('LiveReload is asking LESS to recompile all stylesheets');
886
+ this.window.less.refresh(true);
887
+ return true;
888
+ }
889
+ analyze() {
890
+ return {
891
+ disable: !!(this.window.less && this.window.less.refresh)
892
+ };
893
+ }
894
+ }
2542
895
  ;
2543
896
  LessPlugin.identifier = 'less';
2544
897
  LessPlugin.version = '1.0';
2545
898
  module.exports = LessPlugin;
2546
899
 
2547
- },{"core-js/modules/es6.array.from.js":84,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.regexp.match.js":94,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/web.dom.iterable.js":102}],106:[function(require,module,exports){
900
+ },{"core-js/modules/web.dom.iterable.js":47}],51:[function(require,module,exports){
2548
901
  "use strict";
2549
902
 
2550
- require("core-js/modules/es6.symbol.js");
2551
- require("core-js/modules/es6.number.constructor.js");
2552
- require("core-js/modules/es6.array.slice.js");
2553
- require("core-js/modules/es6.object.to-string.js");
2554
- require("core-js/modules/es6.array.from.js");
2555
- require("core-js/modules/es6.string.iterator.js");
2556
- require("core-js/modules/es6.array.iterator.js");
2557
903
  require("core-js/modules/web.dom.iterable.js");
2558
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2559
- require("core-js/modules/es6.regexp.match.js");
2560
- require("core-js/modules/es6.object.keys.js");
2561
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2562
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2563
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2564
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2565
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2566
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2567
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2568
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2569
904
  /* global alert */
2570
- var _require = require('./connector'),
2571
- Connector = _require.Connector;
2572
- var _require2 = require('./timer'),
2573
- Timer = _require2.Timer;
2574
- var _require3 = require('./options'),
2575
- Options = _require3.Options;
2576
- var _require4 = require('./reloader'),
2577
- Reloader = _require4.Reloader;
2578
- var _require5 = require('./protocol'),
2579
- ProtocolError = _require5.ProtocolError;
2580
- var LiveReload = /*#__PURE__*/function () {
2581
- function LiveReload(window) {
2582
- var _this = this;
2583
- _classCallCheck(this, LiveReload);
905
+ const {
906
+ Connector
907
+ } = require('./connector');
908
+ const {
909
+ Timer
910
+ } = require('./timer');
911
+ const {
912
+ Options
913
+ } = require('./options');
914
+ const {
915
+ Reloader
916
+ } = require('./reloader');
917
+ const {
918
+ ProtocolError
919
+ } = require('./protocol');
920
+ class LiveReload {
921
+ constructor(window) {
2584
922
  this.window = window;
2585
923
  this.listeners = {};
2586
924
  this.plugins = [];
@@ -2588,11 +926,11 @@ var LiveReload = /*#__PURE__*/function () {
2588
926
 
2589
927
  // i can haz console?
2590
928
  this.console = this.window.console && this.window.console.log && this.window.console.error ? this.window.location.href.match(/LR-verbose/) ? this.window.console : {
2591
- log: function log() {},
929
+ log() {},
2592
930
  error: this.window.console.error.bind(this.window.console)
2593
931
  } : {
2594
- log: function log() {},
2595
- error: function error() {}
932
+ log() {},
933
+ error() {}
2596
934
  };
2597
935
 
2598
936
  // i can haz sockets?
@@ -2604,9 +942,8 @@ var LiveReload = /*#__PURE__*/function () {
2604
942
  // i can haz options?
2605
943
  if ('LiveReloadOptions' in window) {
2606
944
  this.options = new Options();
2607
- for (var _i = 0, _Object$keys = Object.keys(window.LiveReloadOptions || {}); _i < _Object$keys.length; _i++) {
2608
- var k = _Object$keys[_i];
2609
- var v = window.LiveReloadOptions[k];
945
+ for (const k of Object.keys(window.LiveReloadOptions || {})) {
946
+ const v = window.LiveReloadOptions[k];
2610
947
  this.options.set(k, v);
2611
948
  }
2612
949
  } else {
@@ -2622,233 +959,184 @@ var LiveReload = /*#__PURE__*/function () {
2622
959
 
2623
960
  // i can haz connection?
2624
961
  this.connector = new Connector(this.options, this.WebSocket, Timer, {
2625
- connecting: function connecting() {},
2626
- socketConnected: function socketConnected() {},
2627
- connected: function connected(protocol) {
2628
- if (typeof _this.listeners.connect === 'function') {
2629
- _this.listeners.connect();
962
+ connecting: () => {},
963
+ socketConnected: () => {},
964
+ connected: protocol => {
965
+ if (typeof this.listeners.connect === 'function') {
966
+ this.listeners.connect();
2630
967
  }
2631
- var host = _this.options.host;
2632
- var port = _this.options.port ? ":".concat(_this.options.port) : '';
2633
- _this.log("LiveReload is connected to ".concat(host).concat(port, " (protocol v").concat(protocol, ")."));
2634
- return _this.analyze();
968
+ const {
969
+ host
970
+ } = this.options;
971
+ const port = this.options.port ? `:${this.options.port}` : '';
972
+ this.log(`LiveReload is connected to ${host}${port} (protocol v${protocol}).`);
973
+ return this.analyze();
2635
974
  },
2636
- error: function error(e) {
975
+ error: e => {
2637
976
  if (e instanceof ProtocolError) {
2638
977
  if (typeof console !== 'undefined' && console !== null) {
2639
- return console.log("".concat(e.message, "."));
978
+ return console.log(`${e.message}.`);
2640
979
  }
2641
980
  } else {
2642
981
  if (typeof console !== 'undefined' && console !== null) {
2643
- return console.log("LiveReload internal error: ".concat(e.message));
982
+ return console.log(`LiveReload internal error: ${e.message}`);
2644
983
  }
2645
984
  }
2646
985
  },
2647
- disconnected: function disconnected(reason, nextDelay) {
2648
- if (typeof _this.listeners.disconnect === 'function') {
2649
- _this.listeners.disconnect();
986
+ disconnected: (reason, nextDelay) => {
987
+ if (typeof this.listeners.disconnect === 'function') {
988
+ this.listeners.disconnect();
2650
989
  }
2651
- var host = _this.options.host;
2652
- var port = _this.options.port ? ":".concat(_this.options.port) : '';
990
+ const {
991
+ host
992
+ } = this.options;
993
+ const port = this.options.port ? `:${this.options.port}` : '';
2653
994
  switch (reason) {
2654
995
  case 'cannot-connect':
2655
- return _this.log("LiveReload cannot connect to ".concat(host).concat(port, ", will retry in ").concat(nextDelay, " sec."));
996
+ return this.log(`LiveReload cannot connect to ${host}${port}, will retry in ${nextDelay} sec.`);
2656
997
  case 'broken':
2657
- return _this.log("LiveReload disconnected from ".concat(host).concat(port, ", reconnecting in ").concat(nextDelay, " sec."));
998
+ return this.log(`LiveReload disconnected from ${host}${port}, reconnecting in ${nextDelay} sec.`);
2658
999
  case 'handshake-timeout':
2659
- return _this.log("LiveReload cannot connect to ".concat(host).concat(port, " (handshake timeout), will retry in ").concat(nextDelay, " sec."));
1000
+ return this.log(`LiveReload cannot connect to ${host}${port} (handshake timeout), will retry in ${nextDelay} sec.`);
2660
1001
  case 'handshake-failed':
2661
- return _this.log("LiveReload cannot connect to ".concat(host).concat(port, " (handshake failed), will retry in ").concat(nextDelay, " sec."));
1002
+ return this.log(`LiveReload cannot connect to ${host}${port} (handshake failed), will retry in ${nextDelay} sec.`);
2662
1003
  case 'manual': // nop
2663
1004
  case 'error': // nop
2664
1005
  default:
2665
- return _this.log("LiveReload disconnected from ".concat(host).concat(port, " (").concat(reason, "), reconnecting in ").concat(nextDelay, " sec."));
1006
+ return this.log(`LiveReload disconnected from ${host}${port} (${reason}), reconnecting in ${nextDelay} sec.`);
2666
1007
  }
2667
1008
  },
2668
- message: function message(_message) {
2669
- switch (_message.command) {
1009
+ message: message => {
1010
+ switch (message.command) {
2670
1011
  case 'reload':
2671
- return _this.performReload(_message);
1012
+ return this.performReload(message);
2672
1013
  case 'alert':
2673
- return _this.performAlert(_message);
1014
+ return this.performAlert(message);
2674
1015
  }
2675
1016
  }
2676
1017
  });
2677
1018
  this.initialized = true;
2678
1019
  }
2679
- _createClass(LiveReload, [{
2680
- key: "on",
2681
- value: function on(eventName, handler) {
2682
- this.listeners[eventName] = handler;
2683
- }
2684
- }, {
2685
- key: "log",
2686
- value: function log(message) {
2687
- return this.console.log("".concat(message));
2688
- }
2689
- }, {
2690
- key: "performReload",
2691
- value: function performReload(message) {
2692
- this.log("LiveReload received reload request: ".concat(JSON.stringify(message, null, 2)));
2693
- var _this$options = this.options,
2694
- host = _this$options.host,
2695
- port = _this$options.port,
2696
- pluginOrder = _this$options.pluginOrder;
2697
- return this.reloader.reload(message.path, {
2698
- liveCSS: message.liveCSS != null ? message.liveCSS : true,
2699
- liveImg: message.liveImg != null ? message.liveImg : true,
2700
- reloadMissingCSS: message.reloadMissingCSS != null ? message.reloadMissingCSS : true,
2701
- originalPath: message.originalPath || '',
2702
- overrideURL: message.overrideURL || '',
2703
- serverURL: "http://".concat(host).concat(port && ":".concat(port)),
2704
- pluginOrder: pluginOrder
2705
- });
2706
- }
2707
- }, {
2708
- key: "performAlert",
2709
- value: function performAlert(message) {
2710
- return alert(message.message);
1020
+ on(eventName, handler) {
1021
+ this.listeners[eventName] = handler;
1022
+ }
1023
+ log(message) {
1024
+ return this.console.log(`${message}`);
1025
+ }
1026
+ performReload(message) {
1027
+ this.log(`LiveReload received reload request: ${JSON.stringify(message, null, 2)}`);
1028
+ const {
1029
+ host,
1030
+ port,
1031
+ pluginOrder
1032
+ } = this.options;
1033
+ return this.reloader.reload(message.path, {
1034
+ liveCSS: message.liveCSS != null ? message.liveCSS : true,
1035
+ liveImg: message.liveImg != null ? message.liveImg : true,
1036
+ reloadMissingCSS: message.reloadMissingCSS != null ? message.reloadMissingCSS : true,
1037
+ originalPath: message.originalPath || '',
1038
+ overrideURL: message.overrideURL || '',
1039
+ serverURL: `http://${host}${port && `:${port}`}`,
1040
+ pluginOrder
1041
+ });
1042
+ }
1043
+ performAlert(message) {
1044
+ return alert(message.message);
1045
+ }
1046
+ shutDown() {
1047
+ if (!this.initialized) {
1048
+ return;
2711
1049
  }
2712
- }, {
2713
- key: "shutDown",
2714
- value: function shutDown() {
2715
- if (!this.initialized) {
2716
- return;
2717
- }
2718
- this.connector.disconnect();
2719
- this.log('LiveReload disconnected.');
2720
- return typeof this.listeners.shutdown === 'function' ? this.listeners.shutdown() : undefined;
1050
+ this.connector.disconnect();
1051
+ this.log('LiveReload disconnected.');
1052
+ return typeof this.listeners.shutdown === 'function' ? this.listeners.shutdown() : undefined;
1053
+ }
1054
+ hasPlugin(identifier) {
1055
+ return !!this.pluginIdentifiers[identifier];
1056
+ }
1057
+ addPlugin(PluginClass) {
1058
+ if (!this.initialized) {
1059
+ return;
2721
1060
  }
2722
- }, {
2723
- key: "hasPlugin",
2724
- value: function hasPlugin(identifier) {
2725
- return !!this.pluginIdentifiers[identifier];
1061
+ if (this.hasPlugin(PluginClass.identifier)) {
1062
+ return;
2726
1063
  }
2727
- }, {
2728
- key: "addPlugin",
2729
- value: function addPlugin(PluginClass) {
2730
- var _this2 = this;
2731
- if (!this.initialized) {
2732
- return;
2733
- }
2734
- if (this.hasPlugin(PluginClass.identifier)) {
2735
- return;
2736
- }
2737
- this.pluginIdentifiers[PluginClass.identifier] = true;
2738
- var plugin = new PluginClass(this.window, {
2739
- // expose internal objects for those who know what they're doing
2740
- // (note that these are private APIs and subject to change at any time!)
2741
- _livereload: this,
2742
- _reloader: this.reloader,
2743
- _connector: this.connector,
2744
- // official API
2745
- console: this.console,
2746
- Timer: Timer,
2747
- generateCacheBustUrl: function generateCacheBustUrl(url) {
2748
- return _this2.reloader.generateCacheBustUrl(url);
2749
- }
2750
- });
1064
+ this.pluginIdentifiers[PluginClass.identifier] = true;
1065
+ const plugin = new PluginClass(this.window, {
1066
+ // expose internal objects for those who know what they're doing
1067
+ // (note that these are private APIs and subject to change at any time!)
1068
+ _livereload: this,
1069
+ _reloader: this.reloader,
1070
+ _connector: this.connector,
1071
+ // official API
1072
+ console: this.console,
1073
+ Timer,
1074
+ generateCacheBustUrl: url => this.reloader.generateCacheBustUrl(url)
1075
+ });
1076
+
1077
+ // API that PluginClass can/must provide:
1078
+ //
1079
+ // string PluginClass.identifier
1080
+ // -- required, globally-unique name of this plugin
1081
+ //
1082
+ // string PluginClass.version
1083
+ // -- required, plugin version number (format %d.%d or %d.%d.%d)
1084
+ //
1085
+ // plugin = new PluginClass(window, officialLiveReloadAPI)
1086
+ // -- required, plugin constructor
1087
+ //
1088
+ // bool plugin.reload(string path, { bool liveCSS, bool liveImg })
1089
+ // -- optional, attemp to reload the given path, return true if handled
1090
+ //
1091
+ // object plugin.analyze()
1092
+ // -- optional, returns plugin-specific information about the current document (to send to the connected server)
1093
+ // (LiveReload 2 server currently only defines 'disable' key in this object; return {disable:true} to disable server-side
1094
+ // compilation of a matching plugin's files)
2751
1095
 
2752
- // API that PluginClass can/must provide:
2753
- //
2754
- // string PluginClass.identifier
2755
- // -- required, globally-unique name of this plugin
2756
- //
2757
- // string PluginClass.version
2758
- // -- required, plugin version number (format %d.%d or %d.%d.%d)
2759
- //
2760
- // plugin = new PluginClass(window, officialLiveReloadAPI)
2761
- // -- required, plugin constructor
2762
- //
2763
- // bool plugin.reload(string path, { bool liveCSS, bool liveImg })
2764
- // -- optional, attemp to reload the given path, return true if handled
2765
- //
2766
- // object plugin.analyze()
2767
- // -- optional, returns plugin-specific information about the current document (to send to the connected server)
2768
- // (LiveReload 2 server currently only defines 'disable' key in this object; return {disable:true} to disable server-side
2769
- // compilation of a matching plugin's files)
2770
-
2771
- this.plugins.push(plugin);
2772
- this.reloader.addPlugin(plugin);
1096
+ this.plugins.push(plugin);
1097
+ this.reloader.addPlugin(plugin);
1098
+ }
1099
+ analyze() {
1100
+ if (!this.initialized) {
1101
+ return;
2773
1102
  }
2774
- }, {
2775
- key: "analyze",
2776
- value: function analyze() {
2777
- if (!this.initialized) {
2778
- return;
2779
- }
2780
- if (!(this.connector.protocol >= 7)) {
2781
- return;
2782
- }
2783
- var pluginsData = {};
2784
- var _iterator = _createForOfIteratorHelper(this.plugins),
2785
- _step;
2786
- try {
2787
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
2788
- var plugin = _step.value;
2789
- var pluginData = (typeof plugin.analyze === 'function' ? plugin.analyze() : undefined) || {};
2790
- pluginsData[plugin.constructor.identifier] = pluginData;
2791
- pluginData.version = plugin.constructor.version;
2792
- }
2793
- } catch (err) {
2794
- _iterator.e(err);
2795
- } finally {
2796
- _iterator.f();
2797
- }
2798
- this.connector.sendCommand({
2799
- command: 'info',
2800
- plugins: pluginsData,
2801
- url: this.window.location.href
2802
- });
1103
+ if (!(this.connector.protocol >= 7)) {
1104
+ return;
1105
+ }
1106
+ const pluginsData = {};
1107
+ for (const plugin of this.plugins) {
1108
+ const pluginData = (typeof plugin.analyze === 'function' ? plugin.analyze() : undefined) || {};
1109
+ pluginsData[plugin.constructor.identifier] = pluginData;
1110
+ pluginData.version = plugin.constructor.version;
2803
1111
  }
2804
- }]);
2805
- return LiveReload;
2806
- }();
1112
+ this.connector.sendCommand({
1113
+ command: 'info',
1114
+ plugins: pluginsData,
1115
+ url: this.window.location.href
1116
+ });
1117
+ }
1118
+ }
2807
1119
  ;
2808
1120
  exports.LiveReload = LiveReload;
2809
1121
 
2810
- },{"./connector":103,"./options":107,"./protocol":108,"./reloader":109,"./timer":111,"core-js/modules/es6.array.from.js":84,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.array.slice.js":87,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.keys.js":90,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.regexp.match.js":94,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/web.dom.iterable.js":102}],107:[function(require,module,exports){
1122
+ },{"./connector":48,"./options":52,"./protocol":53,"./reloader":54,"./timer":56,"core-js/modules/web.dom.iterable.js":47}],52:[function(require,module,exports){
2811
1123
  "use strict";
2812
1124
 
2813
- require("core-js/modules/es6.regexp.split.js");
2814
- require("core-js/modules/es6.symbol.js");
2815
- require("core-js/modules/es6.number.constructor.js");
2816
- require("core-js/modules/es6.array.from.js");
2817
- require("core-js/modules/es6.string.iterator.js");
2818
- require("core-js/modules/es6.object.to-string.js");
2819
- require("core-js/modules/es6.array.iterator.js");
2820
1125
  require("core-js/modules/web.dom.iterable.js");
2821
- require("core-js/modules/es6.regexp.match.js");
2822
- require("core-js/modules/es6.regexp.replace.js");
2823
- require("core-js/modules/es6.array.slice.js");
2824
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2825
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2826
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2827
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2828
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2829
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2830
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2831
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2832
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2833
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2834
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2835
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2836
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2837
- var Options = /*#__PURE__*/function () {
2838
- function Options() {
2839
- _classCallCheck(this, Options);
1126
+ class Options {
1127
+ constructor() {
2840
1128
  this.https = false;
2841
1129
  this.host = null;
2842
- var port = 35729; // backing variable for port property closure
1130
+ let port = 35729; // backing variable for port property closure
2843
1131
 
2844
1132
  // we allow port to be overridden with a falsy value to indicate
2845
1133
  // that we should not add a port specification to the backend url;
2846
1134
  // port is now either a number, or a non-numeric string
2847
1135
  Object.defineProperty(this, 'port', {
2848
- get: function get() {
1136
+ get() {
2849
1137
  return port;
2850
1138
  },
2851
- set: function set(v) {
1139
+ set(v) {
2852
1140
  port = v ? isNaN(v) ? v : +v : '';
2853
1141
  }
2854
1142
  });
@@ -2858,79 +1146,59 @@ var Options = /*#__PURE__*/function () {
2858
1146
  this.mindelay = 1000;
2859
1147
  this.maxdelay = 60000;
2860
1148
  this.handshake_timeout = 5000;
2861
- var pluginOrder = [];
1149
+ const pluginOrder = [];
2862
1150
  Object.defineProperty(this, 'pluginOrder', {
2863
- get: function get() {
1151
+ get() {
2864
1152
  return pluginOrder;
2865
1153
  },
2866
- set: function set(v) {
1154
+ set(v) {
2867
1155
  pluginOrder.push.apply(pluginOrder, v.split(/[,;]/));
2868
1156
  }
2869
1157
  });
2870
1158
  }
2871
- _createClass(Options, [{
2872
- key: "set",
2873
- value: function set(name, value) {
2874
- if (typeof value === 'undefined') {
2875
- return;
2876
- }
2877
- if (!isNaN(+value)) {
2878
- value = +value;
2879
- }
2880
- this[name] = value;
1159
+ set(name, value) {
1160
+ if (typeof value === 'undefined') {
1161
+ return;
2881
1162
  }
2882
- }]);
2883
- return Options;
2884
- }();
1163
+ if (!isNaN(+value)) {
1164
+ value = +value;
1165
+ }
1166
+ this[name] = value;
1167
+ }
1168
+ }
2885
1169
  Options.extract = function (document) {
2886
- for (var _i = 0, _Array$from = Array.from(document.getElementsByTagName('script')); _i < _Array$from.length; _i++) {
2887
- var element = _Array$from[_i];
1170
+ for (const element of Array.from(document.getElementsByTagName('script'))) {
2888
1171
  // eslint-disable-next-line no-var
2889
1172
  var m;
2890
1173
  // eslint-disable-next-line no-var
2891
1174
  var mm;
2892
- var src = element.src;
2893
- var srcAttr = element.getAttribute('src');
2894
- var lrUrlRegexp = /^([^:]+:\/\/([^/:]+|\[[0-9a-f:]+\])(?::(\d+))?\/|\/\/|\/)?([^/].*\/)?z?livereload\.js(?:\?(.*))?$/;
1175
+ const src = element.src;
1176
+ const srcAttr = element.getAttribute('src');
1177
+ const lrUrlRegexp = /^([^:]+:\/\/([^/:]+|\[[0-9a-f:]+\])(?::(\d+))?\/|\/\/|\/)?([^/].*\/)?z?livereload\.js(?:\?(.*))?$/;
2895
1178
  // ^proto:// ^host ^port ^// ^/ ^folder
2896
- var lrUrlRegexpAttr = /^(?:(?:([^:/]+)?:?)\/{0,2})([^:]+|\[[0-9a-f:]+\])(?::(\d+))?/;
1179
+ const lrUrlRegexpAttr = /^(?:(?:([^:/]+)?:?)\/{0,2})([^:]+|\[[0-9a-f:]+\])(?::(\d+))?/;
2897
1180
  // ^proto ^host/folder ^port
2898
1181
 
2899
1182
  if ((m = src.match(lrUrlRegexp)) && (mm = srcAttr.match(lrUrlRegexpAttr))) {
2900
- var _m = m,
2901
- _m2 = _slicedToArray(_m, 6),
2902
- host = _m2[2],
2903
- port = _m2[3],
2904
- params = _m2[5];
2905
- var _mm = mm,
2906
- _mm2 = _slicedToArray(_mm, 4),
2907
- portFromAttr = _mm2[3];
2908
- var options = new Options();
1183
+ const [,, host, port,, params] = m;
1184
+ const [,,, portFromAttr] = mm;
1185
+ const options = new Options();
2909
1186
  options.https = element.src.indexOf('https') === 0;
2910
1187
  options.host = host;
2911
1188
 
2912
1189
  // use port number that the script is loaded from as default
2913
1190
  // for explicitly blank value; enables livereload through proxy
2914
- var ourPort = parseInt(port || portFromAttr, 10) || '';
1191
+ const ourPort = parseInt(port || portFromAttr, 10) || '';
2915
1192
 
2916
1193
  // if port is specified in script use that as default instead
2917
1194
  options.port = ourPort || options.port;
2918
1195
  if (params) {
2919
- var _iterator = _createForOfIteratorHelper(params.split('&')),
2920
- _step;
2921
- try {
2922
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
2923
- var pair = _step.value;
2924
- // eslint-disable-next-line no-var
2925
- var keyAndValue;
2926
- if ((keyAndValue = pair.split('=')).length > 1) {
2927
- options.set(keyAndValue[0].replace(/-/g, '_'), keyAndValue.slice(1).join('='));
2928
- }
1196
+ for (const pair of params.split('&')) {
1197
+ // eslint-disable-next-line no-var
1198
+ var keyAndValue;
1199
+ if ((keyAndValue = pair.split('=')).length > 1) {
1200
+ options.set(keyAndValue[0].replace(/-/g, '_'), keyAndValue.slice(1).join('='));
2929
1201
  }
2930
- } catch (err) {
2931
- _iterator.e(err);
2932
- } finally {
2933
- _iterator.f();
2934
1202
  }
2935
1203
  }
2936
1204
 
@@ -2945,157 +1213,95 @@ Options.extract = function (document) {
2945
1213
  };
2946
1214
  exports.Options = Options;
2947
1215
 
2948
- },{"core-js/modules/es6.array.from.js":84,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.array.slice.js":87,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.regexp.match.js":94,"core-js/modules/es6.regexp.replace.js":95,"core-js/modules/es6.regexp.split.js":96,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/web.dom.iterable.js":102}],108:[function(require,module,exports){
1216
+ },{"core-js/modules/web.dom.iterable.js":47}],53:[function(require,module,exports){
2949
1217
  "use strict";
2950
1218
 
2951
- require("core-js/modules/es6.number.constructor.js");
2952
- require("core-js/modules/es6.array.slice.js");
2953
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2954
- require("core-js/modules/es6.regexp.match.js");
2955
- require("core-js/modules/es6.regexp.constructor.js");
2956
- require("core-js/modules/es6.string.includes.js");
2957
- require("core-js/modules/es7.array.includes.js");
2958
- require("core-js/modules/es6.symbol.js");
2959
- require("core-js/modules/es6.array.from.js");
2960
- require("core-js/modules/es6.string.iterator.js");
2961
- require("core-js/modules/es6.object.to-string.js");
2962
- require("core-js/modules/es6.array.iterator.js");
2963
1219
  require("core-js/modules/web.dom.iterable.js");
2964
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2965
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2966
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2967
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2968
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2969
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2970
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2971
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2972
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2973
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2974
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2975
- var PROTOCOL_6, PROTOCOL_7;
1220
+ let PROTOCOL_6, PROTOCOL_7;
2976
1221
  exports.PROTOCOL_6 = PROTOCOL_6 = 'http://livereload.com/protocols/official-6';
2977
1222
  exports.PROTOCOL_7 = PROTOCOL_7 = 'http://livereload.com/protocols/official-7';
2978
- var ProtocolError = /*#__PURE__*/_createClass(function ProtocolError(reason, data) {
2979
- _classCallCheck(this, ProtocolError);
2980
- this.message = "LiveReload protocol error (".concat(reason, ") after receiving data: \"").concat(data, "\".");
2981
- });
1223
+ class ProtocolError {
1224
+ constructor(reason, data) {
1225
+ this.message = `LiveReload protocol error (${reason}) after receiving data: "${data}".`;
1226
+ }
1227
+ }
2982
1228
  ;
2983
- var Parser = /*#__PURE__*/function () {
2984
- function Parser(handlers) {
2985
- _classCallCheck(this, Parser);
1229
+ class Parser {
1230
+ constructor(handlers) {
2986
1231
  this.handlers = handlers;
2987
1232
  this.reset();
2988
1233
  }
2989
- _createClass(Parser, [{
2990
- key: "reset",
2991
- value: function reset() {
2992
- this.protocol = null;
2993
- }
2994
- }, {
2995
- key: "process",
2996
- value: function process(data) {
2997
- try {
2998
- var message;
2999
- if (!this.protocol) {
3000
- // eslint-disable-next-line prefer-regex-literals
3001
- if (data.match(new RegExp('^!!ver:([\\d.]+)$'))) {
1234
+ reset() {
1235
+ this.protocol = null;
1236
+ }
1237
+ process(data) {
1238
+ try {
1239
+ let message;
1240
+ if (!this.protocol) {
1241
+ // eslint-disable-next-line prefer-regex-literals
1242
+ if (data.match(new RegExp('^!!ver:([\\d.]+)$'))) {
1243
+ this.protocol = 6;
1244
+ } else if (message = this._parseMessage(data, ['hello'])) {
1245
+ if (!message.protocols.length) {
1246
+ throw new ProtocolError('no protocols specified in handshake message');
1247
+ } else if (Array.from(message.protocols).includes(PROTOCOL_7)) {
1248
+ this.protocol = 7;
1249
+ } else if (Array.from(message.protocols).includes(PROTOCOL_6)) {
3002
1250
  this.protocol = 6;
3003
- } else if (message = this._parseMessage(data, ['hello'])) {
3004
- if (!message.protocols.length) {
3005
- throw new ProtocolError('no protocols specified in handshake message');
3006
- } else if (Array.from(message.protocols).includes(PROTOCOL_7)) {
3007
- this.protocol = 7;
3008
- } else if (Array.from(message.protocols).includes(PROTOCOL_6)) {
3009
- this.protocol = 6;
3010
- } else {
3011
- throw new ProtocolError('no supported protocols found');
3012
- }
1251
+ } else {
1252
+ throw new ProtocolError('no supported protocols found');
3013
1253
  }
3014
- return this.handlers.connected(this.protocol);
3015
1254
  }
3016
- if (this.protocol === 6) {
3017
- message = JSON.parse(data);
3018
- if (!message.length) {
3019
- throw new ProtocolError('protocol 6 messages must be arrays');
3020
- }
3021
- var _Array$from = Array.from(message),
3022
- _Array$from2 = _slicedToArray(_Array$from, 2),
3023
- command = _Array$from2[0],
3024
- options = _Array$from2[1];
3025
- if (command !== 'refresh') {
3026
- throw new ProtocolError('unknown protocol 6 command');
3027
- }
3028
- return this.handlers.message({
3029
- command: 'reload',
3030
- path: options.path,
3031
- liveCSS: options.apply_css_live != null ? options.apply_css_live : true
3032
- });
3033
- }
3034
- message = this._parseMessage(data, ['reload', 'alert']);
3035
- return this.handlers.message(message);
3036
- } catch (e) {
3037
- if (e instanceof ProtocolError) {
3038
- return this.handlers.error(e);
3039
- }
3040
- throw e;
1255
+ return this.handlers.connected(this.protocol);
3041
1256
  }
3042
- }
3043
- }, {
3044
- key: "_parseMessage",
3045
- value: function _parseMessage(data, validCommands) {
3046
- var message;
3047
- try {
1257
+ if (this.protocol === 6) {
3048
1258
  message = JSON.parse(data);
3049
- } catch (e) {
3050
- throw new ProtocolError('unparsable JSON', data);
3051
- }
3052
- if (!message.command) {
3053
- throw new ProtocolError('missing "command" key', data);
1259
+ if (!message.length) {
1260
+ throw new ProtocolError('protocol 6 messages must be arrays');
1261
+ }
1262
+ const [command, options] = Array.from(message);
1263
+ if (command !== 'refresh') {
1264
+ throw new ProtocolError('unknown protocol 6 command');
1265
+ }
1266
+ return this.handlers.message({
1267
+ command: 'reload',
1268
+ path: options.path,
1269
+ liveCSS: options.apply_css_live != null ? options.apply_css_live : true
1270
+ });
3054
1271
  }
3055
- if (!validCommands.includes(message.command)) {
3056
- throw new ProtocolError("invalid command '".concat(message.command, "', only valid commands are: ").concat(validCommands.join(', '), ")"), data);
1272
+ message = this._parseMessage(data, ['reload', 'alert']);
1273
+ return this.handlers.message(message);
1274
+ } catch (e) {
1275
+ if (e instanceof ProtocolError) {
1276
+ return this.handlers.error(e);
3057
1277
  }
3058
- return message;
1278
+ throw e;
1279
+ }
1280
+ }
1281
+ _parseMessage(data, validCommands) {
1282
+ let message;
1283
+ try {
1284
+ message = JSON.parse(data);
1285
+ } catch (e) {
1286
+ throw new ProtocolError('unparsable JSON', data);
3059
1287
  }
3060
- }]);
3061
- return Parser;
3062
- }();
1288
+ if (!message.command) {
1289
+ throw new ProtocolError('missing "command" key', data);
1290
+ }
1291
+ if (!validCommands.includes(message.command)) {
1292
+ throw new ProtocolError(`invalid command '${message.command}', only valid commands are: ${validCommands.join(', ')})`, data);
1293
+ }
1294
+ return message;
1295
+ }
1296
+ }
3063
1297
  ;
3064
1298
  exports.ProtocolError = ProtocolError;
3065
1299
  exports.Parser = Parser;
3066
1300
 
3067
- },{"core-js/modules/es6.array.from.js":84,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.array.slice.js":87,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.regexp.constructor.js":92,"core-js/modules/es6.regexp.match.js":94,"core-js/modules/es6.string.includes.js":97,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/es7.array.includes.js":100,"core-js/modules/web.dom.iterable.js":102}],109:[function(require,module,exports){
1301
+ },{"core-js/modules/web.dom.iterable.js":47}],54:[function(require,module,exports){
3068
1302
  "use strict";
3069
1303
 
3070
- require("core-js/modules/es6.number.constructor.js");
3071
- require("core-js/modules/es6.object.keys.js");
3072
- require("core-js/modules/es6.object.get-own-property-descriptor.js");
3073
- require("core-js/modules/es7.object.get-own-property-descriptors.js");
3074
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3075
- require("core-js/modules/es6.array.slice.js");
3076
- require("core-js/modules/es6.regexp.replace.js");
3077
- require("core-js/modules/es6.regexp.constructor.js");
3078
- require("core-js/modules/es6.regexp.split.js");
3079
- require("core-js/modules/es6.symbol.js");
3080
- require("core-js/modules/es6.array.from.js");
3081
- require("core-js/modules/es6.string.iterator.js");
3082
- require("core-js/modules/es6.object.to-string.js");
3083
- require("core-js/modules/es6.array.iterator.js");
3084
1304
  require("core-js/modules/web.dom.iterable.js");
3085
- require("core-js/modules/es6.regexp.match.js");
3086
- require("core-js/modules/es6.array.filter.js");
3087
- require("core-js/modules/es6.array.map.js");
3088
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3089
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3090
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3091
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3092
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3093
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3094
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
3095
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3096
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3097
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3098
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
3099
1305
  /* global CSSRule */
3100
1306
 
3101
1307
  /**
@@ -3104,16 +1310,16 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
3104
1310
  * @return {object}
3105
1311
  */
3106
1312
  function splitUrl(url) {
3107
- var hash = '';
3108
- var params = '';
3109
- var index = url.indexOf('#');
1313
+ let hash = '';
1314
+ let params = '';
1315
+ let index = url.indexOf('#');
3110
1316
  if (index >= 0) {
3111
1317
  hash = url.slice(index);
3112
1318
  url = url.slice(0, index);
3113
1319
  }
3114
1320
 
3115
1321
  // http://your.domain.com/path/to/combo/??file1.css,file2,css
3116
- var comboSign = url.indexOf('??');
1322
+ const comboSign = url.indexOf('??');
3117
1323
  if (comboSign >= 0) {
3118
1324
  if (comboSign + 1 !== url.lastIndexOf('?')) {
3119
1325
  index = url.lastIndexOf('?');
@@ -3126,9 +1332,9 @@ function splitUrl(url) {
3126
1332
  url = url.slice(0, index);
3127
1333
  }
3128
1334
  return {
3129
- url: url,
3130
- params: params,
3131
- hash: hash
1335
+ url,
1336
+ params,
1337
+ hash
3132
1338
  };
3133
1339
  }
3134
1340
  ;
@@ -3142,9 +1348,10 @@ function pathFromUrl(url) {
3142
1348
  if (!url) {
3143
1349
  return '';
3144
1350
  }
3145
- var path;
3146
- var _splitUrl = splitUrl(url);
3147
- url = _splitUrl.url;
1351
+ let path;
1352
+ ({
1353
+ url
1354
+ } = splitUrl(url));
3148
1355
  if (url.indexOf('file://') === 0) {
3149
1356
  // eslint-disable-next-line prefer-regex-literals
3150
1357
  path = url.replace(new RegExp('^file://(localhost)?'), '');
@@ -3171,10 +1378,10 @@ function numberOfMatchingSegments(left, right) {
3171
1378
  if (left === right) {
3172
1379
  return 10000;
3173
1380
  }
3174
- var comps1 = left.split(/\/|\\/).reverse();
3175
- var comps2 = right.split(/\/|\\/).reverse();
3176
- var len = Math.min(comps1.length, comps2.length);
3177
- var eqCount = 0;
1381
+ const comps1 = left.split(/\/|\\/).reverse();
1382
+ const comps2 = right.split(/\/|\\/).reverse();
1383
+ const len = Math.min(comps1.length, comps2.length);
1384
+ let eqCount = 0;
3178
1385
  while (eqCount < len && comps1[eqCount] === comps2[eqCount]) {
3179
1386
  ++eqCount;
3180
1387
  }
@@ -3188,31 +1395,19 @@ function numberOfMatchingSegments(left, right) {
3188
1395
  * @param {function} [pathFunc] Transform applied to each item in collection
3189
1396
  * @return {object}
3190
1397
  */
3191
- function pickBestMatch(path, objects) {
3192
- var pathFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (s) {
3193
- return s;
3194
- };
3195
- var score;
3196
- var bestMatch = {
1398
+ function pickBestMatch(path, objects, pathFunc = s => s) {
1399
+ let score;
1400
+ let bestMatch = {
3197
1401
  score: 0
3198
1402
  };
3199
- var _iterator = _createForOfIteratorHelper(objects),
3200
- _step;
3201
- try {
3202
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
3203
- var object = _step.value;
3204
- score = numberOfMatchingSegments(path, pathFunc(object));
3205
- if (score > bestMatch.score) {
3206
- bestMatch = {
3207
- object: object,
3208
- score: score
3209
- };
3210
- }
1403
+ for (const object of objects) {
1404
+ score = numberOfMatchingSegments(path, pathFunc(object));
1405
+ if (score > bestMatch.score) {
1406
+ bestMatch = {
1407
+ object,
1408
+ score
1409
+ };
3211
1410
  }
3212
- } catch (err) {
3213
- _iterator.e(err);
3214
- } finally {
3215
- _iterator.f();
3216
1411
  }
3217
1412
  if (bestMatch.score === 0) {
3218
1413
  return null;
@@ -3229,20 +1424,19 @@ function pickBestMatch(path, objects) {
3229
1424
  function pathsMatch(left, right) {
3230
1425
  return numberOfMatchingSegments(left, right) > 0;
3231
1426
  }
3232
- var IMAGE_STYLES = [{
1427
+ const IMAGE_STYLES = [{
3233
1428
  selector: 'background',
3234
1429
  styleNames: ['backgroundImage']
3235
1430
  }, {
3236
1431
  selector: 'border',
3237
1432
  styleNames: ['borderImage', 'webkitBorderImage', 'MozBorderImage']
3238
1433
  }];
3239
- var DEFAULT_OPTIONS = {
1434
+ const DEFAULT_OPTIONS = {
3240
1435
  stylesheetReloadTimeout: 15000
3241
1436
  };
3242
- var IMAGES_REGEX = /\.(jpe?g|png|gif|svg)$/i;
3243
- var Reloader = /*#__PURE__*/function () {
3244
- function Reloader(window, console, Timer) {
3245
- _classCallCheck(this, Reloader);
1437
+ const IMAGES_REGEX = /\.(jpe?g|png|gif|svg)$/i;
1438
+ class Reloader {
1439
+ constructor(window, console, Timer) {
3246
1440
  this.window = window;
3247
1441
  this.console = console;
3248
1442
  this.Timer = Timer;
@@ -3250,460 +1444,394 @@ var Reloader = /*#__PURE__*/function () {
3250
1444
  this.importCacheWaitPeriod = 200;
3251
1445
  this.plugins = [];
3252
1446
  }
3253
- _createClass(Reloader, [{
3254
- key: "addPlugin",
3255
- value: function addPlugin(plugin) {
3256
- return this.plugins.push(plugin);
1447
+ addPlugin(plugin) {
1448
+ return this.plugins.push(plugin);
1449
+ }
1450
+ analyze(callback) {}
1451
+ reload(path, options = {}) {
1452
+ this.options = {
1453
+ ...DEFAULT_OPTIONS,
1454
+ ...options
1455
+ }; // avoid passing it through all the funcs
1456
+
1457
+ if (this.options.pluginOrder && this.options.pluginOrder.length) {
1458
+ this.runPluginsByOrder(path, options);
1459
+ return;
3257
1460
  }
3258
- }, {
3259
- key: "analyze",
3260
- value: function analyze(callback) {}
3261
- }, {
3262
- key: "reload",
3263
- value: function reload(path) {
3264
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3265
- this.options = _objectSpread(_objectSpread({}, DEFAULT_OPTIONS), options); // avoid passing it through all the funcs
3266
-
3267
- if (this.options.pluginOrder && this.options.pluginOrder.length) {
3268
- this.runPluginsByOrder(path, options);
3269
- return;
3270
- }
3271
- for (var _i = 0, _Array$from = Array.from(this.plugins); _i < _Array$from.length; _i++) {
3272
- var plugin = _Array$from[_i];
3273
- if (plugin.reload && plugin.reload(path, options)) {
3274
- return;
3275
- }
3276
- }
3277
- if (options.liveCSS && path.match(/\.css(?:\.map)?$/i)) {
3278
- if (this.reloadStylesheet(path)) {
3279
- return;
3280
- }
3281
- }
3282
- if (options.liveImg && path.match(IMAGES_REGEX)) {
3283
- this.reloadImages(path);
1461
+ for (const plugin of Array.from(this.plugins)) {
1462
+ if (plugin.reload && plugin.reload(path, options)) {
3284
1463
  return;
3285
1464
  }
3286
- if (options.isChromeExtension) {
3287
- this.reloadChromeExtension();
1465
+ }
1466
+ if (options.liveCSS && path.match(/\.css(?:\.map)?$/i)) {
1467
+ if (this.reloadStylesheet(path)) {
3288
1468
  return;
3289
1469
  }
3290
- return this.reloadPage();
3291
1470
  }
3292
- }, {
3293
- key: "runPluginsByOrder",
3294
- value: function runPluginsByOrder(path, options) {
3295
- var _this = this;
3296
- options.pluginOrder.some(function (pluginId) {
3297
- if (pluginId === 'css') {
3298
- if (options.liveCSS && path.match(/\.css(?:\.map)?$/i)) {
3299
- if (_this.reloadStylesheet(path)) {
3300
- return true;
3301
- }
3302
- }
3303
- }
3304
- if (pluginId === 'img') {
3305
- if (options.liveImg && path.match(IMAGES_REGEX)) {
3306
- _this.reloadImages(path);
3307
- return true;
3308
- }
3309
- }
3310
- if (pluginId === 'extension') {
3311
- if (options.isChromeExtension) {
3312
- _this.reloadChromeExtension();
1471
+ if (options.liveImg && path.match(IMAGES_REGEX)) {
1472
+ this.reloadImages(path);
1473
+ return;
1474
+ }
1475
+ if (options.isChromeExtension) {
1476
+ this.reloadChromeExtension();
1477
+ return;
1478
+ }
1479
+ return this.reloadPage();
1480
+ }
1481
+ runPluginsByOrder(path, options) {
1482
+ options.pluginOrder.some(pluginId => {
1483
+ if (pluginId === 'css') {
1484
+ if (options.liveCSS && path.match(/\.css(?:\.map)?$/i)) {
1485
+ if (this.reloadStylesheet(path)) {
3313
1486
  return true;
3314
1487
  }
3315
1488
  }
3316
- if (pluginId === 'others') {
3317
- _this.reloadPage();
1489
+ }
1490
+ if (pluginId === 'img') {
1491
+ if (options.liveImg && path.match(IMAGES_REGEX)) {
1492
+ this.reloadImages(path);
3318
1493
  return true;
3319
1494
  }
3320
- if (pluginId === 'external') {
3321
- return _this.plugins.some(function (plugin) {
3322
- return plugin.reload && plugin.reload(path, options);
3323
- });
3324
- }
3325
- return _this.plugins.filter(function (plugin) {
3326
- return plugin.constructor.identifier === pluginId;
3327
- }).some(function (plugin) {
3328
- return plugin.reload && plugin.reload(path, options);
3329
- });
3330
- });
3331
- }
3332
- }, {
3333
- key: "reloadPage",
3334
- value: function reloadPage() {
3335
- return this.window.document.location.reload();
3336
- }
3337
- }, {
3338
- key: "reloadChromeExtension",
3339
- value: function reloadChromeExtension() {
3340
- return this.window.chrome.runtime.reload();
3341
- }
3342
- }, {
3343
- key: "reloadImages",
3344
- value: function reloadImages(path) {
3345
- var _this2 = this;
3346
- var img;
3347
- var expando = this.generateUniqueString();
3348
- for (var _i2 = 0, _Array$from2 = Array.from(this.document.images); _i2 < _Array$from2.length; _i2++) {
3349
- img = _Array$from2[_i2];
3350
- if (pathsMatch(path, pathFromUrl(img.src))) {
3351
- img.src = this.generateCacheBustUrl(img.src, expando);
3352
- }
3353
1495
  }
3354
- if (this.document.querySelectorAll) {
3355
- for (var _i3 = 0, _IMAGE_STYLES = IMAGE_STYLES; _i3 < _IMAGE_STYLES.length; _i3++) {
3356
- var _IMAGE_STYLES$_i = _IMAGE_STYLES[_i3],
3357
- selector = _IMAGE_STYLES$_i.selector,
3358
- styleNames = _IMAGE_STYLES$_i.styleNames;
3359
- for (var _i4 = 0, _Array$from3 = Array.from(this.document.querySelectorAll("[style*=".concat(selector, "]"))); _i4 < _Array$from3.length; _i4++) {
3360
- img = _Array$from3[_i4];
3361
- this.reloadStyleImages(img.style, styleNames, path, expando);
3362
- }
1496
+ if (pluginId === 'extension') {
1497
+ if (options.isChromeExtension) {
1498
+ this.reloadChromeExtension();
1499
+ return true;
3363
1500
  }
3364
1501
  }
3365
- if (this.document.styleSheets) {
3366
- return Array.from(this.document.styleSheets).map(function (styleSheet) {
3367
- return _this2.reloadStylesheetImages(styleSheet, path, expando);
3368
- });
1502
+ if (pluginId === 'others') {
1503
+ this.reloadPage();
1504
+ return true;
3369
1505
  }
3370
- }
3371
- }, {
3372
- key: "reloadStylesheetImages",
3373
- value: function reloadStylesheetImages(styleSheet, path, expando) {
3374
- var rules;
3375
- try {
3376
- rules = (styleSheet || {}).cssRules;
3377
- } catch (e) {}
3378
- if (!rules) {
3379
- return;
1506
+ if (pluginId === 'external') {
1507
+ return this.plugins.some(plugin => plugin.reload && plugin.reload(path, options));
3380
1508
  }
3381
- for (var _i5 = 0, _Array$from4 = Array.from(rules); _i5 < _Array$from4.length; _i5++) {
3382
- var rule = _Array$from4[_i5];
3383
- switch (rule.type) {
3384
- case CSSRule.IMPORT_RULE:
3385
- this.reloadStylesheetImages(rule.styleSheet, path, expando);
3386
- break;
3387
- case CSSRule.STYLE_RULE:
3388
- for (var _i6 = 0, _IMAGE_STYLES2 = IMAGE_STYLES; _i6 < _IMAGE_STYLES2.length; _i6++) {
3389
- var styleNames = _IMAGE_STYLES2[_i6].styleNames;
3390
- this.reloadStyleImages(rule.style, styleNames, path, expando);
3391
- }
3392
- break;
3393
- case CSSRule.MEDIA_RULE:
3394
- this.reloadStylesheetImages(rule, path, expando);
3395
- break;
1509
+ return this.plugins.filter(plugin => plugin.constructor.identifier === pluginId).some(plugin => plugin.reload && plugin.reload(path, options));
1510
+ });
1511
+ }
1512
+ reloadPage() {
1513
+ return this.window.document.location.reload();
1514
+ }
1515
+ reloadChromeExtension() {
1516
+ return this.window.chrome.runtime.reload();
1517
+ }
1518
+ reloadImages(path) {
1519
+ let img;
1520
+ const expando = this.generateUniqueString();
1521
+ for (img of Array.from(this.document.images)) {
1522
+ if (pathsMatch(path, pathFromUrl(img.src))) {
1523
+ img.src = this.generateCacheBustUrl(img.src, expando);
1524
+ }
1525
+ }
1526
+ if (this.document.querySelectorAll) {
1527
+ for (const {
1528
+ selector,
1529
+ styleNames
1530
+ } of IMAGE_STYLES) {
1531
+ for (img of Array.from(this.document.querySelectorAll(`[style*=${selector}]`))) {
1532
+ this.reloadStyleImages(img.style, styleNames, path, expando);
3396
1533
  }
3397
1534
  }
3398
1535
  }
3399
- }, {
3400
- key: "reloadStyleImages",
3401
- value: function reloadStyleImages(style, styleNames, path, expando) {
3402
- var _this3 = this;
3403
- var _iterator2 = _createForOfIteratorHelper(styleNames),
3404
- _step2;
3405
- try {
3406
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
3407
- var styleName = _step2.value;
3408
- var value = style[styleName];
3409
- if (typeof value === 'string') {
3410
- // eslint-disable-next-line prefer-regex-literals
3411
- var newValue = value.replace(new RegExp('\\burl\\s*\\(([^)]*)\\)'), function (match, src) {
3412
- if (pathsMatch(path, pathFromUrl(src))) {
3413
- return "url(".concat(_this3.generateCacheBustUrl(src, expando), ")");
3414
- }
3415
- return match;
3416
- });
3417
- if (newValue !== value) {
3418
- style[styleName] = newValue;
3419
- }
1536
+ if (this.document.styleSheets) {
1537
+ return Array.from(this.document.styleSheets).map(styleSheet => this.reloadStylesheetImages(styleSheet, path, expando));
1538
+ }
1539
+ }
1540
+ reloadStylesheetImages(styleSheet, path, expando) {
1541
+ let rules;
1542
+ try {
1543
+ rules = (styleSheet || {}).cssRules;
1544
+ } catch (e) {}
1545
+ if (!rules) {
1546
+ return;
1547
+ }
1548
+ for (const rule of Array.from(rules)) {
1549
+ switch (rule.type) {
1550
+ case CSSRule.IMPORT_RULE:
1551
+ this.reloadStylesheetImages(rule.styleSheet, path, expando);
1552
+ break;
1553
+ case CSSRule.STYLE_RULE:
1554
+ for (const {
1555
+ styleNames
1556
+ } of IMAGE_STYLES) {
1557
+ this.reloadStyleImages(rule.style, styleNames, path, expando);
3420
1558
  }
3421
- }
3422
- } catch (err) {
3423
- _iterator2.e(err);
3424
- } finally {
3425
- _iterator2.f();
1559
+ break;
1560
+ case CSSRule.MEDIA_RULE:
1561
+ this.reloadStylesheetImages(rule, path, expando);
1562
+ break;
3426
1563
  }
3427
1564
  }
3428
- }, {
3429
- key: "reloadStylesheet",
3430
- value: function reloadStylesheet(path) {
3431
- var _this4 = this;
3432
- var options = this.options || DEFAULT_OPTIONS;
3433
-
3434
- // has to be a real array, because DOMNodeList will be modified
3435
- var style;
3436
- var link;
3437
- var links = function () {
3438
- var result = [];
3439
- for (var _i7 = 0, _Array$from5 = Array.from(_this4.document.getElementsByTagName('link')); _i7 < _Array$from5.length; _i7++) {
3440
- link = _Array$from5[_i7];
3441
- if (link.rel.match(/^stylesheet$/i) && !link.__LiveReload_pendingRemoval) {
3442
- result.push(link);
1565
+ }
1566
+ reloadStyleImages(style, styleNames, path, expando) {
1567
+ for (const styleName of styleNames) {
1568
+ const value = style[styleName];
1569
+ if (typeof value === 'string') {
1570
+ // eslint-disable-next-line prefer-regex-literals
1571
+ const newValue = value.replace(new RegExp('\\burl\\s*\\(([^)]*)\\)'), (match, src) => {
1572
+ if (pathsMatch(path, pathFromUrl(src))) {
1573
+ return `url(${this.generateCacheBustUrl(src, expando)})`;
3443
1574
  }
1575
+ return match;
1576
+ });
1577
+ if (newValue !== value) {
1578
+ style[styleName] = newValue;
3444
1579
  }
3445
- return result;
3446
- }();
3447
-
3448
- // find all imported stylesheets
3449
- var imported = [];
3450
- for (var _i8 = 0, _Array$from6 = Array.from(this.document.getElementsByTagName('style')); _i8 < _Array$from6.length; _i8++) {
3451
- style = _Array$from6[_i8];
3452
- if (style.sheet) {
3453
- this.collectImportedStylesheets(style, style.sheet, imported);
1580
+ }
1581
+ }
1582
+ }
1583
+ reloadStylesheet(path) {
1584
+ const options = this.options || DEFAULT_OPTIONS;
1585
+
1586
+ // has to be a real array, because DOMNodeList will be modified
1587
+ let style;
1588
+ let link;
1589
+ const links = (() => {
1590
+ const result = [];
1591
+ for (link of Array.from(this.document.getElementsByTagName('link'))) {
1592
+ if (link.rel.match(/^stylesheet$/i) && !link.__LiveReload_pendingRemoval) {
1593
+ result.push(link);
3454
1594
  }
3455
1595
  }
3456
- for (var _i9 = 0, _Array$from7 = Array.from(links); _i9 < _Array$from7.length; _i9++) {
3457
- link = _Array$from7[_i9];
3458
- this.collectImportedStylesheets(link, link.sheet, imported);
1596
+ return result;
1597
+ })();
1598
+
1599
+ // find all imported stylesheets
1600
+ const imported = [];
1601
+ for (style of Array.from(this.document.getElementsByTagName('style'))) {
1602
+ if (style.sheet) {
1603
+ this.collectImportedStylesheets(style, style.sheet, imported);
3459
1604
  }
1605
+ }
1606
+ for (link of Array.from(links)) {
1607
+ this.collectImportedStylesheets(link, link.sheet, imported);
1608
+ }
3460
1609
 
3461
- // handle prefixfree
3462
- if (this.window.StyleFix && this.document.querySelectorAll) {
3463
- for (var _i10 = 0, _Array$from8 = Array.from(this.document.querySelectorAll('style[data-href]')); _i10 < _Array$from8.length; _i10++) {
3464
- style = _Array$from8[_i10];
3465
- links.push(style);
3466
- }
1610
+ // handle prefixfree
1611
+ if (this.window.StyleFix && this.document.querySelectorAll) {
1612
+ for (style of Array.from(this.document.querySelectorAll('style[data-href]'))) {
1613
+ links.push(style);
3467
1614
  }
3468
- this.console.log("LiveReload found ".concat(links.length, " LINKed stylesheets, ").concat(imported.length, " @imported stylesheets"));
3469
- var match = pickBestMatch(path, links.concat(imported), function (link) {
3470
- return pathFromUrl(_this4.linkHref(link));
3471
- });
3472
- if (match) {
3473
- if (match.object.rule) {
3474
- this.console.log("LiveReload is reloading imported stylesheet: ".concat(match.object.href));
3475
- this.reattachImportedRule(match.object);
3476
- } else {
3477
- this.console.log("LiveReload is reloading stylesheet: ".concat(this.linkHref(match.object)));
3478
- this.reattachStylesheetLink(match.object);
3479
- }
1615
+ }
1616
+ this.console.log(`LiveReload found ${links.length} LINKed stylesheets, ${imported.length} @imported stylesheets`);
1617
+ const match = pickBestMatch(path, links.concat(imported), link => pathFromUrl(this.linkHref(link)));
1618
+ if (match) {
1619
+ if (match.object.rule) {
1620
+ this.console.log(`LiveReload is reloading imported stylesheet: ${match.object.href}`);
1621
+ this.reattachImportedRule(match.object);
3480
1622
  } else {
3481
- if (options.reloadMissingCSS) {
3482
- this.console.log("LiveReload will reload all stylesheets because path '".concat(path, "' did not match any specific one. To disable this behavior, set 'options.reloadMissingCSS' to 'false'."));
3483
- for (var _i11 = 0, _Array$from9 = Array.from(links); _i11 < _Array$from9.length; _i11++) {
3484
- link = _Array$from9[_i11];
3485
- this.reattachStylesheetLink(link);
3486
- }
3487
- } else {
3488
- this.console.log("LiveReload will not reload path '".concat(path, "' because the stylesheet was not found on the page and 'options.reloadMissingCSS' was set to 'false'."));
3489
- }
1623
+ this.console.log(`LiveReload is reloading stylesheet: ${this.linkHref(match.object)}`);
1624
+ this.reattachStylesheetLink(match.object);
3490
1625
  }
3491
- return true;
3492
- }
3493
- }, {
3494
- key: "collectImportedStylesheets",
3495
- value: function collectImportedStylesheets(link, styleSheet, result) {
3496
- // in WebKit, styleSheet.cssRules is null for inaccessible stylesheets;
3497
- // Firefox/Opera may throw exceptions
3498
- var rules;
3499
- try {
3500
- rules = (styleSheet || {}).cssRules;
3501
- } catch (e) {}
3502
- if (rules && rules.length) {
3503
- for (var index = 0; index < rules.length; index++) {
3504
- var rule = rules[index];
3505
- switch (rule.type) {
3506
- case CSSRule.CHARSET_RULE:
3507
- continue;
3508
- // do nothing
3509
- case CSSRule.IMPORT_RULE:
3510
- result.push({
3511
- link: link,
3512
- rule: rule,
3513
- index: index,
3514
- href: rule.href
3515
- });
3516
- this.collectImportedStylesheets(link, rule.styleSheet, result);
3517
- break;
3518
- default:
3519
- break;
3520
- // import rules can only be preceded by charset rules
3521
- }
1626
+ } else {
1627
+ if (options.reloadMissingCSS) {
1628
+ this.console.log(`LiveReload will reload all stylesheets because path '${path}' did not match any specific one. \
1629
+ To disable this behavior, set 'options.reloadMissingCSS' to 'false'.`);
1630
+ for (link of Array.from(links)) {
1631
+ this.reattachStylesheetLink(link);
3522
1632
  }
1633
+ } else {
1634
+ this.console.log(`LiveReload will not reload path '${path}' because the stylesheet was not found on the page \
1635
+ and 'options.reloadMissingCSS' was set to 'false'.`);
3523
1636
  }
3524
1637
  }
3525
- }, {
3526
- key: "waitUntilCssLoads",
3527
- value: function waitUntilCssLoads(clone, func) {
3528
- var _this5 = this;
3529
- var options = this.options || DEFAULT_OPTIONS;
3530
- var callbackExecuted = false;
3531
- var executeCallback = function executeCallback() {
3532
- if (callbackExecuted) {
3533
- return;
1638
+ return true;
1639
+ }
1640
+ collectImportedStylesheets(link, styleSheet, result) {
1641
+ // in WebKit, styleSheet.cssRules is null for inaccessible stylesheets;
1642
+ // Firefox/Opera may throw exceptions
1643
+ let rules;
1644
+ try {
1645
+ rules = (styleSheet || {}).cssRules;
1646
+ } catch (e) {}
1647
+ if (rules && rules.length) {
1648
+ for (let index = 0; index < rules.length; index++) {
1649
+ const rule = rules[index];
1650
+ switch (rule.type) {
1651
+ case CSSRule.CHARSET_RULE:
1652
+ continue;
1653
+ // do nothing
1654
+ case CSSRule.IMPORT_RULE:
1655
+ result.push({
1656
+ link,
1657
+ rule,
1658
+ index,
1659
+ href: rule.href
1660
+ });
1661
+ this.collectImportedStylesheets(link, rule.styleSheet, result);
1662
+ break;
1663
+ default:
1664
+ break;
1665
+ // import rules can only be preceded by charset rules
3534
1666
  }
3535
- callbackExecuted = true;
3536
- return func();
3537
- };
3538
-
3539
- // supported by Chrome 19+, Safari 5.2+, Firefox 9+, Opera 9+, IE6+
3540
- // http://www.zachleat.com/web/load-css-dynamically/
3541
- // http://pieisgood.org/test/script-link-events/
3542
- clone.onload = function () {
3543
- _this5.console.log('LiveReload: the new stylesheet has finished loading');
3544
- _this5.knownToSupportCssOnLoad = true;
3545
- return executeCallback();
3546
- };
3547
- if (!this.knownToSupportCssOnLoad) {
3548
- // polling
3549
- var _poll;
3550
- (_poll = function poll() {
3551
- if (clone.sheet) {
3552
- _this5.console.log('LiveReload is polling until the new CSS finishes loading...');
3553
- return executeCallback();
3554
- }
3555
- return _this5.Timer.start(50, _poll);
3556
- })();
3557
1667
  }
3558
-
3559
- // fail safe
3560
- return this.Timer.start(options.stylesheetReloadTimeout, executeCallback);
3561
1668
  }
3562
- }, {
3563
- key: "linkHref",
3564
- value: function linkHref(link) {
3565
- // prefixfree uses data-href when it turns LINK into STYLE
3566
- return link.href || link.getAttribute && link.getAttribute('data-href');
3567
- }
3568
- }, {
3569
- key: "reattachStylesheetLink",
3570
- value: function reattachStylesheetLink(link) {
3571
- var _this6 = this;
3572
- // ignore LINKs that will be removed by LR soon
3573
- var clone;
3574
- if (link.__LiveReload_pendingRemoval) {
1669
+ }
1670
+ waitUntilCssLoads(clone, func) {
1671
+ const options = this.options || DEFAULT_OPTIONS;
1672
+ let callbackExecuted = false;
1673
+ const executeCallback = () => {
1674
+ if (callbackExecuted) {
3575
1675
  return;
3576
1676
  }
3577
- link.__LiveReload_pendingRemoval = true;
3578
- if (link.tagName === 'STYLE') {
3579
- // prefixfree
3580
- clone = this.document.createElement('link');
3581
- clone.rel = 'stylesheet';
3582
- clone.media = link.media;
3583
- clone.disabled = link.disabled;
3584
- } else {
3585
- clone = link.cloneNode(false);
3586
- }
3587
- clone.href = this.generateCacheBustUrl(this.linkHref(link));
1677
+ callbackExecuted = true;
1678
+ return func();
1679
+ };
3588
1680
 
3589
- // insert the new LINK before the old one
3590
- var parent = link.parentNode;
3591
- if (parent.lastChild === link) {
3592
- parent.appendChild(clone);
3593
- } else {
3594
- parent.insertBefore(clone, link.nextSibling);
3595
- }
3596
- return this.waitUntilCssLoads(clone, function () {
3597
- var additionalWaitingTime;
3598
- if (/AppleWebKit/.test(_this6.window.navigator.userAgent)) {
3599
- additionalWaitingTime = 5;
3600
- } else {
3601
- additionalWaitingTime = 200;
1681
+ // supported by Chrome 19+, Safari 5.2+, Firefox 9+, Opera 9+, IE6+
1682
+ // http://www.zachleat.com/web/load-css-dynamically/
1683
+ // http://pieisgood.org/test/script-link-events/
1684
+ clone.onload = () => {
1685
+ this.console.log('LiveReload: the new stylesheet has finished loading');
1686
+ this.knownToSupportCssOnLoad = true;
1687
+ return executeCallback();
1688
+ };
1689
+ if (!this.knownToSupportCssOnLoad) {
1690
+ // polling
1691
+ let poll;
1692
+ (poll = () => {
1693
+ if (clone.sheet) {
1694
+ this.console.log('LiveReload is polling until the new CSS finishes loading...');
1695
+ return executeCallback();
3602
1696
  }
3603
- return _this6.Timer.start(additionalWaitingTime, function () {
3604
- if (!link.parentNode) {
3605
- return;
3606
- }
3607
- link.parentNode.removeChild(link);
3608
- clone.onreadystatechange = null;
3609
- return _this6.window.StyleFix ? _this6.window.StyleFix.link(clone) : undefined;
3610
- });
3611
- }); // prefixfree
1697
+ return this.Timer.start(50, poll);
1698
+ })();
3612
1699
  }
3613
- }, {
3614
- key: "reattachImportedRule",
3615
- value: function reattachImportedRule(_ref) {
3616
- var _this7 = this;
3617
- var rule = _ref.rule,
3618
- index = _ref.index,
3619
- link = _ref.link;
3620
- var parent = rule.parentStyleSheet;
3621
- var href = this.generateCacheBustUrl(rule.href);
3622
- var media = rule.media.length ? [].join.call(rule.media, ', ') : '';
3623
- var newRule = "@import url(\"".concat(href, "\") ").concat(media, ";");
3624
-
3625
- // used to detect if reattachImportedRule has been called again on the same rule
3626
- rule.__LiveReload_newHref = href;
3627
1700
 
3628
- // WORKAROUND FOR WEBKIT BUG: WebKit resets all styles if we add @import'ed
3629
- // stylesheet that hasn't been cached yet. Workaround is to pre-cache the
3630
- // stylesheet by temporarily adding it as a LINK tag.
3631
- var tempLink = this.document.createElement('link');
3632
- tempLink.rel = 'stylesheet';
3633
- tempLink.href = href;
3634
- tempLink.__LiveReload_pendingRemoval = true; // exclude from path matching
1701
+ // fail safe
1702
+ return this.Timer.start(options.stylesheetReloadTimeout, executeCallback);
1703
+ }
1704
+ linkHref(link) {
1705
+ // prefixfree uses data-href when it turns LINK into STYLE
1706
+ return link.href || link.getAttribute && link.getAttribute('data-href');
1707
+ }
1708
+ reattachStylesheetLink(link) {
1709
+ // ignore LINKs that will be removed by LR soon
1710
+ let clone;
1711
+ if (link.__LiveReload_pendingRemoval) {
1712
+ return;
1713
+ }
1714
+ link.__LiveReload_pendingRemoval = true;
1715
+ if (link.tagName === 'STYLE') {
1716
+ // prefixfree
1717
+ clone = this.document.createElement('link');
1718
+ clone.rel = 'stylesheet';
1719
+ clone.media = link.media;
1720
+ clone.disabled = link.disabled;
1721
+ } else {
1722
+ clone = link.cloneNode(false);
1723
+ }
1724
+ clone.href = this.generateCacheBustUrl(this.linkHref(link));
3635
1725
 
3636
- if (link.parentNode) {
3637
- link.parentNode.insertBefore(tempLink, link);
1726
+ // insert the new LINK before the old one
1727
+ const parent = link.parentNode;
1728
+ if (parent.lastChild === link) {
1729
+ parent.appendChild(clone);
1730
+ } else {
1731
+ parent.insertBefore(clone, link.nextSibling);
1732
+ }
1733
+ return this.waitUntilCssLoads(clone, () => {
1734
+ let additionalWaitingTime;
1735
+ if (/AppleWebKit/.test(this.window.navigator.userAgent)) {
1736
+ additionalWaitingTime = 5;
1737
+ } else {
1738
+ additionalWaitingTime = 200;
3638
1739
  }
3639
-
3640
- // wait for it to load
3641
- return this.Timer.start(this.importCacheWaitPeriod, function () {
3642
- if (tempLink.parentNode) {
3643
- tempLink.parentNode.removeChild(tempLink);
1740
+ return this.Timer.start(additionalWaitingTime, () => {
1741
+ if (!link.parentNode) {
1742
+ return;
3644
1743
  }
1744
+ link.parentNode.removeChild(link);
1745
+ clone.onreadystatechange = null;
1746
+ return this.window.StyleFix ? this.window.StyleFix.link(clone) : undefined;
1747
+ });
1748
+ }); // prefixfree
1749
+ }
1750
+ reattachImportedRule({
1751
+ rule,
1752
+ index,
1753
+ link
1754
+ }) {
1755
+ const parent = rule.parentStyleSheet;
1756
+ const href = this.generateCacheBustUrl(rule.href);
1757
+ const media = rule.media.length ? [].join.call(rule.media, ', ') : '';
1758
+ const newRule = `@import url("${href}") ${media};`;
1759
+
1760
+ // used to detect if reattachImportedRule has been called again on the same rule
1761
+ rule.__LiveReload_newHref = href;
1762
+
1763
+ // WORKAROUND FOR WEBKIT BUG: WebKit resets all styles if we add @import'ed
1764
+ // stylesheet that hasn't been cached yet. Workaround is to pre-cache the
1765
+ // stylesheet by temporarily adding it as a LINK tag.
1766
+ const tempLink = this.document.createElement('link');
1767
+ tempLink.rel = 'stylesheet';
1768
+ tempLink.href = href;
1769
+ tempLink.__LiveReload_pendingRemoval = true; // exclude from path matching
1770
+
1771
+ if (link.parentNode) {
1772
+ link.parentNode.insertBefore(tempLink, link);
1773
+ }
1774
+
1775
+ // wait for it to load
1776
+ return this.Timer.start(this.importCacheWaitPeriod, () => {
1777
+ if (tempLink.parentNode) {
1778
+ tempLink.parentNode.removeChild(tempLink);
1779
+ }
1780
+
1781
+ // if another reattachImportedRule call is in progress, abandon this one
1782
+ if (rule.__LiveReload_newHref !== href) {
1783
+ return;
1784
+ }
1785
+ parent.insertRule(newRule, index);
1786
+ parent.deleteRule(index + 1);
1787
+
1788
+ // save the new rule, so that we can detect another reattachImportedRule call
1789
+ rule = parent.cssRules[index];
1790
+ rule.__LiveReload_newHref = href;
3645
1791
 
1792
+ // repeat again for good measure
1793
+ return this.Timer.start(this.importCacheWaitPeriod, () => {
3646
1794
  // if another reattachImportedRule call is in progress, abandon this one
3647
1795
  if (rule.__LiveReload_newHref !== href) {
3648
1796
  return;
3649
1797
  }
3650
1798
  parent.insertRule(newRule, index);
3651
- parent.deleteRule(index + 1);
3652
-
3653
- // save the new rule, so that we can detect another reattachImportedRule call
3654
- rule = parent.cssRules[index];
3655
- rule.__LiveReload_newHref = href;
3656
-
3657
- // repeat again for good measure
3658
- return _this7.Timer.start(_this7.importCacheWaitPeriod, function () {
3659
- // if another reattachImportedRule call is in progress, abandon this one
3660
- if (rule.__LiveReload_newHref !== href) {
3661
- return;
3662
- }
3663
- parent.insertRule(newRule, index);
3664
- return parent.deleteRule(index + 1);
3665
- });
1799
+ return parent.deleteRule(index + 1);
3666
1800
  });
3667
- }
3668
- }, {
3669
- key: "generateUniqueString",
3670
- value: function generateUniqueString() {
3671
- return "livereload=".concat(Date.now());
3672
- }
3673
- }, {
3674
- key: "generateCacheBustUrl",
3675
- value: function generateCacheBustUrl(url, expando) {
3676
- var options = this.options || DEFAULT_OPTIONS;
3677
- var hash, oldParams;
3678
- if (!expando) {
3679
- expando = this.generateUniqueString();
3680
- }
3681
- var _splitUrl2 = splitUrl(url);
3682
- url = _splitUrl2.url;
3683
- hash = _splitUrl2.hash;
3684
- oldParams = _splitUrl2.params;
3685
- if (options.overrideURL) {
3686
- if (url.indexOf(options.serverURL) < 0) {
3687
- var originalUrl = url;
3688
- url = options.serverURL + options.overrideURL + '?url=' + encodeURIComponent(url);
3689
- this.console.log("LiveReload is overriding source URL ".concat(originalUrl, " with ").concat(url));
3690
- }
3691
- }
3692
- var params = oldParams.replace(/(\?|&)livereload=(\d+)/, function (match, sep) {
3693
- return "".concat(sep).concat(expando);
3694
- });
3695
- if (params === oldParams) {
3696
- if (oldParams.length === 0) {
3697
- params = "?".concat(expando);
3698
- } else {
3699
- params = "".concat(oldParams, "&").concat(expando);
3700
- }
1801
+ });
1802
+ }
1803
+ generateUniqueString() {
1804
+ return `livereload=${Date.now()}`;
1805
+ }
1806
+ generateCacheBustUrl(url, expando) {
1807
+ const options = this.options || DEFAULT_OPTIONS;
1808
+ let hash, oldParams;
1809
+ if (!expando) {
1810
+ expando = this.generateUniqueString();
1811
+ }
1812
+ ({
1813
+ url,
1814
+ hash,
1815
+ params: oldParams
1816
+ } = splitUrl(url));
1817
+ if (options.overrideURL) {
1818
+ if (url.indexOf(options.serverURL) < 0) {
1819
+ const originalUrl = url;
1820
+ url = options.serverURL + options.overrideURL + '?url=' + encodeURIComponent(url);
1821
+ this.console.log(`LiveReload is overriding source URL ${originalUrl} with ${url}`);
1822
+ }
1823
+ }
1824
+ let params = oldParams.replace(/(\?|&)livereload=(\d+)/, (match, sep) => `${sep}${expando}`);
1825
+ if (params === oldParams) {
1826
+ if (oldParams.length === 0) {
1827
+ params = `?${expando}`;
1828
+ } else {
1829
+ params = `${oldParams}&${expando}`;
3701
1830
  }
3702
- return url + params + hash;
3703
1831
  }
3704
- }]);
3705
- return Reloader;
3706
- }();
1832
+ return url + params + hash;
1833
+ }
1834
+ }
3707
1835
  ;
3708
1836
  exports.splitUrl = splitUrl;
3709
1837
  exports.pathFromUrl = pathFromUrl;
@@ -3712,84 +1840,53 @@ exports.pickBestMatch = pickBestMatch;
3712
1840
  exports.pathsMatch = pathsMatch;
3713
1841
  exports.Reloader = Reloader;
3714
1842
 
3715
- },{"core-js/modules/es6.array.filter.js":83,"core-js/modules/es6.array.from.js":84,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.array.map.js":86,"core-js/modules/es6.array.slice.js":87,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.get-own-property-descriptor.js":89,"core-js/modules/es6.object.keys.js":90,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.regexp.constructor.js":92,"core-js/modules/es6.regexp.match.js":94,"core-js/modules/es6.regexp.replace.js":95,"core-js/modules/es6.regexp.split.js":96,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/es7.object.get-own-property-descriptors.js":101,"core-js/modules/web.dom.iterable.js":102}],110:[function(require,module,exports){
1843
+ },{"core-js/modules/web.dom.iterable.js":47}],55:[function(require,module,exports){
3716
1844
  "use strict";
3717
1845
 
3718
- require("core-js/modules/es6.regexp.match.js");
3719
- var CustomEvents = require('./customevents');
3720
- var LiveReload = window.LiveReload = new (require('./livereload').LiveReload)(window);
3721
- for (var k in window) {
1846
+ const CustomEvents = require('./customevents');
1847
+ const LiveReload = window.LiveReload = new (require('./livereload').LiveReload)(window);
1848
+ for (const k in window) {
3722
1849
  if (k.match(/^LiveReloadPlugin/)) {
3723
1850
  LiveReload.addPlugin(window[k]);
3724
1851
  }
3725
1852
  }
3726
1853
  LiveReload.addPlugin(require('./less'));
3727
- LiveReload.on('shutdown', function () {
3728
- return delete window.LiveReload;
3729
- });
3730
- LiveReload.on('connect', function () {
3731
- return CustomEvents.fire(document, 'LiveReloadConnect');
3732
- });
3733
- LiveReload.on('disconnect', function () {
3734
- return CustomEvents.fire(document, 'LiveReloadDisconnect');
3735
- });
3736
- CustomEvents.bind(document, 'LiveReloadShutDown', function () {
3737
- return LiveReload.shutDown();
3738
- });
1854
+ LiveReload.on('shutdown', () => delete window.LiveReload);
1855
+ LiveReload.on('connect', () => CustomEvents.fire(document, 'LiveReloadConnect'));
1856
+ LiveReload.on('disconnect', () => CustomEvents.fire(document, 'LiveReloadDisconnect'));
1857
+ CustomEvents.bind(document, 'LiveReloadShutDown', () => LiveReload.shutDown());
3739
1858
 
3740
- },{"./customevents":104,"./less":105,"./livereload":106,"core-js/modules/es6.regexp.match.js":94}],111:[function(require,module,exports){
1859
+ },{"./customevents":49,"./less":50,"./livereload":51}],56:[function(require,module,exports){
3741
1860
  "use strict";
3742
1861
 
3743
- require("core-js/modules/es6.string.iterator.js");
3744
- require("core-js/modules/es6.object.to-string.js");
3745
- require("core-js/modules/es6.array.iterator.js");
3746
- require("core-js/modules/web.dom.iterable.js");
3747
- require("core-js/modules/es6.symbol.js");
3748
- require("core-js/modules/es6.number.constructor.js");
3749
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3750
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3751
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3752
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3753
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
3754
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3755
- var Timer = /*#__PURE__*/function () {
3756
- function Timer(func) {
3757
- var _this = this;
3758
- _classCallCheck(this, Timer);
1862
+ class Timer {
1863
+ constructor(func) {
3759
1864
  this.func = func;
3760
1865
  this.running = false;
3761
1866
  this.id = null;
3762
- this._handler = function () {
3763
- _this.running = false;
3764
- _this.id = null;
3765
- return _this.func();
1867
+ this._handler = () => {
1868
+ this.running = false;
1869
+ this.id = null;
1870
+ return this.func();
3766
1871
  };
3767
1872
  }
3768
- _createClass(Timer, [{
3769
- key: "start",
3770
- value: function start(timeout) {
3771
- if (this.running) {
3772
- clearTimeout(this.id);
3773
- }
3774
- this.id = setTimeout(this._handler, timeout);
3775
- this.running = true;
1873
+ start(timeout) {
1874
+ if (this.running) {
1875
+ clearTimeout(this.id);
3776
1876
  }
3777
- }, {
3778
- key: "stop",
3779
- value: function stop() {
3780
- if (this.running) {
3781
- clearTimeout(this.id);
3782
- this.running = false;
3783
- this.id = null;
3784
- }
1877
+ this.id = setTimeout(this._handler, timeout);
1878
+ this.running = true;
1879
+ }
1880
+ stop() {
1881
+ if (this.running) {
1882
+ clearTimeout(this.id);
1883
+ this.running = false;
1884
+ this.id = null;
3785
1885
  }
3786
- }]);
3787
- return Timer;
3788
- }();
1886
+ }
1887
+ }
3789
1888
  ;
3790
- Timer.start = function (timeout, func) {
3791
- return setTimeout(func, timeout);
3792
- };
1889
+ Timer.start = (timeout, func) => setTimeout(func, timeout);
3793
1890
  exports.Timer = Timer;
3794
1891
 
3795
- },{"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/web.dom.iterable.js":102}]},{},[110]);
1892
+ },{}]},{},[55]);