@abcagency/hc-ui-components 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintrc +144 -0
  3. package/.prettierignore +3 -0
  4. package/dist/_virtual/_rollupPluginBabelHelpers.js +516 -0
  5. package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  6. package/dist/apis/hcApi.js +189 -0
  7. package/dist/apis/hcApi.js.map +1 -0
  8. package/dist/clientToken.js +10 -0
  9. package/dist/clientToken.js.map +1 -0
  10. package/dist/components/HireControlMap.js +129 -0
  11. package/dist/components/HireControlMap.js.map +1 -0
  12. package/dist/components/modules/accordions/MapAccordionItem.js +76 -0
  13. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -0
  14. package/dist/components/modules/accordions/default.js +108 -0
  15. package/dist/components/modules/accordions/default.js.map +1 -0
  16. package/dist/components/modules/accordions/filterItem.js +50 -0
  17. package/dist/components/modules/accordions/filterItem.js.map +1 -0
  18. package/dist/components/modules/accordions/filters.js +46 -0
  19. package/dist/components/modules/accordions/filters.js.map +1 -0
  20. package/dist/components/modules/buttons/button-group-apply.js +84 -0
  21. package/dist/components/modules/buttons/button-group-apply.js.map +1 -0
  22. package/dist/components/modules/buttons/commute-pill.js +18 -0
  23. package/dist/components/modules/buttons/commute-pill.js.map +1 -0
  24. package/dist/components/modules/buttons/default.js +145 -0
  25. package/dist/components/modules/buttons/default.js.map +1 -0
  26. package/dist/components/modules/buttons/items-pill.js +23 -0
  27. package/dist/components/modules/buttons/items-pill.js.map +1 -0
  28. package/dist/components/modules/buttons/pill-wrapper.js +20 -0
  29. package/dist/components/modules/buttons/pill-wrapper.js.map +1 -0
  30. package/dist/components/modules/buttons/show-all-button.js +39 -0
  31. package/dist/components/modules/buttons/show-all-button.js.map +1 -0
  32. package/dist/components/modules/cards/default.js +102 -0
  33. package/dist/components/modules/cards/default.js.map +1 -0
  34. package/dist/components/modules/cards/filter.js +38 -0
  35. package/dist/components/modules/cards/filter.js.map +1 -0
  36. package/dist/components/modules/dialogs/apply-dialog.js +46 -0
  37. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -0
  38. package/dist/components/modules/filter/commute.js +184 -0
  39. package/dist/components/modules/filter/commute.js.map +1 -0
  40. package/dist/components/modules/filter/index.js +79 -0
  41. package/dist/components/modules/filter/index.js.map +1 -0
  42. package/dist/components/modules/filter/item.js +71 -0
  43. package/dist/components/modules/filter/item.js.map +1 -0
  44. package/dist/components/modules/filter/location.js +68 -0
  45. package/dist/components/modules/filter/location.js.map +1 -0
  46. package/dist/components/modules/filter/points-of-interest.js +38 -0
  47. package/dist/components/modules/filter/points-of-interest.js.map +1 -0
  48. package/dist/components/modules/filter/radio-item.js +46 -0
  49. package/dist/components/modules/filter/radio-item.js.map +1 -0
  50. package/dist/components/modules/filter/search.js +83 -0
  51. package/dist/components/modules/filter/search.js.map +1 -0
  52. package/dist/components/modules/filter/sort.js +93 -0
  53. package/dist/components/modules/filter/sort.js.map +1 -0
  54. package/dist/components/modules/grid.js +39 -0
  55. package/dist/components/modules/grid.js.map +1 -0
  56. package/dist/components/modules/icon.js +23 -0
  57. package/dist/components/modules/icon.js.map +1 -0
  58. package/dist/components/modules/jobListing/listing-details.js +69 -0
  59. package/dist/components/modules/jobListing/listing-details.js.map +1 -0
  60. package/dist/components/modules/maps/info-window-card.js +14 -0
  61. package/dist/components/modules/maps/info-window-card.js.map +1 -0
  62. package/dist/components/modules/maps/info-window-content.js +39 -0
  63. package/dist/components/modules/maps/info-window-content.js.map +1 -0
  64. package/dist/components/modules/maps/list/field-mapper.js +88 -0
  65. package/dist/components/modules/maps/list/field-mapper.js.map +1 -0
  66. package/dist/components/modules/maps/list/header-item.js +59 -0
  67. package/dist/components/modules/maps/list/header-item.js.map +1 -0
  68. package/dist/components/modules/maps/list/header.js +37 -0
  69. package/dist/components/modules/maps/list/header.js.map +1 -0
  70. package/dist/components/modules/maps/list/index.js +93 -0
  71. package/dist/components/modules/maps/list/index.js.map +1 -0
  72. package/dist/components/modules/maps/list/item-expand-card/index.js +16 -0
  73. package/dist/components/modules/maps/list/item-expand-card/index.js.map +1 -0
  74. package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js +38 -0
  75. package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js.map +1 -0
  76. package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js +40 -0
  77. package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js.map +1 -0
  78. package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js +20 -0
  79. package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js.map +1 -0
  80. package/dist/components/modules/maps/list/list-item/index.js +98 -0
  81. package/dist/components/modules/maps/list/list-item/index.js.map +1 -0
  82. package/dist/components/modules/maps/map-list.js +57 -0
  83. package/dist/components/modules/maps/map-list.js.map +1 -0
  84. package/dist/components/modules/maps/map-marker.js +85 -0
  85. package/dist/components/modules/maps/map-marker.js.map +1 -0
  86. package/dist/components/modules/maps/map.js +201 -0
  87. package/dist/components/modules/maps/map.js.map +1 -0
  88. package/dist/components/modules/maps/place-marker.js +37 -0
  89. package/dist/components/modules/maps/place-marker.js.map +1 -0
  90. package/dist/components/modules/maps/tabs.js +84 -0
  91. package/dist/components/modules/maps/tabs.js.map +1 -0
  92. package/dist/constants/placeTypes.js +11 -0
  93. package/dist/constants/placeTypes.js.map +1 -0
  94. package/dist/contexts/mapContext.js +133 -0
  95. package/dist/contexts/mapContext.js.map +1 -0
  96. package/dist/contexts/mapListContext.js +278 -0
  97. package/dist/contexts/mapListContext.js.map +1 -0
  98. package/dist/contexts/placesContext.js +152 -0
  99. package/dist/contexts/placesContext.js.map +1 -0
  100. package/dist/hooks/useList.js +119 -0
  101. package/dist/hooks/useList.js.map +1 -0
  102. package/dist/index.js +2 -4536
  103. package/dist/index.js.map +1 -0
  104. package/dist/services/_virtual/_rollupPluginBabelHelpers.js +372 -0
  105. package/dist/services/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  106. package/dist/services/apis/hcApi.js +189 -0
  107. package/dist/services/apis/hcApi.js.map +1 -0
  108. package/dist/services/clientToken.js +7 -0
  109. package/dist/services/clientToken.js.map +1 -0
  110. package/dist/services/configService.js +33 -0
  111. package/dist/services/configService.js.map +1 -0
  112. package/dist/services/googlePlacesNearbyService.js +61 -0
  113. package/dist/services/googlePlacesNearbyService.js.map +1 -0
  114. package/dist/services/listingAggregatorService.js +56 -0
  115. package/dist/services/listingAggregatorService.js.map +1 -0
  116. package/dist/services/listingEntityService.js +36 -0
  117. package/dist/services/listingEntityService.js.map +1 -0
  118. package/dist/services/listingService.js +60 -112
  119. package/dist/services/listingService.js.map +1 -0
  120. package/dist/services/recruiterService.js +36 -0
  121. package/dist/services/recruiterService.js.map +1 -0
  122. package/dist/services/styles/index.css +3 -0
  123. package/dist/styles/index.css +3 -0
  124. package/dist/util/filterUtil.js +213 -0
  125. package/dist/util/filterUtil.js.map +1 -0
  126. package/dist/util/loading.js +16 -0
  127. package/dist/util/loading.js.map +1 -0
  128. package/dist/util/localStorageUtil.js +32 -0
  129. package/dist/util/localStorageUtil.js.map +1 -0
  130. package/dist/util/mapIconUtil.js +73 -0
  131. package/dist/util/mapIconUtil.js.map +1 -0
  132. package/dist/util/mapUtil.js +76 -0
  133. package/dist/util/mapUtil.js.map +1 -0
  134. package/dist/util/sortUtil.js +33 -0
  135. package/dist/util/sortUtil.js.map +1 -0
  136. package/dist/util/stringUtils.js +9 -0
  137. package/dist/util/stringUtils.js.map +1 -0
  138. package/jsconfig.json +7 -0
  139. package/package.json +51 -38
  140. package/postcss.config.js +13 -15
  141. package/{src/tailwind/preset.default.js → preset.default.js} +15 -15
  142. package/rollup.config.mjs +87 -0
  143. package/src/apis/hcApi.js +93 -87
  144. package/src/clientToken.js +9 -9
  145. package/src/components/HireControlMap.js +120 -0
  146. package/src/components/modules/accordions/MapAccordionItem.js +72 -69
  147. package/src/components/modules/accordions/default.js +171 -173
  148. package/src/components/modules/accordions/filterItem.js +53 -53
  149. package/src/components/modules/accordions/filters.js +47 -44
  150. package/src/components/modules/buttons/button-group-apply.js +113 -85
  151. package/src/components/modules/buttons/commute-pill.js +22 -21
  152. package/src/components/modules/buttons/default.js +196 -196
  153. package/src/components/modules/buttons/items-pill.js +32 -31
  154. package/src/components/modules/buttons/pill-wrapper.js +27 -26
  155. package/src/components/modules/buttons/show-all-button.js +20 -20
  156. package/src/components/modules/cards/default.js +167 -168
  157. package/src/components/modules/cards/filter.js +56 -55
  158. package/src/components/modules/dialogs/apply-dialog.js +48 -47
  159. package/src/components/modules/filter/commute.js +148 -151
  160. package/src/components/modules/filter/index.js +87 -86
  161. package/src/components/modules/filter/item.js +76 -77
  162. package/src/components/modules/filter/location.js +71 -69
  163. package/src/components/modules/filter/points-of-interest.js +44 -43
  164. package/src/components/modules/filter/radio-item.js +53 -51
  165. package/src/components/modules/filter/search.js +92 -91
  166. package/src/components/modules/filter/sort.js +83 -83
  167. package/src/components/modules/grid.js +55 -56
  168. package/src/components/modules/icon.js +33 -33
  169. package/src/components/modules/jobListing/listing-details.js +94 -88
  170. package/src/components/modules/maps/info-window-card.js +17 -17
  171. package/src/components/modules/maps/info-window-content.js +58 -60
  172. package/src/components/modules/maps/list/field-mapper.js +112 -111
  173. package/src/components/modules/maps/list/header-item.js +91 -90
  174. package/src/components/modules/maps/list/header.js +47 -46
  175. package/src/components/modules/maps/list/index.js +107 -104
  176. package/src/components/modules/maps/list/item-expand-card/index.js +22 -21
  177. package/src/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js +50 -48
  178. package/src/components/modules/maps/list/item-expand-card/recruiter-details.js +68 -67
  179. package/src/components/modules/maps/list/item-expand-card/recruiter-headshot.js +22 -22
  180. package/src/components/modules/maps/list/list-item/index.js +134 -133
  181. package/src/components/modules/maps/map-list.js +74 -73
  182. package/src/components/modules/maps/map-marker.js +86 -84
  183. package/src/components/modules/maps/map.js +229 -226
  184. package/src/components/modules/maps/place-marker.js +1 -1
  185. package/src/components/modules/maps/tabs.js +81 -79
  186. package/src/constants/placeTypes.js +8 -8
  187. package/src/contexts/mapContext.js +20 -19
  188. package/src/contexts/mapListContext.js +20 -15
  189. package/src/contexts/placesContext.js +4 -0
  190. package/src/hooks/useList.js +12 -10
  191. package/src/index.js +3 -103
  192. package/src/services/configService.js +16 -16
  193. package/src/services/googlePlacesNearbyService.js +33 -33
  194. package/src/services/listingAggregatorService.js +5 -4
  195. package/src/services/listingEntityService.js +2 -1
  196. package/src/services/listingService.js +27 -28
  197. package/src/services/recruiterService.js +17 -17
  198. package/src/styles/{globals.css → index.css} +23 -23
  199. package/src/util/arrayUtil.js +3 -3
  200. package/src/util/fieldMapper.js +22 -19
  201. package/src/util/filterUtil.js +19 -19
  202. package/src/util/loading.js +17 -17
  203. package/src/util/localStorageUtil.js +26 -26
  204. package/src/util/mapIconUtil.js +3 -3
  205. package/src/util/sortUtil.js +32 -32
  206. package/src/util/stringUtils.js +6 -6
  207. package/{src/tailwind/tailwind.config.js → tailwind.config.js} +126 -127
  208. package/dist/globals.css +0 -3
  209. package/dist/output.css +0 -784
  210. package/dist/services/globals.css +0 -3
  211. package/rollup.config.js +0 -68
  212. package/src/components/layout/footer.js +0 -34
  213. package/src/components/layout/header.js +0 -23
  214. package/src/components/layout/layout.js +0 -36
  215. package/src/components/modules/animations/slidein.js +0 -41
  216. package/src/components/modules/navigation/nav-link.js +0 -65
  217. package/src/components/modules/navigation/navbar.js +0 -106
  218. package/src/components/modules/navigation/skip-link.js +0 -21
  219. package/src/components/modules/navigation/social.js +0 -29
  220. package/src/components/modules/sections/default.js +0 -59
  221. package/src/components/modules/sections/sectionContext.js +0 -4
  222. package/src/hooks/useClickOutside.js +0 -16
  223. package/src/hooks/useEventListener.js +0 -25
  224. package/src/hooks/useEventTracker.js +0 -19
  225. package/src/hooks/useRefScrollProgress.js +0 -24
  226. package/src/hooks/useScript.js +0 -63
  227. package/src/hooks/useScrollDirection.js +0 -39
  228. package/src/hooks/useSectionTracker.js +0 -95
  229. package/src/hooks/useUserAgent.js +0 -43
  230. package/src/hooks/useWindowSize.js +0 -28
  231. package/src/index.css +0 -25
  232. package/src/styles/fonts.js +0 -0
  233. package/src/util/page-head.js +0 -62
  234. package/src/util/provider.js +0 -12
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,372 @@
1
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
2
+ try {
3
+ var i = n[a](c),
4
+ u = i.value;
5
+ } catch (n) {
6
+ return void e(n);
7
+ }
8
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
9
+ }
10
+ function _asyncToGenerator(n) {
11
+ return function () {
12
+ var t = this,
13
+ e = arguments;
14
+ return new Promise(function (r, o) {
15
+ var a = n.apply(t, e);
16
+ function _next(n) {
17
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
18
+ }
19
+ function _throw(n) {
20
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
21
+ }
22
+ _next(void 0);
23
+ });
24
+ };
25
+ }
26
+ function _defineProperty(e, r, t) {
27
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
28
+ value: t,
29
+ enumerable: !0,
30
+ configurable: !0,
31
+ writable: !0
32
+ }) : e[r] = t, e;
33
+ }
34
+ function ownKeys(e, r) {
35
+ var t = Object.keys(e);
36
+ if (Object.getOwnPropertySymbols) {
37
+ var o = Object.getOwnPropertySymbols(e);
38
+ r && (o = o.filter(function (r) {
39
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
40
+ })), t.push.apply(t, o);
41
+ }
42
+ return t;
43
+ }
44
+ function _objectSpread2(e) {
45
+ for (var r = 1; r < arguments.length; r++) {
46
+ var t = null != arguments[r] ? arguments[r] : {};
47
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
48
+ _defineProperty(e, r, t[r]);
49
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
50
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
51
+ });
52
+ }
53
+ return e;
54
+ }
55
+ function _regeneratorRuntime() {
56
+ _regeneratorRuntime = function () {
57
+ return e;
58
+ };
59
+ var t,
60
+ e = {},
61
+ r = Object.prototype,
62
+ n = r.hasOwnProperty,
63
+ o = Object.defineProperty || function (t, e, r) {
64
+ t[e] = r.value;
65
+ },
66
+ i = "function" == typeof Symbol ? Symbol : {},
67
+ a = i.iterator || "@@iterator",
68
+ c = i.asyncIterator || "@@asyncIterator",
69
+ u = i.toStringTag || "@@toStringTag";
70
+ function define(t, e, r) {
71
+ return Object.defineProperty(t, e, {
72
+ value: r,
73
+ enumerable: !0,
74
+ configurable: !0,
75
+ writable: !0
76
+ }), t[e];
77
+ }
78
+ try {
79
+ define({}, "");
80
+ } catch (t) {
81
+ define = function (t, e, r) {
82
+ return t[e] = r;
83
+ };
84
+ }
85
+ function wrap(t, e, r, n) {
86
+ var i = e && e.prototype instanceof Generator ? e : Generator,
87
+ a = Object.create(i.prototype),
88
+ c = new Context(n || []);
89
+ return o(a, "_invoke", {
90
+ value: makeInvokeMethod(t, r, c)
91
+ }), a;
92
+ }
93
+ function tryCatch(t, e, r) {
94
+ try {
95
+ return {
96
+ type: "normal",
97
+ arg: t.call(e, r)
98
+ };
99
+ } catch (t) {
100
+ return {
101
+ type: "throw",
102
+ arg: t
103
+ };
104
+ }
105
+ }
106
+ e.wrap = wrap;
107
+ var h = "suspendedStart",
108
+ l = "suspendedYield",
109
+ f = "executing",
110
+ s = "completed",
111
+ y = {};
112
+ function Generator() {}
113
+ function GeneratorFunction() {}
114
+ function GeneratorFunctionPrototype() {}
115
+ var p = {};
116
+ define(p, a, function () {
117
+ return this;
118
+ });
119
+ var d = Object.getPrototypeOf,
120
+ v = d && d(d(values([])));
121
+ v && v !== r && n.call(v, a) && (p = v);
122
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
123
+ function defineIteratorMethods(t) {
124
+ ["next", "throw", "return"].forEach(function (e) {
125
+ define(t, e, function (t) {
126
+ return this._invoke(e, t);
127
+ });
128
+ });
129
+ }
130
+ function AsyncIterator(t, e) {
131
+ function invoke(r, o, i, a) {
132
+ var c = tryCatch(t[r], t, o);
133
+ if ("throw" !== c.type) {
134
+ var u = c.arg,
135
+ h = u.value;
136
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
137
+ invoke("next", t, i, a);
138
+ }, function (t) {
139
+ invoke("throw", t, i, a);
140
+ }) : e.resolve(h).then(function (t) {
141
+ u.value = t, i(u);
142
+ }, function (t) {
143
+ return invoke("throw", t, i, a);
144
+ });
145
+ }
146
+ a(c.arg);
147
+ }
148
+ var r;
149
+ o(this, "_invoke", {
150
+ value: function (t, n) {
151
+ function callInvokeWithMethodAndArg() {
152
+ return new e(function (e, r) {
153
+ invoke(t, n, e, r);
154
+ });
155
+ }
156
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
157
+ }
158
+ });
159
+ }
160
+ function makeInvokeMethod(e, r, n) {
161
+ var o = h;
162
+ return function (i, a) {
163
+ if (o === f) throw Error("Generator is already running");
164
+ if (o === s) {
165
+ if ("throw" === i) throw a;
166
+ return {
167
+ value: t,
168
+ done: !0
169
+ };
170
+ }
171
+ for (n.method = i, n.arg = a;;) {
172
+ var c = n.delegate;
173
+ if (c) {
174
+ var u = maybeInvokeDelegate(c, n);
175
+ if (u) {
176
+ if (u === y) continue;
177
+ return u;
178
+ }
179
+ }
180
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
181
+ if (o === h) throw o = s, n.arg;
182
+ n.dispatchException(n.arg);
183
+ } else "return" === n.method && n.abrupt("return", n.arg);
184
+ o = f;
185
+ var p = tryCatch(e, r, n);
186
+ if ("normal" === p.type) {
187
+ if (o = n.done ? s : l, p.arg === y) continue;
188
+ return {
189
+ value: p.arg,
190
+ done: n.done
191
+ };
192
+ }
193
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
194
+ }
195
+ };
196
+ }
197
+ function maybeInvokeDelegate(e, r) {
198
+ var n = r.method,
199
+ o = e.iterator[n];
200
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
201
+ var i = tryCatch(o, e.iterator, r.arg);
202
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
203
+ var a = i.arg;
204
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
205
+ }
206
+ function pushTryEntry(t) {
207
+ var e = {
208
+ tryLoc: t[0]
209
+ };
210
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
211
+ }
212
+ function resetTryEntry(t) {
213
+ var e = t.completion || {};
214
+ e.type = "normal", delete e.arg, t.completion = e;
215
+ }
216
+ function Context(t) {
217
+ this.tryEntries = [{
218
+ tryLoc: "root"
219
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
220
+ }
221
+ function values(e) {
222
+ if (e || "" === e) {
223
+ var r = e[a];
224
+ if (r) return r.call(e);
225
+ if ("function" == typeof e.next) return e;
226
+ if (!isNaN(e.length)) {
227
+ var o = -1,
228
+ i = function next() {
229
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
230
+ return next.value = t, next.done = !0, next;
231
+ };
232
+ return i.next = i;
233
+ }
234
+ }
235
+ throw new TypeError(typeof e + " is not iterable");
236
+ }
237
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
238
+ value: GeneratorFunctionPrototype,
239
+ configurable: !0
240
+ }), o(GeneratorFunctionPrototype, "constructor", {
241
+ value: GeneratorFunction,
242
+ configurable: !0
243
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
244
+ var e = "function" == typeof t && t.constructor;
245
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
246
+ }, e.mark = function (t) {
247
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
248
+ }, e.awrap = function (t) {
249
+ return {
250
+ __await: t
251
+ };
252
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
253
+ return this;
254
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
255
+ void 0 === i && (i = Promise);
256
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
257
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
258
+ return t.done ? t.value : a.next();
259
+ });
260
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
261
+ return this;
262
+ }), define(g, "toString", function () {
263
+ return "[object Generator]";
264
+ }), e.keys = function (t) {
265
+ var e = Object(t),
266
+ r = [];
267
+ for (var n in e) r.push(n);
268
+ return r.reverse(), function next() {
269
+ for (; r.length;) {
270
+ var t = r.pop();
271
+ if (t in e) return next.value = t, next.done = !1, next;
272
+ }
273
+ return next.done = !0, next;
274
+ };
275
+ }, e.values = values, Context.prototype = {
276
+ constructor: Context,
277
+ reset: function (e) {
278
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
279
+ },
280
+ stop: function () {
281
+ this.done = !0;
282
+ var t = this.tryEntries[0].completion;
283
+ if ("throw" === t.type) throw t.arg;
284
+ return this.rval;
285
+ },
286
+ dispatchException: function (e) {
287
+ if (this.done) throw e;
288
+ var r = this;
289
+ function handle(n, o) {
290
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
291
+ }
292
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
293
+ var i = this.tryEntries[o],
294
+ a = i.completion;
295
+ if ("root" === i.tryLoc) return handle("end");
296
+ if (i.tryLoc <= this.prev) {
297
+ var c = n.call(i, "catchLoc"),
298
+ u = n.call(i, "finallyLoc");
299
+ if (c && u) {
300
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
301
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
302
+ } else if (c) {
303
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
304
+ } else {
305
+ if (!u) throw Error("try statement without catch or finally");
306
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
307
+ }
308
+ }
309
+ }
310
+ },
311
+ abrupt: function (t, e) {
312
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
313
+ var o = this.tryEntries[r];
314
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
315
+ var i = o;
316
+ break;
317
+ }
318
+ }
319
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
320
+ var a = i ? i.completion : {};
321
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
322
+ },
323
+ complete: function (t, e) {
324
+ if ("throw" === t.type) throw t.arg;
325
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
326
+ },
327
+ finish: function (t) {
328
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
329
+ var r = this.tryEntries[e];
330
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
331
+ }
332
+ },
333
+ catch: function (t) {
334
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
335
+ var r = this.tryEntries[e];
336
+ if (r.tryLoc === t) {
337
+ var n = r.completion;
338
+ if ("throw" === n.type) {
339
+ var o = n.arg;
340
+ resetTryEntry(r);
341
+ }
342
+ return o;
343
+ }
344
+ }
345
+ throw Error("illegal catch attempt");
346
+ },
347
+ delegateYield: function (e, r, n) {
348
+ return this.delegate = {
349
+ iterator: values(e),
350
+ resultName: r,
351
+ nextLoc: n
352
+ }, "next" === this.method && (this.arg = t), y;
353
+ }
354
+ }, e;
355
+ }
356
+ function _toPrimitive(t, r) {
357
+ if ("object" != typeof t || !t) return t;
358
+ var e = t[Symbol.toPrimitive];
359
+ if (void 0 !== e) {
360
+ var i = e.call(t, r || "default");
361
+ if ("object" != typeof i) return i;
362
+ throw new TypeError("@@toPrimitive must return a primitive value.");
363
+ }
364
+ return ("string" === r ? String : Number)(t);
365
+ }
366
+ function _toPropertyKey(t) {
367
+ var i = _toPrimitive(t, "string");
368
+ return "symbol" == typeof i ? i : i + "";
369
+ }
370
+
371
+ export { _asyncToGenerator as asyncToGenerator, _defineProperty as defineProperty, _objectSpread2 as objectSpread2, _regeneratorRuntime as regeneratorRuntime, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey };
372
+ //# sourceMappingURL=_rollupPluginBabelHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,189 @@
1
+ import { asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { getClientAuthKey } from '../clientToken.js';
3
+
4
+ var baseURL = "https://api.myhirecontrol.com";
5
+ var memoryStorage = {
6
+ authToken: null,
7
+ tokenExpiration: null
8
+ };
9
+ function setStorage(key, value) {
10
+ try {
11
+ sessionStorage.setItem(key, value);
12
+ } catch (error) {
13
+ memoryStorage[key] = value;
14
+ }
15
+ }
16
+ function getStorage(key) {
17
+ try {
18
+ return sessionStorage.getItem(key) || memoryStorage[key];
19
+ } catch (error) {
20
+ return memoryStorage[key];
21
+ }
22
+ }
23
+ var login = /*#__PURE__*/function () {
24
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
25
+ var clientAuthKey, response, data;
26
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
27
+ while (1) switch (_context.prev = _context.next) {
28
+ case 0:
29
+ clientAuthKey = getClientAuthKey();
30
+ _context.prev = 1;
31
+ _context.next = 4;
32
+ return fetch("".concat(baseURL, "/auth/login"), {
33
+ method: 'POST',
34
+ headers: {
35
+ 'Content-Type': 'application/json'
36
+ },
37
+ body: JSON.stringify({
38
+ clientAuthKey: clientAuthKey
39
+ })
40
+ });
41
+ case 4:
42
+ response = _context.sent;
43
+ _context.next = 7;
44
+ return response.json();
45
+ case 7:
46
+ data = _context.sent;
47
+ if (!(data.token && data.expiration)) {
48
+ _context.next = 12;
49
+ break;
50
+ }
51
+ setStorage('authToken', data.token);
52
+ setStorage('tokenExpiration', data.expiration);
53
+ return _context.abrupt("return", {
54
+ token: data.token,
55
+ expiration: data.expiration
56
+ });
57
+ case 12:
58
+ _context.next = 18;
59
+ break;
60
+ case 14:
61
+ _context.prev = 14;
62
+ _context.t0 = _context["catch"](1);
63
+ console.error('Login failed:', _context.t0);
64
+ throw _context.t0;
65
+ case 18:
66
+ case "end":
67
+ return _context.stop();
68
+ }
69
+ }, _callee, null, [[1, 14]]);
70
+ }));
71
+ return function login() {
72
+ return _ref.apply(this, arguments);
73
+ };
74
+ }();
75
+ var fetchWithAuth = /*#__PURE__*/function () {
76
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(url) {
77
+ var options,
78
+ token,
79
+ expirationDateTime,
80
+ currentTime,
81
+ authResponse,
82
+ headers,
83
+ finalOptions,
84
+ response,
85
+ _args2 = arguments;
86
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
87
+ while (1) switch (_context2.prev = _context2.next) {
88
+ case 0:
89
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
90
+ token = getStorage('authToken');
91
+ expirationDateTime = getStorage('tokenExpiration');
92
+ currentTime = new Date();
93
+ if (!(!token || !expirationDateTime || new Date(expirationDateTime) <= currentTime)) {
94
+ _context2.next = 9;
95
+ break;
96
+ }
97
+ _context2.next = 7;
98
+ return login();
99
+ case 7:
100
+ authResponse = _context2.sent;
101
+ token = authResponse.token;
102
+ case 9:
103
+ headers = new Headers(options.headers || {});
104
+ headers.append('Authorization', "Bearer ".concat(token));
105
+ finalOptions = _objectSpread2(_objectSpread2({}, options), {}, {
106
+ headers: headers
107
+ });
108
+ _context2.next = 14;
109
+ return fetch("".concat(baseURL).concat(url), finalOptions);
110
+ case 14:
111
+ response = _context2.sent;
112
+ if (response.ok) {
113
+ _context2.next = 17;
114
+ break;
115
+ }
116
+ throw new Error('Network response was not ok.');
117
+ case 17:
118
+ return _context2.abrupt("return", response);
119
+ case 18:
120
+ case "end":
121
+ return _context2.stop();
122
+ }
123
+ }, _callee2);
124
+ }));
125
+ return function fetchWithAuth(_x) {
126
+ return _ref2.apply(this, arguments);
127
+ };
128
+ }();
129
+ var api = {
130
+ get: function () {
131
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url) {
132
+ var response;
133
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
134
+ while (1) switch (_context3.prev = _context3.next) {
135
+ case 0:
136
+ _context3.next = 2;
137
+ return fetchWithAuth(url);
138
+ case 2:
139
+ response = _context3.sent;
140
+ _context3.next = 5;
141
+ return response.json();
142
+ case 5:
143
+ return _context3.abrupt("return", _context3.sent);
144
+ case 6:
145
+ case "end":
146
+ return _context3.stop();
147
+ }
148
+ }, _callee3);
149
+ }));
150
+ function get(_x2) {
151
+ return _get.apply(this, arguments);
152
+ }
153
+ return get;
154
+ }(),
155
+ post: function () {
156
+ var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(url, data) {
157
+ var response;
158
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
159
+ while (1) switch (_context4.prev = _context4.next) {
160
+ case 0:
161
+ _context4.next = 2;
162
+ return fetchWithAuth(url, {
163
+ method: 'POST',
164
+ headers: {
165
+ 'Content-Type': 'application/json'
166
+ },
167
+ body: JSON.stringify(data)
168
+ });
169
+ case 2:
170
+ response = _context4.sent;
171
+ _context4.next = 5;
172
+ return response.json();
173
+ case 5:
174
+ return _context4.abrupt("return", _context4.sent);
175
+ case 6:
176
+ case "end":
177
+ return _context4.stop();
178
+ }
179
+ }, _callee4);
180
+ }));
181
+ function post(_x3, _x4) {
182
+ return _post.apply(this, arguments);
183
+ }
184
+ return post;
185
+ }()
186
+ };
187
+
188
+ export { api as default };
189
+ //# sourceMappingURL=hcApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hcApi.js","sources":["../../../src/apis/hcApi.js"],"sourcesContent":["import { getClientAuthKey } from '~/clientToken.js';\nconst baseURL = process.env.HC_API_BASE_URL;\n\nconst memoryStorage = {\n\tauthToken: null,\n\ttokenExpiration: null\n};\n\nfunction setStorage(key, value) {\n\ttry {\n\t\tsessionStorage.setItem(key, value);\n\t} catch (error) {\n\t\tmemoryStorage[key] = value;\n\t}\n}\n\nfunction getStorage(key) {\n\ttry {\n\t\treturn sessionStorage.getItem(key) || memoryStorage[key];\n\t} catch (error) {\n\t\treturn memoryStorage[key];\n\t}\n}\n\nconst login = async () => {\n\tconst clientAuthKey = getClientAuthKey();\n\n\ttry {\n\t\tconst response = await fetch(`${baseURL}/auth/login`, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json'\n\t\t\t},\n\t\t\tbody: JSON.stringify({\n\t\t\t\tclientAuthKey: clientAuthKey\n\t\t\t})\n\t\t});\n\n\t\tconst data = await response.json();\n\n\t\tif (data.token && data.expiration) {\n\t\t\tsetStorage('authToken', data.token);\n\t\t\tsetStorage('tokenExpiration', data.expiration);\n\t\t\treturn { token: data.token, expiration: data.expiration };\n\t\t}\n\t} catch (error) {\n\t\tconsole.error('Login failed:', error);\n\t\tthrow error;\n\t}\n};\n\nconst fetchWithAuth = async (url, options = {}) => {\n\tlet token = getStorage('authToken');\n\n\tconst expirationDateTime = getStorage('tokenExpiration');\n\tconst currentTime = new Date();\n\n\tif (!token || !expirationDateTime || new Date(expirationDateTime) <= currentTime) {\n\t\tconst authResponse = await login();\n\t\ttoken = authResponse.token;\n\t}\n\n\tconst headers = new Headers(options.headers || {});\n\theaders.append('Authorization', `Bearer ${token}`);\n\n\tconst finalOptions = {\n\t\t...options,\n\t\theaders\n\t};\n\n\tconst response = await fetch(`${baseURL}${url}`, finalOptions);\n\n\tif (!response.ok) throw new Error('Network response was not ok.');\n\n\treturn response;\n};\n\nexport default {\n\tget: async (url) => {\n\t\tconst response = await fetchWithAuth(url);\n\t\treturn await response.json();\n\t},\n\tpost: async (url, data) => {\n\t\tconst response = await fetchWithAuth(url, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json'\n\t\t\t},\n\t\t\tbody: JSON.stringify(data)\n\t\t});\n\t\treturn await response.json();\n\t}\n};\n"],"names":["baseURL","memoryStorage","authToken","tokenExpiration","setStorage","key","value","sessionStorage","setItem","error","getStorage","getItem","login","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","clientAuthKey","response","data","wrap","_callee$","_context","prev","next","getClientAuthKey","fetch","concat","method","headers","body","JSON","stringify","sent","json","token","expiration","abrupt","t0","console","stop","apply","arguments","fetchWithAuth","_ref2","_callee2","url","options","expirationDateTime","currentTime","authResponse","finalOptions","_args2","_callee2$","_context2","length","undefined","Date","Headers","append","_objectSpread","ok","Error","_x","get","_get","_callee3","_callee3$","_context3","_x2","post","_post","_callee4","_callee4$","_context4","_x3","_x4"],"mappings":";;;AACA,IAAMA,OAAO,GAAG,+BAA2B,CAAA;AAE3C,IAAMC,aAAa,GAAG;AACrBC,EAAAA,SAAS,EAAE,IAAI;AACfC,EAAAA,eAAe,EAAE,IAAA;AAClB,CAAC,CAAA;AAED,SAASC,UAAUA,CAACC,GAAG,EAAEC,KAAK,EAAE;EAC/B,IAAI;AACHC,IAAAA,cAAc,CAACC,OAAO,CAACH,GAAG,EAAEC,KAAK,CAAC,CAAA;GAClC,CAAC,OAAOG,KAAK,EAAE;AACfR,IAAAA,aAAa,CAACI,GAAG,CAAC,GAAGC,KAAK,CAAA;AAC3B,GAAA;AACD,CAAA;AAEA,SAASI,UAAUA,CAACL,GAAG,EAAE;EACxB,IAAI;IACH,OAAOE,cAAc,CAACI,OAAO,CAACN,GAAG,CAAC,IAAIJ,aAAa,CAACI,GAAG,CAAC,CAAA;GACxD,CAAC,OAAOI,KAAK,EAAE;IACf,OAAOR,aAAa,CAACI,GAAG,CAAC,CAAA;AAC1B,GAAA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,EAAA;AAAA,QAAA,OAAA,CAAA,EAAA,QAAAA,SAAA,CAAAnD,IAAA,GAAAmD,SAAA,CAAAlD,IAAA;AAAA,UAAA,KAAA,CAAA;AAAAkD,YAAAA,SAAA,CAAAlD,IAAA,GAAA,CAAA,CAAA;YAAA,OACEmB,aAAa,CAACG,GAAG,EAAE;AACzClB,cAAAA,MAAM,EAAE,MAAM;AACdC,cAAAA,OAAO,EAAE;AACR,gBAAA,cAAc,EAAE,kBAAA;eAChB;AACDC,cAAAA,IAAI,EAAEC,IAAI,CAACC,SAAS,CAACb,IAAI,CAAA;AAC1B,aAAC,CAAC,CAAA;AAAA,UAAA,KAAA,CAAA;YANID,QAAQ,GAAAwD,SAAA,CAAAzC,IAAA,CAAA;AAAAyC,YAAAA,SAAA,CAAAlD,IAAA,GAAA,CAAA,CAAA;AAAA,YAAA,OAODN,QAAQ,CAACgB,IAAI,EAAE,CAAA;AAAA,UAAA,KAAA,CAAA;AAAA,YAAA,OAAAwC,SAAA,CAAArC,MAAA,CAAAqC,QAAAA,EAAAA,SAAA,CAAAzC,IAAA,CAAA,CAAA;AAAA,UAAA,KAAA,CAAA,CAAA;AAAA,UAAA,KAAA,KAAA;YAAA,OAAAyC,SAAA,CAAAlC,IAAA,EAAA,CAAA;AAAA,SAAA;AAAA,OAAA,EAAAgC,QAAA,CAAA,CAAA;KAC5B,CAAA,CAAA,CAAA;IAAA,SAAAF,IAAAA,CAAAK,GAAA,EAAAC,GAAA,EAAA;AAAA,MAAA,OAAAL,KAAA,CAAA9B,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA,KAAA;AAAA,IAAA,OAAA4B,IAAA,CAAA;AAAA,GAAA,EAAA;AACF,CAAC;;;;"}
@@ -0,0 +1,7 @@
1
+ var clientAuthKey = null;
2
+ var getClientAuthKey = function getClientAuthKey() {
3
+ return clientAuthKey;
4
+ };
5
+
6
+ export { getClientAuthKey };
7
+ //# sourceMappingURL=clientToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientToken.js","sources":["../../src/clientToken.js"],"sourcesContent":["let clientAuthKey = null;\n\nexport const setClientAuthKey = (key) => {\n clientAuthKey = key;\n};\n\nexport const getClientAuthKey = () => {\n return clientAuthKey;\n};\n"],"names":["clientAuthKey","getClientAuthKey"],"mappings":"AAAA,IAAIA,aAAa,GAAG,IAAI,CAAA;IAMXC,gBAAgB,GAAG,SAAnBA,gBAAgBA,GAAS;AACpC,EAAA,OAAOD,aAAa,CAAA;AACtB;;;;"}
@@ -0,0 +1,33 @@
1
+ import { asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../_virtual/_rollupPluginBabelHelpers.js';
2
+ import api from '../apis/hcApi.js';
3
+
4
+ var getMapConfig = /*#__PURE__*/function () {
5
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6
+ var response;
7
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
8
+ while (1) switch (_context.prev = _context.next) {
9
+ case 0:
10
+ _context.prev = 0;
11
+ _context.next = 3;
12
+ return api.get("/MapConfig");
13
+ case 3:
14
+ response = _context.sent;
15
+ return _context.abrupt("return", response);
16
+ case 7:
17
+ _context.prev = 7;
18
+ _context.t0 = _context["catch"](0);
19
+ console.error("Error retrieving map configuration:", _context.t0);
20
+ throw _context.t0;
21
+ case 11:
22
+ case "end":
23
+ return _context.stop();
24
+ }
25
+ }, _callee, null, [[0, 7]]);
26
+ }));
27
+ return function getMapConfig() {
28
+ return _ref.apply(this, arguments);
29
+ };
30
+ }();
31
+
32
+ export { getMapConfig };
33
+ //# sourceMappingURL=configService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configService.js","sources":["../../src/services/configService.js"],"sourcesContent":["import api from '~/apis/hcApi';\n\nexport const getMapConfig = async () => {\n\n\ttry {\n\t\tconst response = await api.get(`/MapConfig`);\n\t\treturn response;\n\t} catch (error) {\n\t\tconsole.error(\"Error retrieving map configuration:\", error);\n\t\tthrow error;\n\t}\n};\n\nexport default {\n\tgetMapConfig\n};\n"],"names":["getMapConfig","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","wrap","_callee$","_context","prev","next","api","get","sent","abrupt","t0","console","error","stop","apply","arguments"],"mappings":";;;IAEaA,YAAY,gBAAA,YAAA;EAAA,IAAAC,IAAA,GAAAC,iBAAA,eAAAC,mBAAA,EAAAC,CAAAA,IAAA,CAAG,SAAAC,OAAA,GAAA;AAAA,IAAA,IAAAC,QAAA,CAAA;AAAA,IAAA,OAAAH,mBAAA,EAAA,CAAAI,IAAA,CAAA,SAAAC,SAAAC,QAAA,EAAA;AAAA,MAAA,OAAA,CAAA,EAAA,QAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;AAAA,QAAA,KAAA,CAAA;AAAAF,UAAAA,QAAA,CAAAC,IAAA,GAAA,CAAA,CAAA;AAAAD,UAAAA,QAAA,CAAAE,IAAA,GAAA,CAAA,CAAA;AAAA,UAAA,OAGHC,GAAG,CAACC,GAAG,CAAA,YAAa,CAAC,CAAA;AAAA,QAAA,KAAA,CAAA;UAAtCP,QAAQ,GAAAG,QAAA,CAAAK,IAAA,CAAA;AAAA,UAAA,OAAAL,QAAA,CAAAM,MAAA,CAAA,QAAA,EACPT,QAAQ,CAAA,CAAA;AAAA,QAAA,KAAA,CAAA;AAAAG,UAAAA,QAAA,CAAAC,IAAA,GAAA,CAAA,CAAA;UAAAD,QAAA,CAAAO,EAAA,GAAAP,QAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA;UAEfQ,OAAO,CAACC,KAAK,CAAC,qCAAqC,EAAAT,QAAA,CAAAO,EAAO,CAAC,CAAA;UAAC,MAAAP,QAAA,CAAAO,EAAA,CAAA;AAAA,QAAA,KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAP,QAAA,CAAAU,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAd,OAAA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