@opengis/gis 0.2.208 → 0.2.209

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 (221) hide show
  1. package/README.md +181 -181
  2. package/dist/{CardIcon-iGo8QJu9.js → CardIcon-B6rIgAoD.js} +1 -1
  3. package/dist/{EntityTablePage-BiVoVAhN.js → EntityTablePage-CfLq5znM.js} +2 -2
  4. package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-BdL5cQgN.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-CB_4eJz9.js} +1 -1
  5. package/dist/{MapSettings-CXqiYxV4.js → MapSettings-fwcVWgdK.js} +2 -2
  6. package/dist/{MapToolbarRight.vue_vue_type_script_setup_true_lang-BHCChxmg.js → MapToolbarRight.vue_vue_type_script_setup_true_lang-BWqBARGq.js} +1 -1
  7. package/dist/{RastersTablePage-Dgk1wp3d.js → RastersTablePage-XHV40tf_.js} +2 -2
  8. package/dist/{cartocss-BIpgQU6F.js → cartocss-BjGlng_r.js} +526 -503
  9. package/dist/{import-utils-CfXKgZFd.js → import-utils-WfWvX9B5.js} +1 -1
  10. package/dist/{index-CM_DTEUa.js → index-CDy0MSfg.js} +3509 -3461
  11. package/dist/index.css +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/index.umd.cjs +42 -48
  14. package/dist/{raster-D_vEBha8.js → raster-D2X_jR9m.js} +3 -3
  15. package/dist/{register-C5_Un1Ms.js → register-Ctn9pgUE.js} +3 -3
  16. package/dist/service-CiUwLEwY.js +3484 -0
  17. package/dist/{vs-datatable--K-DxayK.js → vs-datatable-BixMLOv-.js} +4 -3
  18. package/module/gis/card/gis.metadata.table/index.yml +22 -22
  19. package/module/gis/card/gis.rasters.table/index.yml +11 -11
  20. package/module/gis/card/gis.registers.table/index.yml +23 -23
  21. package/module/gis/card/gis.services.table/index.yml +25 -25
  22. package/module/gis/cls/bool.yes_no.json +12 -12
  23. package/module/gis/cls/encoding.json +14 -14
  24. package/module/gis/cls/geom_type.json +14 -14
  25. package/module/gis/cls/gis.column_type.json +34 -34
  26. package/module/gis/cls/gis.column_view_type.json +26 -26
  27. package/module/gis/cls/gis.filter_type.json +22 -22
  28. package/module/gis/cls/language.json +10 -10
  29. package/module/gis/cls/meta.service_type.json +42 -42
  30. package/module/gis/cls/ogc.service.json +21 -21
  31. package/module/gis/cls/service_type.json +42 -42
  32. package/module/gis/cls/source_type.json +10 -10
  33. package/module/gis/cls/standarts.json +6 -6
  34. package/module/gis/cls/topic_category.json +106 -106
  35. package/module/gis/cls/update_frequency.json +29 -29
  36. package/module/gis/cls/view.json +21 -21
  37. package/module/gis/form/feedback.answer.form.json +10 -10
  38. package/module/gis/form/gis.cartocss.form.json +64 -64
  39. package/module/gis/form/gis.group_list.form.json +17 -17
  40. package/module/gis/form/gis.maps.form.json +61 -61
  41. package/module/gis/form/gis.metadata.form.json +240 -240
  42. package/module/gis/form/gis.metadata_new.form.json +195 -195
  43. package/module/gis/form/gis.ogc_service.form.json +51 -51
  44. package/module/gis/form/gis.rasters.form.json +76 -76
  45. package/module/gis/form/gis.registers.form.json +127 -127
  46. package/module/gis/form/gis.registers_column.form.json +84 -84
  47. package/module/gis/form/gis.registers_filter.form.json +65 -65
  48. package/module/gis/form/gis.services.form.json +111 -111
  49. package/module/gis/form/gis.services_attributes.form.json +75 -75
  50. package/module/gis/form/gis.services_filter.form.json +65 -65
  51. package/module/gis/menu.json +43 -43
  52. package/module/gis/select/admin.cls.name.sql +9 -9
  53. package/module/gis/select/layer_list.sql +7 -7
  54. package/module/gis/select/layer_list_text.sql +7 -7
  55. package/module/gis/select/pg.column_name.geometry.sql +12 -12
  56. package/module/gis/select/pg.columns.parent.sql +6 -6
  57. package/module/gis/select/pg.table_name.sql +17 -17
  58. package/module/gis/select/service_id.sql +1 -1
  59. package/module/gis/select/srid.sql +7 -7
  60. package/module/gis/table/gis.cartocss.table.json +74 -74
  61. package/module/gis/table/gis.group_list.table.json +58 -58
  62. package/module/gis/table/gis.maps.table.json +110 -110
  63. package/module/gis/table/gis.metadata.table.json +70 -70
  64. package/module/gis/table/gis.metadata_new.table.json +137 -137
  65. package/module/gis/table/gis.ogc_service.table.json +100 -100
  66. package/module/gis/table/gis.rasters.table.json +113 -113
  67. package/module/gis/table/gis.registers.table.json +143 -143
  68. package/module/gis/table/gis.services.table.json +120 -120
  69. package/module/gis/table/site.gis.registers.table.json +88 -88
  70. package/module/gis/table/site.gis.services.table.json +106 -106
  71. package/module/gis/templates/ISO19136_2017_gml_template.xml +330 -330
  72. package/module/gis/tokens.yml +5 -5
  73. package/module/permissions/form/permissions.users.form.json +151 -151
  74. package/module/permissions/table/gis.permissions.table.json +97 -97
  75. package/module/test/map/addr.json +302 -302
  76. package/module/test/map/addr1.yml +23 -23
  77. package/module/test/select/address.str_id.sql +3 -3
  78. package/package.json +79 -79
  79. package/plugin.js +64 -64
  80. package/server/migrations/array_intersect.sql +13 -13
  81. package/server/migrations/cartocss.sql +27 -27
  82. package/server/migrations/group_list.sql +74 -74
  83. package/server/migrations/maps.sql +30 -30
  84. package/server/migrations/metadata.sql +415 -415
  85. package/server/migrations/ogc.sql +106 -106
  86. package/server/migrations/rasters.sql +265 -265
  87. package/server/migrations/services.sql +248 -248
  88. package/server/migrations/services_users_rel.sql +22 -22
  89. package/server/migrations/widgets.sql +20 -20
  90. package/server/plugins/crons.js +21 -21
  91. package/server/plugins/mapnik/funcs/checkRasterFile.js +107 -107
  92. package/server/plugins/mapnik/funcs/mapnik.js +151 -151
  93. package/server/plugins/mapnik/funcs/rootFolder.mjs +8 -8
  94. package/server/plugins/mapnik/map.proto +437 -437
  95. package/server/plugins/vite.js +74 -74
  96. package/server/routes/cartocss/cartocss.route.js +31 -31
  97. package/server/routes/cartocss/cartocss.route.test.js +78 -78
  98. package/server/routes/cartocss/cartocss.schema.js +76 -76
  99. package/server/routes/cartocss/functions/add.cartocss.js +39 -39
  100. package/server/routes/cartocss/functions/get.cartocss.js +57 -57
  101. package/server/routes/gis/functions/checkXML.js +107 -107
  102. package/server/routes/gis/functions/dashboard.js +24 -24
  103. package/server/routes/gis/gis.route.js +26 -26
  104. package/server/routes/gis/gis.route.test.js +33 -33
  105. package/server/routes/map/fonts/index.js +1933 -1933
  106. package/server/routes/map/functions/clearTiles.js +35 -35
  107. package/server/routes/map/functions/geojson.js +187 -187
  108. package/server/routes/map/functions/gis.convert.js +65 -65
  109. package/server/routes/map/functions/gis.icon.js +327 -327
  110. package/server/routes/map/functions/jsonData.js +206 -206
  111. package/server/routes/map/functions/layerList.js +144 -144
  112. package/server/routes/map/functions/map.js +122 -122
  113. package/server/routes/map/functions/mapCatalog.js +72 -72
  114. package/server/routes/map/functions/mapCatalogAttribute.js +53 -53
  115. package/server/routes/map/functions/mapFeatures.js +133 -133
  116. package/server/routes/map/functions/mapFormat.js +246 -246
  117. package/server/routes/map/functions/mapTiles.js +162 -162
  118. package/server/routes/map/functions/maps.js +15 -15
  119. package/server/routes/map/functions/marker_icon.js +43 -43
  120. package/server/routes/map/functions/parseGeoFile.js +85 -85
  121. package/server/routes/map/functions/pointHeight.js +51 -51
  122. package/server/routes/map/functions/vtile.js +174 -174
  123. package/server/routes/map/functions/vtile1.js +191 -191
  124. package/server/routes/map/map.route.js +283 -283
  125. package/server/routes/map/map.route.test.js +693 -693
  126. package/server/routes/map/map.schema.js +356 -356
  127. package/server/routes/map/pin/circle1.svg +76 -76
  128. package/server/routes/map/pin/circle2.svg +18 -18
  129. package/server/routes/map/pin/none.svg +12 -12
  130. package/server/routes/map/pin/pin.svg +14 -14
  131. package/server/routes/map/pin/pin1.svg +16 -16
  132. package/server/routes/map/pin/pin2.svg +7 -7
  133. package/server/routes/map/pin/pin3.svg +34 -34
  134. package/server/routes/map/pin/pin4.svg +14 -14
  135. package/server/routes/map/pin/pin5.svg +7 -7
  136. package/server/routes/map/pin/pin6.svg +12 -12
  137. package/server/routes/map/pin/pin7.svg +12 -12
  138. package/server/routes/mapnik/functions/cartoBounds.js +32 -32
  139. package/server/routes/mapnik/functions/clearTiles.js +103 -103
  140. package/server/routes/mapnik/functions/convertBoundToTile.js +27 -27
  141. package/server/routes/mapnik/functions/createXml.js +76 -76
  142. package/server/routes/mapnik/functions/createXmlMulti.js +72 -72
  143. package/server/routes/mapnik/functions/fileSearch.js +35 -35
  144. package/server/routes/mapnik/functions/fileStat.js +28 -28
  145. package/server/routes/mapnik/functions/pretile.js +138 -138
  146. package/server/routes/mapnik/functions/rasterInfo.js +66 -66
  147. package/server/routes/mapnik/functions/readDir.js +22 -22
  148. package/server/routes/mapnik/functions/rtile.js +164 -164
  149. package/server/routes/mapnik/functions/uploadRaster.js +152 -152
  150. package/server/routes/mapnik/functions/uploadXML.js +140 -140
  151. package/server/routes/mapnik/mapnik.route.js +102 -102
  152. package/server/routes/mapnik/mapnik.route.test.js +370 -370
  153. package/server/routes/mapnik/mapnik.schema.mjs +195 -195
  154. package/server/routes/mapnik.prefixless/functions/mapnikLogger.js +31 -31
  155. package/server/routes/mapnik.prefixless/functions/mapnikStat.js +21 -21
  156. package/server/routes/mapnik.prefixless/mapnik.prefixless.route.js +20 -20
  157. package/server/routes/mapnik.prefixless/mapnik.prefixless.route.test.js +91 -91
  158. package/server/routes/mapnik.prefixless/mapnik.prefixless.schema.mjs +27 -27
  159. package/server/routes/maps/functions/add.map.js +42 -42
  160. package/server/routes/maps/functions/del.map.js +17 -17
  161. package/server/routes/maps/functions/get.map.js +119 -119
  162. package/server/routes/maps/maps.route.js +58 -58
  163. package/server/routes/maps/maps.route.test.js +231 -231
  164. package/server/routes/maps/maps.schema.js +9 -9
  165. package/server/routes/metadata/functions/editMetadata.js +35 -35
  166. package/server/routes/metadata/functions/metadataXML.js +19 -19
  167. package/server/routes/metadata/metadata.route.js +26 -26
  168. package/server/routes/metadata/metadata.route.test.js +46 -46
  169. package/server/routes/metadata/metadata.schema.js +53 -53
  170. package/server/routes/ogc/functions/map.info.point.js +117 -117
  171. package/server/routes/ogc/ogc.route.js +21 -21
  172. package/server/routes/ogc/ogc.route.test.js +53 -53
  173. package/server/routes/ogc/ogc.schema.js +16 -16
  174. package/server/routes/permissions/functions/catalog.permissions.edit.js +20 -20
  175. package/server/routes/permissions/functions/catalog.permissions.js +12 -12
  176. package/server/routes/permissions/functions/get.permissions.js +59 -59
  177. package/server/routes/permissions/functions/gis.catalog.js +80 -80
  178. package/server/routes/permissions/permissions.route.js +35 -35
  179. package/server/routes/permissions/permissions.route.test.js +35 -35
  180. package/server/routes/permissions/permissions.schema.js +43 -43
  181. package/server/routes/registers/functions/add.registry.js +37 -37
  182. package/server/routes/registers/functions/classifiers.js +100 -100
  183. package/server/routes/registers/functions/columns.js +3 -3
  184. package/server/routes/registers/functions/content.type.js +9 -9
  185. package/server/routes/registers/functions/del.registry.js +14 -14
  186. package/server/routes/registers/functions/get.info.js +93 -93
  187. package/server/routes/registers/functions/getFilterSQLParametrized/formatValue.js +328 -328
  188. package/server/routes/registers/functions/getFilterSQLParametrized/getFilterQuery.js +126 -126
  189. package/server/routes/registers/functions/getFilterSQLParametrized/getRangeQuery.js +353 -353
  190. package/server/routes/registers/functions/getFilterSQLParametrized/index.js +81 -81
  191. package/server/routes/registers/functions/getTableColumnMeta.js +148 -148
  192. package/server/routes/registers/functions/gis.export.js +159 -159
  193. package/server/routes/registers/functions/gis.registry.js +71 -71
  194. package/server/routes/registers/functions/gis.registry.list.js +61 -61
  195. package/server/routes/registers/functions/gis.suggest.js +310 -310
  196. package/server/routes/registers/functions/handleRegistryRequest.js +178 -178
  197. package/server/routes/registers/functions/map.registry.js +87 -87
  198. package/server/routes/registers/registers.route.js +92 -92
  199. package/server/routes/registers/registers.route.test.js +173 -173
  200. package/server/routes/registers/registers.schema.js +276 -276
  201. package/server/routes/root.mjs +3 -3
  202. package/server/routes/services/functions/add.service.js +62 -62
  203. package/server/routes/services/functions/create.route.js +93 -93
  204. package/server/routes/services/functions/del.service.js +12 -12
  205. package/server/routes/services/functions/get.layer.geom.js +27 -27
  206. package/server/routes/services/functions/get.service.users.js +76 -76
  207. package/server/routes/services/functions/get.services.col.js +34 -34
  208. package/server/routes/services/functions/get.services.js +124 -124
  209. package/server/routes/services/functions/legend.auto.js +77 -77
  210. package/server/routes/services/services.route.js +76 -76
  211. package/server/routes/services/services.route.test.js +171 -171
  212. package/server/routes/services/services.schema.js +459 -459
  213. package/server/routes/widgets/functions/add.widget.js +38 -38
  214. package/server/routes/widgets/functions/del.widget.js +17 -17
  215. package/server/routes/widgets/functions/get.widget.js +41 -41
  216. package/server/routes/widgets/widgets.route.js +61 -61
  217. package/server/routes/widgets/widgets.route.test.js +144 -144
  218. package/server/routes/widgets/widgets.schema.js +24 -24
  219. package/server/shared/listFiles.js +14 -14
  220. package/utils.js +13 -13
  221. package/dist/service-JN82JN81.js +0 -3676
@@ -0,0 +1,3484 @@
1
+ var fi = Object.defineProperty;
2
+ var di = (e, n, t) => n in e ? fi(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var R = (e, n, t) => di(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { openBlock as _, createElementBlock as q, createElementVNode as y, defineComponent as ae, ref as E, watch as L, createTextVNode as pi, createVNode as O, createBlock as U, createCommentVNode as W, defineAsyncComponent as mi, unref as ze, withCtx as Ge, withDirectives as fn, vModelText as dn, normalizeClass as Ee, Fragment as At, renderList as Ct, toDisplayString as fe, getCurrentInstance as wt, onBeforeUnmount as Tt, toRef as hi, computed as ve, onMounted as gi, resolveDynamicComponent as yi } from "vue";
5
+ import { useRoute as vi, useRouter as bi } from "vue-router";
6
+ import { notify as te } from "@opengis/core";
7
+ import { _ as Ze, u as We, f as xi, M as Si, g as ki, h as Ai, i as Ci, j as it, k as wi, l as Ti, m as _i, s as rt, n as Ei } from "./index-CDy0MSfg.js";
8
+ import { _ as Ii, a as Ni, b as $i, c as Li, d as Fi, e as Ri, f as Oi, g as Pi } from "./MapToolbarRight.vue_vue_type_script_setup_true_lang-BWqBARGq.js";
9
+ import { S as Mi, C as Ui } from "./CardIcon-B6rIgAoD.js";
10
+ import { _ as _t } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-D3ZPeXMw.js";
11
+ import { V as en } from "./vs-datatable-BixMLOv-.js";
12
+ import { _ as Nn, m as $n, r as Le } from "./import-utils-WfWvX9B5.js";
13
+ /*! js-yaml 5.2.1 https://github.com/nodeca/js-yaml @license MIT */
14
+ var T = Symbol("NOT_RESOLVED"), Ln = Symbol("MERGE_KEY");
15
+ function V(e, n) {
16
+ return {
17
+ tagName: e,
18
+ nodeKind: "scalar",
19
+ implicit: n.implicit ?? !1,
20
+ matchByTagPrefix: n.matchByTagPrefix ?? !1,
21
+ implicitFirstChars: n.implicitFirstChars ?? null,
22
+ resolve: n.resolve,
23
+ identify: n.identify ?? null,
24
+ represent: n.represent ?? ((t) => String(t)),
25
+ representTagName: n.representTagName ?? null
26
+ };
27
+ }
28
+ function Fn(e, n) {
29
+ const t = n.finalize === void 0;
30
+ return {
31
+ tagName: e,
32
+ nodeKind: "sequence",
33
+ implicit: !1,
34
+ matchByTagPrefix: n.matchByTagPrefix ?? !1,
35
+ create: n.create,
36
+ addItem: n.addItem,
37
+ finalize: n.finalize ?? ((i) => i),
38
+ carrierIsResult: t,
39
+ identify: n.identify ?? null,
40
+ represent: n.represent ?? ((i) => i),
41
+ representTagName: n.representTagName ?? null
42
+ };
43
+ }
44
+ function nn(e, n) {
45
+ const t = n.finalize === void 0;
46
+ return {
47
+ tagName: e,
48
+ nodeKind: "mapping",
49
+ implicit: !1,
50
+ matchByTagPrefix: n.matchByTagPrefix ?? !1,
51
+ create: n.create,
52
+ addPair: n.addPair,
53
+ has: n.has,
54
+ keys: n.keys,
55
+ get: n.get,
56
+ finalize: n.finalize ?? ((i) => i),
57
+ carrierIsResult: t,
58
+ identify: n.identify ?? null,
59
+ represent: n.represent ?? ((i) => i),
60
+ representTagName: n.representTagName ?? null
61
+ };
62
+ }
63
+ var qi = V("tag:yaml.org,2002:str", {
64
+ resolve: (e) => e,
65
+ identify: (e) => typeof e == "string"
66
+ }), Vi = [
67
+ "",
68
+ "~",
69
+ "null",
70
+ "Null",
71
+ "NULL"
72
+ ], Bi = V("tag:yaml.org,2002:null", {
73
+ implicit: !0,
74
+ implicitFirstChars: [
75
+ "",
76
+ "~",
77
+ "n",
78
+ "N"
79
+ ],
80
+ resolve: (e) => Vi.indexOf(e) !== -1 ? null : T,
81
+ identify: (e) => e === null,
82
+ represent: () => "null"
83
+ }), Di = V("tag:yaml.org,2002:null", {
84
+ implicit: !0,
85
+ implicitFirstChars: ["n"],
86
+ resolve: (e, n) => e === "null" || n && e === "" ? null : T,
87
+ identify: (e) => e === null,
88
+ represent: () => "null"
89
+ }), Yi = [
90
+ "",
91
+ "~",
92
+ "null",
93
+ "Null",
94
+ "NULL"
95
+ ], ji = V("tag:yaml.org,2002:null", {
96
+ implicit: !0,
97
+ implicitFirstChars: [
98
+ "",
99
+ "~",
100
+ "n",
101
+ "N"
102
+ ],
103
+ resolve: (e) => Yi.indexOf(e) !== -1 ? null : T,
104
+ identify: (e) => e === null,
105
+ represent: () => "null"
106
+ }), Ki = [
107
+ "true",
108
+ "True",
109
+ "TRUE"
110
+ ], Hi = [
111
+ "false",
112
+ "False",
113
+ "FALSE"
114
+ ], zi = V("tag:yaml.org,2002:bool", {
115
+ implicit: !0,
116
+ implicitFirstChars: [
117
+ "t",
118
+ "T",
119
+ "f",
120
+ "F"
121
+ ],
122
+ resolve: (e) => Ki.indexOf(e) !== -1 ? !0 : Hi.indexOf(e) !== -1 ? !1 : T,
123
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
124
+ represent: (e) => e ? "true" : "false"
125
+ }), Gi = ["true"], Wi = ["false"], Qi = V("tag:yaml.org,2002:bool", {
126
+ implicit: !0,
127
+ implicitFirstChars: ["t", "f"],
128
+ resolve: (e) => Gi.indexOf(e) !== -1 ? !0 : Wi.indexOf(e) !== -1 ? !1 : T,
129
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
130
+ represent: (e) => e ? "true" : "false"
131
+ }), Ji = [
132
+ "true",
133
+ "True",
134
+ "TRUE",
135
+ "y",
136
+ "Y",
137
+ "yes",
138
+ "Yes",
139
+ "YES",
140
+ "on",
141
+ "On",
142
+ "ON"
143
+ ], Xi = [
144
+ "false",
145
+ "False",
146
+ "FALSE",
147
+ "n",
148
+ "N",
149
+ "no",
150
+ "No",
151
+ "NO",
152
+ "off",
153
+ "Off",
154
+ "OFF"
155
+ ], Zi = V("tag:yaml.org,2002:bool", {
156
+ implicit: !0,
157
+ implicitFirstChars: [
158
+ "y",
159
+ "Y",
160
+ "n",
161
+ "N",
162
+ "t",
163
+ "T",
164
+ "f",
165
+ "F",
166
+ "o",
167
+ "O"
168
+ ],
169
+ resolve: (e) => Ji.indexOf(e) !== -1 ? !0 : Xi.indexOf(e) !== -1 ? !1 : T,
170
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
171
+ represent: (e) => e ? "true" : "false"
172
+ }), er = /* @__PURE__ */ new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"), nr = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
173
+ function tr(e) {
174
+ let n = e, t = 1;
175
+ return (n[0] === "-" || n[0] === "+") && (n[0] === "-" && (t = -1), n = n.slice(1)), n.startsWith("0b") ? t * parseInt(n.slice(2), 2) : n.startsWith("0o") ? t * parseInt(n.slice(2), 8) : n.startsWith("0x") ? t * parseInt(n.slice(2), 16) : t * parseInt(n, 10);
176
+ }
177
+ function ir(e, n) {
178
+ if (n) {
179
+ if (!nr.test(e)) return T;
180
+ } else if (!er.test(e)) return T;
181
+ const t = tr(e);
182
+ return Number.isFinite(t) ? t : T;
183
+ }
184
+ var Et = V("tag:yaml.org,2002:int", {
185
+ implicit: !0,
186
+ implicitFirstChars: [
187
+ "-",
188
+ "+",
189
+ ..."0123456789"
190
+ ],
191
+ resolve: ir,
192
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
193
+ represent: (e) => e.toString(10)
194
+ }), rr = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)$"), or = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
195
+ function lr(e) {
196
+ let n = e, t = 1;
197
+ return (n[0] === "-" || n[0] === "+") && (n[0] === "-" && (t = -1), n = n.slice(1)), n.startsWith("0b") ? t * parseInt(n.slice(2), 2) : n.startsWith("0o") ? t * parseInt(n.slice(2), 8) : n.startsWith("0x") ? t * parseInt(n.slice(2), 16) : t * parseInt(n, 10);
198
+ }
199
+ function ar(e, n) {
200
+ if (n) {
201
+ if (!or.test(e)) return T;
202
+ } else if (!rr.test(e)) return T;
203
+ const t = lr(e);
204
+ return Number.isFinite(t) ? t : T;
205
+ }
206
+ var sr = V("tag:yaml.org,2002:int", {
207
+ implicit: !0,
208
+ implicitFirstChars: ["-", ..."0123456789"],
209
+ resolve: ar,
210
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
211
+ represent: (e) => e.toString(10)
212
+ }), ur = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");
213
+ function cr(e) {
214
+ let n = e.replace(/_/g, ""), t = 1;
215
+ if ((n[0] === "-" || n[0] === "+") && (n[0] === "-" && (t = -1), n = n.slice(1)), n.startsWith("0b")) return t * parseInt(n.slice(2), 2);
216
+ if (n.startsWith("0x")) return t * parseInt(n.slice(2), 16);
217
+ if (n.includes(":")) {
218
+ let i = 0;
219
+ for (const r of n.split(":")) i = i * 60 + Number(r);
220
+ return t * i;
221
+ }
222
+ return n !== "0" && n[0] === "0" ? t * parseInt(n, 8) : t * parseInt(n, 10);
223
+ }
224
+ function fr(e) {
225
+ if (!ur.test(e)) return T;
226
+ const n = cr(e);
227
+ return Number.isFinite(n) ? n : T;
228
+ }
229
+ var bn = V("tag:yaml.org,2002:int", {
230
+ implicit: !0,
231
+ implicitFirstChars: [
232
+ "-",
233
+ "+",
234
+ ..."0123456789"
235
+ ],
236
+ resolve: fr,
237
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
238
+ represent: (e) => e.toString(10)
239
+ }), dr = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), pr = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
240
+ function mr(e) {
241
+ if (!dr.test(e)) return T;
242
+ let n = e.toLowerCase();
243
+ const t = n[0] === "-" ? -1 : 1;
244
+ if ("+-".includes(n[0]) && (n = n.slice(1)), n === ".inf") return t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
245
+ if (n === ".nan") return NaN;
246
+ const i = t * parseFloat(n);
247
+ return Number.isFinite(i) || pr.test(e) ? i : T;
248
+ }
249
+ function hr(e) {
250
+ if (isNaN(e)) return ".nan";
251
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
252
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
253
+ if (Object.is(e, -0)) return "-0.0";
254
+ const n = e.toString(10);
255
+ return /^[-+]?[0-9]+e/.test(n) ? n.replace("e", ".e") : n;
256
+ }
257
+ var It = V("tag:yaml.org,2002:float", {
258
+ implicit: !0,
259
+ implicitFirstChars: [
260
+ "-",
261
+ "+",
262
+ ".",
263
+ ..."0123456789"
264
+ ],
265
+ resolve: mr,
266
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
267
+ represent: hr
268
+ }), gr = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"), yr = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
269
+ function vr(e, n) {
270
+ if (n) {
271
+ if (!yr.test(e)) return T;
272
+ let i = e.toLowerCase();
273
+ const r = i[0] === "-" ? -1 : 1;
274
+ if ("+-".includes(i[0]) && (i = i.slice(1)), i === ".inf") return r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
275
+ if (i === ".nan") return NaN;
276
+ const o = r * parseFloat(i);
277
+ return Number.isFinite(o) ? o : T;
278
+ }
279
+ if (!gr.test(e)) return T;
280
+ const t = Number(e);
281
+ return Number.isFinite(t) ? t : T;
282
+ }
283
+ function br(e) {
284
+ if (isNaN(e)) return ".nan";
285
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
286
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
287
+ if (Object.is(e, -0)) return "-0.0";
288
+ const n = e.toString(10);
289
+ return /^[-+]?[0-9]+e/.test(n) ? n.replace("e", ".e") : n;
290
+ }
291
+ var xr = V("tag:yaml.org,2002:float", {
292
+ implicit: !0,
293
+ implicitFirstChars: ["-", ..."0123456789"],
294
+ resolve: vr,
295
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
296
+ represent: br
297
+ }), Sr = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), kr = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
298
+ function Ar(e) {
299
+ if (!Sr.test(e)) return T;
300
+ let n = e.toLowerCase().replace(/_/g, "");
301
+ const t = n[0] === "-" ? -1 : 1;
302
+ if ("+-".includes(n[0]) && (n = n.slice(1)), n === ".inf") return t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
303
+ if (n === ".nan") return NaN;
304
+ let i = 0;
305
+ if (n.includes(":")) {
306
+ for (const r of n.split(":")) i = i * 60 + Number(r);
307
+ i *= t;
308
+ } else i = t * parseFloat(n);
309
+ return Number.isFinite(i) || kr.test(e) ? i : T;
310
+ }
311
+ function Cr(e) {
312
+ if (isNaN(e)) return ".nan";
313
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
314
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
315
+ if (Object.is(e, -0)) return "-0.0";
316
+ const n = e.toString(10);
317
+ return /^[-+]?[0-9]+e/.test(n) ? n.replace("e", ".e") : n;
318
+ }
319
+ var xn = V("tag:yaml.org,2002:float", {
320
+ implicit: !0,
321
+ implicitFirstChars: [
322
+ "-",
323
+ "+",
324
+ ".",
325
+ ..."0123456789"
326
+ ],
327
+ resolve: Ar,
328
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
329
+ represent: Cr
330
+ }), wr = V("tag:yaml.org,2002:merge", {
331
+ implicit: !0,
332
+ implicitFirstChars: ["<"],
333
+ resolve: (e, n) => e === "<<" || n && e === "" ? Ln : T
334
+ }), Tr = /^[A-Za-z0-9+/]*={0,2}$/;
335
+ function _r(e) {
336
+ const n = e.replace(/\s/g, "");
337
+ if (n.length % 4 !== 0 || !Tr.test(n)) return T;
338
+ const t = atob(n), i = new Uint8Array(t.length);
339
+ for (let r = 0; r < t.length; r++) i[r] = t.charCodeAt(r);
340
+ return i;
341
+ }
342
+ function Er(e) {
343
+ let n = "";
344
+ for (let t = 0; t < e.length; t++) n += String.fromCharCode(e[t]);
345
+ return btoa(n);
346
+ }
347
+ var Ir = V("tag:yaml.org,2002:binary", {
348
+ resolve: _r,
349
+ identify: (e) => Object.prototype.toString.call(e) === "[object Uint8Array]",
350
+ represent: Er
351
+ }), Nr = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), $r = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
352
+ function Lr(e) {
353
+ let n = Nr.exec(e);
354
+ if (n === null && (n = $r.exec(e)), n === null) return T;
355
+ const t = +n[1], i = +n[2] - 1, r = +n[3];
356
+ if (!n[4]) {
357
+ const c = new Date(Date.UTC(t, i, r));
358
+ return c.getUTCFullYear() !== t || c.getUTCMonth() !== i || c.getUTCDate() !== r ? T : c;
359
+ }
360
+ const o = +n[4], l = +n[5], a = +n[6];
361
+ let s = 0;
362
+ if (o > 23 || l > 59 || a > 59) return T;
363
+ if (n[7]) {
364
+ let c = n[7].slice(0, 3);
365
+ for (; c.length < 3; ) c += "0";
366
+ s = +c;
367
+ }
368
+ const u = new Date(Date.UTC(t, i, r, o, l, a, s));
369
+ if (u.getUTCFullYear() !== t || u.getUTCMonth() !== i || u.getUTCDate() !== r) return T;
370
+ if (n[9]) {
371
+ const c = +n[10], g = +(n[11] || 0);
372
+ if (c > 23 || g > 59) return T;
373
+ const m = (c * 60 + g) * 6e4;
374
+ u.setTime(u.getTime() - (n[9] === "-" ? -m : m));
375
+ }
376
+ return u;
377
+ }
378
+ var Fr = V("tag:yaml.org,2002:timestamp", {
379
+ implicit: !0,
380
+ implicitFirstChars: [..."0123456789"],
381
+ resolve: Lr,
382
+ identify: (e) => e instanceof Date,
383
+ represent: (e) => e.toISOString()
384
+ }), Rr = Fn("tag:yaml.org,2002:seq", {
385
+ create: () => [],
386
+ addItem: (e, n) => {
387
+ e.push(n);
388
+ },
389
+ identify: Array.isArray
390
+ });
391
+ function tn(e) {
392
+ if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
393
+ const n = Object.getPrototypeOf(e);
394
+ return n === null || n === Object.prototype;
395
+ }
396
+ function Sn(e, n) {
397
+ const t = {};
398
+ for (const i of n) e[i] !== void 0 && (t[i] = e[i]);
399
+ return t;
400
+ }
401
+ var Or = Fn("tag:yaml.org,2002:omap", {
402
+ create: () => ({
403
+ list: [],
404
+ seen: /* @__PURE__ */ new Set()
405
+ }),
406
+ addItem: (e, n) => {
407
+ let t;
408
+ if (n instanceof Map) {
409
+ if (n.size !== 1) return "cannot resolve an ordered map item";
410
+ t = n.keys().next().value;
411
+ } else if (tn(n)) {
412
+ const i = Object.keys(n);
413
+ if (i.length !== 1) return "cannot resolve an ordered map item";
414
+ t = i[0];
415
+ } else return "cannot resolve an ordered map item";
416
+ return e.seen.has(t) ? "duplicate key in ordered map" : (e.seen.add(t), e.list.push(n), "");
417
+ },
418
+ finalize: (e) => e.list
419
+ }), Pr = Fn("tag:yaml.org,2002:pairs", {
420
+ create: () => [],
421
+ addItem: (e, n) => {
422
+ if (n instanceof Map)
423
+ return n.size !== 1 ? "cannot resolve a pairs item" : (e.push(n.entries().next().value), "");
424
+ if (Object.prototype.toString.call(n) !== "[object Object]") return "cannot resolve a pairs item";
425
+ const t = n, i = Object.keys(t);
426
+ return i.length !== 1 ? "cannot resolve a pairs item" : (e.push([i[0], t[i[0]]]), "");
427
+ }
428
+ }), Mr = nn("tag:yaml.org,2002:map", {
429
+ create: () => ({}),
430
+ identify: tn,
431
+ represent: (e) => {
432
+ const n = /* @__PURE__ */ new Map();
433
+ for (const t of Object.keys(e)) n.set(t, e[t]);
434
+ return n;
435
+ },
436
+ addPair: (e, n, t) => {
437
+ if (n !== null && typeof n == "object") return "object-based map does not support complex keys";
438
+ const i = String(n);
439
+ return i === "__proto__" ? Object.defineProperty(e, i, {
440
+ value: t,
441
+ enumerable: !0,
442
+ configurable: !0,
443
+ writable: !0
444
+ }) : e[i] = t, "";
445
+ },
446
+ has: (e, n) => n !== null && typeof n == "object" ? !1 : Object.prototype.hasOwnProperty.call(e, String(n)),
447
+ keys: (e) => Object.keys(e),
448
+ get: (e, n) => e[String(n)]
449
+ }), Ur = nn("tag:yaml.org,2002:set", {
450
+ create: () => /* @__PURE__ */ new Set(),
451
+ identify: (e) => e instanceof Set,
452
+ represent: (e) => {
453
+ const n = /* @__PURE__ */ new Map();
454
+ for (const t of e) n.set(t, null);
455
+ return n;
456
+ },
457
+ addPair: (e, n, t) => t !== null ? "cannot resolve a set item" : (e.add(n), ""),
458
+ has: (e, n) => e.has(n),
459
+ keys: (e) => e.keys(),
460
+ get: () => null
461
+ });
462
+ function qr() {
463
+ return {
464
+ scalar: {},
465
+ sequence: {},
466
+ mapping: {}
467
+ };
468
+ }
469
+ function Vr() {
470
+ return {
471
+ scalar: [],
472
+ sequence: [],
473
+ mapping: []
474
+ };
475
+ }
476
+ function Br(e) {
477
+ const n = [];
478
+ for (const t of e) {
479
+ let i = n.length;
480
+ for (let r = 0; r < n.length; r++) {
481
+ const o = n[r];
482
+ if (o.nodeKind === t.nodeKind && o.tagName === t.tagName && o.matchByTagPrefix === t.matchByTagPrefix) {
483
+ i = r;
484
+ break;
485
+ }
486
+ }
487
+ n[i] = t;
488
+ }
489
+ return n;
490
+ }
491
+ var rn = class Nt {
492
+ constructor(n) {
493
+ R(this, "tags");
494
+ R(this, "implicitScalarTags");
495
+ R(this, "implicitScalarByFirstChar");
496
+ R(this, "implicitScalarAnyFirstChar");
497
+ R(this, "defaultScalarTag");
498
+ R(this, "defaultSequenceTag");
499
+ R(this, "defaultMappingTag");
500
+ R(this, "exact");
501
+ R(this, "prefix");
502
+ const t = Br(n), i = [], r = qr(), o = Vr();
503
+ for (const c of t) {
504
+ if (c.nodeKind === "scalar" && c.implicit) {
505
+ if (c.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
506
+ i.push(c);
507
+ }
508
+ switch (c.nodeKind) {
509
+ case "scalar":
510
+ c.matchByTagPrefix ? o.scalar.push(c) : r.scalar[c.tagName] = c;
511
+ break;
512
+ case "sequence":
513
+ c.matchByTagPrefix ? o.sequence.push(c) : r.sequence[c.tagName] = c;
514
+ break;
515
+ case "mapping":
516
+ c.matchByTagPrefix ? o.mapping.push(c) : r.mapping[c.tagName] = c;
517
+ break;
518
+ }
519
+ }
520
+ const l = i.filter((c) => c.implicitFirstChars === null), a = /* @__PURE__ */ new Set();
521
+ for (const c of i) if (c.implicitFirstChars !== null) for (const g of c.implicitFirstChars) a.add(g);
522
+ const s = /* @__PURE__ */ new Map();
523
+ for (const c of a) s.set(c, i.filter((g) => g.implicitFirstChars === null || g.implicitFirstChars.indexOf(c) !== -1));
524
+ const u = r.scalar["tag:yaml.org,2002:str"];
525
+ if (!u) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");
526
+ this.tags = t, this.implicitScalarTags = i, this.implicitScalarByFirstChar = s, this.implicitScalarAnyFirstChar = l, this.defaultScalarTag = u, this.defaultSequenceTag = r.sequence["tag:yaml.org,2002:seq"], this.defaultMappingTag = r.mapping["tag:yaml.org,2002:map"], this.exact = r, this.prefix = o;
527
+ }
528
+ withTags(...n) {
529
+ let t = [];
530
+ for (const i of n) t = t.concat(i);
531
+ return new Nt([...this.tags, ...t]);
532
+ }
533
+ }, Rn = new rn([
534
+ qi,
535
+ Rr,
536
+ Mr
537
+ ]);
538
+ new rn([
539
+ ...Rn.tags,
540
+ Di,
541
+ Qi,
542
+ sr,
543
+ xr
544
+ ]);
545
+ var Dr = new rn([
546
+ ...Rn.tags,
547
+ Bi,
548
+ zi,
549
+ Et,
550
+ It
551
+ ]), Yr = new rn([
552
+ ...Rn.tags,
553
+ ji,
554
+ Zi,
555
+ bn,
556
+ xn,
557
+ Fr,
558
+ wr,
559
+ Ir,
560
+ Or,
561
+ Pr,
562
+ Ur
563
+ ]);
564
+ nn("tag:yaml.org,2002:map", {
565
+ create: () => /* @__PURE__ */ new Map(),
566
+ addPair: (e, n, t) => (e.set(n, t), ""),
567
+ has: (e, n) => e.has(n),
568
+ keys: (e) => e.keys(),
569
+ get: (e, n) => e.get(n),
570
+ identify: (e) => e instanceof Map || tn(e),
571
+ represent: (e) => {
572
+ if (e instanceof Map) return e;
573
+ const n = /* @__PURE__ */ new Map(), t = e;
574
+ for (const i of Object.keys(t)) n.set(i, t[i]);
575
+ return n;
576
+ }
577
+ });
578
+ function ot(e) {
579
+ if (Array.isArray(e)) {
580
+ const n = Array.prototype.slice.call(e);
581
+ for (let t = 0; t < n.length; t++) {
582
+ if (Array.isArray(n[t])) return null;
583
+ typeof n[t] == "object" && Object.prototype.toString.call(n[t]) === "[object Object]" && (n[t] = "[object Object]");
584
+ }
585
+ return String(n);
586
+ }
587
+ return typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" ? "[object Object]" : String(e);
588
+ }
589
+ nn("tag:yaml.org,2002:map", {
590
+ create: () => ({}),
591
+ identify: tn,
592
+ represent: (e) => {
593
+ const n = /* @__PURE__ */ new Map();
594
+ for (const t of Object.keys(e)) n.set(t, e[t]);
595
+ return n;
596
+ },
597
+ addPair: (e, n, t) => {
598
+ const i = ot(n);
599
+ return i === null ? "nested arrays are not supported inside keys" : (i === "__proto__" ? Object.defineProperty(e, i, {
600
+ value: t,
601
+ enumerable: !0,
602
+ configurable: !0,
603
+ writable: !0
604
+ }) : e[i] = t, "");
605
+ },
606
+ has: (e, n) => {
607
+ const t = ot(n);
608
+ return t !== null && Object.prototype.hasOwnProperty.call(e, t);
609
+ },
610
+ keys: (e) => Object.keys(e),
611
+ get: (e, n) => e[String(n)]
612
+ });
613
+ var jr = {
614
+ maxLength: 79,
615
+ indent: 1,
616
+ linesBefore: 3,
617
+ linesAfter: 2
618
+ };
619
+ function pn(e, n, t, i, r) {
620
+ let o = "", l = "";
621
+ const a = Math.floor(r / 2) - 1;
622
+ return i - n > a && (o = " ... ", n = i - a + o.length), t - i > a && (l = " ...", t = i + a - l.length), {
623
+ str: o + e.slice(n, t).replace(/\t/g, "→") + l,
624
+ pos: i - n + o.length
625
+ };
626
+ }
627
+ function mn(e, n) {
628
+ return " ".repeat(Math.max(n - e.length, 0)) + e;
629
+ }
630
+ function Kr(e, n) {
631
+ if (!e.buffer) return null;
632
+ const t = {
633
+ ...jr,
634
+ ...n
635
+ }, i = /\r?\n|\r|\0/g, r = [0], o = [];
636
+ let l, a = -1;
637
+ for (; l = i.exec(e.buffer); )
638
+ o.push(l.index), r.push(l.index + l[0].length), e.position <= l.index && a < 0 && (a = r.length - 2);
639
+ a < 0 && (a = r.length - 1);
640
+ let s = "";
641
+ const u = Math.min(e.line + t.linesAfter, o.length).toString().length, c = t.maxLength - (t.indent + u + 3);
642
+ for (let m = 1; m <= t.linesBefore && !(a - m < 0); m++) {
643
+ const b = pn(e.buffer, r[a - m], o[a - m], e.position - (r[a] - r[a - m]), c);
644
+ s = `${" ".repeat(t.indent)}${mn((e.line - m + 1).toString(), u)} | ${b.str}
645
+ ${s}`;
646
+ }
647
+ const g = pn(e.buffer, r[a], o[a], e.position, c);
648
+ s += `${" ".repeat(t.indent)}${mn((e.line + 1).toString(), u)} | ${g.str}
649
+ `, s += `${"-".repeat(t.indent + u + 3 + g.pos)}^
650
+ `;
651
+ for (let m = 1; m <= t.linesAfter && !(a + m >= o.length); m++) {
652
+ const b = pn(e.buffer, r[a + m], o[a + m], e.position - (r[a] - r[a + m]), c);
653
+ s += `${" ".repeat(t.indent)}${mn((e.line + m + 1).toString(), u)} | ${b.str}
654
+ `;
655
+ }
656
+ return s.replace(/\n$/, "");
657
+ }
658
+ function lt(e, n) {
659
+ let t = "";
660
+ return e.mark ? (e.mark.name && (t += `in "${e.mark.name}" `), t += `(${e.mark.line + 1}:${e.mark.column + 1})`, !n && e.mark.snippet && (t += `
661
+
662
+ ${e.mark.snippet}`), `${e.reason} ${t}`) : e.reason;
663
+ }
664
+ var Fe = class extends Error {
665
+ constructor(n, t) {
666
+ super();
667
+ R(this, "reason");
668
+ R(this, "mark");
669
+ this.name = "YAMLException", this.reason = n, this.mark = t, this.message = lt(this, !1), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
670
+ }
671
+ toString(n) {
672
+ return `${this.name}: ${lt(this, n)}`;
673
+ }
674
+ };
675
+ function on(e, n, t, i = "") {
676
+ let r = 0, o = 0;
677
+ for (let a = 0; a < n; a++) {
678
+ const s = e.charCodeAt(a);
679
+ s === 10 ? (r++, o = a + 1) : s === 13 && (r++, e.charCodeAt(a + 1) === 10 && a++, o = a + 1);
680
+ }
681
+ const l = {
682
+ name: i,
683
+ buffer: e,
684
+ position: n,
685
+ line: r,
686
+ column: n - o
687
+ };
688
+ throw l.snippet = Kr(l), new Fe(t, l);
689
+ }
690
+ var Hr = -1;
691
+ function at(e) {
692
+ switch (e) {
693
+ case 48:
694
+ return "\0";
695
+ case 97:
696
+ return "\x07";
697
+ case 98:
698
+ return "\b";
699
+ case 116:
700
+ return " ";
701
+ case 9:
702
+ return " ";
703
+ case 110:
704
+ return `
705
+ `;
706
+ case 118:
707
+ return "\v";
708
+ case 102:
709
+ return "\f";
710
+ case 114:
711
+ return "\r";
712
+ case 101:
713
+ return "\x1B";
714
+ case 32:
715
+ return " ";
716
+ case 34:
717
+ return '"';
718
+ case 47:
719
+ return "/";
720
+ case 92:
721
+ return "\\";
722
+ case 78:
723
+ return "…";
724
+ case 95:
725
+ return " ";
726
+ case 76:
727
+ return "\u2028";
728
+ case 80:
729
+ return "\u2029";
730
+ default:
731
+ return "";
732
+ }
733
+ }
734
+ var $t = new Array(256), Lt = new Array(256);
735
+ for (let e = 0; e < 256; e++)
736
+ $t[e] = at(e) ? 1 : 0, Lt[e] = at(e);
737
+ function zr(e) {
738
+ return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
739
+ }
740
+ function Gr(e) {
741
+ return e >= 48 && e <= 57 ? e - 48 : (e | 32) - 97 + 10;
742
+ }
743
+ function Wr(e) {
744
+ return e === 120 ? 2 : e === 117 ? 4 : 8;
745
+ }
746
+ function Qe(e, n, t) {
747
+ let i = 0;
748
+ for (; n < t; ) {
749
+ const r = e.charCodeAt(n);
750
+ if (r === 10)
751
+ i++, n++;
752
+ else if (r === 13)
753
+ i++, n++, e.charCodeAt(n) === 10 && n++;
754
+ else if (r === 32 || r === 9) n++;
755
+ else break;
756
+ }
757
+ return {
758
+ position: n,
759
+ breaks: i
760
+ };
761
+ }
762
+ function On(e) {
763
+ return e === 1 ? " " : `
764
+ `.repeat(e - 1);
765
+ }
766
+ function Qr(e, n, t) {
767
+ let i = "", r = n, o = n, l = n;
768
+ for (; r < t; ) {
769
+ const a = e.charCodeAt(r);
770
+ if (a === 10 || a === 13) {
771
+ i += e.slice(o, l);
772
+ const s = Qe(e, r, t);
773
+ i += On(s.breaks), r = o = l = s.position;
774
+ } else
775
+ r++, a !== 32 && a !== 9 && (l = r);
776
+ }
777
+ return i + e.slice(o, l);
778
+ }
779
+ function Jr(e, n, t) {
780
+ let i = "", r = n, o = n, l = n;
781
+ for (; r < t; ) {
782
+ const a = e.charCodeAt(r);
783
+ if (a === 39)
784
+ i += e.slice(o, r) + "'", r += 2, o = l = r;
785
+ else if (a === 10 || a === 13) {
786
+ i += e.slice(o, l);
787
+ const s = Qe(e, r, t);
788
+ i += On(s.breaks), r = o = l = s.position;
789
+ } else
790
+ r++, a !== 32 && a !== 9 && (l = r);
791
+ }
792
+ return i + e.slice(o, t);
793
+ }
794
+ function Xr(e, n, t) {
795
+ let i = "", r = n, o = n, l = n;
796
+ for (; r < t; ) {
797
+ const a = e.charCodeAt(r);
798
+ if (a === 92) {
799
+ i += e.slice(o, r), r++;
800
+ const s = e.charCodeAt(r);
801
+ if (s === 10 || s === 13) r = Qe(e, r, t).position;
802
+ else if (s < 256 && $t[s])
803
+ i += Lt[s], r++;
804
+ else {
805
+ let u = Wr(s), c = 0;
806
+ for (; u > 0; u--) {
807
+ r++;
808
+ const g = Gr(e.charCodeAt(r));
809
+ c = (c << 4) + g;
810
+ }
811
+ i += zr(c), r++;
812
+ }
813
+ o = l = r;
814
+ } else if (a === 10 || a === 13) {
815
+ i += e.slice(o, l);
816
+ const s = Qe(e, r, t);
817
+ i += On(s.breaks), r = o = l = s.position;
818
+ } else
819
+ r++, a !== 32 && a !== 9 && (l = r);
820
+ }
821
+ return i + e.slice(o, t);
822
+ }
823
+ function st(e, n, t, i, r, o) {
824
+ const l = i < 0 ? 0 : i, a = e.slice(n, t).replace(/\r\n?/g, `
825
+ `), s = a === "" ? [] : (a.endsWith(`
826
+ `) ? a.slice(0, -1) : a).split(`
827
+ `);
828
+ let u = "", c = !1, g = 0, m = !1;
829
+ for (const b of s) {
830
+ let p = 0;
831
+ for (; p < l && b.charCodeAt(p) === 32; ) p++;
832
+ if (i < 0 || p >= b.length) {
833
+ g++;
834
+ continue;
835
+ }
836
+ const h = b.slice(l), v = h.charCodeAt(0);
837
+ o ? v === 32 || v === 9 ? (m = !0, u += `
838
+ `.repeat(c ? 1 + g : g)) : m ? (m = !1, u += `
839
+ `.repeat(g + 1)) : g === 0 ? c && (u += " ") : u += `
840
+ `.repeat(g) : u += `
841
+ `.repeat(c ? 1 + g : g), u += h, c = !0, g = 0;
842
+ }
843
+ return r === 3 ? u += `
844
+ `.repeat(c ? 1 + g : g) : r !== 2 && c && (u += `
845
+ `), u;
846
+ }
847
+ function Zr(e, n) {
848
+ if (n.valueStart === Hr) return "";
849
+ const { valueStart: t, valueEnd: i } = n;
850
+ if (n.fast) return e.slice(t, i);
851
+ switch (n.style) {
852
+ case 2:
853
+ return Jr(e, t, i);
854
+ case 3:
855
+ return Xr(e, t, i);
856
+ case 4:
857
+ return st(e, t, i, n.indent, n.chomping, !1);
858
+ case 5:
859
+ return st(e, t, i, n.indent, n.chomping, !0);
860
+ default:
861
+ return Qr(e, t, i);
862
+ }
863
+ }
864
+ var eo = {
865
+ "!": "!",
866
+ "!!": "tag:yaml.org,2002:"
867
+ };
868
+ function hn(e) {
869
+ return encodeURI(e).replace(/!/g, "%21");
870
+ }
871
+ function Ft(e, n) {
872
+ if (e.startsWith("!<") && e.endsWith(">")) return decodeURIComponent(e.slice(2, -1));
873
+ const t = e.indexOf("!", 1), i = t === -1 ? "!" : e.slice(0, t + 1), r = (n == null ? void 0 : n[i]) ?? eo[i] ?? i;
874
+ return decodeURIComponent(r) + decodeURIComponent(e.slice(i.length));
875
+ }
876
+ function Rt(e) {
877
+ let n = e;
878
+ return n.charCodeAt(0) === 33 ? (n = n.slice(1), `!${hn(n)}`) : n.slice(0, 18) === "tag:yaml.org,2002:" ? `!!${hn(n.slice(18))}` : `!<${hn(n)}>`;
879
+ }
880
+ var be = -1, Pn = {
881
+ filename: "",
882
+ schema: Dr,
883
+ json: !1,
884
+ maxTotalMergeKeys: 1e4,
885
+ maxAliases: -1
886
+ };
887
+ function no(e) {
888
+ return "tagStart" in e && e.tagStart !== be ? e.tagStart : "anchorStart" in e && e.anchorStart !== be ? e.anchorStart : "valueStart" in e && e.valueStart !== be ? e.valueStart : "start" in e ? e.start : 0;
889
+ }
890
+ function j(e, n) {
891
+ on(e.source, e.position, n, e.filename);
892
+ }
893
+ function Ot(e, n, t, i) {
894
+ try {
895
+ return t.finalize(i);
896
+ } catch (r) {
897
+ if (r instanceof Fe) throw r;
898
+ on(e.source, n, r instanceof Error ? r.message : String(r), e.filename);
899
+ }
900
+ }
901
+ function Ke(e, n, t) {
902
+ const i = e[t];
903
+ if (i) return i;
904
+ for (const r of n) if (t.startsWith(r.tagName)) return r;
905
+ }
906
+ function to(e, n, t, i, r) {
907
+ const o = Ke(n, t, i);
908
+ if (o) return o;
909
+ j(e, `unknown ${r} tag !<${i}>`);
910
+ }
911
+ function io(e, n) {
912
+ const t = Zr(e.source, n), i = n.tagStart === be ? "" : e.source.slice(n.tagStart, n.tagEnd), r = e.schema.defaultScalarTag;
913
+ if (i !== "") {
914
+ if (i === "!") return {
915
+ value: t,
916
+ tag: r
917
+ };
918
+ const o = Ft(i, e.tagHandlers), l = Ke(e.schema.exact.scalar, e.schema.prefix.scalar, o);
919
+ if (l) {
920
+ const s = l.resolve(t, !0, o);
921
+ return s === T && j(e, `cannot resolve a node with !<${o}> explicit tag`), {
922
+ value: s,
923
+ tag: l
924
+ };
925
+ }
926
+ const a = Ke(e.schema.exact.mapping, e.schema.prefix.mapping, o) ?? Ke(e.schema.exact.sequence, e.schema.prefix.sequence, o);
927
+ if (a) {
928
+ t !== "" && j(e, `cannot resolve a node with !<${o}> explicit tag`);
929
+ const s = a.create(o);
930
+ return {
931
+ value: a.carrierIsResult ? s : Ot(e, e.position, a, s),
932
+ tag: a
933
+ };
934
+ }
935
+ j(e, `unknown scalar tag !<${o}>`);
936
+ }
937
+ if (n.style === 1) {
938
+ const o = e.schema.implicitScalarByFirstChar.get(t.charAt(0)) ?? e.schema.implicitScalarAnyFirstChar;
939
+ for (const l of o) {
940
+ const a = l.resolve(t, !1, l.tagName);
941
+ if (a !== T) return {
942
+ value: a,
943
+ tag: l
944
+ };
945
+ }
946
+ }
947
+ return {
948
+ value: r.resolve(t, !1, r.tagName),
949
+ tag: r
950
+ };
951
+ }
952
+ function ut(e, n, t, i, r, o) {
953
+ const l = n.tagStart === be ? "" : e.source.slice(n.tagStart, n.tagEnd), a = l === "" || l === "!" ? r : Ft(l, e.tagHandlers);
954
+ return {
955
+ tagName: a,
956
+ tag: to(e, t, i, a, o)
957
+ };
958
+ }
959
+ function Pt(e) {
960
+ return e.nodeKind === "mapping";
961
+ }
962
+ function ct(e, n, t, i) {
963
+ for (const r of i.keys(t)) {
964
+ if (e.maxTotalMergeKeys !== -1 && ++e.totalMergeKeys > e.maxTotalMergeKeys && j(e, `merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`), n.tag.has(n.value, r)) continue;
965
+ const o = n.tag.addPair(n.value, r, i.get(t, r));
966
+ o && j(e, o), (n.overridable ?? (n.overridable = /* @__PURE__ */ new Set())).add(r);
967
+ }
968
+ }
969
+ function ro(e, n, t, i) {
970
+ if (e.position = n.keyPosition, Pt(i)) ct(e, n, t, i);
971
+ else if (i.nodeKind === "sequence" && Array.isArray(t)) for (const r of t) ct(e, n, r, n.tag);
972
+ else j(e, "cannot merge mappings; the provided source object is unacceptable");
973
+ }
974
+ function oo(e, n, t, i, r) {
975
+ var l, a;
976
+ if (e.position = n.keyPosition, t === Ln) {
977
+ ro(e, n, i, r);
978
+ return;
979
+ }
980
+ !e.json && n.tag.has(n.value, t) && !((l = n.overridable) != null && l.has(t)) && j(e, "duplicated mapping key");
981
+ const o = n.tag.addPair(n.value, t, i);
982
+ o && j(e, o), (a = n.overridable) == null || a.delete(t);
983
+ }
984
+ function gn(e, n, t) {
985
+ const i = e.frames[e.frames.length - 1];
986
+ if (i.kind === "document")
987
+ i.value = n, i.hasValue = !0;
988
+ else if (i.kind === "sequence") {
989
+ i.merge && (Pt(t) || j(e, "cannot merge mappings; the provided source object is unacceptable"));
990
+ const r = i.tag.addItem(i.value, n, i.index++);
991
+ r && j(e, r);
992
+ } else if (i.hasKey) {
993
+ const r = i.key;
994
+ i.key = void 0, i.hasKey = !1, oo(e, i, r, n, t);
995
+ } else
996
+ i.key = n, i.keyPosition = e.position, i.hasKey = !0;
997
+ }
998
+ function yn(e, n, t, i, r) {
999
+ if (n.anchorStart !== be) {
1000
+ const o = {
1001
+ value: t,
1002
+ tag: i,
1003
+ isValueFinal: r
1004
+ };
1005
+ return e.anchors.set(e.source.slice(n.anchorStart, n.anchorEnd), o), o;
1006
+ }
1007
+ return null;
1008
+ }
1009
+ function lo(e, n) {
1010
+ const t = {
1011
+ ...Pn,
1012
+ ...n,
1013
+ events: e,
1014
+ documents: [],
1015
+ eventIndex: 0,
1016
+ position: 0,
1017
+ frames: [],
1018
+ anchors: /* @__PURE__ */ new Map(),
1019
+ tagHandlers: /* @__PURE__ */ Object.create(null),
1020
+ totalMergeKeys: 0,
1021
+ aliasCount: 0
1022
+ };
1023
+ for (; t.eventIndex < t.events.length; ) {
1024
+ const i = t.events[t.eventIndex++];
1025
+ switch (t.position = no(i), i.type) {
1026
+ case 1:
1027
+ t.anchors = /* @__PURE__ */ new Map(), t.aliasCount = 0, t.tagHandlers = /* @__PURE__ */ Object.create(null);
1028
+ for (const r of i.directives) r.kind === "tag" && (t.tagHandlers[r.handle] = r.prefix);
1029
+ t.frames.push({
1030
+ kind: "document",
1031
+ position: t.position,
1032
+ value: void 0,
1033
+ hasValue: !1
1034
+ });
1035
+ break;
1036
+ case 4: {
1037
+ const { value: r, tag: o } = io(t, i);
1038
+ yn(t, i, r, o, !0), gn(t, r, o);
1039
+ break;
1040
+ }
1041
+ case 2: {
1042
+ const r = ut(t, i, t.schema.exact.sequence, t.schema.prefix.sequence, "tag:yaml.org,2002:seq", "sequence"), o = r.tag.create(r.tagName), l = yn(t, i, o, r.tag, r.tag.carrierIsResult), a = t.frames[t.frames.length - 1], s = a !== void 0 && a.kind === "mapping" && a.hasKey && a.key === Ln;
1043
+ t.frames.push({
1044
+ kind: "sequence",
1045
+ position: t.position,
1046
+ value: o,
1047
+ tag: r.tag,
1048
+ anchor: l,
1049
+ index: 0,
1050
+ merge: s
1051
+ });
1052
+ break;
1053
+ }
1054
+ case 3: {
1055
+ const r = ut(t, i, t.schema.exact.mapping, t.schema.prefix.mapping, "tag:yaml.org,2002:map", "mapping"), o = r.tag.create(r.tagName), l = yn(t, i, o, r.tag, r.tag.carrierIsResult);
1056
+ t.frames.push({
1057
+ kind: "mapping",
1058
+ position: t.position,
1059
+ value: o,
1060
+ tag: r.tag,
1061
+ anchor: l,
1062
+ key: void 0,
1063
+ keyPosition: t.position,
1064
+ hasKey: !1,
1065
+ overridable: null
1066
+ });
1067
+ break;
1068
+ }
1069
+ case 5: {
1070
+ t.maxAliases !== -1 && ++t.aliasCount > t.maxAliases && j(t, `aliases exceeded maxAliases (${t.maxAliases})`);
1071
+ const r = t.source.slice(i.anchorStart, i.anchorEnd), o = t.anchors.get(r);
1072
+ o || j(t, `unidentified alias "${r}"`), o.isValueFinal || j(t, `recursive alias "${r}" is not supported for tag ${o.tag.tagName} because it uses finalize()`), gn(t, o.value, o.tag);
1073
+ break;
1074
+ }
1075
+ case 6: {
1076
+ const r = t.frames.pop();
1077
+ if (r.kind === "document") t.documents.push(r.value);
1078
+ else {
1079
+ const o = r.tag.carrierIsResult ? r.value : Ot(t, r.position, r.tag, r.value);
1080
+ r.anchor && (r.anchor.value = o, r.anchor.isValueFinal = !0), gn(t, o, r.tag);
1081
+ }
1082
+ break;
1083
+ }
1084
+ }
1085
+ }
1086
+ return t.documents;
1087
+ }
1088
+ var w = -1, Mt = Object.prototype.hasOwnProperty, ie = 1, kn = 2, Ut = 3, Je = 4, ao = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, so = /[,\[\]{}]/, qt = /^(?:!|!!|![0-9A-Za-z-]+!)$/, An = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`, Vt = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`, uo = new RegExp(`^(?:${An})*$`), co = new RegExp(`^(?:${Vt})+$`), fo = new RegExp(`^(?:!(?:${An})*|${Vt}(?:${An})*)$`), Mn = {
1089
+ filename: "",
1090
+ maxDepth: 100
1091
+ };
1092
+ function po(e, n, t) {
1093
+ e.events.push({
1094
+ type: 1,
1095
+ explicitStart: n,
1096
+ explicitEnd: t,
1097
+ directives: e.directives
1098
+ });
1099
+ }
1100
+ function Bt(e, n, t, i, r, o, l) {
1101
+ e.events.push({
1102
+ type: 2,
1103
+ start: n,
1104
+ anchorStart: t,
1105
+ anchorEnd: i,
1106
+ tagStart: r,
1107
+ tagEnd: o,
1108
+ style: l
1109
+ });
1110
+ }
1111
+ function Ie(e, n, t, i, r, o, l) {
1112
+ e.events.push({
1113
+ type: 3,
1114
+ start: n,
1115
+ anchorStart: t,
1116
+ anchorEnd: i,
1117
+ tagStart: r,
1118
+ tagEnd: o,
1119
+ style: l
1120
+ });
1121
+ }
1122
+ function Ae(e, n, t, i, r, o, l, a, s = 1, u = -1, c = !1) {
1123
+ e.events.push({
1124
+ type: 4,
1125
+ valueStart: n,
1126
+ valueEnd: t,
1127
+ anchorStart: i,
1128
+ anchorEnd: r,
1129
+ tagStart: o,
1130
+ tagEnd: l,
1131
+ style: a,
1132
+ chomping: s,
1133
+ indent: u,
1134
+ fast: c
1135
+ });
1136
+ }
1137
+ function mo(e, n, t) {
1138
+ e.events.push({
1139
+ type: 5,
1140
+ anchorStart: n,
1141
+ anchorEnd: t
1142
+ });
1143
+ }
1144
+ function xe(e) {
1145
+ e.events.push({ type: 6 });
1146
+ }
1147
+ function Y(e) {
1148
+ Ae(e, w, w, w, w, w, w, 1);
1149
+ }
1150
+ function ft() {
1151
+ return {
1152
+ anchorStart: w,
1153
+ anchorEnd: w,
1154
+ tagStart: w,
1155
+ tagEnd: w
1156
+ };
1157
+ }
1158
+ function Ne(e) {
1159
+ return {
1160
+ position: e.position,
1161
+ line: e.line,
1162
+ lineStart: e.lineStart,
1163
+ lineIndent: e.lineIndent,
1164
+ firstTabInLine: e.firstTabInLine,
1165
+ eventsLength: e.events.length
1166
+ };
1167
+ }
1168
+ function oe(e, n) {
1169
+ e.position = n.position, e.line = n.line, e.lineStart = n.lineStart, e.lineIndent = n.lineIndent, e.firstTabInLine = n.firstTabInLine, e.events.length = n.eventsLength;
1170
+ }
1171
+ function x(e, n) {
1172
+ on(e.input.slice(0, e.length), e.position, n, e.filename);
1173
+ }
1174
+ function P(e) {
1175
+ return e === 10 || e === 13;
1176
+ }
1177
+ function pe(e) {
1178
+ return e === 9 || e === 32;
1179
+ }
1180
+ function Q(e) {
1181
+ return pe(e) || P(e);
1182
+ }
1183
+ function X(e) {
1184
+ return e === 0 || Q(e);
1185
+ }
1186
+ function me(e) {
1187
+ return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
1188
+ }
1189
+ function ho(e) {
1190
+ return e >= 48 && e <= 57 ? e - 48 : -1;
1191
+ }
1192
+ function go(e) {
1193
+ if (e >= 48 && e <= 57) return e - 48;
1194
+ const n = e | 32;
1195
+ return n >= 97 && n <= 102 ? n - 97 + 10 : -1;
1196
+ }
1197
+ function yo(e) {
1198
+ return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
1199
+ }
1200
+ function vo(e) {
1201
+ return e === 48 || e === 97 || e === 98 || e === 116 || e === 9 || e === 110 || e === 118 || e === 102 || e === 114 || e === 101 || e === 32 || e === 34 || e === 47 || e === 92 || e === 78 || e === 95 || e === 76 || e === 80;
1202
+ }
1203
+ function Xe(e) {
1204
+ e.input.charCodeAt(e.position) === 10 ? e.position++ : (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++), e.line++, e.lineStart = e.position, e.lineIndent = 0, e.firstTabInLine = -1;
1205
+ }
1206
+ function D(e, n) {
1207
+ let t = 0, i = e.input.charCodeAt(e.position), r = e.position === e.lineStart || Q(e.input.charCodeAt(e.position - 1));
1208
+ for (; i !== 0; ) {
1209
+ for (; pe(i); )
1210
+ r = !0, i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
1211
+ if (n && r && i === 35) do
1212
+ i = e.input.charCodeAt(++e.position);
1213
+ while (!P(i) && i !== 0);
1214
+ if (!P(i)) break;
1215
+ for (Xe(e), t++, r = !0, i = e.input.charCodeAt(e.position); i === 32; )
1216
+ e.lineIndent++, i = e.input.charCodeAt(++e.position);
1217
+ }
1218
+ return t;
1219
+ }
1220
+ function le(e, n = e.position) {
1221
+ const t = e.input.charCodeAt(n);
1222
+ if ((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2)) {
1223
+ const i = e.input.charCodeAt(n + 3);
1224
+ return i === 0 || Q(i);
1225
+ }
1226
+ return !1;
1227
+ }
1228
+ function dt(e) {
1229
+ let n = e.input.charCodeAt(e.position);
1230
+ for (; n !== 0 && !P(n); ) n = e.input.charCodeAt(++e.position);
1231
+ }
1232
+ function Dt(e, n, t) {
1233
+ ao.test(e.input.slice(n, t)) && x(e, "the stream contains non-printable characters");
1234
+ }
1235
+ function bo(e, n, t) {
1236
+ if (e.input.charCodeAt(e.position) !== 33) return !1;
1237
+ n.tagStart !== w && x(e, "duplication of a tag property");
1238
+ const i = e.position;
1239
+ let r = !1, o = !1, l = "!", a = e.input.charCodeAt(++e.position);
1240
+ a === 60 ? (r = !0, a = e.input.charCodeAt(++e.position)) : a === 33 && (o = !0, l = "!!", a = e.input.charCodeAt(++e.position));
1241
+ let s = e.position, u;
1242
+ if (r) {
1243
+ for (; a !== 0 && a !== 62; ) a = e.input.charCodeAt(++e.position);
1244
+ a !== 62 && x(e, "unexpected end of the stream within a verbatim tag"), u = e.input.slice(s, e.position), e.position++;
1245
+ } else {
1246
+ for (; a !== 0 && !Q(a) && !(t && me(a)); )
1247
+ a === 33 && (o ? x(e, "tag suffix cannot contain exclamation marks") : (l = e.input.slice(s - 1, e.position + 1), qt.test(l) || x(e, "named tag handle cannot contain such characters"), o = !0, s = e.position + 1)), a = e.input.charCodeAt(++e.position);
1248
+ u = e.input.slice(s, e.position), so.test(u) && x(e, "tag suffix cannot contain flow indicator characters");
1249
+ }
1250
+ return u && !(r ? uo.test(u) : co.test(u)) && x(e, `tag name cannot contain such characters: ${u}`), !r && l !== "!" && l !== "!!" && !Mt.call(e.tagHandlers, l) && x(e, `undeclared tag handle "${l}"`), n.tagStart = i, n.tagEnd = e.position, !0;
1251
+ }
1252
+ function xo(e, n) {
1253
+ if (e.input.charCodeAt(e.position) !== 38) return !1;
1254
+ n.anchorStart !== w && x(e, "duplication of an anchor property"), e.position++;
1255
+ const t = e.position;
1256
+ for (; e.input.charCodeAt(e.position) !== 0 && !Q(e.input.charCodeAt(e.position)) && !me(e.input.charCodeAt(e.position)); ) e.position++;
1257
+ return e.position === t && x(e, "name of an anchor node must contain at least one character"), n.anchorStart = t, n.anchorEnd = e.position, !0;
1258
+ }
1259
+ function So(e, n) {
1260
+ if (e.input.charCodeAt(e.position) !== 42) return !1;
1261
+ (n.anchorStart !== w || n.tagStart !== w) && x(e, "alias node should not have any properties"), e.position++;
1262
+ const t = e.position;
1263
+ for (; e.input.charCodeAt(e.position) !== 0 && !Q(e.input.charCodeAt(e.position)) && !me(e.input.charCodeAt(e.position)); ) e.position++;
1264
+ return e.position === t && x(e, "name of an alias node must contain at least one character"), mo(e, t, e.position), !0;
1265
+ }
1266
+ function Cn(e, n) {
1267
+ D(e, !1), e.lineIndent < n && x(e, "deficient indentation");
1268
+ }
1269
+ function ko(e, n, t) {
1270
+ if (e.input.charCodeAt(e.position) !== 39) return !1;
1271
+ e.position++;
1272
+ const i = e.position;
1273
+ let r = !0;
1274
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
1275
+ const o = e.input.charCodeAt(e.position);
1276
+ if (o === 39) {
1277
+ if (e.input.charCodeAt(e.position + 1) === 39) {
1278
+ r = !1, e.position += 2;
1279
+ continue;
1280
+ }
1281
+ const l = e.position;
1282
+ return e.position++, Ae(e, i, l, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, 2, 1, -1, r), !0;
1283
+ }
1284
+ P(o) ? (r = !1, Cn(e, n)) : e.position === e.lineStart && le(e) ? x(e, "unexpected end of the document within a single quoted scalar") : o !== 9 && o < 32 ? x(e, "expected valid JSON character") : e.position++;
1285
+ }
1286
+ x(e, "unexpected end of the stream within a single quoted scalar");
1287
+ }
1288
+ function Ao(e, n, t) {
1289
+ if (e.input.charCodeAt(e.position) !== 34) return !1;
1290
+ e.position++;
1291
+ const i = e.position;
1292
+ let r = !0;
1293
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
1294
+ const o = e.input.charCodeAt(e.position);
1295
+ if (o === 34) {
1296
+ const l = e.position;
1297
+ return e.position++, Ae(e, i, l, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, 3, 1, -1, r), !0;
1298
+ }
1299
+ if (o === 92) {
1300
+ r = !1;
1301
+ const l = e.input.charCodeAt(++e.position);
1302
+ if (P(l)) Cn(e, n);
1303
+ else if (vo(l)) e.position++;
1304
+ else {
1305
+ let a = yo(l);
1306
+ for (a === 0 && x(e, "unknown escape sequence"); a-- > 0; )
1307
+ e.position++, go(e.input.charCodeAt(e.position)) < 0 && x(e, "expected hexadecimal character");
1308
+ e.position++;
1309
+ }
1310
+ } else P(o) ? (r = !1, Cn(e, n)) : e.position === e.lineStart && le(e) ? x(e, "unexpected end of the document within a double quoted scalar") : o !== 9 && o < 32 ? x(e, "expected valid JSON character") : e.position++;
1311
+ }
1312
+ x(e, "unexpected end of the stream within a double quoted scalar");
1313
+ }
1314
+ function Co(e, n, t) {
1315
+ const i = e.input.charCodeAt(e.position);
1316
+ let r = 1, o = -1, l = !1;
1317
+ if (i !== 124 && i !== 62) return !1;
1318
+ const a = i === 124 ? 4 : 5;
1319
+ for (e.position++; e.input.charCodeAt(e.position) !== 0; ) {
1320
+ const b = e.input.charCodeAt(e.position), p = ho(b);
1321
+ if (b === 43 || b === 45)
1322
+ r !== 1 && x(e, "repeat of a chomping mode identifier"), r = b === 43 ? 3 : 2, e.position++;
1323
+ else if (p >= 0)
1324
+ p === 0 && x(e, "bad explicit indentation width of a block scalar; it cannot be less than one"), l && x(e, "repeat of an indentation width identifier"), o = n + p - 1, l = !0, e.position++;
1325
+ else break;
1326
+ }
1327
+ let s = !1;
1328
+ for (; pe(e.input.charCodeAt(e.position)); )
1329
+ s = !0, e.position++;
1330
+ s && e.input.charCodeAt(e.position) === 35 && dt(e), P(e.input.charCodeAt(e.position)) ? Xe(e) : e.input.charCodeAt(e.position) !== 0 && x(e, "a line break is expected");
1331
+ let u = l ? o : -1, c = 0;
1332
+ const g = e.position;
1333
+ let m = e.position;
1334
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
1335
+ const b = e.position;
1336
+ let p = 0;
1337
+ for (; e.input.charCodeAt(b + p) === 32; ) p++;
1338
+ const h = e.input.charCodeAt(b + p);
1339
+ if (h === 0) {
1340
+ u >= 0 ? p > u && (m = b + p) : p > 0 && (m = b + p);
1341
+ break;
1342
+ }
1343
+ if (b === e.lineStart && le(e, b)) break;
1344
+ if (!l && u === -1 && P(h) && (c = Math.max(c, p)), !l && u === -1 && !P(h) && (h === 9 && p < n && (e.position = b + p, x(e, "tab characters must not be used in indentation")), p < c && (e.position = b + p, x(e, "bad indentation of a mapping entry"))), u === -1 && h !== 0 && !P(h) && p < n) {
1345
+ e.lineIndent = p, e.position = b + p;
1346
+ break;
1347
+ }
1348
+ !l && h !== 0 && !P(h) && u === -1 && (u = p);
1349
+ const v = u === -1 ? n + 1 : u;
1350
+ if (h !== 0 && !P(h) && p < v) {
1351
+ e.lineIndent = p, e.position = b + p;
1352
+ break;
1353
+ }
1354
+ dt(e), m = e.position, P(e.input.charCodeAt(e.position)) && (Xe(e), m = e.position);
1355
+ }
1356
+ return Dt(e, g, m), Ae(e, g, m, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, a, r, u), !0;
1357
+ }
1358
+ function wo(e, n) {
1359
+ const t = e.input.charCodeAt(e.position), i = n === ie;
1360
+ if (t === 0 || Q(t) || t === 35 || t === 38 || t === 42 || t === 33 || t === 124 || t === 62 || t === 39 || t === 34 || t === 37 || t === 64 || t === 96 || i && me(t)) return !1;
1361
+ if (t === 63 || t === 45) {
1362
+ const r = e.input.charCodeAt(e.position + 1);
1363
+ if (X(r) || i && me(r)) return !1;
1364
+ }
1365
+ return !0;
1366
+ }
1367
+ function To(e, n, t, i) {
1368
+ if (!wo(e, t)) return !1;
1369
+ const r = e.position;
1370
+ let o = e.position, l = e.input.charCodeAt(e.position);
1371
+ const a = t === ie;
1372
+ let s = !1;
1373
+ for (; l !== 0 && !(e.position === e.lineStart && le(e)); ) {
1374
+ if (l === 58) {
1375
+ const u = e.input.charCodeAt(e.position + 1);
1376
+ if (X(u) || a && me(u)) break;
1377
+ } else if (l === 35) {
1378
+ if (Q(e.input.charCodeAt(e.position - 1))) break;
1379
+ } else {
1380
+ if (a && me(l)) break;
1381
+ if (P(l)) {
1382
+ const u = e.position, c = e.line, g = e.lineStart, m = e.lineIndent;
1383
+ if (D(e, !1), e.lineIndent >= n) {
1384
+ s = !0, l = e.input.charCodeAt(e.position);
1385
+ continue;
1386
+ }
1387
+ e.position = u, e.line = c, e.lineStart = g, e.lineIndent = m;
1388
+ break;
1389
+ }
1390
+ }
1391
+ pe(l) || (o = e.position + 1), l = e.input.charCodeAt(++e.position);
1392
+ }
1393
+ return o === r ? !1 : (Dt(e, r, o), Ae(e, r, o, i.anchorStart, i.anchorEnd, i.tagStart, i.tagEnd, 1, 1, -1, !s), !0);
1394
+ }
1395
+ function ce(e, n) {
1396
+ const t = e.line;
1397
+ D(e, !0), (e.line > t && e.lineIndent < n || e.firstTabInLine !== -1 && e.lineIndent < n) && x(e, "deficient indentation");
1398
+ }
1399
+ function _o(e, n, t) {
1400
+ const i = e.input.charCodeAt(e.position), r = i === 123, o = e.position;
1401
+ let l = !0;
1402
+ if (i !== 91 && i !== 123) return !1;
1403
+ const a = r ? 125 : 93;
1404
+ for (r ? Ie(e, o, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, 2) : Bt(e, o, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, 2), e.position++; e.input.charCodeAt(e.position) !== 0; ) {
1405
+ ce(e, n);
1406
+ let s = e.input.charCodeAt(e.position);
1407
+ if (s === a)
1408
+ return e.position++, xe(e), !0;
1409
+ l ? s === 44 && x(e, "expected the node content, but found ','") : x(e, "missed comma between flow collection entries");
1410
+ let u = !1, c = !1;
1411
+ s === 63 && Q(e.input.charCodeAt(e.position + 1)) && (u = c = !0, e.position += 1, ce(e, n));
1412
+ const g = e.line, m = Ne(e), b = Z(e, n, ie, !1, !0);
1413
+ ce(e, n), s = e.input.charCodeAt(e.position), (r || c || e.line === g) && s === 58 ? (u = !0, e.position++, ce(e, n), r ? b || Y(e) : (oe(e, m), Ie(e, m.position, w, w, w, w, 2), Z(e, n, ie, !1, !0) || Y(e), ce(e, n), e.position++, ce(e, n)), Z(e, n, ie, !1, !0) || Y(e), ce(e, n), r || xe(e)) : r && u ? (b || Y(e), Y(e)) : r ? Y(e) : u && (oe(e, m), Ie(e, m.position, w, w, w, w, 2), Z(e, n, ie, !1, !0), Y(e), xe(e)), s = e.input.charCodeAt(e.position), s === 44 ? (l = !0, e.position++) : l = !1;
1414
+ }
1415
+ x(e, "unexpected end of the stream within a flow collection");
1416
+ }
1417
+ function pt(e, n, t) {
1418
+ if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !X(e.input.charCodeAt(e.position + 1))) return !1;
1419
+ for (Bt(e, e.position, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, 1); e.input.charCodeAt(e.position) === 45 && X(e.input.charCodeAt(e.position + 1)); ) {
1420
+ e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, x(e, "tab characters must not be used in indentation"));
1421
+ const i = e.line;
1422
+ e.position++;
1423
+ const r = D(e, !0) > 0;
1424
+ if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && X(e.input.charCodeAt(e.position + 1)) && x(e, "bad indentation of a sequence entry"), r && e.lineIndent <= n ? Y(e) : Z(e, n, Ut, !1, !0), D(e, !0), e.lineIndent < n || e.position >= e.length) break;
1425
+ e.lineIndent > n && x(e, "bad indentation of a sequence entry"), e.line === i && e.input.charCodeAt(e.position) === 45 && X(e.input.charCodeAt(e.position + 1)) && x(e, "bad indentation of a sequence entry");
1426
+ }
1427
+ return xe(e), !0;
1428
+ }
1429
+ function vn(e, n, t, i) {
1430
+ let r = !1, o = !1, l = !1, a = !1;
1431
+ if (e.firstTabInLine !== -1) return !1;
1432
+ let s = e.input.charCodeAt(e.position);
1433
+ for (; s !== 0; ) {
1434
+ !r && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, x(e, "tab characters must not be used in indentation"));
1435
+ const u = e.input.charCodeAt(e.position + 1), c = e.line;
1436
+ if ((s === 63 || s === 58) && X(u))
1437
+ l || (Ie(e, e.position, i.anchorStart, i.anchorEnd, i.tagStart, i.tagEnd, 1), l = !0), s === 63 ? (r && Y(e), o = !0, r = !0) : (r || (Y(e), o = !0), r = !1), e.position += 1, a = !0;
1438
+ else {
1439
+ r && (Y(e), r = !1);
1440
+ const g = Ne(e);
1441
+ if (!Z(e, t, kn, !1, !0)) break;
1442
+ if (e.line === c) {
1443
+ for (s = e.input.charCodeAt(e.position); pe(s); ) s = e.input.charCodeAt(++e.position);
1444
+ if (s === 58) {
1445
+ if (s = e.input.charCodeAt(++e.position), X(s) || x(e, "a whitespace character is expected after the key-value separator within a block mapping"), !l) {
1446
+ for (oe(e, g), Ie(e, g.position, i.anchorStart, i.anchorEnd, i.tagStart, i.tagEnd, 1), l = !0, Z(e, t, kn, !1, !0), s = e.input.charCodeAt(e.position); pe(s); ) s = e.input.charCodeAt(++e.position);
1447
+ e.position++;
1448
+ }
1449
+ o = !0, r = !1, a = !1;
1450
+ } else if (o) x(e, "expected ':' after a mapping key");
1451
+ else
1452
+ return i.anchorStart !== w || i.tagStart !== w ? (oe(e, g), !1) : !0;
1453
+ } else if (o) x(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1454
+ else
1455
+ return i.anchorStart !== w || i.tagStart !== w ? (oe(e, g), !1) : !0;
1456
+ }
1457
+ if (Z(e, n, Je, !0, a) && (a = !1), r || a && (Y(e), a = !1), D(e, !0), s = e.input.charCodeAt(e.position), (e.line === c || e.lineIndent > n) && s !== 0) x(e, "bad indentation of a mapping entry");
1458
+ else if (e.lineIndent < n) break;
1459
+ }
1460
+ return o ? (r && Y(e), l && xe(e), !0) : !1;
1461
+ }
1462
+ function Z(e, n, t, i, r, o = !0) {
1463
+ var p, h;
1464
+ e.depth >= e.maxDepth && x(e, `nesting exceeded maxDepth (${e.maxDepth})`), e.depth++;
1465
+ let l = 1, a = !1, s = !1, u = null;
1466
+ const c = ft();
1467
+ let g = t === Je || t === Ut, m = g;
1468
+ const b = g;
1469
+ if (i && D(e, !0) && (a = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : l = -1), e.position === e.lineStart && le(e))
1470
+ return e.depth--, !1;
1471
+ if (l === 1) for (; ; ) {
1472
+ const v = e.input.charCodeAt(e.position), k = Ne(e);
1473
+ if (a && l !== 1 && (v === 33 || v === 38)) break;
1474
+ if (a && b && (c.tagStart !== w || c.anchorStart !== w) && (v === 33 || v === 38)) {
1475
+ const C = Ne(e), I = n + 1;
1476
+ if (vn(e, e.position - e.lineStart, I, c) && ((p = e.events[C.eventsLength]) == null ? void 0 : p.type) === 3)
1477
+ return e.depth--, !0;
1478
+ oe(e, C);
1479
+ }
1480
+ if (a && (v === 33 && c.tagStart !== w || v === 38 && c.anchorStart !== w) || !bo(e, c, t === ie) && !xo(e, c)) break;
1481
+ u === null && (u = k), D(e, !0) ? (a = !0, m = b, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : l = -1) : m = !1;
1482
+ }
1483
+ if (m && (m = a || r), l === 1 || t === Je) {
1484
+ const v = t === ie || t === kn ? n : n + 1, k = e.position - e.lineStart;
1485
+ if (l === 1) if (m && (pt(e, k, c) || vn(e, k, v, c)) || _o(e, v, c)) s = !0;
1486
+ else {
1487
+ const C = e.input.charCodeAt(e.position);
1488
+ if (u !== null && o && b && !m && C !== 124 && C !== 62) {
1489
+ const I = Ne(e), F = u.position - u.lineStart;
1490
+ oe(e, u), vn(e, F, v, ft()) && ((h = e.events[I.eventsLength]) == null ? void 0 : h.type) === 3 ? s = !0 : oe(e, I);
1491
+ }
1492
+ !s && (g && Co(e, v, c) || ko(e, v, c) || Ao(e, v, c) || So(e, c) || To(e, v, t, c)) && (s = !0);
1493
+ }
1494
+ else l === 0 && (s = m && pt(e, k, c));
1495
+ }
1496
+ return g = g && !s, !s && (c.anchorStart !== w || c.tagStart !== w || g) && (Ae(e, w, w, c.anchorStart, c.anchorEnd, c.tagStart, c.tagEnd, 1), s = !0), e.depth--, s || c.anchorStart !== w || c.tagStart !== w;
1497
+ }
1498
+ function Eo(e) {
1499
+ if (e.lineIndent > 0 || e.input.charCodeAt(e.position) !== 37) return !1;
1500
+ e.position++;
1501
+ const n = e.position;
1502
+ for (; e.input.charCodeAt(e.position) !== 0 && !Q(e.input.charCodeAt(e.position)); ) e.position++;
1503
+ const t = e.input.slice(n, e.position), i = [];
1504
+ for (t.length === 0 && x(e, "directive name must not be less than one character in length"); e.input.charCodeAt(e.position) !== 0 && !P(e.input.charCodeAt(e.position)); ) {
1505
+ for (; pe(e.input.charCodeAt(e.position)); ) e.position++;
1506
+ if (e.input.charCodeAt(e.position) === 35 || P(e.input.charCodeAt(e.position)) || e.input.charCodeAt(e.position) === 0) break;
1507
+ const r = e.position;
1508
+ for (; e.input.charCodeAt(e.position) !== 0 && !Q(e.input.charCodeAt(e.position)); ) e.position++;
1509
+ i.push(e.input.slice(r, e.position));
1510
+ }
1511
+ if (P(e.input.charCodeAt(e.position)) && Xe(e), t === "YAML") {
1512
+ e.directives.some((o) => o.kind === "yaml") && x(e, "duplication of %YAML directive"), i.length !== 1 && x(e, "YAML directive accepts exactly one argument");
1513
+ const r = /^([0-9]+)\.([0-9]+)$/.exec(i[0]);
1514
+ r === null && x(e, "ill-formed argument of the YAML directive"), parseInt(r[1], 10) !== 1 && x(e, "unacceptable YAML version of the document"), e.directives.push({
1515
+ kind: "yaml",
1516
+ version: i[0]
1517
+ });
1518
+ } else if (t === "TAG") {
1519
+ i.length !== 2 && x(e, "TAG directive accepts exactly two arguments");
1520
+ const [r, o] = i;
1521
+ qt.test(r) || x(e, "ill-formed tag handle (first argument) of the TAG directive"), Mt.call(e.tagHandlers, r) && x(e, `there is a previously declared suffix for "${r}" tag handle`), fo.test(o) || x(e, "ill-formed tag prefix (second argument) of the TAG directive"), e.tagHandlers[r] = o, e.directives.push({
1522
+ kind: "tag",
1523
+ handle: r,
1524
+ prefix: o
1525
+ });
1526
+ }
1527
+ return !0;
1528
+ }
1529
+ function Io(e) {
1530
+ e.directives = [], e.tagHandlers = /* @__PURE__ */ Object.create(null);
1531
+ let n = !1;
1532
+ for (D(e, !0); Eo(e); )
1533
+ n = !0, D(e, !0);
1534
+ let t = !1, i = !1, r = !0;
1535
+ if (e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 && X(e.input.charCodeAt(e.position + 3))) {
1536
+ t = !0;
1537
+ const a = e.line;
1538
+ e.position += 3, D(e, !0), r = e.line > a;
1539
+ } else n && x(e, "directives end mark is expected");
1540
+ const o = e.events.length;
1541
+ if (!t && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 && le(e)) {
1542
+ e.position += 3, D(e, !0);
1543
+ return;
1544
+ }
1545
+ if (po(e, t, !1), Z(e, e.lineIndent - 1, Je, !1, r, r) || Y(e), D(e, !0), e.position === e.lineStart && le(e) && (i = e.input.charCodeAt(e.position) === 46, i)) {
1546
+ const a = e.line;
1547
+ e.position += 3, D(e, !0), e.line === a && e.position < e.length && x(e, "end of the stream or a document separator is expected");
1548
+ }
1549
+ const l = e.events[o];
1550
+ (l == null ? void 0 : l.type) === 1 && (l.explicitEnd = i), xe(e), !i && e.position < e.length && !(e.position === e.lineStart && le(e)) && x(e, "end of the stream or a document separator is expected");
1551
+ }
1552
+ function No(e, n) {
1553
+ const t = e.length, i = {
1554
+ ...Mn,
1555
+ ...n,
1556
+ input: `${e}\0`,
1557
+ length: t,
1558
+ position: 0,
1559
+ line: 0,
1560
+ lineStart: 0,
1561
+ lineIndent: 0,
1562
+ firstTabInLine: -1,
1563
+ depth: 0,
1564
+ directives: [],
1565
+ tagHandlers: /* @__PURE__ */ Object.create(null),
1566
+ events: []
1567
+ }, r = e.indexOf("\0");
1568
+ for (r !== -1 && on(e, r, "null byte is not allowed in input", i.filename), i.input.charCodeAt(i.position) === 65279 && i.position++; i.position < i.length && (D(i, !0), !(i.position >= i.length)); ) {
1569
+ const o = i.position;
1570
+ Io(i), i.position === o && x(i, "can not read a document");
1571
+ }
1572
+ return i.events;
1573
+ }
1574
+ var $o = {
1575
+ ...Mn,
1576
+ ...Pn
1577
+ };
1578
+ function Lo(e, n = {}) {
1579
+ const t = {
1580
+ ...$o,
1581
+ ...n
1582
+ }, i = String(e), r = Object.keys(Mn), o = Object.keys(Pn);
1583
+ return lo(No(i, Sn(t, r)), {
1584
+ ...Sn(t, o),
1585
+ source: i
1586
+ });
1587
+ }
1588
+ function wn(e, n) {
1589
+ const t = Lo(e, n);
1590
+ if (t.length === 0) throw new Fe("expected a document, but the input is empty");
1591
+ if (t.length === 1) return t[0];
1592
+ throw new Fe("expected a single document in the stream, but found more");
1593
+ }
1594
+ var De = class {
1595
+ constructor() {
1596
+ R(this, "tagged", !1);
1597
+ R(this, "flow", !1);
1598
+ R(this, "singleQuoted", !1);
1599
+ R(this, "doubleQuoted", !1);
1600
+ R(this, "literal", !1);
1601
+ R(this, "folded", !1);
1602
+ }
1603
+ }, de = Symbol("INVALID");
1604
+ function Fo(e) {
1605
+ const n = new Set([
1606
+ e.defaultScalarTag,
1607
+ e.defaultSequenceTag,
1608
+ e.defaultMappingTag
1609
+ ].filter((o) => o !== void 0)), t = e.implicitScalarTags, i = e.tags.filter((o) => !(o.nodeKind === "scalar" && o.implicit) && !n.has(o)), r = e.tags.filter((o) => n.has(o));
1610
+ return [
1611
+ ...t.map((o) => ({
1612
+ tag: o,
1613
+ implicitTag: !0
1614
+ })),
1615
+ ...i.map((o) => ({
1616
+ tag: o,
1617
+ implicitTag: !1
1618
+ })),
1619
+ ...r.map((o) => ({
1620
+ tag: o,
1621
+ implicitTag: !0
1622
+ }))
1623
+ ];
1624
+ }
1625
+ function Ro(e, n) {
1626
+ for (let t = 0, i = e.representTypes.length; t < i; t += 1) {
1627
+ const { tag: r, implicitTag: o } = e.representTypes[t];
1628
+ if (r.identify && r.identify(n)) {
1629
+ let l;
1630
+ return r.matchByTagPrefix && r.representTagName ? l = r.representTagName(n) : l = r.tagName, {
1631
+ tag: r,
1632
+ tagName: l,
1633
+ implicitTag: o
1634
+ };
1635
+ }
1636
+ }
1637
+ return null;
1638
+ }
1639
+ function _e(e, n) {
1640
+ if (!e.noRefs && n !== null && typeof n == "object") {
1641
+ const c = e.refs.get(n);
1642
+ if (c)
1643
+ return c.anchor === void 0 && (c.anchor = `ref_${e.refCounter++}`), {
1644
+ kind: "alias",
1645
+ tag: "",
1646
+ style: new De(),
1647
+ anchor: c.anchor
1648
+ };
1649
+ }
1650
+ const t = Ro(e, n);
1651
+ if (!t) {
1652
+ if (n === void 0 || e.skipInvalid) return de;
1653
+ throw new Fe(`unacceptable kind of an object to dump ${Object.prototype.toString.call(n)}`);
1654
+ }
1655
+ const { tag: i, tagName: r, implicitTag: o } = t, l = o ? r : Rt(r);
1656
+ if (i.nodeKind === "scalar") {
1657
+ const c = new De();
1658
+ return c.tagged = !o, {
1659
+ kind: "scalar",
1660
+ tag: l,
1661
+ style: c,
1662
+ value: i.represent(n)
1663
+ };
1664
+ }
1665
+ if (i.nodeKind === "sequence") {
1666
+ const c = i.represent(n), g = new De();
1667
+ g.tagged = !o;
1668
+ const m = {
1669
+ kind: "sequence",
1670
+ tag: l,
1671
+ style: g,
1672
+ items: []
1673
+ };
1674
+ e.noRefs || e.refs.set(n, m);
1675
+ for (let b = 0, p = c.length; b < p; b += 1) {
1676
+ let h = _e(e, c[b]);
1677
+ h === de && c[b] === void 0 && (h = _e(e, null)), h !== de && m.items.push(h);
1678
+ }
1679
+ return m;
1680
+ }
1681
+ const a = i.represent(n), s = new De();
1682
+ s.tagged = !o;
1683
+ const u = {
1684
+ kind: "mapping",
1685
+ tag: l,
1686
+ style: s,
1687
+ items: []
1688
+ };
1689
+ e.noRefs || e.refs.set(n, u);
1690
+ for (const [c, g] of a) {
1691
+ const m = _e(e, c);
1692
+ if (m === de) continue;
1693
+ const b = _e(e, g);
1694
+ b !== de && u.items.push({
1695
+ key: m,
1696
+ value: b
1697
+ });
1698
+ }
1699
+ return u;
1700
+ }
1701
+ function Oo(e, n, t = {}) {
1702
+ const i = _e({
1703
+ representTypes: Fo(n),
1704
+ noRefs: t.noRefs ?? !1,
1705
+ skipInvalid: t.skipInvalid ?? !1,
1706
+ refs: /* @__PURE__ */ new Map(),
1707
+ refCounter: 0
1708
+ }, e);
1709
+ return [{
1710
+ contents: i === de ? null : i,
1711
+ directives: []
1712
+ }];
1713
+ }
1714
+ var Po = Symbol("visit:break"), Yt = Symbol("visit:skip");
1715
+ function He(e, n, t) {
1716
+ const i = n(e, t);
1717
+ if (i === Po) return !0;
1718
+ if (i === Yt) return !1;
1719
+ const r = t.depth + 1;
1720
+ switch (e.kind) {
1721
+ case "sequence":
1722
+ for (const o of e.items) if (He(o, n, {
1723
+ depth: r,
1724
+ parent: e,
1725
+ isKey: !1
1726
+ })) return !0;
1727
+ break;
1728
+ case "mapping":
1729
+ for (const { key: o, value: l } of e.items)
1730
+ if (He(o, n, {
1731
+ depth: r,
1732
+ parent: e,
1733
+ isKey: !0
1734
+ }) || He(l, n, {
1735
+ depth: r,
1736
+ parent: e,
1737
+ isKey: !1
1738
+ })) return !0;
1739
+ break;
1740
+ }
1741
+ return !1;
1742
+ }
1743
+ function Mo(e, n) {
1744
+ for (const t of e) if (t.contents && He(t.contents, n, {
1745
+ depth: 0,
1746
+ parent: null,
1747
+ isKey: !1
1748
+ })) return;
1749
+ }
1750
+ var Un = 65279, Uo = 9, he = 10, jt = 13, qo = 32, Vo = 33, Kt = 34, Tn = 35, Bo = 37, Do = 38, Ht = 39, Yo = 42, zt = 44, qn = 45, Re = 58, jo = 61, Ko = 62, Gt = 63, Ho = 64, Wt = 91, Qt = 93, zo = 96, Jt = 123, Go = 124, Xt = 125, B = {};
1751
+ B[0] = "\\0";
1752
+ B[7] = "\\a";
1753
+ B[8] = "\\b";
1754
+ B[9] = "\\t";
1755
+ B[10] = "\\n";
1756
+ B[11] = "\\v";
1757
+ B[12] = "\\f";
1758
+ B[13] = "\\r";
1759
+ B[27] = "\\e";
1760
+ B[34] = '\\"';
1761
+ B[92] = "\\\\";
1762
+ B[133] = "\\N";
1763
+ B[160] = "\\_";
1764
+ B[8232] = "\\L";
1765
+ B[8233] = "\\P";
1766
+ var Vn = {
1767
+ indent: 2,
1768
+ seqNoIndent: !1,
1769
+ seqInlineFirst: !0,
1770
+ sortKeys: !1,
1771
+ lineWidth: 80,
1772
+ flowBracketPadding: !1,
1773
+ flowSkipCommaSpace: !1,
1774
+ flowSkipColonSpace: !1,
1775
+ quoteFlowKeys: !1,
1776
+ quoteStyle: "single",
1777
+ forceQuotes: !1,
1778
+ tagBeforeAnchor: !1
1779
+ };
1780
+ function Wo(e) {
1781
+ return e.style.tagged ? e.tag : Rt(e.tag);
1782
+ }
1783
+ function Qo(e) {
1784
+ const n = {
1785
+ ...Vn,
1786
+ ...e
1787
+ };
1788
+ return {
1789
+ ...n,
1790
+ defaultScalarTagName: n.schema.defaultScalarTag.tagName,
1791
+ implicitResolvers: n.schema.implicitScalarTags
1792
+ };
1793
+ }
1794
+ function Jo(e) {
1795
+ const n = e.toString(16).toUpperCase(), t = e <= 255 ? "x" : "u", i = e <= 255 ? 2 : 4;
1796
+ return `\\${t}${"0".repeat(i - n.length)}${n}`;
1797
+ }
1798
+ function mt(e, n) {
1799
+ const t = " ".repeat(n);
1800
+ let i = 0, r = "";
1801
+ const o = e.length;
1802
+ for (; i < o; ) {
1803
+ let l;
1804
+ const a = e.indexOf(`
1805
+ `, i);
1806
+ a === -1 ? (l = e.slice(i), i = o) : (l = e.slice(i, a + 1), i = a + 1), l.length && l !== `
1807
+ ` && (r += t), r += l;
1808
+ }
1809
+ return r;
1810
+ }
1811
+ function _n(e, n) {
1812
+ return `
1813
+ ${" ".repeat(e.indent * n)}`;
1814
+ }
1815
+ function Xo(e, n) {
1816
+ const t = e.indent * Math.max(1, n);
1817
+ return {
1818
+ indent: t,
1819
+ blockIndent: n === 0 ? e.indent + 1 : e.indent,
1820
+ lineWidth: e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - t)
1821
+ };
1822
+ }
1823
+ function ht(e, n) {
1824
+ for (let t = 0, i = e.implicitResolvers.length; t < i; t += 1) {
1825
+ const r = e.implicitResolvers[t];
1826
+ if (r.resolve(n, !1, r.tagName) !== T) return r.tagName;
1827
+ }
1828
+ return e.defaultScalarTagName;
1829
+ }
1830
+ function ke(e) {
1831
+ return e === qo || e === Uo;
1832
+ }
1833
+ function Zo(e) {
1834
+ const n = e.charCodeAt(0);
1835
+ if (n !== qn && n !== 46 || e.charCodeAt(1) !== n || e.charCodeAt(2) !== n) return !1;
1836
+ if (e.length === 3) return !0;
1837
+ const t = e.charCodeAt(3);
1838
+ return ke(t) || t === jt || t === he;
1839
+ }
1840
+ function Oe(e) {
1841
+ return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !== Un || e >= 65536 && e <= 1114111;
1842
+ }
1843
+ function gt(e) {
1844
+ return Oe(e) && e !== Un && e !== jt && e !== he;
1845
+ }
1846
+ function En(e, n, t) {
1847
+ const i = gt(e), r = i && !ke(e);
1848
+ return (t ? i : i && e !== zt && e !== Wt && e !== Qt && e !== Jt && e !== Xt) && e !== Tn && !(n === Re && !r) || gt(n) && !ke(n) && e === Tn || n === Re && r;
1849
+ }
1850
+ function el(e) {
1851
+ return Oe(e) && e !== Un && !ke(e) && e !== qn && e !== Gt && e !== Re && e !== zt && e !== Wt && e !== Qt && e !== Jt && e !== Xt && e !== Tn && e !== Do && e !== Yo && e !== Vo && e !== Go && e !== jo && e !== Ko && e !== Ht && e !== Kt && e !== Bo && e !== Ho && e !== zo;
1852
+ }
1853
+ function nl(e, n) {
1854
+ const t = Se(e, 0);
1855
+ if (el(t)) return !0;
1856
+ if (e.length > 1 && (t === qn || t === Gt || t === Re)) {
1857
+ const i = Se(e, 1);
1858
+ return !ke(i) && En(i, t, n);
1859
+ }
1860
+ return !1;
1861
+ }
1862
+ function tl(e) {
1863
+ return !ke(e) && e !== Re;
1864
+ }
1865
+ function Se(e, n) {
1866
+ const t = e.charCodeAt(n);
1867
+ let i;
1868
+ return t >= 55296 && t <= 56319 && n + 1 < e.length && (i = e.charCodeAt(n + 1), i >= 56320 && i <= 57343) ? (t - 55296) * 1024 + i - 56320 + 65536 : t;
1869
+ }
1870
+ function Zt(e) {
1871
+ return /^\n* /.test(e);
1872
+ }
1873
+ var Pe = 1, $e = 2, Bn = 3, Dn = 4, re = 5;
1874
+ function il(e, n, t, i, r, o) {
1875
+ const { blockIndent: l, lineWidth: a } = t;
1876
+ let s, u = 0, c = -1, g = !1, m = !1;
1877
+ const b = a !== -1;
1878
+ let p = -1, h = !Zo(n) && nl(n, o) && tl(Se(n, n.length - 1));
1879
+ if (i || r) for (s = 0; s < n.length; u >= 65536 ? s += 2 : s++) {
1880
+ if (u = Se(n, s), !Oe(u)) return re;
1881
+ h = h && En(u, c, o), c = u;
1882
+ }
1883
+ else {
1884
+ for (s = 0; s < n.length; u >= 65536 ? s += 2 : s++) {
1885
+ if (u = Se(n, s), u === he)
1886
+ g = !0, b && (m = m || s - p - 1 > a && n[p + 1] !== " ", p = s);
1887
+ else if (!Oe(u)) return re;
1888
+ h = h && En(u, c, o), c = u;
1889
+ }
1890
+ m = m || b && s - p - 1 > a && n[p + 1] !== " ";
1891
+ }
1892
+ return !g && !m ? h && !r ? Pe : e.quoteStyle === "double" ? re : $e : l > 9 && Zt(n) ? re : m ? Dn : Bn;
1893
+ }
1894
+ function rl(e, n, t) {
1895
+ const { indent: i, blockIndent: r, lineWidth: o } = t;
1896
+ switch (n) {
1897
+ case Pe:
1898
+ return vt(e, i);
1899
+ case $e:
1900
+ return `'${vt(e, i).replace(/'/g, "''")}'`;
1901
+ case Bn:
1902
+ return "|" + yt(e, r) + bt(mt(e, i));
1903
+ case Dn:
1904
+ return ">" + yt(e, r) + bt(mt(ll(e, o), i));
1905
+ case re:
1906
+ return `"${al(e)}"`;
1907
+ }
1908
+ }
1909
+ function ol(e, n, t, i, r) {
1910
+ const o = i || !r;
1911
+ if (n.style.singleQuoted) return $e;
1912
+ if (n.style.doubleQuoted) return re;
1913
+ if (!o) {
1914
+ if (n.style.literal) return Bn;
1915
+ if (n.style.folded) return Dn;
1916
+ }
1917
+ const l = n.value;
1918
+ if (l.length === 0)
1919
+ return n.style.tagged || ht(e, l) === n.tag ? Pe : e.quoteStyle === "double" ? re : $e;
1920
+ const a = il(e, l, t, o, e.forceQuotes && !i, r);
1921
+ return a === Pe && !n.style.tagged && ht(e, l) !== n.tag ? e.quoteStyle === "double" ? re : $e : a;
1922
+ }
1923
+ function yt(e, n) {
1924
+ const t = Zt(e) ? String(n) : "", i = e[e.length - 1] === `
1925
+ `;
1926
+ return `${t}${i && (e[e.length - 2] === `
1927
+ ` || e === `
1928
+ `) ? "+" : i ? "" : "-"}
1929
+ `;
1930
+ }
1931
+ function vt(e, n) {
1932
+ let t = e.indexOf(`
1933
+ `);
1934
+ if (t === -1) return e;
1935
+ const i = " ".repeat(n);
1936
+ let r = e.slice(0, t);
1937
+ const o = /(\n+)([^\n]*)/g;
1938
+ o.lastIndex = t;
1939
+ let l;
1940
+ for (; l = o.exec(e); ) {
1941
+ const a = l[1].length, s = l[2];
1942
+ r += `
1943
+ `.repeat(a + 1) + i + s;
1944
+ }
1945
+ return r;
1946
+ }
1947
+ function bt(e) {
1948
+ return e[e.length - 1] === `
1949
+ ` ? e.slice(0, -1) : e;
1950
+ }
1951
+ function ll(e, n) {
1952
+ const t = /(\n+)([^\n]*)/g;
1953
+ let i = e.indexOf(`
1954
+ `);
1955
+ i === -1 && (i = e.length), t.lastIndex = i;
1956
+ let r = xt(e.slice(0, i), n), o = e[0] === `
1957
+ ` || e[0] === " ", l, a;
1958
+ for (; a = t.exec(e); ) {
1959
+ const s = a[1], u = a[2];
1960
+ l = u[0] === " ", r += s + (!o && !l && u !== "" ? `
1961
+ ` : "") + xt(u, n), o = l;
1962
+ }
1963
+ return r;
1964
+ }
1965
+ function xt(e, n) {
1966
+ if (e === "" || e[0] === " ") return e;
1967
+ const t = / [^ ]/g;
1968
+ let i, r = 0, o, l = 0, a = 0, s = "";
1969
+ for (; i = t.exec(e); )
1970
+ a = i.index, a - r > n && (o = l > r ? l : a, s += `
1971
+ ${e.slice(r, o)}`, r = o + 1), l = a;
1972
+ return s += `
1973
+ `, e.length - r > n && l > r ? s += `${e.slice(r, l)}
1974
+ ${e.slice(l + 1)}` : s += e.slice(r), s.slice(1);
1975
+ }
1976
+ function al(e) {
1977
+ let n = "", t = 0;
1978
+ for (let i = 0; i < e.length; t >= 65536 ? i += 2 : i++) {
1979
+ t = Se(e, i);
1980
+ const r = B[t];
1981
+ if (r) {
1982
+ n += r;
1983
+ continue;
1984
+ }
1985
+ if (Oe(t)) {
1986
+ n += e[i], t >= 65536 && (n += e[i + 1]);
1987
+ continue;
1988
+ }
1989
+ n += Jo(t);
1990
+ }
1991
+ return n;
1992
+ }
1993
+ function sl(e, n, t) {
1994
+ let i = "";
1995
+ for (let o = 0, l = t.items.length; o < l; o += 1) {
1996
+ const a = ee(e, n, t.items[o], {});
1997
+ i !== "" && (i += `,${e.flowSkipCommaSpace ? "" : " "}`), i += a;
1998
+ }
1999
+ const r = e.flowBracketPadding && i !== "" ? " " : "";
2000
+ return `[${r}${i}${r}]`;
2001
+ }
2002
+ function St(e, n, t, i) {
2003
+ let r = "";
2004
+ for (let o = 0, l = t.items.length; o < l; o += 1) {
2005
+ const a = ee(e, n + 1, t.items[o], {
2006
+ block: !0,
2007
+ compact: e.seqInlineFirst,
2008
+ isblockseq: !0
2009
+ });
2010
+ (!i || r !== "") && (r += _n(e, n)), a === "" || he === a.charCodeAt(0) ? r += "-" : r += "- ", r += a;
2011
+ }
2012
+ return r;
2013
+ }
2014
+ function ul(e, n, t) {
2015
+ let i = "";
2016
+ const r = ei(e, t.items);
2017
+ for (const { key: l, value: a } of r) {
2018
+ let s = "";
2019
+ i !== "" && (s += `,${e.flowSkipCommaSpace ? "" : " "}`);
2020
+ const u = ee(e, n, l, { iskey: !0 }), c = u.length > 1024;
2021
+ c ? s += "? " : e.quoteFlowKeys && (s += '"');
2022
+ const g = ee(e, n, a, {}), m = e.flowSkipColonSpace || g === "" ? "" : " ";
2023
+ s += `${u}${e.quoteFlowKeys && !c ? '"' : ""}:${m}${g}`, i += s;
2024
+ }
2025
+ const o = e.flowBracketPadding && i !== "" ? " " : "";
2026
+ return `{${o}${i}${o}}`;
2027
+ }
2028
+ function Ye(e) {
2029
+ return e.kind === "scalar" ? e.value : e;
2030
+ }
2031
+ function ei(e, n) {
2032
+ if (!e.sortKeys) return n;
2033
+ const t = n.slice();
2034
+ if (e.sortKeys === !0) t.sort((i, r) => {
2035
+ const o = Ye(i.key), l = Ye(r.key);
2036
+ return o < l ? -1 : o > l ? 1 : 0;
2037
+ });
2038
+ else {
2039
+ const i = e.sortKeys;
2040
+ t.sort((r, o) => i(Ye(r.key), Ye(o.key)));
2041
+ }
2042
+ return t;
2043
+ }
2044
+ function cl(e, n, t, i) {
2045
+ let r = "";
2046
+ const o = ei(e, t.items);
2047
+ for (let l = 0, a = o.length; l < a; l += 1) {
2048
+ let s = "";
2049
+ (!i || r !== "") && (s += _n(e, n));
2050
+ const { key: u, value: c } = o[l], g = (u.kind === "mapping" || u.kind === "sequence") && !u.style.flow && u.items.length !== 0 || u.kind === "scalar" && (u.style.literal || u.style.folded), m = g ? ee(e, n + 1, u, {
2051
+ block: !0,
2052
+ compact: !0,
2053
+ isblockseq: !In(e, u, n + 1)
2054
+ }) : ee(e, n + 1, u, {
2055
+ block: !0,
2056
+ compact: !0,
2057
+ iskey: !0
2058
+ }), b = u.kind === "scalar" && u.value.indexOf(`
2059
+ `) !== -1, p = g || b || m.length > 1024;
2060
+ p && (m && he === m.charCodeAt(0) ? s += "?" : s += "? "), s += m, p && (s += _n(e, n));
2061
+ const h = ee(e, n + 1, c, {
2062
+ block: !0,
2063
+ compact: p,
2064
+ isblockseq: p && !In(e, c, n + 1)
2065
+ }), v = u.kind === "scalar" && u.value === "" && m !== "" && m.charCodeAt(m.length - 1) !== Ht && m.charCodeAt(m.length - 1) !== Kt, k = !p && (u.kind === "alias" || v) ? " " : "";
2066
+ h === "" || he === h.charCodeAt(0) ? s += `${k}:` : s += `${k}: `, s += h, r += s;
2067
+ }
2068
+ return r;
2069
+ }
2070
+ function In(e, n, t) {
2071
+ return n.style.tagged || n.anchor !== void 0 || e.indent < 2 && t > 0;
2072
+ }
2073
+ function ee(e, n, t, i) {
2074
+ if (t.kind === "alias") return `*${t.anchor}`;
2075
+ const { block: r = !1, iskey: o = !1, isblockseq: l = !1 } = i;
2076
+ let a = i.compact ?? !1;
2077
+ const s = t.anchor !== void 0;
2078
+ In(e, t, n) && (a = !1);
2079
+ let u, c = t.style.tagged;
2080
+ const g = r && (t.kind === "mapping" || t.kind === "sequence") && !t.style.flow && t.items.length !== 0;
2081
+ if (t.kind === "mapping") g ? u = cl(e, n, t, a) : u = ul(e, n, t);
2082
+ else if (t.kind === "sequence") g ? e.seqNoIndent && !l && n > 0 ? u = St(e, n - 1, t, a) : u = St(e, n, t, a) : u = sl(e, n, t);
2083
+ else {
2084
+ const m = Xo(e, n), b = ol(e, t, m, o, r);
2085
+ u = rl(t.value, b, m), c = t.style.tagged || b !== Pe && t.tag !== e.defaultScalarTagName;
2086
+ }
2087
+ if (g && a && n > 0 && e.indent > 2 && (u = `${" ".repeat(e.indent - 2)}${u}`), c || s) {
2088
+ const m = [], b = c ? Wo(t) : null, p = s ? `&${t.anchor}` : null;
2089
+ e.tagBeforeAnchor ? (b !== null && m.push(b), p !== null && m.push(p)) : (p !== null && m.push(p), b !== null && m.push(b));
2090
+ const h = u === "" || u.charCodeAt(0) === he ? "" : " ";
2091
+ u = `${m.join(" ")}${h}${u}`;
2092
+ }
2093
+ return u;
2094
+ }
2095
+ function fl(e) {
2096
+ return (e.kind === "sequence" || e.kind === "mapping") && !e.style.flow && e.items.length !== 0 && !e.style.tagged && e.anchor === void 0;
2097
+ }
2098
+ function dl(e) {
2099
+ let n = e;
2100
+ for (; (n.kind === "sequence" || n.kind === "mapping") && !n.style.flow && n.items.length !== 0; ) n = n.kind === "sequence" ? n.items[n.items.length - 1] : n.items[n.items.length - 1].value;
2101
+ if (n.kind !== "scalar" || !(n.style.literal || n.style.folded)) return !1;
2102
+ const { value: t } = n;
2103
+ return t.endsWith(`
2104
+
2105
+ `) || t === `
2106
+ `;
2107
+ }
2108
+ function pl(e) {
2109
+ let n = "";
2110
+ for (const t of e.directives) {
2111
+ if (t.kind === "yaml") {
2112
+ n += `%YAML ${t.version}
2113
+ `;
2114
+ continue;
2115
+ }
2116
+ const { handle: i, prefix: r } = t;
2117
+ n += `%TAG ${i} ${r}
2118
+ `;
2119
+ }
2120
+ return n;
2121
+ }
2122
+ function ml(e, n) {
2123
+ const t = Qo(n);
2124
+ let i = "", r = !1;
2125
+ for (let o = 0; o < e.length; o += 1) {
2126
+ const l = e[o], a = pl(l), s = a !== "", u = l.explicitStart || s || o > 0 && !r;
2127
+ if (i += a, l.contents === null)
2128
+ u && (i += `---
2129
+ `);
2130
+ else if (u) {
2131
+ const c = ee(t, 0, l.contents, {
2132
+ block: !0,
2133
+ compact: !0
2134
+ }), g = c === "" ? "" : s || fl(l.contents) ? `
2135
+ ` : " ";
2136
+ i += `---${g}${c}
2137
+ `;
2138
+ } else i += ee(t, 0, l.contents, {
2139
+ block: !0,
2140
+ compact: !0
2141
+ }) + `
2142
+ `;
2143
+ r = l.explicitEnd || l.contents !== null && dl(l.contents), r && (i += `...
2144
+ `);
2145
+ }
2146
+ return i;
2147
+ }
2148
+ var hl = Yr.withTags({
2149
+ ...bn,
2150
+ resolve: (e, n, t) => {
2151
+ const i = bn.resolve(e, n, t);
2152
+ return i === T ? Et.resolve(e, n, t) : i;
2153
+ }
2154
+ }, {
2155
+ ...xn,
2156
+ resolve: (e, n, t) => {
2157
+ const i = xn.resolve(e, n, t);
2158
+ return i === T ? It.resolve(e, n, t) : i;
2159
+ }
2160
+ }), gl = {
2161
+ ...Vn,
2162
+ schema: hl,
2163
+ skipInvalid: !1,
2164
+ noRefs: !1,
2165
+ flowLevel: -1,
2166
+ transform: () => {
2167
+ }
2168
+ };
2169
+ function ni(e, n = {}) {
2170
+ const t = {
2171
+ ...gl,
2172
+ ...n
2173
+ }, i = Oo(e, t.schema, {
2174
+ noRefs: t.noRefs,
2175
+ skipInvalid: t.skipInvalid
2176
+ });
2177
+ return t.flowLevel >= 0 && Mo(i, (r, o) => {
2178
+ if (!(o.depth < t.flowLevel))
2179
+ return r.style.flow = !0, Yt;
2180
+ }), t.transform(i), ml(i, {
2181
+ ...Sn(t, Object.keys(Vn)),
2182
+ schema: t.schema
2183
+ });
2184
+ }
2185
+ const yl = {}, vl = {
2186
+ xmlns: "http://www.w3.org/2000/svg",
2187
+ width: "24",
2188
+ height: "24",
2189
+ viewBox: "0 0 24 24",
2190
+ fill: "none",
2191
+ stroke: "currentColor",
2192
+ "stroke-width": "2",
2193
+ "stroke-linecap": "round",
2194
+ "stroke-linejoin": "round",
2195
+ class: "lucide lucide-layers"
2196
+ };
2197
+ function bl(e, n) {
2198
+ return _(), q("svg", vl, [...n[0] || (n[0] = [
2199
+ y("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }, null, -1),
2200
+ y("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }, null, -1),
2201
+ y("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" }, null, -1)
2202
+ ])]);
2203
+ }
2204
+ const xl = /* @__PURE__ */ Ze(yl, [["render", bl]]), Sl = {}, kl = {
2205
+ xmlns: "http://www.w3.org/2000/svg",
2206
+ width: "24",
2207
+ height: "24",
2208
+ viewBox: "0 0 24 24",
2209
+ fill: "none",
2210
+ stroke: "currentColor",
2211
+ "stroke-width": "2",
2212
+ "stroke-linecap": "round",
2213
+ "stroke-linejoin": "round",
2214
+ class: "lucide lucide-map"
2215
+ };
2216
+ function Al(e, n) {
2217
+ return _(), q("svg", kl, [...n[0] || (n[0] = [
2218
+ y("path", { d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" }, null, -1),
2219
+ y("path", { d: "M15 5.764v15" }, null, -1),
2220
+ y("path", { d: "M9 3.236v15" }, null, -1)
2221
+ ])]);
2222
+ }
2223
+ const Cl = /* @__PURE__ */ Ze(Sl, [["render", Al]]), wl = {}, Tl = {
2224
+ xmlns: "http://www.w3.org/2000/svg",
2225
+ width: "24",
2226
+ height: "24",
2227
+ viewBox: "0 0 24 24",
2228
+ fill: "none",
2229
+ stroke: "currentColor",
2230
+ "stroke-width": "2",
2231
+ "stroke-linecap": "round",
2232
+ "stroke-linejoin": "round",
2233
+ class: "lucide lucide-filter"
2234
+ };
2235
+ function _l(e, n) {
2236
+ return _(), q("svg", Tl, [...n[0] || (n[0] = [
2237
+ y("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2238
+ ])]);
2239
+ }
2240
+ const El = /* @__PURE__ */ Ze(wl, [["render", _l]]), Il = { class: "flex flex-col flex-1 overflow-hidden" }, Nl = { class: "flex justify-end gap-2" }, $l = ["href"], Ll = { class: "flex flex-col flex-1 overflow-hidden" }, Fl = { class: "bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden mt-3 flex flex-col flex-1" }, Rl = { class: "relative bg-gradient-to-br from-slate-50 to-white flex-1" }, Ol = /* @__PURE__ */ ae({
2241
+ __name: "vs-tab-style",
2242
+ props: {
2243
+ token: {},
2244
+ styleYaml: {},
2245
+ styleText: {}
2246
+ },
2247
+ emits: ["update:style-yaml", "update:style-text", "save"],
2248
+ setup(e, { emit: n }) {
2249
+ const t = e, i = n, r = E("");
2250
+ L(
2251
+ () => t.styleText,
2252
+ (s) => {
2253
+ const u = s ?? "";
2254
+ r.value !== u && (r.value = u);
2255
+ },
2256
+ { immediate: !0 }
2257
+ ), L(r, async (s) => {
2258
+ var c, g;
2259
+ const u = s ?? "";
2260
+ t.styleText !== u && i("update:style-text", u);
2261
+ try {
2262
+ const m = s ? wn(s) : null;
2263
+ if ((c = m == null ? void 0 : m.colorAttr) != null && c.length && ((g = t.styleYaml) == null ? void 0 : g.colorAttr) !== m.colorAttr) {
2264
+ const b = await o(m.colorAttr);
2265
+ m.colors = b.reduce(
2266
+ (h, v, k) => ({
2267
+ ...h,
2268
+ [v.id.toString()]: l[k]
2269
+ }),
2270
+ {}
2271
+ );
2272
+ const p = ni(m);
2273
+ p !== r.value && (r.value = p);
2274
+ }
2275
+ JSON.stringify(m) !== JSON.stringify(t.styleYaml) && i(
2276
+ "update:style-yaml",
2277
+ m && typeof m == "object" ? m : null
2278
+ );
2279
+ } catch {
2280
+ t.styleYaml !== null && i("update:style-yaml", null);
2281
+ }
2282
+ });
2283
+ async function o(s) {
2284
+ return (await fetch(`/api/gis-service/${t.token}/${s}`).then(
2285
+ (c) => c.json()
2286
+ )).rows;
2287
+ }
2288
+ const l = [
2289
+ "#8dd3c7",
2290
+ "#ffffb3",
2291
+ "#bebada",
2292
+ "#fb8072",
2293
+ "#80b1d3",
2294
+ "#fdb462",
2295
+ "#b3de69",
2296
+ "#fccde5",
2297
+ "#d9d9d9",
2298
+ "#bc80bd"
2299
+ ];
2300
+ function a() {
2301
+ let s = t.styleYaml;
2302
+ if (!s && r.value)
2303
+ try {
2304
+ const u = wn(r.value);
2305
+ s = u && typeof u == "object" ? u : null;
2306
+ } catch {
2307
+ te({
2308
+ type: "error",
2309
+ title: "Помилка",
2310
+ message: "Не вдалося зберегти стилі"
2311
+ });
2312
+ return;
2313
+ }
2314
+ i("save", s && typeof s == "object" ? s : null);
2315
+ }
2316
+ return (s, u) => (_(), q("div", Il, [
2317
+ y("div", Nl, [
2318
+ y("a", {
2319
+ target: "_blank",
2320
+ href: "/api/gis-service/" + t.token + "/col",
2321
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2322
+ }, " Атрибути ", 8, $l),
2323
+ y("button", {
2324
+ onClick: a,
2325
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2326
+ }, [...u[1] || (u[1] = [
2327
+ y("svg", {
2328
+ xmlns: "http://www.w3.org/2000/svg",
2329
+ width: "24",
2330
+ height: "24",
2331
+ viewBox: "0 0 24 24",
2332
+ fill: "none",
2333
+ stroke: "currentColor",
2334
+ "stroke-width": "2",
2335
+ "stroke-linecap": "round",
2336
+ "stroke-linejoin": "round",
2337
+ class: "lucide lucide-save h-3 w-3 mr-1"
2338
+ }, [
2339
+ y("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
2340
+ y("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
2341
+ y("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
2342
+ ], -1),
2343
+ pi(" Зберегти стилі ", -1)
2344
+ ])])
2345
+ ]),
2346
+ y("div", Ll, [
2347
+ y("div", Fl, [
2348
+ u[2] || (u[2] = y("div", { class: "bg-gradient-to-r from-gray-50 to-gray-100 px-4 py-2 border-b border-gray-200 flex items-center justify-between" }, [
2349
+ y("div", { class: "text-xs text-gray-400" }, "YAML")
2350
+ ], -1)),
2351
+ y("div", Rl, [
2352
+ O(_t, {
2353
+ modelValue: r.value,
2354
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
2355
+ language: "yaml",
2356
+ theme: "vs-light"
2357
+ }, null, 8, ["modelValue"])
2358
+ ])
2359
+ ])
2360
+ ])
2361
+ ]));
2362
+ }
2363
+ }), Pl = { class: "flex flex-col flex-1 min-h-0" }, Ml = { class: "flex flex-col flex-1 min-h-0" }, Ul = /* @__PURE__ */ ae({
2364
+ __name: "vs-tab-popup",
2365
+ props: {
2366
+ token: {},
2367
+ fields: {},
2368
+ columns: {}
2369
+ },
2370
+ emits: ["update:columns", "save"],
2371
+ setup(e, { emit: n }) {
2372
+ const t = e, i = n, r = E(t.columns || []);
2373
+ L(
2374
+ () => t.columns,
2375
+ (p) => r.value = p || [],
2376
+ { immediate: !0 }
2377
+ ), L(r, (p) => {
2378
+ const h = We(t.token);
2379
+ h && (h.popup = p), i("update:columns", p);
2380
+ });
2381
+ const o = E("list"), l = E(!1), a = E([]), s = [
2382
+ { key: "name", label: "Назва", type: "main" }
2383
+ // { key: "ua", label: "UA" },
2384
+ // { key: "format", label: "Format" },
2385
+ // { key: "meta", label: "Meta" },
2386
+ ], u = {
2387
+ name: { type: "text", label: "Назва", disabled: !0, validators: ["required"] },
2388
+ label: { type: "text", label: "Найменування", validators: ["required"] },
2389
+ // format: { type: "text", label: "Format", disabled: true, hidden: true },
2390
+ meta: {
2391
+ type: "radio",
2392
+ label: "Meta",
2393
+ mode: "combo",
2394
+ options: [
2395
+ { text: "Заголовок", id: "title" },
2396
+ { text: "Властивість", id: "feature" },
2397
+ { text: "Бейдж", id: "badge" }
2398
+ ]
2399
+ },
2400
+ data: {
2401
+ type: "autocomplete",
2402
+ label: "Класифікатор",
2403
+ data: "admin.cls.name"
2404
+ // conditions: ["meta", "in", ["badge", "select", "tags"]],
2405
+ }
2406
+ };
2407
+ function c() {
2408
+ a.value = r.value.map((p) => p.name || p.id), l.value = !0;
2409
+ }
2410
+ function g() {
2411
+ var k;
2412
+ const p = [...r.value], h = ((k = t.fields) == null ? void 0 : k.filter((C) => a.value.includes(C.name))) || [], v = $n(p, h, {
2413
+ selectedKeys: a.value,
2414
+ resolveKey: (C) => Le(C)
2415
+ });
2416
+ r.value = v, l.value = !1, a.value = [];
2417
+ }
2418
+ function m() {
2419
+ l.value = !1, a.value = [];
2420
+ }
2421
+ function b() {
2422
+ let p = [];
2423
+ o.value === "all" ? p = t.fields || [] : o.value === "none" ? p = [] : p = r.value, p.filter((h) => !h.label).forEach((h) => h.label = h.ua), i("save", p);
2424
+ }
2425
+ return (p, h) => (_(), q("div", Pl, [
2426
+ y("div", { class: "flex justify-between mb-3 gap-2" }, [
2427
+ y("button", {
2428
+ onClick: c,
2429
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2430
+ }, " Імпорт "),
2431
+ y("button", {
2432
+ onClick: b,
2433
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2434
+ }, " Зберегти попап ")
2435
+ ]),
2436
+ y("div", Ml, [
2437
+ o.value === "list" ? (_(), U(en, {
2438
+ key: 0,
2439
+ modelValue: r.value,
2440
+ "onUpdate:modelValue": h[0] || (h[0] = (v) => r.value = v),
2441
+ "columns-scheme": s,
2442
+ "form-scheme": u,
2443
+ "main-col-width": "250px",
2444
+ "add-button": !1
2445
+ }, null, 8, ["modelValue"])) : W("", !0)
2446
+ ]),
2447
+ O(Nn, {
2448
+ visible: l.value,
2449
+ "onUpdate:visible": h[1] || (h[1] = (v) => l.value = v),
2450
+ selection: a.value,
2451
+ "onUpdate:selection": h[2] || (h[2] = (v) => a.value = v),
2452
+ fields: e.fields,
2453
+ title: "Імпорт полів",
2454
+ "id-prefix": "import-popup",
2455
+ onConfirm: g,
2456
+ onCancel: m
2457
+ }, null, 8, ["visible", "selection", "fields"])
2458
+ ]));
2459
+ }
2460
+ }), ql = { class: "flex flex-col flex-1 min-h-0" }, Vl = { class: "flex justify-between mb-3 gap-2" }, Bl = { class: "p-4 space-y-4 text-sm" }, Dl = { class: "space-y-1" }, Yl = { class: "space-y-1" }, jl = { class: "flex items-center gap-3" }, Kl = { class: "flex justify-end gap-2 p-4 border-t" }, Hl = /* @__PURE__ */ ae({
2461
+ __name: "vs-tab-legend",
2462
+ props: {
2463
+ mapInfo: {},
2464
+ token: {},
2465
+ columns: {}
2466
+ },
2467
+ emits: ["update:columns", "save"],
2468
+ setup(e, { emit: n }) {
2469
+ const t = e, i = n, r = E(t.columns || []);
2470
+ L(
2471
+ () => t.columns,
2472
+ (p) => {
2473
+ r.value = p || [];
2474
+ }
2475
+ ), L(r, (p) => {
2476
+ i("update:columns", p);
2477
+ });
2478
+ const o = E(!1), l = E({
2479
+ name: "",
2480
+ color: "#2E86DE"
2481
+ }), a = mi(
2482
+ () => import("@opengis/core").then((p) => p.VsModal)
2483
+ ), s = [
2484
+ { key: "name", label: "Назва" },
2485
+ { key: "color", label: "Колір", type: "color" }
2486
+ ], u = {
2487
+ name: { type: "text", label: "Назва", validators: ["required"] },
2488
+ color: { type: "color", label: "Колір", validators: ["required"] }
2489
+ };
2490
+ function c(p) {
2491
+ p && g(), o.value = p;
2492
+ }
2493
+ function g() {
2494
+ l.value = { name: "", color: "#2E86DE" };
2495
+ }
2496
+ function m() {
2497
+ var k, C;
2498
+ const p = (k = l.value.name) == null ? void 0 : k.trim();
2499
+ if (!p) {
2500
+ te({
2501
+ type: "warning",
2502
+ title: "Перевірка",
2503
+ message: "Вкажіть назву елементу легенди"
2504
+ });
2505
+ return;
2506
+ }
2507
+ const h = ((C = l.value.color) == null ? void 0 : C.trim()) || "#2E86DE";
2508
+ if (r.value.some(
2509
+ (I) => Le(I) === Le({ name: p })
2510
+ )) {
2511
+ te({
2512
+ type: "warning",
2513
+ title: "Дубль",
2514
+ message: "Такий елемент легенди вже існує"
2515
+ });
2516
+ return;
2517
+ }
2518
+ r.value = [...r.value, { name: p, color: h }], g(), o.value = !1;
2519
+ }
2520
+ function b() {
2521
+ i("save", r.value);
2522
+ }
2523
+ return (p, h) => (_(), q("div", ql, [
2524
+ y("div", Vl, [
2525
+ y("button", {
2526
+ onClick: h[0] || (h[0] = (v) => o.value = !0),
2527
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2528
+ }, " Додати "),
2529
+ y("button", {
2530
+ onClick: b,
2531
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2532
+ }, " Зберегти легенду ")
2533
+ ]),
2534
+ O(en, {
2535
+ modelValue: r.value,
2536
+ "onUpdate:modelValue": h[1] || (h[1] = (v) => r.value = v),
2537
+ "columns-scheme": s,
2538
+ "form-scheme": u,
2539
+ "main-col-width": "250px",
2540
+ "add-button": !1
2541
+ }, null, 8, ["modelValue"]),
2542
+ O(ze(a), {
2543
+ teleport: "#modal",
2544
+ visible: o.value,
2545
+ title: "Новий елемент легенди",
2546
+ "onUpdate:visible": c
2547
+ }, {
2548
+ footer: Ge(() => [
2549
+ y("div", Kl, [
2550
+ y("button", {
2551
+ type: "button",
2552
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed",
2553
+ onClick: h[5] || (h[5] = (v) => c(!1))
2554
+ }, " Скасувати "),
2555
+ y("button", {
2556
+ type: "button",
2557
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed",
2558
+ onClick: m
2559
+ }, " Додати ")
2560
+ ])
2561
+ ]),
2562
+ default: Ge(() => [
2563
+ y("div", Bl, [
2564
+ y("div", Dl, [
2565
+ h[6] || (h[6] = y("label", { class: "block text-xs font-medium text-gray-500 uppercase tracking-wide" }, " Назва ", -1)),
2566
+ fn(y("input", {
2567
+ "onUpdate:modelValue": h[2] || (h[2] = (v) => l.value.name = v),
2568
+ type: "text",
2569
+ class: "w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200",
2570
+ placeholder: "Наприклад, Житлова зона"
2571
+ }, null, 512), [
2572
+ [dn, l.value.name]
2573
+ ])
2574
+ ]),
2575
+ y("div", Yl, [
2576
+ h[7] || (h[7] = y("label", { class: "block text-xs font-medium text-gray-500 uppercase tracking-wide" }, " Колір ", -1)),
2577
+ y("div", jl, [
2578
+ fn(y("input", {
2579
+ "onUpdate:modelValue": h[3] || (h[3] = (v) => l.value.color = v),
2580
+ type: "color",
2581
+ class: "h-10 w-16 rounded border border-gray-300"
2582
+ }, null, 512), [
2583
+ [dn, l.value.color]
2584
+ ]),
2585
+ fn(y("input", {
2586
+ "onUpdate:modelValue": h[4] || (h[4] = (v) => l.value.color = v),
2587
+ type: "text",
2588
+ class: "flex-1 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200",
2589
+ placeholder: "#FFFFFF"
2590
+ }, null, 512), [
2591
+ [dn, l.value.color]
2592
+ ])
2593
+ ])
2594
+ ])
2595
+ ])
2596
+ ]),
2597
+ _: 1
2598
+ }, 8, ["visible"])
2599
+ ]));
2600
+ }
2601
+ }), zl = { class: "space-y-3 bg-gradient-to-br from-sky-50 to-blue-50 p-4 rounded-xl border border-sky-100 shadow-sm" }, Gl = ["onClick"], Wl = ["aria-checked", "value"], Ql = { key: 0 }, Jl = /* @__PURE__ */ ae({
2602
+ __name: "view-mode-toggle",
2603
+ props: {
2604
+ modelValue: {},
2605
+ options: {},
2606
+ showHtml: { type: Boolean }
2607
+ },
2608
+ emits: ["update:modelValue"],
2609
+ setup(e, { emit: n }) {
2610
+ const t = e, i = n, r = (l) => i("update:modelValue", l), o = t.options || [
2611
+ { value: "all", label: "All" },
2612
+ { value: "list", label: "List" },
2613
+ { value: "none", label: "None" }
2614
+ ];
2615
+ return (l, a) => (_(), q("div", zl, [
2616
+ a[1] || (a[1] = y("label", { class: "text-sm font-medium text-gray-600" }, "Режим відображення", -1)),
2617
+ y("div", {
2618
+ role: "radiogroup",
2619
+ class: Ee(["grid gap-2", `grid-cols-${ze(o).length}`])
2620
+ }, [
2621
+ (_(!0), q(At, null, Ct(ze(o), (s) => (_(), q("div", {
2622
+ key: s.value,
2623
+ onClick: (u) => r(s.value),
2624
+ class: Ee(["flex items-center justify-center space-x-2 rounded-lg p-2 border transition-all duration-300 cursor-pointer", [
2625
+ e.modelValue === s.value ? "bg-gradient-to-r from-sky-200 to-blue-200 border-transparent shadow-sm" : "bg-white border-gray-100 hover:border-sky-200 hover:shadow-sm"
2626
+ ]])
2627
+ }, [
2628
+ y("button", {
2629
+ type: "button",
2630
+ role: "radio",
2631
+ "aria-checked": e.modelValue === s.value,
2632
+ value: s.value,
2633
+ class: "aspect-square rounded-full border border-primary h-4 w-4 flex items-center justify-center text-sky-500"
2634
+ }, [
2635
+ e.modelValue === s.value ? (_(), q("span", Ql, [...a[0] || (a[0] = [
2636
+ y("svg", {
2637
+ xmlns: "http://www.w3.org/2000/svg",
2638
+ viewBox: "0 0 24 24",
2639
+ fill: "none",
2640
+ stroke: "currentColor",
2641
+ "stroke-width": "2",
2642
+ "stroke-linecap": "round",
2643
+ "stroke-linejoin": "round",
2644
+ class: "lucide lucide-circle h-2.5 w-2.5 fill-current text-current"
2645
+ }, [
2646
+ y("circle", {
2647
+ cx: "12",
2648
+ cy: "12",
2649
+ r: "10"
2650
+ })
2651
+ ], -1)
2652
+ ])])) : W("", !0)
2653
+ ], 8, Wl),
2654
+ y("label", {
2655
+ class: Ee(["text-xs font-medium cursor-pointer", e.modelValue === s.value ? "text-gray-700" : "text-gray-600"])
2656
+ }, fe(s.label), 3)
2657
+ ], 10, Gl))), 128))
2658
+ ], 2)
2659
+ ]));
2660
+ }
2661
+ }), Xl = { class: "flex flex-col flex-1 min-h-0" }, Zl = { class: "flex flex-col flex-1 min-h-0" }, ea = /* @__PURE__ */ ae({
2662
+ __name: "vs-tab-card",
2663
+ props: {
2664
+ fields: {},
2665
+ columns: {},
2666
+ viewMode: {},
2667
+ html: {}
2668
+ },
2669
+ emits: ["update:columns", "save"],
2670
+ setup(e, { emit: n }) {
2671
+ const t = e, i = n, r = E(t.columns || []);
2672
+ L(
2673
+ () => t.columns,
2674
+ (v) => r.value = v || [],
2675
+ { immediate: !0 }
2676
+ ), L(r, (v) => i("update:columns", v));
2677
+ const o = E(t.viewMode ?? "list");
2678
+ L(
2679
+ () => t.viewMode,
2680
+ (v) => {
2681
+ v && v !== o.value && (o.value = v);
2682
+ }
2683
+ );
2684
+ const l = E(t.html ?? "");
2685
+ L(
2686
+ () => t.html,
2687
+ (v) => {
2688
+ typeof v == "string" && v !== l.value && (l.value = v);
2689
+ },
2690
+ { immediate: !0 }
2691
+ );
2692
+ const a = E(!1), s = E([]), u = [
2693
+ { key: "name", label: "Name", type: "main" }
2694
+ // { key: "ua", label: "UA" },
2695
+ // { key: 'format', label: 'Format' },
2696
+ //{ key: 'is_admin', label: 'Admin', options: [{ text: "Так", id: true }, { text: "Ні", id: false }]},
2697
+ /* { key: "meta", label: "Мета" }, */
2698
+ ], c = {
2699
+ name: {
2700
+ type: "text",
2701
+ label: "Name",
2702
+ validators: ["required"],
2703
+ disabled: !0
2704
+ },
2705
+ label: { type: "text", label: "Label", validators: ["required"] },
2706
+ format: {
2707
+ type: "radio",
2708
+ label: "Format",
2709
+ mode: "inline",
2710
+ validators: ["required"],
2711
+ options: [
2712
+ { text: "Text", id: "text" },
2713
+ { text: "Number", id: "number" },
2714
+ { text: "Date", id: "date" },
2715
+ { text: "File", id: "file" },
2716
+ { text: "Select", id: "select" },
2717
+ { text: "Tags", id: "tags" }
2718
+ ]
2719
+ },
2720
+ is_admin: { type: "Switcher", label: "Тільки для адміністративної частини" },
2721
+ data: {
2722
+ type: "select",
2723
+ label: "Класифікатор",
2724
+ data: "admin.cls.name"
2725
+ // conditions: ['format', 'in', ['select', 'badge', 'tags']],
2726
+ }
2727
+ /* meta: {
2728
+ type: "combobox",
2729
+ label: "Мета",
2730
+ validators: ["required"],
2731
+ mode: "combo",
2732
+ options: [
2733
+ { text: "Title", id: "title" },
2734
+ { text: "Features", id: "features" },
2735
+ { text: "Status", id: "status" },
2736
+ { text: "Tags", id: "tags" },
2737
+ { text: "Category", id: "category" },
2738
+ ],
2739
+ }, */
2740
+ };
2741
+ function g() {
2742
+ s.value = o.value === "html" ? [] : r.value.map((v) => v.name || v.id), a.value = !0;
2743
+ }
2744
+ function m() {
2745
+ var I;
2746
+ const v = [...r.value], k = ((I = t.fields) == null ? void 0 : I.filter((F) => s.value.includes(F.name)).map((F) => {
2747
+ const { type: Ce, format: ge, ...G } = F;
2748
+ return {
2749
+ ...G,
2750
+ format: ge ?? (F.name === "files" ? "file" : Ce ?? "text")
2751
+ };
2752
+ })) || [], C = $n(v, k, {
2753
+ selectedKeys: s.value,
2754
+ resolveKey: (F) => Le(F)
2755
+ });
2756
+ if (r.value = C, o.value === "html" && k.length) {
2757
+ const F = k.map((G) => {
2758
+ const we = G.label ?? "", ye = G.name ?? G.id ?? "";
2759
+ return `<dd>${we}</dd>
2760
+ <dt>{{ ${ye} }}</dt>`;
2761
+ }).join(`
2762
+ `), ge = (l.value ?? "").trimEnd();
2763
+ l.value = ge ? `${ge}
2764
+ ${F}` : F;
2765
+ }
2766
+ a.value = !1, s.value = [];
2767
+ }
2768
+ function b() {
2769
+ a.value = !1, s.value = [];
2770
+ }
2771
+ function p() {
2772
+ const v = o.value === "html" ? "html" : "list", k = {
2773
+ card_mode: v
2774
+ };
2775
+ v === "html" ? k.html = l.value : v === "list" && (k.list = r.value), i("save", "card", k);
2776
+ }
2777
+ const h = [
2778
+ { value: "all", label: "Всі" },
2779
+ { value: "list", label: "Список" },
2780
+ { value: "none", label: "Жодне" },
2781
+ { value: "html", label: "HTML" }
2782
+ ];
2783
+ return (v, k) => (_(), q("div", Xl, [
2784
+ y("div", { class: "flex justify-between mb-3 gap-2" }, [
2785
+ y("button", {
2786
+ onClick: g,
2787
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2788
+ }, " Імпорт "),
2789
+ y("button", {
2790
+ onClick: p,
2791
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2792
+ }, " Зберегти ")
2793
+ ]),
2794
+ O(Jl, {
2795
+ modelValue: o.value,
2796
+ "onUpdate:modelValue": k[0] || (k[0] = (C) => o.value = C),
2797
+ options: h
2798
+ }, null, 8, ["modelValue"]),
2799
+ y("div", Zl, [
2800
+ o.value === "list" ? (_(), U(en, {
2801
+ key: 0,
2802
+ modelValue: r.value,
2803
+ "onUpdate:modelValue": k[1] || (k[1] = (C) => r.value = C),
2804
+ "columns-scheme": u,
2805
+ "form-scheme": c,
2806
+ "main-col-width": "250px",
2807
+ "add-button": !1
2808
+ }, null, 8, ["modelValue"])) : o.value === "html" ? (_(), U(_t, {
2809
+ key: 1,
2810
+ modelValue: l.value,
2811
+ "onUpdate:modelValue": k[2] || (k[2] = (C) => l.value = C),
2812
+ language: "html",
2813
+ theme: "vs-light",
2814
+ class: "flex-1 min-h-0"
2815
+ }, null, 8, ["modelValue"])) : W("", !0)
2816
+ ]),
2817
+ O(Nn, {
2818
+ visible: a.value,
2819
+ "onUpdate:visible": k[3] || (k[3] = (C) => a.value = C),
2820
+ selection: s.value,
2821
+ "onUpdate:selection": k[4] || (k[4] = (C) => s.value = C),
2822
+ fields: e.fields,
2823
+ title: "Імпорт полів для картки",
2824
+ "id-prefix": "import-card",
2825
+ onConfirm: m,
2826
+ onCancel: b
2827
+ }, null, 8, ["visible", "selection", "fields"])
2828
+ ]));
2829
+ }
2830
+ }), na = { class: "flex flex-col flex-1 min-h-0" }, ta = /* @__PURE__ */ ae({
2831
+ __name: "vs-tab-filter",
2832
+ props: {
2833
+ fields: {},
2834
+ columns: {}
2835
+ },
2836
+ emits: ["update:columns", "save"],
2837
+ setup(e, { emit: n }) {
2838
+ const t = e, i = n;
2839
+ console.log(t.columns);
2840
+ const r = E(t.columns || []);
2841
+ L(
2842
+ () => t.columns,
2843
+ (p) => r.value = p || [],
2844
+ { immediate: !0 }
2845
+ ), L(r, (p) => i("update:columns", p), { deep: !0, immediate: !0 });
2846
+ const o = E("list"), l = E(!1), a = E([]), s = [
2847
+ { key: "id", label: "Name" },
2848
+ { key: "label", label: "UA" }
2849
+ // { key: "type", label: "Тип" },
2850
+ ], u = {
2851
+ name: { type: "text", label: "Name", disabled: !0, validators: ["required"] },
2852
+ label: { type: "text", label: "UA", validators: ["required"] },
2853
+ type: {
2854
+ type: "radio",
2855
+ label: "Тип",
2856
+ position: "horizontal",
2857
+ validators: ["required"],
2858
+ options: [
2859
+ { text: "Check", id: "check" },
2860
+ { text: "Range", id: "range" },
2861
+ { text: "Date", id: "date" },
2862
+ { text: "Text", id: "text" },
2863
+ { text: "Select", id: "autocomplete" }
2864
+ ]
2865
+ },
2866
+ hidden: {
2867
+ label: "Приховати",
2868
+ type: "Switcher"
2869
+ },
2870
+ data: {
2871
+ type: "select",
2872
+ label: "Класифікатор",
2873
+ data: "admin.cls.name",
2874
+ info: "Класифікатори можна переглянути у реєстрі “Класифікатори“. Якщо не вказувати класифікатор, то текстові дані можуть бути класифіковані системно",
2875
+ conditions: ["type", "in", ["autocomplete", "select", "check"]]
2876
+ }
2877
+ };
2878
+ function c() {
2879
+ a.value = r.value.map((p) => p.name || p.id), l.value = !0;
2880
+ }
2881
+ function g() {
2882
+ var k;
2883
+ const p = [...r.value], h = ((k = t.fields) == null ? void 0 : k.filter((C) => a.value.includes(C.name))) || [], v = $n(p, h, {
2884
+ selectedKeys: a.value,
2885
+ resolveKey: (C) => Le(C)
2886
+ });
2887
+ r.value = v, l.value = !1, a.value = [];
2888
+ }
2889
+ function m() {
2890
+ l.value = !1, a.value = [];
2891
+ }
2892
+ function b() {
2893
+ let p = [];
2894
+ o.value === "all" ? p = t.fields || [] : o.value === "none" ? p = [] : p = r.value, i("save", p);
2895
+ }
2896
+ return (p, h) => (_(), q("div", na, [
2897
+ y("div", { class: "flex justify-between mb-3 gap-2" }, [
2898
+ y("button", {
2899
+ onClick: c,
2900
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2901
+ }, " Імпорт "),
2902
+ y("button", {
2903
+ onClick: b,
2904
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2905
+ }, " Зберегти фільтр ")
2906
+ ]),
2907
+ o.value === "list" ? (_(), U(en, {
2908
+ key: 0,
2909
+ modelValue: r.value,
2910
+ "onUpdate:modelValue": h[0] || (h[0] = (v) => r.value = v),
2911
+ "columns-scheme": s,
2912
+ "form-scheme": u,
2913
+ "main-col-width": "250px",
2914
+ "add-button": !1
2915
+ }, null, 8, ["modelValue"])) : W("", !0),
2916
+ O(Nn, {
2917
+ visible: l.value,
2918
+ "onUpdate:visible": h[1] || (h[1] = (v) => l.value = v),
2919
+ selection: a.value,
2920
+ "onUpdate:selection": h[2] || (h[2] = (v) => a.value = v),
2921
+ fields: e.fields,
2922
+ title: "Імпорт полів",
2923
+ "id-prefix": "import-filter",
2924
+ onConfirm: g,
2925
+ onCancel: m
2926
+ }, null, 8, ["visible", "selection", "fields"])
2927
+ ]));
2928
+ }
2929
+ }), ia = /* @__PURE__ */ ae({
2930
+ __name: "MapDataLayer",
2931
+ props: {
2932
+ id: {},
2933
+ layer: {},
2934
+ styleSpec: {},
2935
+ autoCenter: { type: [Boolean, null] }
2936
+ },
2937
+ setup(e, { expose: n }) {
2938
+ var p, h, v, k, C;
2939
+ const { map: t, flyTo: i, setZoom: r } = xi(), o = ((h = (p = wt()) == null ? void 0 : p.appContext.config.globalProperties) == null ? void 0 : h.$settings) || null, l = e, a = l.id;
2940
+ String(l.id);
2941
+ const s = `${location.origin}/api/vtile/${l.id}/ua/{z}/{x}/{y}.vmt?all=1`, u = We(a, {
2942
+ source: {
2943
+ type: "vector",
2944
+ tiles: [s],
2945
+ minzoom: 0,
2946
+ maxzoom: 14
2947
+ },
2948
+ popup: l.layer.popup,
2949
+ card: (v = l.layer) == null ? void 0 : v.card,
2950
+ layer: {
2951
+ // id: layerId,
2952
+ // source: sourceId,
2953
+ // 'source-layer': props.id,
2954
+ style: (k = l.layer) == null ? void 0 : k.style
2955
+ /* paint: {
2956
+ 'circle-radius': 6,
2957
+ 'circle-color': 'red',
2958
+ } */
2959
+ }
2960
+ });
2961
+ n({ layerHandle: u }), (l.autoCenter ?? !0) && i({ center: l.layer.center || ((C = o == null ? void 0 : o.map) == null ? void 0 : C.center) || [30, 50], animate: !1 });
2962
+ let c = null;
2963
+ function g() {
2964
+ if (!(u != null && u.setTiles)) return;
2965
+ const I = s.includes("?") ? "&" : "?", F = `${s}${I}_=${Date.now()}`;
2966
+ u.setTiles([F]);
2967
+ }
2968
+ function m() {
2969
+ c && clearTimeout(c), c = setTimeout(() => {
2970
+ c = null, b().catch((I) => console.error("Failed to update map layer", I));
2971
+ }, 300);
2972
+ }
2973
+ async function b() {
2974
+ t.value && (g(), u.setStyle(l.styleSpec ?? null));
2975
+ }
2976
+ return L(() => l.styleSpec, m, { deep: !0 }), L(
2977
+ () => {
2978
+ var I;
2979
+ return (I = l.layer) == null ? void 0 : I.card;
2980
+ },
2981
+ (I) => {
2982
+ u && (u.card = I);
2983
+ }
2984
+ ), Tt(() => {
2985
+ u.remove();
2986
+ }), (I, F) => null;
2987
+ }
2988
+ }), ra = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, oa = { class: "flex-1 relative overflow-hidden" }, la = { class: "absolute top-0 left-0 w-full z-20" }, aa = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, sa = { class: "flex items-start justify-between gap-4" }, ua = { class: "flex-1 min-w-0" }, ca = { class: "flex items-center text-sm text-gray-500 mb-3" }, fa = { class: "text-gray-900 font-medium truncate max-w-xs" }, da = { class: "flex items-center justify-between gap-4" }, pa = { class: "flex-1 min-w-0" }, ma = { class: "flex items-center gap-3 mb-1" }, ha = { class: "text-base font-semibold text-gray-900 truncate" }, ga = {
2989
+ key: 0,
2990
+ class: "px-2 py-0.5 bg-green-50 border border-green-200 rounded flex-shrink-0"
2991
+ }, ya = { class: "text-xs font-medium text-green-700" }, va = ["title"], ba = { class: "w-full h-full bg-gradient-to-br from-sky-50 via-white to-blue-50 flex items-center justify-center relative pt-[115px]" }, xa = { class: "relative w-full h-full" }, Sa = { style: { top: "17px", left: "230px", position: "absolute", "z-index": "1" } }, ka = { class: "absolute top-4 left-4 z-20" }, Aa = { class: "absolute bottom-4 left-4 z-20" }, Ca = { class: "flex-1 flex flex-col h-full" }, wa = { class: "px-3 pt-3 pb-2 border-b border-gray-100" }, Ta = { class: "items-center justify-center text-muted-foreground grid w-full grid-cols-6 h-12 p-1 bg-gray-50 rounded-xl shadow-sm" }, _a = ["aria-selected", "onClick"], Ea = { class: "leading-none" }, Ia = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, Na = "OpenGIS", kt = 2, je = 5, $a = 1e3, La = /* @__PURE__ */ ae({
2992
+ __name: "service",
2993
+ props: {
2994
+ hideServiceKey: { type: Boolean, default: !1 }
2995
+ },
2996
+ setup(e) {
2997
+ var Wn, Qn;
2998
+ const t = hi(e, "hideServiceKey"), i = vi(), r = bi(), { id: o } = i.params, l = E(null), a = E(null), s = E({}), u = E(null), c = ((Qn = (Wn = wt()) == null ? void 0 : Wn.appContext.config.globalProperties) == null ? void 0 : Qn.$settings) || null;
2999
+ function g(f) {
3000
+ typeof document > "u" || (document.title = f ? `${f} — Сервіс` : Na);
3001
+ }
3002
+ let m = null;
3003
+ const b = E(!1);
3004
+ function p() {
3005
+ var f;
3006
+ return (f = l.value) == null ? void 0 : f.ctx;
3007
+ }
3008
+ function h(f) {
3009
+ typeof window > "u" || window.dispatchEvent(
3010
+ new CustomEvent(Ei, {
3011
+ detail: f
3012
+ })
3013
+ );
3014
+ }
3015
+ function v(f) {
3016
+ var M, A, J;
3017
+ const d = (A = (M = p()) == null ? void 0 : M.map) == null ? void 0 : A.value;
3018
+ if (!d || !f) return [];
3019
+ const S = (J = u.value) != null && J.service_id ? String(u.value.service_id) : null;
3020
+ return (d.queryRenderedFeatures(f) || []).filter(($) => {
3021
+ var Jn, Xn, Zn, et, nt, tt;
3022
+ const ne = ((Jn = $ == null ? void 0 : $.properties) == null ? void 0 : Jn.id) ?? ($ == null ? void 0 : $.id);
3023
+ if (ne == null || !($ != null && $.source) || S && String($.source) !== S)
3024
+ return !1;
3025
+ const z = We($.source) || We((Xn = $.layer) == null ? void 0 : Xn.id);
3026
+ if (!z) return !1;
3027
+ const ue = (et = (Zn = z == null ? void 0 : z.opts) == null ? void 0 : Zn.source) == null ? void 0 : et.type, Be = (tt = (nt = z == null ? void 0 : z.opts) == null ? void 0 : nt.layer) == null ? void 0 : tt.type;
3028
+ return ue !== "raster" && Be !== "raster";
3029
+ });
3030
+ }
3031
+ function k(f) {
3032
+ const d = v(f == null ? void 0 : f.point);
3033
+ h({
3034
+ features: d,
3035
+ externalItems: []
3036
+ });
3037
+ }
3038
+ function C(f) {
3039
+ if (Array.isArray(f)) return C(f[0]);
3040
+ if (typeof f != "string" && typeof f != "number") return null;
3041
+ const d = typeof f == "number" ? f : Number(f.trim());
3042
+ return Number.isFinite(d) ? d : null;
3043
+ }
3044
+ function I(f, d) {
3045
+ return f.toFixed(d);
3046
+ }
3047
+ function F(f, d, S) {
3048
+ const N = 0.5 * 10 ** -S;
3049
+ return Math.abs(f - d) > N;
3050
+ }
3051
+ function Ce() {
3052
+ var $, ne, z, ue;
3053
+ const f = (ne = ($ = p()) == null ? void 0 : $.map) == null ? void 0 : ne.value;
3054
+ if (!f) return;
3055
+ const d = C(i.query.z), S = C(i.query.x), N = C(i.query.y);
3056
+ if (d == null || S == null || N == null) return;
3057
+ const M = (z = f.getCenter) == null ? void 0 : z.call(f), A = (ue = f.getZoom) == null ? void 0 : ue.call(f);
3058
+ (!M || F(M.lng, S, je) || F(M.lat, N, je) || F(A ?? 0, d, kt)) && (b.value = !0, f.jumpTo({ center: [S, N], zoom: d }), b.value = !1);
3059
+ }
3060
+ function ge() {
3061
+ var M, A, J, $;
3062
+ if (b.value) return;
3063
+ const f = (A = (M = p()) == null ? void 0 : M.map) == null ? void 0 : A.value;
3064
+ if (!f) return;
3065
+ const d = (J = f.getCenter) == null ? void 0 : J.call(f), S = ($ = f.getZoom) == null ? void 0 : $.call(f);
3066
+ if (!d || S == null) return;
3067
+ const N = {
3068
+ ...i.query,
3069
+ z: I(S, kt),
3070
+ x: I(d.lng, je),
3071
+ y: I(d.lat, je)
3072
+ };
3073
+ i.query.z === N.z && i.query.x === N.x && i.query.y === N.y || r.replace({ query: N });
3074
+ }
3075
+ const G = E(null), we = E(""), ye = E([]), ln = E([]), Me = E([]), an = E("list"), sn = E(""), Ue = E([]), qe = E(!0);
3076
+ let se = null;
3077
+ const K = ve(
3078
+ () => {
3079
+ var f, d;
3080
+ return ((f = u.value) == null ? void 0 : f.id) ?? ((d = u.value) == null ? void 0 : d.service_id) ?? null;
3081
+ }
3082
+ ), Yn = ve(() => {
3083
+ const f = (c == null ? void 0 : c.map) || null, d = (f == null ? void 0 : f.boundary) ?? null, S = (f == null ? void 0 : f.katottg) ?? null;
3084
+ return !d && !S ? null : { boundary: d, katottg: S };
3085
+ }), un = ve(() => {
3086
+ const f = u.value;
3087
+ if (!f) return "";
3088
+ const d = [];
3089
+ !t.value && f.service_key && d.push(`Сервіс: ${f.service_key}`), f.description && d.push(f.description);
3090
+ const S = f.group_name || f.group_id;
3091
+ return S && d.push(`Група: ${S}`), typeof f.is_public < "u" && d.push(f.is_public ? "Публічний" : "Не публічний"), typeof f.is_active < "u" && d.push(f.is_active ? "Активний" : "Неактивний"), d.join(", ");
3092
+ }), jn = ve(() => {
3093
+ const f = u.value, d = (f == null ? void 0 : f.group_name) || (f == null ? void 0 : f.group_id);
3094
+ return d ? String(d).toUpperCase() : "";
3095
+ }), ti = ve(() => {
3096
+ var S;
3097
+ const f = (S = i.matched[i.matched.length - 1]) == null ? void 0 : S.path;
3098
+ return (typeof f == "string" && f ? f : i.path).replace(/\/:id\??$/, "") || "/";
3099
+ }), ii = ve(() => {
3100
+ var d;
3101
+ const f = (d = i.meta) == null ? void 0 : d.title;
3102
+ return typeof f == "string" && f.trim() ? f : "Datasets";
3103
+ });
3104
+ function ri() {
3105
+ r.push(ti.value);
3106
+ }
3107
+ const Kn = [
3108
+ { key: "style", label: "Стиль", icon: Mi },
3109
+ { key: "popup", label: "Попап", icon: Cl },
3110
+ { key: "filter", label: "Фільтр", icon: El },
3111
+ { key: "legend", label: "Легенда", icon: xl },
3112
+ { key: "card", label: "Картка", icon: Ui },
3113
+ { key: "metadata", label: "Метадані", icon: Pi }
3114
+ ], Hn = Kn.map((f) => f.key), H = E("style");
3115
+ gi(async () => {
3116
+ const f = i.query.tab;
3117
+ f && Hn.includes(f) && (H.value = f), await Ve(), oi();
3118
+ });
3119
+ async function oi() {
3120
+ var N;
3121
+ const f = p();
3122
+ if (!(f != null && f.ready)) return;
3123
+ await f.ready(), Ce();
3124
+ const d = (N = f.map) == null ? void 0 : N.value;
3125
+ if (!d) return;
3126
+ const S = () => ge();
3127
+ d.on("moveend", S), d.on("zoomend", S), d.on("click", k), m = () => {
3128
+ d.off("moveend", S), d.off("zoomend", S), d.off("click", k);
3129
+ };
3130
+ }
3131
+ L(
3132
+ () => [i.query.z, i.query.x, i.query.y],
3133
+ () => {
3134
+ Ce();
3135
+ }
3136
+ ), L(H, (f) => {
3137
+ i.query.tab !== f && r.replace({ query: { ...i.query, tab: f } });
3138
+ }), L(
3139
+ () => i.query.tab,
3140
+ (f) => {
3141
+ f && Hn.includes(f) && H.value !== f && (H.value = f);
3142
+ }
3143
+ ), L(
3144
+ () => {
3145
+ var f;
3146
+ return (f = u.value) == null ? void 0 : f.name;
3147
+ },
3148
+ (f) => g(f),
3149
+ { immediate: !0 }
3150
+ );
3151
+ function zn(f) {
3152
+ if (!f) return null;
3153
+ try {
3154
+ return JSON.parse(JSON.stringify(f));
3155
+ } catch (d) {
3156
+ return console.warn("Failed to clone style", d), null;
3157
+ }
3158
+ }
3159
+ function cn(f) {
3160
+ if (!f) return null;
3161
+ if (typeof f == "string")
3162
+ try {
3163
+ return rt(wn(f) || null);
3164
+ } catch (d) {
3165
+ return console.warn("Failed to parse style yaml", d), null;
3166
+ }
3167
+ return rt(zn(f));
3168
+ }
3169
+ function li(f, d) {
3170
+ try {
3171
+ return JSON.stringify(f) === JSON.stringify(d);
3172
+ } catch {
3173
+ return !1;
3174
+ }
3175
+ }
3176
+ function ai() {
3177
+ var d;
3178
+ if (!u.value) return;
3179
+ const f = cn(G.value);
3180
+ li(f, ((d = u.value) == null ? void 0 : d.style) ?? null) || (u.value = {
3181
+ ...u.value,
3182
+ style: f
3183
+ });
3184
+ }
3185
+ function si() {
3186
+ se && clearTimeout(se), se = setTimeout(() => {
3187
+ se = null, ai();
3188
+ }, $a);
3189
+ }
3190
+ const Ve = async () => {
3191
+ try {
3192
+ const f = await fetch(`/api/gis-service/${o}`);
3193
+ if (!f.ok) throw new Error(`${f.status}`);
3194
+ const d = await f.json();
3195
+ s.value = d || {}, a.value = o;
3196
+ const S = cn(d.style);
3197
+ u.value = d ? { ...d, style: zn(S) } : null, G.value = S, we.value = typeof (d == null ? void 0 : d.style) == "string" ? d.style : S ? ni(S) : "", ln.value = (d == null ? void 0 : d.popup) || [], an.value = d.card_mode === "html" ? "html" : "list", Me.value = d.card, sn.value = d.html, ye.value = (d == null ? void 0 : d.legend) || [], Ue.value = (d == null ? void 0 : d.filters) || [];
3198
+ } catch (f) {
3199
+ console.error("Failed to fetch map info", f);
3200
+ }
3201
+ };
3202
+ L(
3203
+ () => {
3204
+ var f;
3205
+ return (f = u.value) == null ? void 0 : f.style;
3206
+ },
3207
+ (f) => {
3208
+ G.value = cn(f);
3209
+ },
3210
+ { deep: !0 }
3211
+ ), L(
3212
+ () => G.value,
3213
+ () => {
3214
+ si();
3215
+ },
3216
+ { deep: !0 }
3217
+ ), Tt(() => {
3218
+ se && (clearTimeout(se), se = null), m == null || m(), m = null;
3219
+ });
3220
+ async function ui(f) {
3221
+ try {
3222
+ const d = await fetch(`/api/gis-clear-vtile/${f}`), { message: S, error: N, code: M } = await d.json();
3223
+ if (M === 200)
3224
+ return te({ type: "success", title: "Успіх", message: S });
3225
+ te({ type: "error", title: "Помилка", message: N });
3226
+ } catch (d) {
3227
+ te({
3228
+ type: "error",
3229
+ title: "Помилка",
3230
+ message: "Не вдалося очистити тайли"
3231
+ }), console.error(d);
3232
+ }
3233
+ }
3234
+ async function Te(f, d) {
3235
+ await Gn({ [f]: d }, f);
3236
+ }
3237
+ async function Gn(f, d) {
3238
+ if (u.value = {
3239
+ ...u.value || {},
3240
+ ...f
3241
+ }, typeof f.html < "u" && (s.value = {
3242
+ ...s.value || {},
3243
+ html: f.html
3244
+ }), !!K.value)
3245
+ try {
3246
+ if (!(await fetch(`/api/gis-service/${K.value}`, {
3247
+ method: "PUT",
3248
+ headers: { "Content-Type": "application/json" },
3249
+ body: JSON.stringify(f)
3250
+ })).ok) throw new Error("Save failed");
3251
+ te({
3252
+ type: "success",
3253
+ title: "Успіх",
3254
+ message: `${d} saved`
3255
+ }), await Ve();
3256
+ } catch (S) {
3257
+ te({
3258
+ type: "error",
3259
+ title: "Помилка",
3260
+ message: `Failed to save ${d}`
3261
+ }), console.error(S);
3262
+ }
3263
+ }
3264
+ async function ci(f, d) {
3265
+ if (f !== "card") {
3266
+ await Te(f, d);
3267
+ return;
3268
+ }
3269
+ const S = (d == null ? void 0 : d.card_mode) === "html" ? "html" : "list", N = S === "html" && typeof (d == null ? void 0 : d.html) == "string" ? d.html : "", M = (S === "html" ? [] : null) || (Array.isArray(d == null ? void 0 : d.list) ? d.list : []);
3270
+ Me.value = M, an.value = S, sn.value = N;
3271
+ const A = {
3272
+ card_mode: S
3273
+ };
3274
+ S === "html" && (A.html = N), S === "list" && (A.card = M), await Gn(A, "card");
3275
+ }
3276
+ return (f, d) => {
3277
+ var S, N, M;
3278
+ return _(), q("div", ra, [
3279
+ y("div", oa, [
3280
+ y("div", la, [
3281
+ y("div", aa, [
3282
+ y("div", sa, [
3283
+ y("div", ua, [
3284
+ y("div", ca, [
3285
+ y("button", {
3286
+ type: "button",
3287
+ class: "hover:text-gray-700 cursor-pointer transition-colors",
3288
+ onClick: ri
3289
+ }, fe(ii.value), 1),
3290
+ d[11] || (d[11] = y("svg", {
3291
+ xmlns: "http://www.w3.org/2000/svg",
3292
+ width: "24",
3293
+ height: "24",
3294
+ viewBox: "0 0 24 24",
3295
+ fill: "none",
3296
+ stroke: "currentColor",
3297
+ "stroke-width": "2",
3298
+ "stroke-linecap": "round",
3299
+ "stroke-linejoin": "round",
3300
+ class: "lucide lucide-chevron-right w-4 h-4 mx-1"
3301
+ }, [
3302
+ y("path", { d: "m9 18 6-6-6-6" })
3303
+ ], -1)),
3304
+ y("span", fa, fe(((S = u.value) == null ? void 0 : S.name) || "Dataset"), 1)
3305
+ ]),
3306
+ y("div", da, [
3307
+ y("div", pa, [
3308
+ y("div", ma, [
3309
+ y("h1", ha, fe(((N = u.value) == null ? void 0 : N.name) || "Dataset"), 1),
3310
+ jn.value ? (_(), q("div", ga, [
3311
+ y("span", ya, fe(jn.value), 1)
3312
+ ])) : W("", !0)
3313
+ ]),
3314
+ un.value ? (_(), q("p", {
3315
+ key: 0,
3316
+ class: "text-xs text-gray-500 truncate",
3317
+ title: un.value
3318
+ }, fe(un.value), 9, va)) : W("", !0)
3319
+ ])
3320
+ ])
3321
+ ]),
3322
+ K.value ? (_(), U(Ii, {
3323
+ key: 0,
3324
+ class: "flex-shrink-0",
3325
+ "entity-id": K.value,
3326
+ "entity-info": { name: (M = u.value) == null ? void 0 : M.name },
3327
+ table: "gis.services.table",
3328
+ "entity-label": "Сервіс",
3329
+ "save-method": "put",
3330
+ "show-xml-item": !1,
3331
+ "clear-tiles-handler": ui,
3332
+ onSaved: Ve
3333
+ }, null, 8, ["entity-id", "entity-info"])) : W("", !0)
3334
+ ])
3335
+ ])
3336
+ ]),
3337
+ y("div", ba, [
3338
+ y("div", xa, [
3339
+ O(Si, {
3340
+ ref_key: "mapViewRef",
3341
+ ref: l
3342
+ }, {
3343
+ default: Ge(() => {
3344
+ var A, J, $, ne, z, ue, Be;
3345
+ return [
3346
+ (A = u.value) != null && A.service_id ? (_(), U(ia, {
3347
+ key: 0,
3348
+ id: (J = u.value) == null ? void 0 : J.service_id,
3349
+ layer: u.value,
3350
+ "style-spec": (($ = u.value) == null ? void 0 : $.style) || null,
3351
+ autoCenter: !1
3352
+ }, null, 8, ["id", "layer", "style-spec"])) : W("", !0),
3353
+ K.value ? (_(), U(ki, {
3354
+ key: 1,
3355
+ "layer-id": K.value,
3356
+ boundary: ((ne = u.value) == null ? void 0 : ne.boundary) || ((z = Yn.value) == null ? void 0 : z.boundary) || null,
3357
+ katottg: ((ue = u.value) == null ? void 0 : ue.katottg) || ((Be = Yn.value) == null ? void 0 : Be.katottg) || null
3358
+ }, null, 8, ["layer-id", "boundary", "katottg"])) : W("", !0),
3359
+ y("div", Sa, [
3360
+ K.value ? (_(), U(Ai, {
3361
+ key: 0,
3362
+ "layer-id": K.value,
3363
+ filters: Ue.value
3364
+ }, null, 8, ["layer-id", "filters"])) : W("", !0)
3365
+ ]),
3366
+ d[12] || (d[12] = y("div", {
3367
+ id: "map-filter-popover-host",
3368
+ class: "map-widget__filter-host"
3369
+ }, null, -1)),
3370
+ y("div", ka, [
3371
+ O(Ci)
3372
+ ]),
3373
+ O(Ni, null, {
3374
+ default: Ge(() => [
3375
+ O($i),
3376
+ O(Li),
3377
+ O(Fi),
3378
+ O(it),
3379
+ s.value.center ? (_(), U(it, {
3380
+ key: 0,
3381
+ targetCenter: s.value.center,
3382
+ targetLabel: "Ценр даних"
3383
+ }, null, 8, ["targetCenter"])) : W("", !0)
3384
+ ]),
3385
+ _: 1
3386
+ }),
3387
+ y("div", Aa, [
3388
+ O(wi, {
3389
+ items: ye.value || null
3390
+ }, null, 8, ["items"])
3391
+ ]),
3392
+ O(Ti),
3393
+ O(_i, {
3394
+ html: s.value.html
3395
+ }, null, 8, ["html"])
3396
+ ];
3397
+ }),
3398
+ _: 1
3399
+ }, 512)
3400
+ ])
3401
+ ]),
3402
+ O(Ri, {
3403
+ open: qe.value,
3404
+ onToggle: d[0] || (d[0] = (A) => qe.value = !qe.value),
3405
+ "top-class": "top-4"
3406
+ }, null, 8, ["open"])
3407
+ ]),
3408
+ y("div", {
3409
+ class: Ee(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", qe.value ? "w-[650px]" : "w-0"])
3410
+ }, [
3411
+ y("div", Ca, [
3412
+ y("div", wa, [
3413
+ y("div", Ta, [
3414
+ (_(), q(At, null, Ct(Kn, (A) => y("button", {
3415
+ key: A.key,
3416
+ type: "button",
3417
+ role: "tab",
3418
+ "aria-selected": H.value === A.key,
3419
+ class: Ee([
3420
+ "whitespace-nowrap flex flex-col items-center justify-center gap-0.5 py-1 px-1 text-[9px] font-medium transition-all duration-300 hover:bg-white/70 rounded-lg group",
3421
+ H.value === A.key ? "bg-white shadow-sm text-gray-700" : ""
3422
+ ]),
3423
+ onClick: (J) => H.value = A.key
3424
+ }, [
3425
+ (_(), U(yi(A.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
3426
+ y("span", Ea, fe(A.label), 1)
3427
+ ], 10, _a)), 64))
3428
+ ])
3429
+ ]),
3430
+ y("div", Ia, [
3431
+ H.value === "style" ? (_(), U(Ol, {
3432
+ key: 0,
3433
+ token: K.value,
3434
+ "style-text": we.value,
3435
+ "style-yaml": G.value,
3436
+ "onUpdate:styleYaml": d[1] || (d[1] = (A) => G.value = A),
3437
+ "onUpdate:styleText": d[2] || (d[2] = (A) => we.value = A),
3438
+ onSave: d[3] || (d[3] = (A) => Te("style", A))
3439
+ }, null, 8, ["token", "style-text", "style-yaml"])) : H.value === "legend" ? (_(), U(Hl, {
3440
+ key: 1,
3441
+ token: K.value,
3442
+ columns: ye.value,
3443
+ "onUpdate:columns": d[4] || (d[4] = (A) => ye.value = A),
3444
+ onSave: d[5] || (d[5] = (A) => Te("legend", A))
3445
+ }, null, 8, ["token", "columns"])) : H.value === "popup" ? (_(), U(Ul, {
3446
+ key: 2,
3447
+ token: K.value,
3448
+ columns: ln.value,
3449
+ fields: s.value.fields,
3450
+ "onUpdate:columns": d[6] || (d[6] = (A) => ln.value = A),
3451
+ onSave: d[7] || (d[7] = (A) => Te("popup", A))
3452
+ }, null, 8, ["token", "columns", "fields"])) : H.value === "card" ? (_(), U(ea, {
3453
+ key: 3,
3454
+ token: K.value,
3455
+ columns: Me.value,
3456
+ fields: s.value.fields,
3457
+ "view-mode": an.value,
3458
+ html: sn.value,
3459
+ "onUpdate:columns": d[8] || (d[8] = (A) => Me.value = A),
3460
+ onSave: ci
3461
+ }, null, 8, ["token", "columns", "fields", "view-mode", "html"])) : H.value === "filter" ? (_(), U(ta, {
3462
+ key: 4,
3463
+ token: K.value,
3464
+ fields: s.value.fields,
3465
+ columns: Ue.value,
3466
+ "onUpdate:columns": d[9] || (d[9] = (A) => Ue.value = A),
3467
+ onSave: d[10] || (d[10] = (A) => Te("filters", A))
3468
+ }, null, 8, ["token", "fields", "columns"])) : H.value === "metadata" ? (_(), U(Oi, {
3469
+ key: 5,
3470
+ data: u.value,
3471
+ "entity-id": String(ze(o)),
3472
+ "entity-type": "service",
3473
+ onSaved: Ve
3474
+ }, null, 8, ["data", "entity-id"])) : W("", !0)
3475
+ ])
3476
+ ])
3477
+ ], 2)
3478
+ ]);
3479
+ };
3480
+ }
3481
+ }), Ya = /* @__PURE__ */ Ze(La, [["__scopeId", "data-v-3ee04cf6"]]);
3482
+ export {
3483
+ Ya as default
3484
+ };