@bigbinary/neeto-github-frontend 1.0.7 → 1.0.9

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.
package/dist/index.cjs.js CHANGED
@@ -3,186 +3,627 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var neetoCist = require('@bigbinary/neeto-cist');
7
- var neetoui = require('@bigbinary/neetoui');
8
- var reactI18next = require('react-i18next');
9
- var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
10
- var require$$0 = require('util');
11
6
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
12
7
  var neetoIcons = require('@bigbinary/neeto-icons');
8
+ var neetoui = require('@bigbinary/neetoui');
13
9
  var misc = require('@bigbinary/neeto-icons/misc');
14
10
  var classNames = require('classnames');
11
+ var neetoCist = require('@bigbinary/neeto-cist');
15
12
  var Search = require('@bigbinary/neeto-molecules/Search');
13
+ var reactI18next = require('react-i18next');
16
14
  var Scrollable = require('@bigbinary/neeto-molecules/Scrollable');
17
15
  var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
16
+ var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
17
+ var require$$0 = require('util');
18
18
 
19
19
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
20
 
21
21
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
22
- var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
23
22
  var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
24
23
  var Search__default = /*#__PURE__*/_interopDefaultLegacy(Search);
25
24
  var Scrollable__default = /*#__PURE__*/_interopDefaultLegacy(Scrollable);
26
25
  var DateFormat__default = /*#__PURE__*/_interopDefaultLegacy(DateFormat);
26
+ var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
27
27
 
28
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
29
-
30
- /* eslint complexity: [2, 18], max-statements: [2, 33] */
31
- var shams = function hasSymbols() {
32
- if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
33
- if (typeof Symbol.iterator === 'symbol') { return true; }
34
-
35
- var obj = {};
36
- var sym = Symbol('test');
37
- var symObj = Object(sym);
38
- if (typeof sym === 'string') { return false; }
39
-
40
- if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
41
- if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
42
-
43
- // temp disabled per https://github.com/ljharb/object.assign/issues/17
44
- // if (sym instanceof Symbol) { return false; }
45
- // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
46
- // if (!(symObj instanceof Symbol)) { return false; }
47
-
48
- // if (typeof Symbol.prototype.toString !== 'function') { return false; }
49
- // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
50
-
51
- var symVal = 42;
52
- obj[sym] = symVal;
53
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
54
- if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
55
-
56
- if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
57
-
58
- var syms = Object.getOwnPropertySymbols(obj);
59
- if (syms.length !== 1 || syms[0] !== sym) { return false; }
60
-
61
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
62
-
63
- if (typeof Object.getOwnPropertyDescriptor === 'function') {
64
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
65
- if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
66
- }
67
-
68
- return true;
69
- };
70
-
71
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
72
- var hasSymbolSham = shams;
73
-
74
- var hasSymbols$1 = function hasNativeSymbols() {
75
- if (typeof origSymbol !== 'function') { return false; }
76
- if (typeof Symbol !== 'function') { return false; }
77
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
78
- if (typeof Symbol('bar') !== 'symbol') { return false; }
79
-
80
- return hasSymbolSham();
81
- };
28
+ var Configure = reactUtils.withT(function (_ref) {
29
+ var t = _ref.t,
30
+ isConnected = _ref.isConnected,
31
+ installationUrl = _ref.installationUrl;
32
+ return /*#__PURE__*/React__default["default"].createElement("div", {
33
+ className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
34
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
35
+ className: "mt-1 text-indigo-600 xl:mt-3",
36
+ href: installationUrl,
37
+ icon: isConnected ? neetoIcons.Settings : neetoIcons.Plus,
38
+ iconPosition: "left",
39
+ iconSize: 20,
40
+ size: "small",
41
+ style: "text"
42
+ }, isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")));
43
+ });
82
44
 
83
- var test = {
84
- foo: {}
85
- };
45
+ var Header = reactUtils.withT(function (_ref) {
46
+ var t = _ref.t;
47
+ return /*#__PURE__*/React__default["default"].createElement("div", {
48
+ className: "neeto-ui-text-gray-800 mb-1 flex w-full flex-row items-center space-x-2 font-sans text-lg font-medium leading-6 antialiased"
49
+ }, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
50
+ size: 16
51
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
52
+ style: "h4"
53
+ }, t("neetoGithub.github")));
54
+ });
86
55
 
87
- var $Object = Object;
56
+ var List$1 = reactUtils.withT(function (_ref) {
57
+ var t = _ref.t,
58
+ accounts = _ref.accounts;
59
+ return accounts.map(function (_ref2) {
60
+ var id = _ref2.id,
61
+ name = _ref2.name,
62
+ avatarUrl = _ref2.avatarUrl,
63
+ type = _ref2.type,
64
+ profileUrl = _ref2.profileUrl,
65
+ count = _ref2.count;
66
+ return /*#__PURE__*/React__default["default"].createElement("div", {
67
+ className: "neeto-ui-border-gray-300 flex w-full items-center space-x-2 border-b border-l-0 border-r-0 border-t-0 border-solid p-2",
68
+ key: id
69
+ }, type === "Organization" ? /*#__PURE__*/React__default["default"].createElement(neetoIcons.Building, {
70
+ className: "neeto-ui-text-gray-600",
71
+ size: 16
72
+ }) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.User, {
73
+ className: "neeto-ui-text-gray-600",
74
+ size: 16
75
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
76
+ className: "neeto-ui-text-gray-900",
77
+ style: "body2"
78
+ }, "@", name), /*#__PURE__*/React__default["default"].createElement("img", {
79
+ alt: name,
80
+ className: "neeto-ui-rounded-full h-4 w-4",
81
+ src: avatarUrl
82
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
83
+ className: "text-indigo-600",
84
+ icon: neetoIcons.CannedResponses,
85
+ iconPosition: "left",
86
+ iconSize: 16,
87
+ size: "small",
88
+ style: "text",
89
+ onClick: function onClick() {
90
+ return window.open(profileUrl, "_blank");
91
+ }
92
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
93
+ className: "neeto-ui-text-gray-900 mx-2 text-sm",
94
+ component: "span",
95
+ style: "h3"
96
+ }, "\u2022"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
97
+ style: "body2"
98
+ }, t("neetoGithub.countOf.repos", {
99
+ count: count
100
+ })));
101
+ });
102
+ });
88
103
 
89
- var hasProto$1 = function hasProto() {
90
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
104
+ var Accounts = function Accounts(_ref) {
105
+ var isPane = _ref.isPane,
106
+ accounts = _ref.accounts,
107
+ isConnected = _ref.isConnected,
108
+ onConnect = _ref.onConnect,
109
+ installationUrl = _ref.installationUrl;
110
+ return /*#__PURE__*/React__default["default"].createElement("div", {
111
+ className: classNames__default["default"]("flex w-full flex-col border border-solid border-transparent px-0 py-2", {
112
+ "2xl:max-w-sm 2xl:px-8": isPane,
113
+ "xl:max-w-sm xl:px-8": !isPane
114
+ })
115
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
116
+ className: "mb-2"
117
+ }, /*#__PURE__*/React__default["default"].createElement(Header, null), /*#__PURE__*/React__default["default"].createElement(List$1, {
118
+ accounts: accounts,
119
+ isConnected: isConnected
120
+ }), /*#__PURE__*/React__default["default"].createElement(Configure, {
121
+ installationUrl: installationUrl,
122
+ isConnected: isConnected,
123
+ onConnect: onConnect
124
+ })));
91
125
  };
92
126
 
93
- /* eslint no-invalid-this: 1 */
127
+ function _arrayWithHoles(arr) {
128
+ if (Array.isArray(arr)) return arr;
129
+ }
94
130
 
95
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
96
- var toStr$1 = Object.prototype.toString;
97
- var max = Math.max;
98
- var funcType = '[object Function]';
131
+ function _iterableToArrayLimit(r, l) {
132
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
133
+ if (null != t) {
134
+ var e,
135
+ n,
136
+ i,
137
+ u,
138
+ a = [],
139
+ f = !0,
140
+ o = !1;
141
+ try {
142
+ if (i = (t = t.call(r)).next, 0 === l) {
143
+ if (Object(t) !== t) return;
144
+ f = !1;
145
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
146
+ } catch (r) {
147
+ o = !0, n = r;
148
+ } finally {
149
+ try {
150
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
151
+ } finally {
152
+ if (o) throw n;
153
+ }
154
+ }
155
+ return a;
156
+ }
157
+ }
99
158
 
100
- var concatty = function concatty(a, b) {
101
- var arr = [];
159
+ function _arrayLikeToArray(arr, len) {
160
+ if (len == null || len > arr.length) len = arr.length;
161
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
162
+ return arr2;
163
+ }
102
164
 
103
- for (var i = 0; i < a.length; i += 1) {
104
- arr[i] = a[i];
105
- }
106
- for (var j = 0; j < b.length; j += 1) {
107
- arr[j + a.length] = b[j];
108
- }
165
+ function _unsupportedIterableToArray(o, minLen) {
166
+ if (!o) return;
167
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
168
+ var n = Object.prototype.toString.call(o).slice(8, -1);
169
+ if (n === "Object" && o.constructor) n = o.constructor.name;
170
+ if (n === "Map" || n === "Set") return Array.from(o);
171
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
172
+ }
109
173
 
110
- return arr;
111
- };
174
+ function _nonIterableRest() {
175
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
176
+ }
112
177
 
113
- var slicy = function slicy(arrLike, offset) {
114
- var arr = [];
115
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
116
- arr[j] = arrLike[i];
117
- }
118
- return arr;
119
- };
178
+ function _slicedToArray(arr, i) {
179
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
180
+ }
120
181
 
121
- var joiny = function (arr, joiner) {
122
- var str = '';
123
- for (var i = 0; i < arr.length; i += 1) {
124
- str += arr[i];
125
- if (i + 1 < arr.length) {
126
- str += joiner;
127
- }
182
+ var NoRepositories = reactUtils.withT(function (_ref) {
183
+ var t = _ref.t,
184
+ installationUrl = _ref.installationUrl,
185
+ troubleshootUrl = _ref.troubleshootUrl;
186
+ return /*#__PURE__*/React__default["default"].createElement("div", {
187
+ className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
188
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
189
+ style: "body2"
190
+ }, t("neetoGithub.noReposDescription")), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
191
+ href: installationUrl,
192
+ icon: misc.Github,
193
+ iconPosition: "left",
194
+ label: t("neetoGithub.connectRepository"),
195
+ size: "medium",
196
+ style: "primary"
197
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
198
+ className: "text-xs"
199
+ }, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
200
+ i18nKey: "troubleshoot",
201
+ components: {
202
+ troubleshootLink: /*#__PURE__*/React__default["default"].createElement("a", {
203
+ className: "text-indigo-600 underline",
204
+ href: troubleshootUrl,
205
+ rel: "noopener noreferrer",
206
+ target: "_blank"
207
+ })
128
208
  }
129
- return str;
130
- };
209
+ })));
210
+ });
131
211
 
132
- var implementation$1 = function bind(that) {
133
- var target = this;
134
- if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
135
- throw new TypeError(ERROR_MESSAGE + target);
212
+ var RepositoryTile = function RepositoryTile(_ref) {
213
+ var onConnect = _ref.onConnect,
214
+ repository = _ref.repository;
215
+ var _useTranslation = reactI18next.useTranslation(),
216
+ t = _useTranslation.t;
217
+ var id = repository.id,
218
+ fullName = repository.fullName,
219
+ isPrivate = repository.isPrivate,
220
+ updatedAt = repository.updatedAt;
221
+ return /*#__PURE__*/React__default["default"].createElement("div", {
222
+ className: "neeto-ui-border-gray-300 flex items-center justify-between border-b border-l-0 border-r-0 border-t-0 border-solid py-3 pl-5 pr-3",
223
+ key: id
224
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
225
+ className: "width-calc flex items-center space-x-2"
226
+ }, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
227
+ size: 16
228
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
229
+ style: "body2"
230
+ }, fullName), isPrivate && /*#__PURE__*/React__default["default"].createElement(neetoIcons.Lock, {
231
+ size: 16
232
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
233
+ className: "hidden md:inline-block"
234
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
235
+ className: "neeto-ui-text-gray-900 mx-2 text-sm",
236
+ component: "span",
237
+ style: "h3"
238
+ }, "\u2022"), /*#__PURE__*/React__default["default"].createElement(DateFormat__default["default"].FromNow, {
239
+ date: updatedAt
240
+ }))), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
241
+ style: "primary",
242
+ type: "button",
243
+ onClick: function onClick() {
244
+ return onConnect({
245
+ repoType: "private",
246
+ repository: repository
247
+ });
136
248
  }
137
- var args = slicy(arguments, 1);
249
+ }, t("neetoGithub.connect")));
250
+ };
138
251
 
139
- var bound;
140
- var binder = function () {
141
- if (this instanceof bound) {
142
- var result = target.apply(
143
- this,
144
- concatty(args, arguments)
145
- );
146
- if (Object(result) === result) {
147
- return result;
148
- }
149
- return this;
150
- }
151
- return target.apply(
152
- that,
153
- concatty(args, arguments)
154
- );
252
+ var List = reactUtils.withT(function (_ref) {
253
+ var t = _ref.t,
254
+ isPublicRepoAllowed = _ref.isPublicRepoAllowed,
255
+ filteredRepositories = _ref.filteredRepositories,
256
+ repositories = _ref.repositories,
257
+ onConnect = _ref.onConnect,
258
+ installationUrl = _ref.installationUrl,
259
+ troubleshootUrl = _ref.troubleshootUrl;
260
+ return /*#__PURE__*/React__default["default"].createElement("div", {
261
+ className: classNames__default["default"]("neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex flex-col items-center justify-center border border-solid p-0 2xl:h-96", {
262
+ "h-52": isPublicRepoAllowed,
263
+ "h-72": !isPublicRepoAllowed
264
+ })
265
+ }, neetoCist.isPresent(repositories) ? /*#__PURE__*/React__default["default"].createElement(Scrollable__default["default"], {
266
+ className: "m-0 h-full w-full overflow-y-scroll p-0 shadow-inner"
267
+ }, neetoCist.isPresent(filteredRepositories) ? filteredRepositories.map(function (repository) {
268
+ return /*#__PURE__*/React__default["default"].createElement(RepositoryTile, {
269
+ onConnect: onConnect,
270
+ repository: repository
271
+ });
272
+ }) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
273
+ className: "flex h-full w-full items-center justify-center",
274
+ style: "body2"
275
+ }, t("neetoGithub.noRepos"))) : /*#__PURE__*/React__default["default"].createElement(NoRepositories, {
276
+ installationUrl: installationUrl,
277
+ troubleshootUrl: troubleshootUrl
278
+ }));
279
+ });
155
280
 
156
- };
281
+ var NotConnected = reactUtils.withT(function (_ref) {
282
+ var t = _ref.t,
283
+ installationUrl = _ref.installationUrl;
284
+ return /*#__PURE__*/React__default["default"].createElement("div", {
285
+ className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
286
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
287
+ style: "body2"
288
+ }, t("neetoGithub.notConnectedDescription", {
289
+ appName: initializers.globalProps.appName
290
+ })), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
291
+ href: installationUrl,
292
+ icon: misc.Github,
293
+ iconPosition: "left",
294
+ label: t("neetoGithub.connectGithub"),
295
+ size: "medium",
296
+ style: "primary"
297
+ }));
298
+ });
157
299
 
158
- var boundLength = max(0, target.length - args.length);
159
- var boundArgs = [];
160
- for (var i = 0; i < boundLength; i++) {
161
- boundArgs[i] = '$' + i;
300
+ var Private = function Private(_ref) {
301
+ var isConnected = _ref.isConnected,
302
+ isPublicRepoAllowed = _ref.isPublicRepoAllowed,
303
+ repositories = _ref.repositories,
304
+ onConnect = _ref.onConnect,
305
+ installationUrl = _ref.installationUrl,
306
+ troubleshootUrl = _ref.troubleshootUrl;
307
+ var _useTranslation = reactI18next.useTranslation(),
308
+ t = _useTranslation.t;
309
+ var _useState = React.useState(repositories),
310
+ _useState2 = _slicedToArray(_useState, 2),
311
+ filteredRepositories = _useState2[0],
312
+ setFilteredRepositories = _useState2[1];
313
+ var onSearch = function onSearch(searchTerm) {
314
+ if (!neetoCist.isPresent(searchTerm)) {
315
+ setFilteredRepositories(repositories);
316
+ return;
162
317
  }
318
+ var filteredRepositories = repositories.filter(function (_ref2) {
319
+ var fullName = _ref2.fullName;
320
+ return fullName.toLowerCase().includes(searchTerm.toLowerCase());
321
+ });
322
+ setFilteredRepositories(filteredRepositories);
323
+ };
324
+ return /*#__PURE__*/React__default["default"].createElement("div", {
325
+ className: "connect-repo neeto-ui-rounded-md neeto-ui-border-gray-300 border border-solid px-8 py-7"
326
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
327
+ className: "mb-2 pb-5 text-lg font-medium",
328
+ style: "h2"
329
+ }, t("neetoGithub.connectARepo")), isConnected ? /*#__PURE__*/React__default["default"].createElement("div", {
330
+ className: "flex w-full flex-col space-y-6"
331
+ }, /*#__PURE__*/React__default["default"].createElement(Search__default["default"], {
332
+ onSearch: onSearch,
333
+ className: "w-full",
334
+ suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
335
+ style: "body2"
336
+ }, t("neetoGithub.countOf.repos", {
337
+ count: filteredRepositories.length
338
+ }))
339
+ }), /*#__PURE__*/React__default["default"].createElement(List, {
340
+ isPublicRepoAllowed: isPublicRepoAllowed,
341
+ filteredRepositories: filteredRepositories,
342
+ installationUrl: installationUrl,
343
+ onConnect: onConnect,
344
+ repositories: repositories,
345
+ troubleshootUrl: troubleshootUrl
346
+ })) : /*#__PURE__*/React__default["default"].createElement("div", {
347
+ className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
348
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
349
+ className: "neeto-ui-rounded-md neeto-ui-border-gray-300 m-0 flex h-[366px] flex-col items-center justify-center border border-solid p-4 shadow-inner"
350
+ }, /*#__PURE__*/React__default["default"].createElement(NotConnected, {
351
+ installationUrl: installationUrl
352
+ }))));
353
+ };
163
354
 
164
- bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
165
-
166
- if (target.prototype) {
167
- var Empty = function Empty() {};
168
- Empty.prototype = target.prototype;
169
- bound.prototype = new Empty();
170
- Empty.prototype = null;
355
+ var Public = function Public(_ref) {
356
+ var onConnect = _ref.onConnect;
357
+ var _useTranslation = reactI18next.useTranslation(),
358
+ t = _useTranslation.t;
359
+ var _useState = React.useState(""),
360
+ _useState2 = _slicedToArray(_useState, 2),
361
+ publicRepoUrl = _useState2[0],
362
+ setPublicRepoUrl = _useState2[1];
363
+ return /*#__PURE__*/React__default["default"].createElement("div", {
364
+ className: "transition-drop-shadow neeto-ui-border-gray-300 neeto-ui-rounded-md border border-solid px-8 py-7 font-sans transition-colors"
365
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
366
+ className: "mb-2 pb-5"
367
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
368
+ className: "flex justify-between"
369
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
370
+ className: "pr-4"
371
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
372
+ className: "text-lg font-medium",
373
+ style: "h2"
374
+ }, t("neetoGithub.publicGitRepo")), /*#__PURE__*/React__default["default"].createElement("div", {
375
+ className: "neeto-ui-text-gray-900 mt-2 flex max-w-xl space-x-1 font-sans text-sm font-normal leading-6 antialiased"
376
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
377
+ style: "body2"
378
+ }, t("neetoGithub.publicGitRepoDescription")))))), /*#__PURE__*/React__default["default"].createElement("div", {
379
+ className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
380
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
381
+ className: "flex"
382
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
383
+ className: "z-0 flex-1"
384
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
385
+ className: "w-full"
386
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
387
+ nakedInput: true,
388
+ autocomplete: "false",
389
+ className: "relative rounded-b rounded-l rounded-r-none rounded-t border-b border-l border-r-0 border-t border-solid px-2",
390
+ placeholder: t("neetoGithub.publicGitRepoPlaceholder"),
391
+ size: "large",
392
+ spellcheck: "false",
393
+ type: "text",
394
+ value: publicRepoUrl,
395
+ onChange: function onChange(e) {
396
+ return setPublicRepoUrl(e.target.value);
171
397
  }
172
-
173
- return bound;
398
+ }))), /*#__PURE__*/React__default["default"].createElement("div", {
399
+ className: "relative"
400
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
401
+ className: "rounded-b rounded-l-none rounded-r rounded-t",
402
+ disabled: !neetoCist.isPresent(publicRepoUrl),
403
+ size: "large",
404
+ style: "primary",
405
+ type: "button",
406
+ onClick: function onClick() {
407
+ return onConnect({
408
+ repoType: "public",
409
+ repository: {
410
+ fullName: publicRepoUrl
411
+ }
412
+ });
413
+ }
414
+ }, t("neetoGithub.continue"))))));
174
415
  };
175
416
 
176
- var implementation = implementation$1;
177
-
178
- var functionBind = Function.prototype.bind || implementation;
179
-
180
- var call = Function.prototype.call;
181
- var $hasOwn = Object.prototype.hasOwnProperty;
182
- var bind$1 = functionBind;
417
+ var Repositories = function Repositories(_ref) {
418
+ var isConnected = _ref.isConnected,
419
+ isPublicRepoAllowed = _ref.isPublicRepoAllowed,
420
+ repositories = _ref.repositories,
421
+ onConnect = _ref.onConnect,
422
+ installationUrl = _ref.installationUrl,
423
+ troubleshootUrl = _ref.troubleshootUrl;
424
+ return /*#__PURE__*/React__default["default"].createElement("div", {
425
+ className: "w-full space-y-6"
426
+ }, /*#__PURE__*/React__default["default"].createElement(Private, {
427
+ isPublicRepoAllowed: isPublicRepoAllowed,
428
+ installationUrl: installationUrl,
429
+ isConnected: isConnected,
430
+ onConnect: onConnect,
431
+ repositories: repositories,
432
+ troubleshootUrl: troubleshootUrl
433
+ }), isPublicRepoAllowed && /*#__PURE__*/React__default["default"].createElement(Public, {
434
+ onConnect: onConnect
435
+ }));
436
+ };
183
437
 
184
- /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
185
- var hasown = bind$1.call(call, $hasOwn);
438
+ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
439
+ var _ref$accounts = _ref.accounts,
440
+ accounts = _ref$accounts === void 0 ? [] : _ref$accounts,
441
+ installationUrl = _ref.installationUrl,
442
+ isConnected = _ref.isConnected,
443
+ _ref$isPublicRepoAllo = _ref.isPublicRepoAllowed,
444
+ isPublicRepoAllowed = _ref$isPublicRepoAllo === void 0 ? false : _ref$isPublicRepoAllo,
445
+ onConnect = _ref.onConnect,
446
+ _ref$repositories = _ref.repositories,
447
+ repositories = _ref$repositories === void 0 ? [] : _ref$repositories,
448
+ troubleshootUrl = _ref.troubleshootUrl,
449
+ _ref$isPane = _ref.isPane,
450
+ isPane = _ref$isPane === void 0 ? false : _ref$isPane;
451
+ return /*#__PURE__*/React__default["default"].createElement("div", {
452
+ className: "flex w-full flex-col-reverse xl:flex-row"
453
+ }, /*#__PURE__*/React__default["default"].createElement(Repositories, {
454
+ installationUrl: installationUrl,
455
+ isConnected: isConnected,
456
+ isPublicRepoAllowed: isPublicRepoAllowed,
457
+ onConnect: onConnect,
458
+ repositories: repositories,
459
+ troubleshootUrl: troubleshootUrl
460
+ }), /*#__PURE__*/React__default["default"].createElement(Accounts, {
461
+ accounts: accounts,
462
+ installationUrl: installationUrl,
463
+ isConnected: isConnected,
464
+ onConnect: onConnect,
465
+ isPane: isPane
466
+ }));
467
+ };
468
+
469
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
470
+
471
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
472
+ var shams = function hasSymbols() {
473
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
474
+ if (typeof Symbol.iterator === 'symbol') { return true; }
475
+
476
+ var obj = {};
477
+ var sym = Symbol('test');
478
+ var symObj = Object(sym);
479
+ if (typeof sym === 'string') { return false; }
480
+
481
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
482
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
483
+
484
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
485
+ // if (sym instanceof Symbol) { return false; }
486
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
487
+ // if (!(symObj instanceof Symbol)) { return false; }
488
+
489
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
490
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
491
+
492
+ var symVal = 42;
493
+ obj[sym] = symVal;
494
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
495
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
496
+
497
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
498
+
499
+ var syms = Object.getOwnPropertySymbols(obj);
500
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
501
+
502
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
503
+
504
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
505
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
506
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
507
+ }
508
+
509
+ return true;
510
+ };
511
+
512
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
513
+ var hasSymbolSham = shams;
514
+
515
+ var hasSymbols$1 = function hasNativeSymbols() {
516
+ if (typeof origSymbol !== 'function') { return false; }
517
+ if (typeof Symbol !== 'function') { return false; }
518
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
519
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
520
+
521
+ return hasSymbolSham();
522
+ };
523
+
524
+ var test = {
525
+ foo: {}
526
+ };
527
+
528
+ var $Object = Object;
529
+
530
+ var hasProto$1 = function hasProto() {
531
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
532
+ };
533
+
534
+ /* eslint no-invalid-this: 1 */
535
+
536
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
537
+ var toStr$1 = Object.prototype.toString;
538
+ var max = Math.max;
539
+ var funcType = '[object Function]';
540
+
541
+ var concatty = function concatty(a, b) {
542
+ var arr = [];
543
+
544
+ for (var i = 0; i < a.length; i += 1) {
545
+ arr[i] = a[i];
546
+ }
547
+ for (var j = 0; j < b.length; j += 1) {
548
+ arr[j + a.length] = b[j];
549
+ }
550
+
551
+ return arr;
552
+ };
553
+
554
+ var slicy = function slicy(arrLike, offset) {
555
+ var arr = [];
556
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
557
+ arr[j] = arrLike[i];
558
+ }
559
+ return arr;
560
+ };
561
+
562
+ var joiny = function (arr, joiner) {
563
+ var str = '';
564
+ for (var i = 0; i < arr.length; i += 1) {
565
+ str += arr[i];
566
+ if (i + 1 < arr.length) {
567
+ str += joiner;
568
+ }
569
+ }
570
+ return str;
571
+ };
572
+
573
+ var implementation$1 = function bind(that) {
574
+ var target = this;
575
+ if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
576
+ throw new TypeError(ERROR_MESSAGE + target);
577
+ }
578
+ var args = slicy(arguments, 1);
579
+
580
+ var bound;
581
+ var binder = function () {
582
+ if (this instanceof bound) {
583
+ var result = target.apply(
584
+ this,
585
+ concatty(args, arguments)
586
+ );
587
+ if (Object(result) === result) {
588
+ return result;
589
+ }
590
+ return this;
591
+ }
592
+ return target.apply(
593
+ that,
594
+ concatty(args, arguments)
595
+ );
596
+
597
+ };
598
+
599
+ var boundLength = max(0, target.length - args.length);
600
+ var boundArgs = [];
601
+ for (var i = 0; i < boundLength; i++) {
602
+ boundArgs[i] = '$' + i;
603
+ }
604
+
605
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
606
+
607
+ if (target.prototype) {
608
+ var Empty = function Empty() {};
609
+ Empty.prototype = target.prototype;
610
+ bound.prototype = new Empty();
611
+ Empty.prototype = null;
612
+ }
613
+
614
+ return bound;
615
+ };
616
+
617
+ var implementation = implementation$1;
618
+
619
+ var functionBind = Function.prototype.bind || implementation;
620
+
621
+ var call = Function.prototype.call;
622
+ var $hasOwn = Object.prototype.hasOwnProperty;
623
+ var bind$1 = functionBind;
624
+
625
+ /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
626
+ var hasown = bind$1.call(call, $hasOwn);
186
627
 
187
628
  var undefined$1;
188
629
 
@@ -351,2377 +792,1933 @@ var LEGACY_ALIASES = {
351
792
  '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
352
793
  '%ArrayProto_values%': ['Array', 'prototype', 'values'],
353
794
  '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
354
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
355
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
356
- '%BooleanPrototype%': ['Boolean', 'prototype'],
357
- '%DataViewPrototype%': ['DataView', 'prototype'],
358
- '%DatePrototype%': ['Date', 'prototype'],
359
- '%ErrorPrototype%': ['Error', 'prototype'],
360
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
361
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
362
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
363
- '%FunctionPrototype%': ['Function', 'prototype'],
364
- '%Generator%': ['GeneratorFunction', 'prototype'],
365
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
366
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
367
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
368
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
369
- '%JSONParse%': ['JSON', 'parse'],
370
- '%JSONStringify%': ['JSON', 'stringify'],
371
- '%MapPrototype%': ['Map', 'prototype'],
372
- '%NumberPrototype%': ['Number', 'prototype'],
373
- '%ObjectPrototype%': ['Object', 'prototype'],
374
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
375
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
376
- '%PromisePrototype%': ['Promise', 'prototype'],
377
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
378
- '%Promise_all%': ['Promise', 'all'],
379
- '%Promise_reject%': ['Promise', 'reject'],
380
- '%Promise_resolve%': ['Promise', 'resolve'],
381
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
382
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
383
- '%RegExpPrototype%': ['RegExp', 'prototype'],
384
- '%SetPrototype%': ['Set', 'prototype'],
385
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
386
- '%StringPrototype%': ['String', 'prototype'],
387
- '%SymbolPrototype%': ['Symbol', 'prototype'],
388
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
389
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
390
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
391
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
392
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
393
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
394
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
395
- '%URIErrorPrototype%': ['URIError', 'prototype'],
396
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
397
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
398
- };
399
-
400
- var bind = functionBind;
401
- var hasOwn$1 = hasown;
402
- var $concat$1 = bind.call(Function.call, Array.prototype.concat);
403
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
404
- var $replace$1 = bind.call(Function.call, String.prototype.replace);
405
- var $strSlice = bind.call(Function.call, String.prototype.slice);
406
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
407
-
408
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
409
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
410
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
411
- var stringToPath = function stringToPath(string) {
412
- var first = $strSlice(string, 0, 1);
413
- var last = $strSlice(string, -1);
414
- if (first === '%' && last !== '%') {
415
- throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
416
- } else if (last === '%' && first !== '%') {
417
- throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
418
- }
419
- var result = [];
420
- $replace$1(string, rePropName, function (match, number, quote, subString) {
421
- result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
422
- });
423
- return result;
424
- };
425
- /* end adaptation */
426
-
427
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
428
- var intrinsicName = name;
429
- var alias;
430
- if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
431
- alias = LEGACY_ALIASES[intrinsicName];
432
- intrinsicName = '%' + alias[0] + '%';
433
- }
434
-
435
- if (hasOwn$1(INTRINSICS, intrinsicName)) {
436
- var value = INTRINSICS[intrinsicName];
437
- if (value === needsEval) {
438
- value = doEval(intrinsicName);
439
- }
440
- if (typeof value === 'undefined' && !allowMissing) {
441
- throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
442
- }
443
-
444
- return {
445
- alias: alias,
446
- name: intrinsicName,
447
- value: value
448
- };
449
- }
450
-
451
- throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
452
- };
453
-
454
- var getIntrinsic = function GetIntrinsic(name, allowMissing) {
455
- if (typeof name !== 'string' || name.length === 0) {
456
- throw new $TypeError$3('intrinsic name must be a non-empty string');
457
- }
458
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
459
- throw new $TypeError$3('"allowMissing" argument must be a boolean');
460
- }
461
-
462
- if ($exec(/^%?[^%]*%?$/, name) === null) {
463
- throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
464
- }
465
- var parts = stringToPath(name);
466
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
467
-
468
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
469
- var intrinsicRealName = intrinsic.name;
470
- var value = intrinsic.value;
471
- var skipFurtherCaching = false;
472
-
473
- var alias = intrinsic.alias;
474
- if (alias) {
475
- intrinsicBaseName = alias[0];
476
- $spliceApply(parts, $concat$1([0, 1], alias));
477
- }
478
-
479
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
480
- var part = parts[i];
481
- var first = $strSlice(part, 0, 1);
482
- var last = $strSlice(part, -1);
483
- if (
484
- (
485
- (first === '"' || first === "'" || first === '`')
486
- || (last === '"' || last === "'" || last === '`')
487
- )
488
- && first !== last
489
- ) {
490
- throw new $SyntaxError$1('property names with quotes must have matching quotes');
491
- }
492
- if (part === 'constructor' || !isOwn) {
493
- skipFurtherCaching = true;
494
- }
495
-
496
- intrinsicBaseName += '.' + part;
497
- intrinsicRealName = '%' + intrinsicBaseName + '%';
498
-
499
- if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
500
- value = INTRINSICS[intrinsicRealName];
501
- } else if (value != null) {
502
- if (!(part in value)) {
503
- if (!allowMissing) {
504
- throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
505
- }
506
- return void undefined$1;
507
- }
508
- if ($gOPD$1 && (i + 1) >= parts.length) {
509
- var desc = $gOPD$1(value, part);
510
- isOwn = !!desc;
511
-
512
- // By convention, when a data property is converted to an accessor
513
- // property to emulate a data property that does not suffer from
514
- // the override mistake, that accessor's getter is marked with
515
- // an `originalValue` property. Here, when we detect this, we
516
- // uphold the illusion by pretending to see that original data
517
- // property, i.e., returning the value rather than the getter
518
- // itself.
519
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
520
- value = desc.get;
521
- } else {
522
- value = value[part];
523
- }
524
- } else {
525
- isOwn = hasOwn$1(value, part);
526
- value = value[part];
527
- }
528
-
529
- if (isOwn && !skipFurtherCaching) {
530
- INTRINSICS[intrinsicRealName] = value;
531
- }
532
- }
533
- }
534
- return value;
535
- };
536
-
537
- var callBind$1 = {exports: {}};
538
-
539
- var GetIntrinsic$5 = getIntrinsic;
540
-
541
- var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
542
-
543
- var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
544
- if ($defineProperty$1) {
545
- try {
546
- $defineProperty$1({}, 'a', { value: 1 });
547
- return true;
548
- } catch (e) {
549
- // IE 8 has a broken defineProperty
550
- return false;
551
- }
552
- }
553
- return false;
554
- };
555
-
556
- hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
557
- // node v0.6 has a bug where array lengths can be Set but not Defined
558
- if (!hasPropertyDescriptors$1()) {
559
- return null;
560
- }
561
- try {
562
- return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
563
- } catch (e) {
564
- // In Firefox 4-22, defining length on an array throws an exception.
565
- return true;
566
- }
567
- };
568
-
569
- var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
570
-
571
- var GetIntrinsic$4 = getIntrinsic;
572
-
573
- var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
574
-
575
- if ($gOPD) {
576
- try {
577
- $gOPD([], 'length');
578
- } catch (e) {
579
- // IE 8 has a broken gOPD
580
- $gOPD = null;
581
- }
582
- }
583
-
584
- var gopd$1 = $gOPD;
585
-
586
- var hasPropertyDescriptors = hasPropertyDescriptors_1();
587
-
588
- var GetIntrinsic$3 = getIntrinsic;
589
-
590
- var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
591
- if ($defineProperty) {
592
- try {
593
- $defineProperty({}, 'a', { value: 1 });
594
- } catch (e) {
595
- // IE 8 has a broken defineProperty
596
- $defineProperty = false;
597
- }
598
- }
599
-
600
- var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
601
- var $TypeError$2 = GetIntrinsic$3('%TypeError%');
602
-
603
- var gopd = gopd$1;
604
-
605
- /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
606
- var defineDataProperty = function defineDataProperty(
607
- obj,
608
- property,
609
- value
610
- ) {
611
- if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
612
- throw new $TypeError$2('`obj` must be an object or a function`');
613
- }
614
- if (typeof property !== 'string' && typeof property !== 'symbol') {
615
- throw new $TypeError$2('`property` must be a string or a symbol`');
616
- }
617
- if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
618
- throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
619
- }
620
- if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
621
- throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
622
- }
623
- if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
624
- throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
625
- }
626
- if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
627
- throw new $TypeError$2('`loose`, if provided, must be a boolean');
628
- }
629
-
630
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
631
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
632
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
633
- var loose = arguments.length > 6 ? arguments[6] : false;
634
-
635
- /* @type {false | TypedPropertyDescriptor<unknown>} */
636
- var desc = !!gopd && gopd(obj, property);
637
-
638
- if ($defineProperty) {
639
- $defineProperty(obj, property, {
640
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
641
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
642
- value: value,
643
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
644
- });
645
- } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
646
- // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
647
- obj[property] = value; // eslint-disable-line no-param-reassign
648
- } else {
649
- throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
650
- }
651
- };
652
-
653
- var GetIntrinsic$2 = getIntrinsic;
654
- var define = defineDataProperty;
655
- var hasDescriptors = hasPropertyDescriptors_1();
656
- var gOPD = gopd$1;
657
-
658
- var $TypeError$1 = GetIntrinsic$2('%TypeError%');
659
- var $floor$1 = GetIntrinsic$2('%Math.floor%');
660
-
661
- var setFunctionLength = function setFunctionLength(fn, length) {
662
- if (typeof fn !== 'function') {
663
- throw new $TypeError$1('`fn` is not a function');
664
- }
665
- if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
666
- throw new $TypeError$1('`length` must be a positive 32-bit integer');
667
- }
668
-
669
- var loose = arguments.length > 2 && !!arguments[2];
670
-
671
- var functionLengthIsConfigurable = true;
672
- var functionLengthIsWritable = true;
673
- if ('length' in fn && gOPD) {
674
- var desc = gOPD(fn, 'length');
675
- if (desc && !desc.configurable) {
676
- functionLengthIsConfigurable = false;
677
- }
678
- if (desc && !desc.writable) {
679
- functionLengthIsWritable = false;
680
- }
681
- }
682
-
683
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
684
- if (hasDescriptors) {
685
- define(fn, 'length', length, true, true);
686
- } else {
687
- define(fn, 'length', length);
688
- }
689
- }
690
- return fn;
691
- };
692
-
693
- callBind$1.exports;
694
-
695
- (function (module) {
696
-
697
- var bind = functionBind;
698
- var GetIntrinsic = getIntrinsic;
699
- var setFunctionLength$1 = setFunctionLength;
700
-
701
- var $TypeError = GetIntrinsic('%TypeError%');
702
- var $apply = GetIntrinsic('%Function.prototype.apply%');
703
- var $call = GetIntrinsic('%Function.prototype.call%');
704
- var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
705
-
706
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
707
- var $max = GetIntrinsic('%Math.max%');
708
-
709
- if ($defineProperty) {
710
- try {
711
- $defineProperty({}, 'a', { value: 1 });
712
- } catch (e) {
713
- // IE 8 has a broken defineProperty
714
- $defineProperty = null;
715
- }
716
- }
717
-
718
- module.exports = function callBind(originalFunction) {
719
- if (typeof originalFunction !== 'function') {
720
- throw new $TypeError('a function is required');
721
- }
722
- var func = $reflectApply(bind, $call, arguments);
723
- return setFunctionLength$1(
724
- func,
725
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
726
- true
727
- );
728
- };
729
-
730
- var applyBind = function applyBind() {
731
- return $reflectApply(bind, $apply, arguments);
732
- };
733
-
734
- if ($defineProperty) {
735
- $defineProperty(module.exports, 'apply', { value: applyBind });
736
- } else {
737
- module.exports.apply = applyBind;
738
- }
739
- } (callBind$1));
740
-
741
- var callBindExports = callBind$1.exports;
742
-
743
- var GetIntrinsic$1 = getIntrinsic;
744
-
745
- var callBind = callBindExports;
746
-
747
- var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
748
-
749
- var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
750
- var intrinsic = GetIntrinsic$1(name, !!allowMissing);
751
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
752
- return callBind(intrinsic);
753
- }
754
- return intrinsic;
755
- };
756
-
757
- var util_inspect = require$$0__default["default"].inspect;
758
-
759
- var hasMap = typeof Map === 'function' && Map.prototype;
760
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
761
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
762
- var mapForEach = hasMap && Map.prototype.forEach;
763
- var hasSet = typeof Set === 'function' && Set.prototype;
764
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
765
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
766
- var setForEach = hasSet && Set.prototype.forEach;
767
- var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
768
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
769
- var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
770
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
771
- var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
772
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
773
- var booleanValueOf = Boolean.prototype.valueOf;
774
- var objectToString = Object.prototype.toString;
775
- var functionToString = Function.prototype.toString;
776
- var $match = String.prototype.match;
777
- var $slice = String.prototype.slice;
778
- var $replace = String.prototype.replace;
779
- var $toUpperCase = String.prototype.toUpperCase;
780
- var $toLowerCase = String.prototype.toLowerCase;
781
- var $test = RegExp.prototype.test;
782
- var $concat = Array.prototype.concat;
783
- var $join = Array.prototype.join;
784
- var $arrSlice = Array.prototype.slice;
785
- var $floor = Math.floor;
786
- var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
787
- var gOPS = Object.getOwnPropertySymbols;
788
- var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
789
- var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
790
- // ie, `has-tostringtag/shams
791
- var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
792
- ? Symbol.toStringTag
793
- : null;
794
- var isEnumerable = Object.prototype.propertyIsEnumerable;
795
-
796
- var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
797
- [].__proto__ === Array.prototype // eslint-disable-line no-proto
798
- ? function (O) {
799
- return O.__proto__; // eslint-disable-line no-proto
800
- }
801
- : null
802
- );
803
-
804
- function addNumericSeparator(num, str) {
805
- if (
806
- num === Infinity
807
- || num === -Infinity
808
- || num !== num
809
- || (num && num > -1000 && num < 1000)
810
- || $test.call(/e/, str)
811
- ) {
812
- return str;
813
- }
814
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
815
- if (typeof num === 'number') {
816
- var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
817
- if (int !== num) {
818
- var intStr = String(int);
819
- var dec = $slice.call(str, intStr.length + 1);
820
- return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
821
- }
822
- }
823
- return $replace.call(str, sepRegex, '$&_');
824
- }
825
-
826
- var utilInspect = util_inspect;
827
- var inspectCustom = utilInspect.custom;
828
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
829
-
830
- var objectInspect = function inspect_(obj, options, depth, seen) {
831
- var opts = options || {};
832
-
833
- if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
834
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
835
- }
836
- if (
837
- has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
838
- ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
839
- : opts.maxStringLength !== null
840
- )
841
- ) {
842
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
843
- }
844
- var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
845
- if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
846
- throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
847
- }
848
-
849
- if (
850
- has$3(opts, 'indent')
851
- && opts.indent !== null
852
- && opts.indent !== '\t'
853
- && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
854
- ) {
855
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
856
- }
857
- if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
858
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
859
- }
860
- var numericSeparator = opts.numericSeparator;
861
-
862
- if (typeof obj === 'undefined') {
863
- return 'undefined';
864
- }
865
- if (obj === null) {
866
- return 'null';
867
- }
868
- if (typeof obj === 'boolean') {
869
- return obj ? 'true' : 'false';
870
- }
871
-
872
- if (typeof obj === 'string') {
873
- return inspectString(obj, opts);
874
- }
875
- if (typeof obj === 'number') {
876
- if (obj === 0) {
877
- return Infinity / obj > 0 ? '0' : '-0';
878
- }
879
- var str = String(obj);
880
- return numericSeparator ? addNumericSeparator(obj, str) : str;
881
- }
882
- if (typeof obj === 'bigint') {
883
- var bigIntStr = String(obj) + 'n';
884
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
885
- }
886
-
887
- var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
888
- if (typeof depth === 'undefined') { depth = 0; }
889
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
890
- return isArray$3(obj) ? '[Array]' : '[Object]';
891
- }
892
-
893
- var indent = getIndent(opts, depth);
894
-
895
- if (typeof seen === 'undefined') {
896
- seen = [];
897
- } else if (indexOf(seen, obj) >= 0) {
898
- return '[Circular]';
899
- }
900
-
901
- function inspect(value, from, noIndent) {
902
- if (from) {
903
- seen = $arrSlice.call(seen);
904
- seen.push(from);
905
- }
906
- if (noIndent) {
907
- var newOpts = {
908
- depth: opts.depth
909
- };
910
- if (has$3(opts, 'quoteStyle')) {
911
- newOpts.quoteStyle = opts.quoteStyle;
912
- }
913
- return inspect_(value, newOpts, depth + 1, seen);
914
- }
915
- return inspect_(value, opts, depth + 1, seen);
916
- }
917
-
918
- if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
919
- var name = nameOf(obj);
920
- var keys = arrObjKeys(obj, inspect);
921
- return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
922
- }
923
- if (isSymbol(obj)) {
924
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
925
- return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
926
- }
927
- if (isElement(obj)) {
928
- var s = '<' + $toLowerCase.call(String(obj.nodeName));
929
- var attrs = obj.attributes || [];
930
- for (var i = 0; i < attrs.length; i++) {
931
- s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
932
- }
933
- s += '>';
934
- if (obj.childNodes && obj.childNodes.length) { s += '...'; }
935
- s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
936
- return s;
937
- }
938
- if (isArray$3(obj)) {
939
- if (obj.length === 0) { return '[]'; }
940
- var xs = arrObjKeys(obj, inspect);
941
- if (indent && !singleLineValues(xs)) {
942
- return '[' + indentedJoin(xs, indent) + ']';
943
- }
944
- return '[ ' + $join.call(xs, ', ') + ' ]';
945
- }
946
- if (isError(obj)) {
947
- var parts = arrObjKeys(obj, inspect);
948
- if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
949
- return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
950
- }
951
- if (parts.length === 0) { return '[' + String(obj) + ']'; }
952
- return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
953
- }
954
- if (typeof obj === 'object' && customInspect) {
955
- if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
956
- return utilInspect(obj, { depth: maxDepth - depth });
957
- } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
958
- return obj.inspect();
959
- }
960
- }
961
- if (isMap(obj)) {
962
- var mapParts = [];
963
- if (mapForEach) {
964
- mapForEach.call(obj, function (value, key) {
965
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
966
- });
967
- }
968
- return collectionOf('Map', mapSize.call(obj), mapParts, indent);
969
- }
970
- if (isSet(obj)) {
971
- var setParts = [];
972
- if (setForEach) {
973
- setForEach.call(obj, function (value) {
974
- setParts.push(inspect(value, obj));
975
- });
976
- }
977
- return collectionOf('Set', setSize.call(obj), setParts, indent);
978
- }
979
- if (isWeakMap(obj)) {
980
- return weakCollectionOf('WeakMap');
981
- }
982
- if (isWeakSet(obj)) {
983
- return weakCollectionOf('WeakSet');
984
- }
985
- if (isWeakRef(obj)) {
986
- return weakCollectionOf('WeakRef');
987
- }
988
- if (isNumber(obj)) {
989
- return markBoxed(inspect(Number(obj)));
990
- }
991
- if (isBigInt(obj)) {
992
- return markBoxed(inspect(bigIntValueOf.call(obj)));
993
- }
994
- if (isBoolean(obj)) {
995
- return markBoxed(booleanValueOf.call(obj));
996
- }
997
- if (isString(obj)) {
998
- return markBoxed(inspect(String(obj)));
999
- }
1000
- // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
1001
- /* eslint-env browser */
1002
- if (typeof window !== 'undefined' && obj === window) {
1003
- return '{ [object Window] }';
1004
- }
1005
- if (obj === commonjsGlobal) {
1006
- return '{ [object globalThis] }';
1007
- }
1008
- if (!isDate(obj) && !isRegExp$1(obj)) {
1009
- var ys = arrObjKeys(obj, inspect);
1010
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1011
- var protoTag = obj instanceof Object ? '' : 'null prototype';
1012
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
1013
- var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
1014
- var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
1015
- if (ys.length === 0) { return tag + '{}'; }
1016
- if (indent) {
1017
- return tag + '{' + indentedJoin(ys, indent) + '}';
1018
- }
1019
- return tag + '{ ' + $join.call(ys, ', ') + ' }';
1020
- }
1021
- return String(obj);
795
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
796
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
797
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
798
+ '%DataViewPrototype%': ['DataView', 'prototype'],
799
+ '%DatePrototype%': ['Date', 'prototype'],
800
+ '%ErrorPrototype%': ['Error', 'prototype'],
801
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
802
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
803
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
804
+ '%FunctionPrototype%': ['Function', 'prototype'],
805
+ '%Generator%': ['GeneratorFunction', 'prototype'],
806
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
807
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
808
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
809
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
810
+ '%JSONParse%': ['JSON', 'parse'],
811
+ '%JSONStringify%': ['JSON', 'stringify'],
812
+ '%MapPrototype%': ['Map', 'prototype'],
813
+ '%NumberPrototype%': ['Number', 'prototype'],
814
+ '%ObjectPrototype%': ['Object', 'prototype'],
815
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
816
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
817
+ '%PromisePrototype%': ['Promise', 'prototype'],
818
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
819
+ '%Promise_all%': ['Promise', 'all'],
820
+ '%Promise_reject%': ['Promise', 'reject'],
821
+ '%Promise_resolve%': ['Promise', 'resolve'],
822
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
823
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
824
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
825
+ '%SetPrototype%': ['Set', 'prototype'],
826
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
827
+ '%StringPrototype%': ['String', 'prototype'],
828
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
829
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
830
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
831
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
832
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
833
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
834
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
835
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
836
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
837
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
838
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
1022
839
  };
1023
840
 
1024
- function wrapQuotes(s, defaultStyle, opts) {
1025
- var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
1026
- return quoteChar + s + quoteChar;
1027
- }
841
+ var bind = functionBind;
842
+ var hasOwn$1 = hasown;
843
+ var $concat$1 = bind.call(Function.call, Array.prototype.concat);
844
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
845
+ var $replace$1 = bind.call(Function.call, String.prototype.replace);
846
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
847
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
1028
848
 
1029
- function quote(s) {
1030
- return $replace.call(String(s), /"/g, '&quot;');
1031
- }
849
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
850
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
851
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
852
+ var stringToPath = function stringToPath(string) {
853
+ var first = $strSlice(string, 0, 1);
854
+ var last = $strSlice(string, -1);
855
+ if (first === '%' && last !== '%') {
856
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
857
+ } else if (last === '%' && first !== '%') {
858
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
859
+ }
860
+ var result = [];
861
+ $replace$1(string, rePropName, function (match, number, quote, subString) {
862
+ result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
863
+ });
864
+ return result;
865
+ };
866
+ /* end adaptation */
1032
867
 
1033
- function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1034
- function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1035
- function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1036
- function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1037
- function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1038
- function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1039
- function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
868
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
869
+ var intrinsicName = name;
870
+ var alias;
871
+ if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
872
+ alias = LEGACY_ALIASES[intrinsicName];
873
+ intrinsicName = '%' + alias[0] + '%';
874
+ }
1040
875
 
1041
- // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
1042
- function isSymbol(obj) {
1043
- if (hasShammedSymbols) {
1044
- return obj && typeof obj === 'object' && obj instanceof Symbol;
1045
- }
1046
- if (typeof obj === 'symbol') {
1047
- return true;
1048
- }
1049
- if (!obj || typeof obj !== 'object' || !symToString) {
1050
- return false;
1051
- }
1052
- try {
1053
- symToString.call(obj);
1054
- return true;
1055
- } catch (e) {}
1056
- return false;
1057
- }
876
+ if (hasOwn$1(INTRINSICS, intrinsicName)) {
877
+ var value = INTRINSICS[intrinsicName];
878
+ if (value === needsEval) {
879
+ value = doEval(intrinsicName);
880
+ }
881
+ if (typeof value === 'undefined' && !allowMissing) {
882
+ throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
883
+ }
1058
884
 
1059
- function isBigInt(obj) {
1060
- if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
1061
- return false;
1062
- }
1063
- try {
1064
- bigIntValueOf.call(obj);
1065
- return true;
1066
- } catch (e) {}
1067
- return false;
1068
- }
885
+ return {
886
+ alias: alias,
887
+ name: intrinsicName,
888
+ value: value
889
+ };
890
+ }
1069
891
 
1070
- var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
1071
- function has$3(obj, key) {
1072
- return hasOwn.call(obj, key);
1073
- }
892
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
893
+ };
1074
894
 
1075
- function toStr(obj) {
1076
- return objectToString.call(obj);
1077
- }
895
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
896
+ if (typeof name !== 'string' || name.length === 0) {
897
+ throw new $TypeError$3('intrinsic name must be a non-empty string');
898
+ }
899
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
900
+ throw new $TypeError$3('"allowMissing" argument must be a boolean');
901
+ }
1078
902
 
1079
- function nameOf(f) {
1080
- if (f.name) { return f.name; }
1081
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1082
- if (m) { return m[1]; }
1083
- return null;
1084
- }
903
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
904
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
905
+ }
906
+ var parts = stringToPath(name);
907
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1085
908
 
1086
- function indexOf(xs, x) {
1087
- if (xs.indexOf) { return xs.indexOf(x); }
1088
- for (var i = 0, l = xs.length; i < l; i++) {
1089
- if (xs[i] === x) { return i; }
1090
- }
1091
- return -1;
1092
- }
909
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
910
+ var intrinsicRealName = intrinsic.name;
911
+ var value = intrinsic.value;
912
+ var skipFurtherCaching = false;
1093
913
 
1094
- function isMap(x) {
1095
- if (!mapSize || !x || typeof x !== 'object') {
1096
- return false;
1097
- }
1098
- try {
1099
- mapSize.call(x);
1100
- try {
1101
- setSize.call(x);
1102
- } catch (s) {
1103
- return true;
1104
- }
1105
- return x instanceof Map; // core-js workaround, pre-v2.5.0
1106
- } catch (e) {}
1107
- return false;
1108
- }
914
+ var alias = intrinsic.alias;
915
+ if (alias) {
916
+ intrinsicBaseName = alias[0];
917
+ $spliceApply(parts, $concat$1([0, 1], alias));
918
+ }
919
+
920
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
921
+ var part = parts[i];
922
+ var first = $strSlice(part, 0, 1);
923
+ var last = $strSlice(part, -1);
924
+ if (
925
+ (
926
+ (first === '"' || first === "'" || first === '`')
927
+ || (last === '"' || last === "'" || last === '`')
928
+ )
929
+ && first !== last
930
+ ) {
931
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
932
+ }
933
+ if (part === 'constructor' || !isOwn) {
934
+ skipFurtherCaching = true;
935
+ }
936
+
937
+ intrinsicBaseName += '.' + part;
938
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
939
+
940
+ if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
941
+ value = INTRINSICS[intrinsicRealName];
942
+ } else if (value != null) {
943
+ if (!(part in value)) {
944
+ if (!allowMissing) {
945
+ throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
946
+ }
947
+ return void undefined$1;
948
+ }
949
+ if ($gOPD$1 && (i + 1) >= parts.length) {
950
+ var desc = $gOPD$1(value, part);
951
+ isOwn = !!desc;
952
+
953
+ // By convention, when a data property is converted to an accessor
954
+ // property to emulate a data property that does not suffer from
955
+ // the override mistake, that accessor's getter is marked with
956
+ // an `originalValue` property. Here, when we detect this, we
957
+ // uphold the illusion by pretending to see that original data
958
+ // property, i.e., returning the value rather than the getter
959
+ // itself.
960
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
961
+ value = desc.get;
962
+ } else {
963
+ value = value[part];
964
+ }
965
+ } else {
966
+ isOwn = hasOwn$1(value, part);
967
+ value = value[part];
968
+ }
969
+
970
+ if (isOwn && !skipFurtherCaching) {
971
+ INTRINSICS[intrinsicRealName] = value;
972
+ }
973
+ }
974
+ }
975
+ return value;
976
+ };
977
+
978
+ var callBind$1 = {exports: {}};
979
+
980
+ var GetIntrinsic$5 = getIntrinsic;
981
+
982
+ var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
983
+
984
+ var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
985
+ if ($defineProperty$1) {
986
+ try {
987
+ $defineProperty$1({}, 'a', { value: 1 });
988
+ return true;
989
+ } catch (e) {
990
+ // IE 8 has a broken defineProperty
991
+ return false;
992
+ }
993
+ }
994
+ return false;
995
+ };
1109
996
 
1110
- function isWeakMap(x) {
1111
- if (!weakMapHas || !x || typeof x !== 'object') {
1112
- return false;
1113
- }
1114
- try {
1115
- weakMapHas.call(x, weakMapHas);
1116
- try {
1117
- weakSetHas.call(x, weakSetHas);
1118
- } catch (s) {
1119
- return true;
1120
- }
1121
- return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
1122
- } catch (e) {}
1123
- return false;
1124
- }
997
+ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
998
+ // node v0.6 has a bug where array lengths can be Set but not Defined
999
+ if (!hasPropertyDescriptors$1()) {
1000
+ return null;
1001
+ }
1002
+ try {
1003
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
1004
+ } catch (e) {
1005
+ // In Firefox 4-22, defining length on an array throws an exception.
1006
+ return true;
1007
+ }
1008
+ };
1125
1009
 
1126
- function isWeakRef(x) {
1127
- if (!weakRefDeref || !x || typeof x !== 'object') {
1128
- return false;
1129
- }
1130
- try {
1131
- weakRefDeref.call(x);
1132
- return true;
1133
- } catch (e) {}
1134
- return false;
1135
- }
1010
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
1136
1011
 
1137
- function isSet(x) {
1138
- if (!setSize || !x || typeof x !== 'object') {
1139
- return false;
1140
- }
1141
- try {
1142
- setSize.call(x);
1143
- try {
1144
- mapSize.call(x);
1145
- } catch (m) {
1146
- return true;
1147
- }
1148
- return x instanceof Set; // core-js workaround, pre-v2.5.0
1149
- } catch (e) {}
1150
- return false;
1151
- }
1012
+ var GetIntrinsic$4 = getIntrinsic;
1152
1013
 
1153
- function isWeakSet(x) {
1154
- if (!weakSetHas || !x || typeof x !== 'object') {
1155
- return false;
1156
- }
1157
- try {
1158
- weakSetHas.call(x, weakSetHas);
1159
- try {
1160
- weakMapHas.call(x, weakMapHas);
1161
- } catch (s) {
1162
- return true;
1163
- }
1164
- return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
1165
- } catch (e) {}
1166
- return false;
1167
- }
1014
+ var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
1168
1015
 
1169
- function isElement(x) {
1170
- if (!x || typeof x !== 'object') { return false; }
1171
- if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
1172
- return true;
1173
- }
1174
- return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
1016
+ if ($gOPD) {
1017
+ try {
1018
+ $gOPD([], 'length');
1019
+ } catch (e) {
1020
+ // IE 8 has a broken gOPD
1021
+ $gOPD = null;
1022
+ }
1175
1023
  }
1176
1024
 
1177
- function inspectString(str, opts) {
1178
- if (str.length > opts.maxStringLength) {
1179
- var remaining = str.length - opts.maxStringLength;
1180
- var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
1181
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1182
- }
1183
- // eslint-disable-next-line no-control-regex
1184
- var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
1185
- return wrapQuotes(s, 'single', opts);
1186
- }
1025
+ var gopd$1 = $gOPD;
1187
1026
 
1188
- function lowbyte(c) {
1189
- var n = c.charCodeAt(0);
1190
- var x = {
1191
- 8: 'b',
1192
- 9: 't',
1193
- 10: 'n',
1194
- 12: 'f',
1195
- 13: 'r'
1196
- }[n];
1197
- if (x) { return '\\' + x; }
1198
- return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
1199
- }
1027
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
1200
1028
 
1201
- function markBoxed(str) {
1202
- return 'Object(' + str + ')';
1203
- }
1029
+ var GetIntrinsic$3 = getIntrinsic;
1204
1030
 
1205
- function weakCollectionOf(type) {
1206
- return type + ' { ? }';
1031
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
1032
+ if ($defineProperty) {
1033
+ try {
1034
+ $defineProperty({}, 'a', { value: 1 });
1035
+ } catch (e) {
1036
+ // IE 8 has a broken defineProperty
1037
+ $defineProperty = false;
1038
+ }
1207
1039
  }
1208
1040
 
1209
- function collectionOf(type, size, entries, indent) {
1210
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
1211
- return type + ' (' + size + ') {' + joinedEntries + '}';
1212
- }
1041
+ var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
1042
+ var $TypeError$2 = GetIntrinsic$3('%TypeError%');
1213
1043
 
1214
- function singleLineValues(xs) {
1215
- for (var i = 0; i < xs.length; i++) {
1216
- if (indexOf(xs[i], '\n') >= 0) {
1217
- return false;
1218
- }
1219
- }
1220
- return true;
1221
- }
1044
+ var gopd = gopd$1;
1222
1045
 
1223
- function getIndent(opts, depth) {
1224
- var baseIndent;
1225
- if (opts.indent === '\t') {
1226
- baseIndent = '\t';
1227
- } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1228
- baseIndent = $join.call(Array(opts.indent + 1), ' ');
1229
- } else {
1230
- return null;
1231
- }
1232
- return {
1233
- base: baseIndent,
1234
- prev: $join.call(Array(depth + 1), baseIndent)
1235
- };
1236
- }
1046
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
1047
+ var defineDataProperty = function defineDataProperty(
1048
+ obj,
1049
+ property,
1050
+ value
1051
+ ) {
1052
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
1053
+ throw new $TypeError$2('`obj` must be an object or a function`');
1054
+ }
1055
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
1056
+ throw new $TypeError$2('`property` must be a string or a symbol`');
1057
+ }
1058
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
1059
+ throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
1060
+ }
1061
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
1062
+ throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
1063
+ }
1064
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
1065
+ throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
1066
+ }
1067
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
1068
+ throw new $TypeError$2('`loose`, if provided, must be a boolean');
1069
+ }
1237
1070
 
1238
- function indentedJoin(xs, indent) {
1239
- if (xs.length === 0) { return ''; }
1240
- var lineJoiner = '\n' + indent.prev + indent.base;
1241
- return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1242
- }
1071
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
1072
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
1073
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
1074
+ var loose = arguments.length > 6 ? arguments[6] : false;
1243
1075
 
1244
- function arrObjKeys(obj, inspect) {
1245
- var isArr = isArray$3(obj);
1246
- var xs = [];
1247
- if (isArr) {
1248
- xs.length = obj.length;
1249
- for (var i = 0; i < obj.length; i++) {
1250
- xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1251
- }
1252
- }
1253
- var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1254
- var symMap;
1255
- if (hasShammedSymbols) {
1256
- symMap = {};
1257
- for (var k = 0; k < syms.length; k++) {
1258
- symMap['$' + syms[k]] = syms[k];
1259
- }
1260
- }
1076
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
1077
+ var desc = !!gopd && gopd(obj, property);
1261
1078
 
1262
- for (var key in obj) { // eslint-disable-line no-restricted-syntax
1263
- if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1264
- if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1265
- if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1266
- // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1267
- continue; // eslint-disable-line no-restricted-syntax, no-continue
1268
- } else if ($test.call(/[^\w$]/, key)) {
1269
- xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1270
- } else {
1271
- xs.push(key + ': ' + inspect(obj[key], obj));
1272
- }
1273
- }
1274
- if (typeof gOPS === 'function') {
1275
- for (var j = 0; j < syms.length; j++) {
1276
- if (isEnumerable.call(obj, syms[j])) {
1277
- xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1278
- }
1279
- }
1280
- }
1281
- return xs;
1282
- }
1079
+ if ($defineProperty) {
1080
+ $defineProperty(obj, property, {
1081
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
1082
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
1083
+ value: value,
1084
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
1085
+ });
1086
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
1087
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
1088
+ obj[property] = value; // eslint-disable-line no-param-reassign
1089
+ } else {
1090
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
1091
+ }
1092
+ };
1283
1093
 
1284
- var GetIntrinsic = getIntrinsic;
1285
- var callBound = callBound$1;
1286
- var inspect = objectInspect;
1094
+ var GetIntrinsic$2 = getIntrinsic;
1095
+ var define = defineDataProperty;
1096
+ var hasDescriptors = hasPropertyDescriptors_1();
1097
+ var gOPD = gopd$1;
1098
+
1099
+ var $TypeError$1 = GetIntrinsic$2('%TypeError%');
1100
+ var $floor$1 = GetIntrinsic$2('%Math.floor%');
1287
1101
 
1288
- var $TypeError = GetIntrinsic('%TypeError%');
1289
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
1290
- var $Map = GetIntrinsic('%Map%', true);
1102
+ var setFunctionLength = function setFunctionLength(fn, length) {
1103
+ if (typeof fn !== 'function') {
1104
+ throw new $TypeError$1('`fn` is not a function');
1105
+ }
1106
+ if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
1107
+ throw new $TypeError$1('`length` must be a positive 32-bit integer');
1108
+ }
1291
1109
 
1292
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
1293
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
1294
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
1295
- var $mapGet = callBound('Map.prototype.get', true);
1296
- var $mapSet = callBound('Map.prototype.set', true);
1297
- var $mapHas = callBound('Map.prototype.has', true);
1110
+ var loose = arguments.length > 2 && !!arguments[2];
1298
1111
 
1299
- /*
1300
- * This function traverses the list returning the node corresponding to the
1301
- * given key.
1302
- *
1303
- * That node is also moved to the head of the list, so that if it's accessed
1304
- * again we don't need to traverse the whole list. By doing so, all the recently
1305
- * used nodes can be accessed relatively quickly.
1306
- */
1307
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1308
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1309
- if (curr.key === key) {
1310
- prev.next = curr.next;
1311
- curr.next = list.next;
1312
- list.next = curr; // eslint-disable-line no-param-reassign
1313
- return curr;
1112
+ var functionLengthIsConfigurable = true;
1113
+ var functionLengthIsWritable = true;
1114
+ if ('length' in fn && gOPD) {
1115
+ var desc = gOPD(fn, 'length');
1116
+ if (desc && !desc.configurable) {
1117
+ functionLengthIsConfigurable = false;
1118
+ }
1119
+ if (desc && !desc.writable) {
1120
+ functionLengthIsWritable = false;
1314
1121
  }
1315
1122
  }
1316
- };
1317
1123
 
1318
- var listGet = function (objects, key) {
1319
- var node = listGetNode(objects, key);
1320
- return node && node.value;
1321
- };
1322
- var listSet = function (objects, key, value) {
1323
- var node = listGetNode(objects, key);
1324
- if (node) {
1325
- node.value = value;
1326
- } else {
1327
- // Prepend the new node to the beginning of the list
1328
- objects.next = { // eslint-disable-line no-param-reassign
1329
- key: key,
1330
- next: objects.next,
1331
- value: value
1332
- };
1124
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
1125
+ if (hasDescriptors) {
1126
+ define(fn, 'length', length, true, true);
1127
+ } else {
1128
+ define(fn, 'length', length);
1129
+ }
1333
1130
  }
1334
- };
1335
- var listHas = function (objects, key) {
1336
- return !!listGetNode(objects, key);
1131
+ return fn;
1337
1132
  };
1338
1133
 
1339
- var sideChannel = function getSideChannel() {
1340
- var $wm;
1341
- var $m;
1342
- var $o;
1343
- var channel = {
1344
- assert: function (key) {
1345
- if (!channel.has(key)) {
1346
- throw new $TypeError('Side channel does not contain ' + inspect(key));
1347
- }
1348
- },
1349
- get: function (key) { // eslint-disable-line consistent-return
1350
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1351
- if ($wm) {
1352
- return $weakMapGet($wm, key);
1353
- }
1354
- } else if ($Map) {
1355
- if ($m) {
1356
- return $mapGet($m, key);
1357
- }
1358
- } else {
1359
- if ($o) { // eslint-disable-line no-lonely-if
1360
- return listGet($o, key);
1361
- }
1362
- }
1363
- },
1364
- has: function (key) {
1365
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1366
- if ($wm) {
1367
- return $weakMapHas($wm, key);
1368
- }
1369
- } else if ($Map) {
1370
- if ($m) {
1371
- return $mapHas($m, key);
1372
- }
1373
- } else {
1374
- if ($o) { // eslint-disable-line no-lonely-if
1375
- return listHas($o, key);
1376
- }
1377
- }
1378
- return false;
1379
- },
1380
- set: function (key, value) {
1381
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1382
- if (!$wm) {
1383
- $wm = new $WeakMap();
1384
- }
1385
- $weakMapSet($wm, key, value);
1386
- } else if ($Map) {
1387
- if (!$m) {
1388
- $m = new $Map();
1389
- }
1390
- $mapSet($m, key, value);
1391
- } else {
1392
- if (!$o) {
1393
- /*
1394
- * Initialize the linked list as an empty node, so that we don't have
1395
- * to special-case handling of the first node: we can always refer to
1396
- * it as (previous node).next, instead of something like (list).head
1397
- */
1398
- $o = { key: {}, next: null };
1399
- }
1400
- listSet($o, key, value);
1401
- }
1134
+ callBind$1.exports;
1135
+
1136
+ (function (module) {
1137
+
1138
+ var bind = functionBind;
1139
+ var GetIntrinsic = getIntrinsic;
1140
+ var setFunctionLength$1 = setFunctionLength;
1141
+
1142
+ var $TypeError = GetIntrinsic('%TypeError%');
1143
+ var $apply = GetIntrinsic('%Function.prototype.apply%');
1144
+ var $call = GetIntrinsic('%Function.prototype.call%');
1145
+ var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
1146
+
1147
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
1148
+ var $max = GetIntrinsic('%Math.max%');
1149
+
1150
+ if ($defineProperty) {
1151
+ try {
1152
+ $defineProperty({}, 'a', { value: 1 });
1153
+ } catch (e) {
1154
+ // IE 8 has a broken defineProperty
1155
+ $defineProperty = null;
1156
+ }
1157
+ }
1158
+
1159
+ module.exports = function callBind(originalFunction) {
1160
+ if (typeof originalFunction !== 'function') {
1161
+ throw new $TypeError('a function is required');
1402
1162
  }
1163
+ var func = $reflectApply(bind, $call, arguments);
1164
+ return setFunctionLength$1(
1165
+ func,
1166
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
1167
+ true
1168
+ );
1403
1169
  };
1404
- return channel;
1170
+
1171
+ var applyBind = function applyBind() {
1172
+ return $reflectApply(bind, $apply, arguments);
1173
+ };
1174
+
1175
+ if ($defineProperty) {
1176
+ $defineProperty(module.exports, 'apply', { value: applyBind });
1177
+ } else {
1178
+ module.exports.apply = applyBind;
1179
+ }
1180
+ } (callBind$1));
1181
+
1182
+ var callBindExports = callBind$1.exports;
1183
+
1184
+ var GetIntrinsic$1 = getIntrinsic;
1185
+
1186
+ var callBind = callBindExports;
1187
+
1188
+ var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
1189
+
1190
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
1191
+ var intrinsic = GetIntrinsic$1(name, !!allowMissing);
1192
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
1193
+ return callBind(intrinsic);
1194
+ }
1195
+ return intrinsic;
1405
1196
  };
1406
1197
 
1407
- var replace = String.prototype.replace;
1408
- var percentTwenties = /%20/g;
1198
+ var util_inspect = require$$0__default["default"].inspect;
1199
+
1200
+ var hasMap = typeof Map === 'function' && Map.prototype;
1201
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
1202
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
1203
+ var mapForEach = hasMap && Map.prototype.forEach;
1204
+ var hasSet = typeof Set === 'function' && Set.prototype;
1205
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
1206
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
1207
+ var setForEach = hasSet && Set.prototype.forEach;
1208
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
1209
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
1210
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
1211
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
1212
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
1213
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
1214
+ var booleanValueOf = Boolean.prototype.valueOf;
1215
+ var objectToString = Object.prototype.toString;
1216
+ var functionToString = Function.prototype.toString;
1217
+ var $match = String.prototype.match;
1218
+ var $slice = String.prototype.slice;
1219
+ var $replace = String.prototype.replace;
1220
+ var $toUpperCase = String.prototype.toUpperCase;
1221
+ var $toLowerCase = String.prototype.toLowerCase;
1222
+ var $test = RegExp.prototype.test;
1223
+ var $concat = Array.prototype.concat;
1224
+ var $join = Array.prototype.join;
1225
+ var $arrSlice = Array.prototype.slice;
1226
+ var $floor = Math.floor;
1227
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
1228
+ var gOPS = Object.getOwnPropertySymbols;
1229
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
1230
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
1231
+ // ie, `has-tostringtag/shams
1232
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
1233
+ ? Symbol.toStringTag
1234
+ : null;
1235
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
1236
+
1237
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
1238
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
1239
+ ? function (O) {
1240
+ return O.__proto__; // eslint-disable-line no-proto
1241
+ }
1242
+ : null
1243
+ );
1244
+
1245
+ function addNumericSeparator(num, str) {
1246
+ if (
1247
+ num === Infinity
1248
+ || num === -Infinity
1249
+ || num !== num
1250
+ || (num && num > -1000 && num < 1000)
1251
+ || $test.call(/e/, str)
1252
+ ) {
1253
+ return str;
1254
+ }
1255
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1256
+ if (typeof num === 'number') {
1257
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
1258
+ if (int !== num) {
1259
+ var intStr = String(int);
1260
+ var dec = $slice.call(str, intStr.length + 1);
1261
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
1262
+ }
1263
+ }
1264
+ return $replace.call(str, sepRegex, '$&_');
1265
+ }
1266
+
1267
+ var utilInspect = util_inspect;
1268
+ var inspectCustom = utilInspect.custom;
1269
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
1409
1270
 
1410
- var Format = {
1411
- RFC1738: 'RFC1738',
1412
- RFC3986: 'RFC3986'
1413
- };
1271
+ var objectInspect = function inspect_(obj, options, depth, seen) {
1272
+ var opts = options || {};
1414
1273
 
1415
- var formats$3 = {
1416
- 'default': Format.RFC3986,
1417
- formatters: {
1418
- RFC1738: function (value) {
1419
- return replace.call(value, percentTwenties, '+');
1420
- },
1421
- RFC3986: function (value) {
1422
- return String(value);
1423
- }
1424
- },
1425
- RFC1738: Format.RFC1738,
1426
- RFC3986: Format.RFC3986
1427
- };
1274
+ if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
1275
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
1276
+ }
1277
+ if (
1278
+ has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
1279
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
1280
+ : opts.maxStringLength !== null
1281
+ )
1282
+ ) {
1283
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1284
+ }
1285
+ var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
1286
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
1287
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
1288
+ }
1428
1289
 
1429
- var formats$2 = formats$3;
1290
+ if (
1291
+ has$3(opts, 'indent')
1292
+ && opts.indent !== null
1293
+ && opts.indent !== '\t'
1294
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
1295
+ ) {
1296
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1297
+ }
1298
+ if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
1299
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1300
+ }
1301
+ var numericSeparator = opts.numericSeparator;
1430
1302
 
1431
- var has$2 = Object.prototype.hasOwnProperty;
1432
- var isArray$2 = Array.isArray;
1303
+ if (typeof obj === 'undefined') {
1304
+ return 'undefined';
1305
+ }
1306
+ if (obj === null) {
1307
+ return 'null';
1308
+ }
1309
+ if (typeof obj === 'boolean') {
1310
+ return obj ? 'true' : 'false';
1311
+ }
1433
1312
 
1434
- var hexTable = (function () {
1435
- var array = [];
1436
- for (var i = 0; i < 256; ++i) {
1437
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1313
+ if (typeof obj === 'string') {
1314
+ return inspectString(obj, opts);
1315
+ }
1316
+ if (typeof obj === 'number') {
1317
+ if (obj === 0) {
1318
+ return Infinity / obj > 0 ? '0' : '-0';
1319
+ }
1320
+ var str = String(obj);
1321
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
1322
+ }
1323
+ if (typeof obj === 'bigint') {
1324
+ var bigIntStr = String(obj) + 'n';
1325
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
1438
1326
  }
1439
1327
 
1440
- return array;
1441
- }());
1328
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
1329
+ if (typeof depth === 'undefined') { depth = 0; }
1330
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
1331
+ return isArray$3(obj) ? '[Array]' : '[Object]';
1332
+ }
1442
1333
 
1443
- var compactQueue = function compactQueue(queue) {
1444
- while (queue.length > 1) {
1445
- var item = queue.pop();
1446
- var obj = item.obj[item.prop];
1334
+ var indent = getIndent(opts, depth);
1447
1335
 
1448
- if (isArray$2(obj)) {
1449
- var compacted = [];
1336
+ if (typeof seen === 'undefined') {
1337
+ seen = [];
1338
+ } else if (indexOf(seen, obj) >= 0) {
1339
+ return '[Circular]';
1340
+ }
1450
1341
 
1451
- for (var j = 0; j < obj.length; ++j) {
1452
- if (typeof obj[j] !== 'undefined') {
1453
- compacted.push(obj[j]);
1454
- }
1342
+ function inspect(value, from, noIndent) {
1343
+ if (from) {
1344
+ seen = $arrSlice.call(seen);
1345
+ seen.push(from);
1346
+ }
1347
+ if (noIndent) {
1348
+ var newOpts = {
1349
+ depth: opts.depth
1350
+ };
1351
+ if (has$3(opts, 'quoteStyle')) {
1352
+ newOpts.quoteStyle = opts.quoteStyle;
1455
1353
  }
1354
+ return inspect_(value, newOpts, depth + 1, seen);
1355
+ }
1356
+ return inspect_(value, opts, depth + 1, seen);
1357
+ }
1456
1358
 
1457
- item.obj[item.prop] = compacted;
1359
+ if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
1360
+ var name = nameOf(obj);
1361
+ var keys = arrObjKeys(obj, inspect);
1362
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
1363
+ }
1364
+ if (isSymbol(obj)) {
1365
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
1366
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
1367
+ }
1368
+ if (isElement(obj)) {
1369
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
1370
+ var attrs = obj.attributes || [];
1371
+ for (var i = 0; i < attrs.length; i++) {
1372
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
1373
+ }
1374
+ s += '>';
1375
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
1376
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
1377
+ return s;
1378
+ }
1379
+ if (isArray$3(obj)) {
1380
+ if (obj.length === 0) { return '[]'; }
1381
+ var xs = arrObjKeys(obj, inspect);
1382
+ if (indent && !singleLineValues(xs)) {
1383
+ return '[' + indentedJoin(xs, indent) + ']';
1384
+ }
1385
+ return '[ ' + $join.call(xs, ', ') + ' ]';
1386
+ }
1387
+ if (isError(obj)) {
1388
+ var parts = arrObjKeys(obj, inspect);
1389
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
1390
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
1391
+ }
1392
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
1393
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
1394
+ }
1395
+ if (typeof obj === 'object' && customInspect) {
1396
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
1397
+ return utilInspect(obj, { depth: maxDepth - depth });
1398
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
1399
+ return obj.inspect();
1400
+ }
1401
+ }
1402
+ if (isMap(obj)) {
1403
+ var mapParts = [];
1404
+ if (mapForEach) {
1405
+ mapForEach.call(obj, function (value, key) {
1406
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1407
+ });
1408
+ }
1409
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
1410
+ }
1411
+ if (isSet(obj)) {
1412
+ var setParts = [];
1413
+ if (setForEach) {
1414
+ setForEach.call(obj, function (value) {
1415
+ setParts.push(inspect(value, obj));
1416
+ });
1417
+ }
1418
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
1419
+ }
1420
+ if (isWeakMap(obj)) {
1421
+ return weakCollectionOf('WeakMap');
1422
+ }
1423
+ if (isWeakSet(obj)) {
1424
+ return weakCollectionOf('WeakSet');
1425
+ }
1426
+ if (isWeakRef(obj)) {
1427
+ return weakCollectionOf('WeakRef');
1428
+ }
1429
+ if (isNumber(obj)) {
1430
+ return markBoxed(inspect(Number(obj)));
1431
+ }
1432
+ if (isBigInt(obj)) {
1433
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
1434
+ }
1435
+ if (isBoolean(obj)) {
1436
+ return markBoxed(booleanValueOf.call(obj));
1437
+ }
1438
+ if (isString(obj)) {
1439
+ return markBoxed(inspect(String(obj)));
1440
+ }
1441
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
1442
+ /* eslint-env browser */
1443
+ if (typeof window !== 'undefined' && obj === window) {
1444
+ return '{ [object Window] }';
1445
+ }
1446
+ if (obj === commonjsGlobal) {
1447
+ return '{ [object globalThis] }';
1448
+ }
1449
+ if (!isDate(obj) && !isRegExp$1(obj)) {
1450
+ var ys = arrObjKeys(obj, inspect);
1451
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1452
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
1453
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
1454
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
1455
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
1456
+ if (ys.length === 0) { return tag + '{}'; }
1457
+ if (indent) {
1458
+ return tag + '{' + indentedJoin(ys, indent) + '}';
1458
1459
  }
1460
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
1459
1461
  }
1462
+ return String(obj);
1460
1463
  };
1461
1464
 
1462
- var arrayToObject = function arrayToObject(source, options) {
1463
- var obj = options && options.plainObjects ? Object.create(null) : {};
1464
- for (var i = 0; i < source.length; ++i) {
1465
- if (typeof source[i] !== 'undefined') {
1466
- obj[i] = source[i];
1467
- }
1465
+ function wrapQuotes(s, defaultStyle, opts) {
1466
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
1467
+ return quoteChar + s + quoteChar;
1468
+ }
1469
+
1470
+ function quote(s) {
1471
+ return $replace.call(String(s), /"/g, '&quot;');
1472
+ }
1473
+
1474
+ function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1475
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1476
+ function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1477
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1478
+ function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1479
+ function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1480
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1481
+
1482
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
1483
+ function isSymbol(obj) {
1484
+ if (hasShammedSymbols) {
1485
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
1486
+ }
1487
+ if (typeof obj === 'symbol') {
1488
+ return true;
1489
+ }
1490
+ if (!obj || typeof obj !== 'object' || !symToString) {
1491
+ return false;
1492
+ }
1493
+ try {
1494
+ symToString.call(obj);
1495
+ return true;
1496
+ } catch (e) {}
1497
+ return false;
1498
+ }
1499
+
1500
+ function isBigInt(obj) {
1501
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
1502
+ return false;
1468
1503
  }
1504
+ try {
1505
+ bigIntValueOf.call(obj);
1506
+ return true;
1507
+ } catch (e) {}
1508
+ return false;
1509
+ }
1469
1510
 
1470
- return obj;
1471
- };
1511
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
1512
+ function has$3(obj, key) {
1513
+ return hasOwn.call(obj, key);
1514
+ }
1472
1515
 
1473
- var merge = function merge(target, source, options) {
1474
- /* eslint no-param-reassign: 0 */
1475
- if (!source) {
1476
- return target;
1477
- }
1516
+ function toStr(obj) {
1517
+ return objectToString.call(obj);
1518
+ }
1478
1519
 
1479
- if (typeof source !== 'object') {
1480
- if (isArray$2(target)) {
1481
- target.push(source);
1482
- } else if (target && typeof target === 'object') {
1483
- if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1484
- target[source] = true;
1485
- }
1486
- } else {
1487
- return [target, source];
1488
- }
1520
+ function nameOf(f) {
1521
+ if (f.name) { return f.name; }
1522
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1523
+ if (m) { return m[1]; }
1524
+ return null;
1525
+ }
1489
1526
 
1490
- return target;
1527
+ function indexOf(xs, x) {
1528
+ if (xs.indexOf) { return xs.indexOf(x); }
1529
+ for (var i = 0, l = xs.length; i < l; i++) {
1530
+ if (xs[i] === x) { return i; }
1491
1531
  }
1532
+ return -1;
1533
+ }
1492
1534
 
1493
- if (!target || typeof target !== 'object') {
1494
- return [target].concat(source);
1535
+ function isMap(x) {
1536
+ if (!mapSize || !x || typeof x !== 'object') {
1537
+ return false;
1495
1538
  }
1539
+ try {
1540
+ mapSize.call(x);
1541
+ try {
1542
+ setSize.call(x);
1543
+ } catch (s) {
1544
+ return true;
1545
+ }
1546
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
1547
+ } catch (e) {}
1548
+ return false;
1549
+ }
1496
1550
 
1497
- var mergeTarget = target;
1498
- if (isArray$2(target) && !isArray$2(source)) {
1499
- mergeTarget = arrayToObject(target, options);
1551
+ function isWeakMap(x) {
1552
+ if (!weakMapHas || !x || typeof x !== 'object') {
1553
+ return false;
1500
1554
  }
1555
+ try {
1556
+ weakMapHas.call(x, weakMapHas);
1557
+ try {
1558
+ weakSetHas.call(x, weakSetHas);
1559
+ } catch (s) {
1560
+ return true;
1561
+ }
1562
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
1563
+ } catch (e) {}
1564
+ return false;
1565
+ }
1501
1566
 
1502
- if (isArray$2(target) && isArray$2(source)) {
1503
- source.forEach(function (item, i) {
1504
- if (has$2.call(target, i)) {
1505
- var targetItem = target[i];
1506
- if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1507
- target[i] = merge(targetItem, item, options);
1508
- } else {
1509
- target.push(item);
1510
- }
1511
- } else {
1512
- target[i] = item;
1513
- }
1514
- });
1515
- return target;
1567
+ function isWeakRef(x) {
1568
+ if (!weakRefDeref || !x || typeof x !== 'object') {
1569
+ return false;
1516
1570
  }
1571
+ try {
1572
+ weakRefDeref.call(x);
1573
+ return true;
1574
+ } catch (e) {}
1575
+ return false;
1576
+ }
1517
1577
 
1518
- return Object.keys(source).reduce(function (acc, key) {
1519
- var value = source[key];
1520
-
1521
- if (has$2.call(acc, key)) {
1522
- acc[key] = merge(acc[key], value, options);
1523
- } else {
1524
- acc[key] = value;
1578
+ function isSet(x) {
1579
+ if (!setSize || !x || typeof x !== 'object') {
1580
+ return false;
1581
+ }
1582
+ try {
1583
+ setSize.call(x);
1584
+ try {
1585
+ mapSize.call(x);
1586
+ } catch (m) {
1587
+ return true;
1525
1588
  }
1526
- return acc;
1527
- }, mergeTarget);
1528
- };
1529
-
1530
- var assign = function assignSingleSource(target, source) {
1531
- return Object.keys(source).reduce(function (acc, key) {
1532
- acc[key] = source[key];
1533
- return acc;
1534
- }, target);
1535
- };
1589
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
1590
+ } catch (e) {}
1591
+ return false;
1592
+ }
1536
1593
 
1537
- var decode = function (str, decoder, charset) {
1538
- var strWithoutPlus = str.replace(/\+/g, ' ');
1539
- if (charset === 'iso-8859-1') {
1540
- // unescape never throws, no try...catch needed:
1541
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1594
+ function isWeakSet(x) {
1595
+ if (!weakSetHas || !x || typeof x !== 'object') {
1596
+ return false;
1542
1597
  }
1543
- // utf-8
1544
1598
  try {
1545
- return decodeURIComponent(strWithoutPlus);
1546
- } catch (e) {
1547
- return strWithoutPlus;
1548
- }
1549
- };
1599
+ weakSetHas.call(x, weakSetHas);
1600
+ try {
1601
+ weakMapHas.call(x, weakMapHas);
1602
+ } catch (s) {
1603
+ return true;
1604
+ }
1605
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
1606
+ } catch (e) {}
1607
+ return false;
1608
+ }
1550
1609
 
1551
- var encode = function encode(str, defaultEncoder, charset, kind, format) {
1552
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1553
- // It has been adapted here for stricter adherence to RFC 3986
1554
- if (str.length === 0) {
1555
- return str;
1610
+ function isElement(x) {
1611
+ if (!x || typeof x !== 'object') { return false; }
1612
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
1613
+ return true;
1556
1614
  }
1615
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
1616
+ }
1557
1617
 
1558
- var string = str;
1559
- if (typeof str === 'symbol') {
1560
- string = Symbol.prototype.toString.call(str);
1561
- } else if (typeof str !== 'string') {
1562
- string = String(str);
1618
+ function inspectString(str, opts) {
1619
+ if (str.length > opts.maxStringLength) {
1620
+ var remaining = str.length - opts.maxStringLength;
1621
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
1622
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1563
1623
  }
1624
+ // eslint-disable-next-line no-control-regex
1625
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
1626
+ return wrapQuotes(s, 'single', opts);
1627
+ }
1564
1628
 
1565
- if (charset === 'iso-8859-1') {
1566
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
1567
- return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
1568
- });
1569
- }
1629
+ function lowbyte(c) {
1630
+ var n = c.charCodeAt(0);
1631
+ var x = {
1632
+ 8: 'b',
1633
+ 9: 't',
1634
+ 10: 'n',
1635
+ 12: 'f',
1636
+ 13: 'r'
1637
+ }[n];
1638
+ if (x) { return '\\' + x; }
1639
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
1640
+ }
1570
1641
 
1571
- var out = '';
1572
- for (var i = 0; i < string.length; ++i) {
1573
- var c = string.charCodeAt(i);
1642
+ function markBoxed(str) {
1643
+ return 'Object(' + str + ')';
1644
+ }
1574
1645
 
1575
- if (
1576
- c === 0x2D // -
1577
- || c === 0x2E // .
1578
- || c === 0x5F // _
1579
- || c === 0x7E // ~
1580
- || (c >= 0x30 && c <= 0x39) // 0-9
1581
- || (c >= 0x41 && c <= 0x5A) // a-z
1582
- || (c >= 0x61 && c <= 0x7A) // A-Z
1583
- || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
1584
- ) {
1585
- out += string.charAt(i);
1586
- continue;
1646
+ function weakCollectionOf(type) {
1647
+ return type + ' { ? }';
1648
+ }
1649
+
1650
+ function collectionOf(type, size, entries, indent) {
1651
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
1652
+ return type + ' (' + size + ') {' + joinedEntries + '}';
1653
+ }
1654
+
1655
+ function singleLineValues(xs) {
1656
+ for (var i = 0; i < xs.length; i++) {
1657
+ if (indexOf(xs[i], '\n') >= 0) {
1658
+ return false;
1587
1659
  }
1660
+ }
1661
+ return true;
1662
+ }
1663
+
1664
+ function getIndent(opts, depth) {
1665
+ var baseIndent;
1666
+ if (opts.indent === '\t') {
1667
+ baseIndent = '\t';
1668
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1669
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
1670
+ } else {
1671
+ return null;
1672
+ }
1673
+ return {
1674
+ base: baseIndent,
1675
+ prev: $join.call(Array(depth + 1), baseIndent)
1676
+ };
1677
+ }
1588
1678
 
1589
- if (c < 0x80) {
1590
- out = out + hexTable[c];
1591
- continue;
1592
- }
1679
+ function indentedJoin(xs, indent) {
1680
+ if (xs.length === 0) { return ''; }
1681
+ var lineJoiner = '\n' + indent.prev + indent.base;
1682
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1683
+ }
1593
1684
 
1594
- if (c < 0x800) {
1595
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
1596
- continue;
1685
+ function arrObjKeys(obj, inspect) {
1686
+ var isArr = isArray$3(obj);
1687
+ var xs = [];
1688
+ if (isArr) {
1689
+ xs.length = obj.length;
1690
+ for (var i = 0; i < obj.length; i++) {
1691
+ xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1597
1692
  }
1598
-
1599
- if (c < 0xD800 || c >= 0xE000) {
1600
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
1601
- continue;
1693
+ }
1694
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1695
+ var symMap;
1696
+ if (hasShammedSymbols) {
1697
+ symMap = {};
1698
+ for (var k = 0; k < syms.length; k++) {
1699
+ symMap['$' + syms[k]] = syms[k];
1602
1700
  }
1603
-
1604
- i += 1;
1605
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
1606
- /* eslint operator-linebreak: [2, "before"] */
1607
- out += hexTable[0xF0 | (c >> 18)]
1608
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
1609
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
1610
- + hexTable[0x80 | (c & 0x3F)];
1611
1701
  }
1612
1702
 
1613
- return out;
1614
- };
1615
-
1616
- var compact = function compact(value) {
1617
- var queue = [{ obj: { o: value }, prop: 'o' }];
1618
- var refs = [];
1619
-
1620
- for (var i = 0; i < queue.length; ++i) {
1621
- var item = queue[i];
1622
- var obj = item.obj[item.prop];
1623
-
1624
- var keys = Object.keys(obj);
1625
- for (var j = 0; j < keys.length; ++j) {
1626
- var key = keys[j];
1627
- var val = obj[key];
1628
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
1629
- queue.push({ obj: obj, prop: key });
1630
- refs.push(val);
1703
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
1704
+ if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1705
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1706
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1707
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1708
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
1709
+ } else if ($test.call(/[^\w$]/, key)) {
1710
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1711
+ } else {
1712
+ xs.push(key + ': ' + inspect(obj[key], obj));
1713
+ }
1714
+ }
1715
+ if (typeof gOPS === 'function') {
1716
+ for (var j = 0; j < syms.length; j++) {
1717
+ if (isEnumerable.call(obj, syms[j])) {
1718
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1631
1719
  }
1632
1720
  }
1633
1721
  }
1722
+ return xs;
1723
+ }
1634
1724
 
1635
- compactQueue(queue);
1636
-
1637
- return value;
1638
- };
1725
+ var GetIntrinsic = getIntrinsic;
1726
+ var callBound = callBound$1;
1727
+ var inspect = objectInspect;
1639
1728
 
1640
- var isRegExp = function isRegExp(obj) {
1641
- return Object.prototype.toString.call(obj) === '[object RegExp]';
1642
- };
1729
+ var $TypeError = GetIntrinsic('%TypeError%');
1730
+ var $WeakMap = GetIntrinsic('%WeakMap%', true);
1731
+ var $Map = GetIntrinsic('%Map%', true);
1643
1732
 
1644
- var isBuffer = function isBuffer(obj) {
1645
- if (!obj || typeof obj !== 'object') {
1646
- return false;
1647
- }
1733
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
1734
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
1735
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
1736
+ var $mapGet = callBound('Map.prototype.get', true);
1737
+ var $mapSet = callBound('Map.prototype.set', true);
1738
+ var $mapHas = callBound('Map.prototype.has', true);
1648
1739
 
1649
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
1740
+ /*
1741
+ * This function traverses the list returning the node corresponding to the
1742
+ * given key.
1743
+ *
1744
+ * That node is also moved to the head of the list, so that if it's accessed
1745
+ * again we don't need to traverse the whole list. By doing so, all the recently
1746
+ * used nodes can be accessed relatively quickly.
1747
+ */
1748
+ var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1749
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1750
+ if (curr.key === key) {
1751
+ prev.next = curr.next;
1752
+ curr.next = list.next;
1753
+ list.next = curr; // eslint-disable-line no-param-reassign
1754
+ return curr;
1755
+ }
1756
+ }
1650
1757
  };
1651
1758
 
1652
- var combine = function combine(a, b) {
1653
- return [].concat(a, b);
1759
+ var listGet = function (objects, key) {
1760
+ var node = listGetNode(objects, key);
1761
+ return node && node.value;
1654
1762
  };
1655
-
1656
- var maybeMap = function maybeMap(val, fn) {
1657
- if (isArray$2(val)) {
1658
- var mapped = [];
1659
- for (var i = 0; i < val.length; i += 1) {
1660
- mapped.push(fn(val[i]));
1661
- }
1662
- return mapped;
1663
- }
1664
- return fn(val);
1763
+ var listSet = function (objects, key, value) {
1764
+ var node = listGetNode(objects, key);
1765
+ if (node) {
1766
+ node.value = value;
1767
+ } else {
1768
+ // Prepend the new node to the beginning of the list
1769
+ objects.next = { // eslint-disable-line no-param-reassign
1770
+ key: key,
1771
+ next: objects.next,
1772
+ value: value
1773
+ };
1774
+ }
1775
+ };
1776
+ var listHas = function (objects, key) {
1777
+ return !!listGetNode(objects, key);
1665
1778
  };
1666
1779
 
1667
- var utils$2 = {
1668
- arrayToObject: arrayToObject,
1669
- assign: assign,
1670
- combine: combine,
1671
- compact: compact,
1672
- decode: decode,
1673
- encode: encode,
1674
- isBuffer: isBuffer,
1675
- isRegExp: isRegExp,
1676
- maybeMap: maybeMap,
1677
- merge: merge
1780
+ var sideChannel = function getSideChannel() {
1781
+ var $wm;
1782
+ var $m;
1783
+ var $o;
1784
+ var channel = {
1785
+ assert: function (key) {
1786
+ if (!channel.has(key)) {
1787
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
1788
+ }
1789
+ },
1790
+ get: function (key) { // eslint-disable-line consistent-return
1791
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1792
+ if ($wm) {
1793
+ return $weakMapGet($wm, key);
1794
+ }
1795
+ } else if ($Map) {
1796
+ if ($m) {
1797
+ return $mapGet($m, key);
1798
+ }
1799
+ } else {
1800
+ if ($o) { // eslint-disable-line no-lonely-if
1801
+ return listGet($o, key);
1802
+ }
1803
+ }
1804
+ },
1805
+ has: function (key) {
1806
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1807
+ if ($wm) {
1808
+ return $weakMapHas($wm, key);
1809
+ }
1810
+ } else if ($Map) {
1811
+ if ($m) {
1812
+ return $mapHas($m, key);
1813
+ }
1814
+ } else {
1815
+ if ($o) { // eslint-disable-line no-lonely-if
1816
+ return listHas($o, key);
1817
+ }
1818
+ }
1819
+ return false;
1820
+ },
1821
+ set: function (key, value) {
1822
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1823
+ if (!$wm) {
1824
+ $wm = new $WeakMap();
1825
+ }
1826
+ $weakMapSet($wm, key, value);
1827
+ } else if ($Map) {
1828
+ if (!$m) {
1829
+ $m = new $Map();
1830
+ }
1831
+ $mapSet($m, key, value);
1832
+ } else {
1833
+ if (!$o) {
1834
+ /*
1835
+ * Initialize the linked list as an empty node, so that we don't have
1836
+ * to special-case handling of the first node: we can always refer to
1837
+ * it as (previous node).next, instead of something like (list).head
1838
+ */
1839
+ $o = { key: {}, next: null };
1840
+ }
1841
+ listSet($o, key, value);
1842
+ }
1843
+ }
1844
+ };
1845
+ return channel;
1678
1846
  };
1679
1847
 
1680
- var getSideChannel = sideChannel;
1681
- var utils$1 = utils$2;
1682
- var formats$1 = formats$3;
1683
- var has$1 = Object.prototype.hasOwnProperty;
1848
+ var replace = String.prototype.replace;
1849
+ var percentTwenties = /%20/g;
1684
1850
 
1685
- var arrayPrefixGenerators = {
1686
- brackets: function brackets(prefix) {
1687
- return prefix + '[]';
1688
- },
1689
- comma: 'comma',
1690
- indices: function indices(prefix, key) {
1691
- return prefix + '[' + key + ']';
1851
+ var Format = {
1852
+ RFC1738: 'RFC1738',
1853
+ RFC3986: 'RFC3986'
1854
+ };
1855
+
1856
+ var formats$3 = {
1857
+ 'default': Format.RFC3986,
1858
+ formatters: {
1859
+ RFC1738: function (value) {
1860
+ return replace.call(value, percentTwenties, '+');
1861
+ },
1862
+ RFC3986: function (value) {
1863
+ return String(value);
1864
+ }
1692
1865
  },
1693
- repeat: function repeat(prefix) {
1694
- return prefix;
1695
- }
1866
+ RFC1738: Format.RFC1738,
1867
+ RFC3986: Format.RFC3986
1696
1868
  };
1697
1869
 
1698
- var isArray$1 = Array.isArray;
1699
- var split = String.prototype.split;
1700
- var push = Array.prototype.push;
1701
- var pushToArray = function (arr, valueOrArray) {
1702
- push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
1703
- };
1870
+ var formats$2 = formats$3;
1704
1871
 
1705
- var toISO = Date.prototype.toISOString;
1872
+ var has$2 = Object.prototype.hasOwnProperty;
1873
+ var isArray$2 = Array.isArray;
1706
1874
 
1707
- var defaultFormat = formats$1['default'];
1708
- var defaults$1 = {
1709
- addQueryPrefix: false,
1710
- allowDots: false,
1711
- charset: 'utf-8',
1712
- charsetSentinel: false,
1713
- delimiter: '&',
1714
- encode: true,
1715
- encoder: utils$1.encode,
1716
- encodeValuesOnly: false,
1717
- format: defaultFormat,
1718
- formatter: formats$1.formatters[defaultFormat],
1719
- // deprecated
1720
- indices: false,
1721
- serializeDate: function serializeDate(date) {
1722
- return toISO.call(date);
1723
- },
1724
- skipNulls: false,
1725
- strictNullHandling: false
1726
- };
1875
+ var hexTable = (function () {
1876
+ var array = [];
1877
+ for (var i = 0; i < 256; ++i) {
1878
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1879
+ }
1727
1880
 
1728
- var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
1729
- return typeof v === 'string'
1730
- || typeof v === 'number'
1731
- || typeof v === 'boolean'
1732
- || typeof v === 'symbol'
1733
- || typeof v === 'bigint';
1734
- };
1881
+ return array;
1882
+ }());
1735
1883
 
1736
- var sentinel = {};
1884
+ var compactQueue = function compactQueue(queue) {
1885
+ while (queue.length > 1) {
1886
+ var item = queue.pop();
1887
+ var obj = item.obj[item.prop];
1737
1888
 
1738
- var stringify$1 = function stringify(
1739
- object,
1740
- prefix,
1741
- generateArrayPrefix,
1742
- commaRoundTrip,
1743
- strictNullHandling,
1744
- skipNulls,
1745
- encoder,
1746
- filter,
1747
- sort,
1748
- allowDots,
1749
- serializeDate,
1750
- format,
1751
- formatter,
1752
- encodeValuesOnly,
1753
- charset,
1754
- sideChannel
1755
- ) {
1756
- var obj = object;
1889
+ if (isArray$2(obj)) {
1890
+ var compacted = [];
1757
1891
 
1758
- var tmpSc = sideChannel;
1759
- var step = 0;
1760
- var findFlag = false;
1761
- while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
1762
- // Where object last appeared in the ref tree
1763
- var pos = tmpSc.get(object);
1764
- step += 1;
1765
- if (typeof pos !== 'undefined') {
1766
- if (pos === step) {
1767
- throw new RangeError('Cyclic object value');
1768
- } else {
1769
- findFlag = true; // Break while
1892
+ for (var j = 0; j < obj.length; ++j) {
1893
+ if (typeof obj[j] !== 'undefined') {
1894
+ compacted.push(obj[j]);
1895
+ }
1770
1896
  }
1771
- }
1772
- if (typeof tmpSc.get(sentinel) === 'undefined') {
1773
- step = 0;
1897
+
1898
+ item.obj[item.prop] = compacted;
1774
1899
  }
1775
1900
  }
1901
+ };
1776
1902
 
1777
- if (typeof filter === 'function') {
1778
- obj = filter(prefix, obj);
1779
- } else if (obj instanceof Date) {
1780
- obj = serializeDate(obj);
1781
- } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1782
- obj = utils$1.maybeMap(obj, function (value) {
1783
- if (value instanceof Date) {
1784
- return serializeDate(value);
1785
- }
1786
- return value;
1787
- });
1903
+ var arrayToObject = function arrayToObject(source, options) {
1904
+ var obj = options && options.plainObjects ? Object.create(null) : {};
1905
+ for (var i = 0; i < source.length; ++i) {
1906
+ if (typeof source[i] !== 'undefined') {
1907
+ obj[i] = source[i];
1908
+ }
1788
1909
  }
1789
1910
 
1790
- if (obj === null) {
1791
- if (strictNullHandling) {
1792
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
1793
- }
1911
+ return obj;
1912
+ };
1794
1913
 
1795
- obj = '';
1914
+ var merge = function merge(target, source, options) {
1915
+ /* eslint no-param-reassign: 0 */
1916
+ if (!source) {
1917
+ return target;
1796
1918
  }
1797
1919
 
1798
- if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
1799
- if (encoder) {
1800
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
1801
- if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
1802
- var valuesArray = split.call(String(obj), ',');
1803
- var valuesJoined = '';
1804
- for (var i = 0; i < valuesArray.length; ++i) {
1805
- valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
1806
- }
1807
- return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
1920
+ if (typeof source !== 'object') {
1921
+ if (isArray$2(target)) {
1922
+ target.push(source);
1923
+ } else if (target && typeof target === 'object') {
1924
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1925
+ target[source] = true;
1808
1926
  }
1809
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
1927
+ } else {
1928
+ return [target, source];
1810
1929
  }
1811
- return [formatter(prefix) + '=' + formatter(String(obj))];
1812
- }
1813
1930
 
1814
- var values = [];
1931
+ return target;
1932
+ }
1815
1933
 
1816
- if (typeof obj === 'undefined') {
1817
- return values;
1934
+ if (!target || typeof target !== 'object') {
1935
+ return [target].concat(source);
1818
1936
  }
1819
1937
 
1820
- var objKeys;
1821
- if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1822
- // we need to join elements in
1823
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
1824
- } else if (isArray$1(filter)) {
1825
- objKeys = filter;
1826
- } else {
1827
- var keys = Object.keys(obj);
1828
- objKeys = sort ? keys.sort(sort) : keys;
1938
+ var mergeTarget = target;
1939
+ if (isArray$2(target) && !isArray$2(source)) {
1940
+ mergeTarget = arrayToObject(target, options);
1829
1941
  }
1830
1942
 
1831
- var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
1943
+ if (isArray$2(target) && isArray$2(source)) {
1944
+ source.forEach(function (item, i) {
1945
+ if (has$2.call(target, i)) {
1946
+ var targetItem = target[i];
1947
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1948
+ target[i] = merge(targetItem, item, options);
1949
+ } else {
1950
+ target.push(item);
1951
+ }
1952
+ } else {
1953
+ target[i] = item;
1954
+ }
1955
+ });
1956
+ return target;
1957
+ }
1832
1958
 
1833
- for (var j = 0; j < objKeys.length; ++j) {
1834
- var key = objKeys[j];
1835
- var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
1959
+ return Object.keys(source).reduce(function (acc, key) {
1960
+ var value = source[key];
1836
1961
 
1837
- if (skipNulls && value === null) {
1838
- continue;
1962
+ if (has$2.call(acc, key)) {
1963
+ acc[key] = merge(acc[key], value, options);
1964
+ } else {
1965
+ acc[key] = value;
1839
1966
  }
1967
+ return acc;
1968
+ }, mergeTarget);
1969
+ };
1840
1970
 
1841
- var keyPrefix = isArray$1(obj)
1842
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
1843
- : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
1971
+ var assign = function assignSingleSource(target, source) {
1972
+ return Object.keys(source).reduce(function (acc, key) {
1973
+ acc[key] = source[key];
1974
+ return acc;
1975
+ }, target);
1976
+ };
1844
1977
 
1845
- sideChannel.set(object, step);
1846
- var valueSideChannel = getSideChannel();
1847
- valueSideChannel.set(sentinel, sideChannel);
1848
- pushToArray(values, stringify(
1849
- value,
1850
- keyPrefix,
1851
- generateArrayPrefix,
1852
- commaRoundTrip,
1853
- strictNullHandling,
1854
- skipNulls,
1855
- encoder,
1856
- filter,
1857
- sort,
1858
- allowDots,
1859
- serializeDate,
1860
- format,
1861
- formatter,
1862
- encodeValuesOnly,
1863
- charset,
1864
- valueSideChannel
1865
- ));
1978
+ var decode = function (str, decoder, charset) {
1979
+ var strWithoutPlus = str.replace(/\+/g, ' ');
1980
+ if (charset === 'iso-8859-1') {
1981
+ // unescape never throws, no try...catch needed:
1982
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1983
+ }
1984
+ // utf-8
1985
+ try {
1986
+ return decodeURIComponent(strWithoutPlus);
1987
+ } catch (e) {
1988
+ return strWithoutPlus;
1866
1989
  }
1867
-
1868
- return values;
1869
1990
  };
1870
1991
 
1871
- var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
1872
- if (!opts) {
1873
- return defaults$1;
1992
+ var encode = function encode(str, defaultEncoder, charset, kind, format) {
1993
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1994
+ // It has been adapted here for stricter adherence to RFC 3986
1995
+ if (str.length === 0) {
1996
+ return str;
1997
+ }
1998
+
1999
+ var string = str;
2000
+ if (typeof str === 'symbol') {
2001
+ string = Symbol.prototype.toString.call(str);
2002
+ } else if (typeof str !== 'string') {
2003
+ string = String(str);
2004
+ }
2005
+
2006
+ if (charset === 'iso-8859-1') {
2007
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
2008
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
2009
+ });
1874
2010
  }
1875
2011
 
1876
- if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
1877
- throw new TypeError('Encoder has to be a function.');
1878
- }
2012
+ var out = '';
2013
+ for (var i = 0; i < string.length; ++i) {
2014
+ var c = string.charCodeAt(i);
2015
+
2016
+ if (
2017
+ c === 0x2D // -
2018
+ || c === 0x2E // .
2019
+ || c === 0x5F // _
2020
+ || c === 0x7E // ~
2021
+ || (c >= 0x30 && c <= 0x39) // 0-9
2022
+ || (c >= 0x41 && c <= 0x5A) // a-z
2023
+ || (c >= 0x61 && c <= 0x7A) // A-Z
2024
+ || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
2025
+ ) {
2026
+ out += string.charAt(i);
2027
+ continue;
2028
+ }
2029
+
2030
+ if (c < 0x80) {
2031
+ out = out + hexTable[c];
2032
+ continue;
2033
+ }
1879
2034
 
1880
- var charset = opts.charset || defaults$1.charset;
1881
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
1882
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
1883
- }
2035
+ if (c < 0x800) {
2036
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
2037
+ continue;
2038
+ }
1884
2039
 
1885
- var format = formats$1['default'];
1886
- if (typeof opts.format !== 'undefined') {
1887
- if (!has$1.call(formats$1.formatters, opts.format)) {
1888
- throw new TypeError('Unknown format option provided.');
2040
+ if (c < 0xD800 || c >= 0xE000) {
2041
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
2042
+ continue;
1889
2043
  }
1890
- format = opts.format;
1891
- }
1892
- var formatter = formats$1.formatters[format];
1893
2044
 
1894
- var filter = defaults$1.filter;
1895
- if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
1896
- filter = opts.filter;
2045
+ i += 1;
2046
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
2047
+ /* eslint operator-linebreak: [2, "before"] */
2048
+ out += hexTable[0xF0 | (c >> 18)]
2049
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
2050
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
2051
+ + hexTable[0x80 | (c & 0x3F)];
1897
2052
  }
1898
2053
 
1899
- return {
1900
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
1901
- allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
1902
- charset: charset,
1903
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
1904
- delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
1905
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
1906
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
1907
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
1908
- filter: filter,
1909
- format: format,
1910
- formatter: formatter,
1911
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
1912
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
1913
- sort: typeof opts.sort === 'function' ? opts.sort : null,
1914
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
1915
- };
2054
+ return out;
1916
2055
  };
1917
2056
 
1918
- var stringify_1 = function (object, opts) {
1919
- var obj = object;
1920
- var options = normalizeStringifyOptions(opts);
2057
+ var compact = function compact(value) {
2058
+ var queue = [{ obj: { o: value }, prop: 'o' }];
2059
+ var refs = [];
1921
2060
 
1922
- var objKeys;
1923
- var filter;
2061
+ for (var i = 0; i < queue.length; ++i) {
2062
+ var item = queue[i];
2063
+ var obj = item.obj[item.prop];
1924
2064
 
1925
- if (typeof options.filter === 'function') {
1926
- filter = options.filter;
1927
- obj = filter('', obj);
1928
- } else if (isArray$1(options.filter)) {
1929
- filter = options.filter;
1930
- objKeys = filter;
2065
+ var keys = Object.keys(obj);
2066
+ for (var j = 0; j < keys.length; ++j) {
2067
+ var key = keys[j];
2068
+ var val = obj[key];
2069
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
2070
+ queue.push({ obj: obj, prop: key });
2071
+ refs.push(val);
2072
+ }
2073
+ }
1931
2074
  }
1932
2075
 
1933
- var keys = [];
1934
-
1935
- if (typeof obj !== 'object' || obj === null) {
1936
- return '';
1937
- }
2076
+ compactQueue(queue);
1938
2077
 
1939
- var arrayFormat;
1940
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
1941
- arrayFormat = opts.arrayFormat;
1942
- } else if (opts && 'indices' in opts) {
1943
- arrayFormat = opts.indices ? 'indices' : 'repeat';
1944
- } else {
1945
- arrayFormat = 'indices';
1946
- }
2078
+ return value;
2079
+ };
1947
2080
 
1948
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
1949
- if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
1950
- throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
1951
- }
1952
- var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
2081
+ var isRegExp = function isRegExp(obj) {
2082
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
2083
+ };
1953
2084
 
1954
- if (!objKeys) {
1955
- objKeys = Object.keys(obj);
2085
+ var isBuffer = function isBuffer(obj) {
2086
+ if (!obj || typeof obj !== 'object') {
2087
+ return false;
1956
2088
  }
1957
2089
 
1958
- if (options.sort) {
1959
- objKeys.sort(options.sort);
1960
- }
2090
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
2091
+ };
1961
2092
 
1962
- var sideChannel = getSideChannel();
1963
- for (var i = 0; i < objKeys.length; ++i) {
1964
- var key = objKeys[i];
2093
+ var combine = function combine(a, b) {
2094
+ return [].concat(a, b);
2095
+ };
1965
2096
 
1966
- if (options.skipNulls && obj[key] === null) {
1967
- continue;
2097
+ var maybeMap = function maybeMap(val, fn) {
2098
+ if (isArray$2(val)) {
2099
+ var mapped = [];
2100
+ for (var i = 0; i < val.length; i += 1) {
2101
+ mapped.push(fn(val[i]));
1968
2102
  }
1969
- pushToArray(keys, stringify$1(
1970
- obj[key],
1971
- key,
1972
- generateArrayPrefix,
1973
- commaRoundTrip,
1974
- options.strictNullHandling,
1975
- options.skipNulls,
1976
- options.encode ? options.encoder : null,
1977
- options.filter,
1978
- options.sort,
1979
- options.allowDots,
1980
- options.serializeDate,
1981
- options.format,
1982
- options.formatter,
1983
- options.encodeValuesOnly,
1984
- options.charset,
1985
- sideChannel
1986
- ));
2103
+ return mapped;
1987
2104
  }
2105
+ return fn(val);
2106
+ };
1988
2107
 
1989
- var joined = keys.join(options.delimiter);
1990
- var prefix = options.addQueryPrefix === true ? '?' : '';
2108
+ var utils$2 = {
2109
+ arrayToObject: arrayToObject,
2110
+ assign: assign,
2111
+ combine: combine,
2112
+ compact: compact,
2113
+ decode: decode,
2114
+ encode: encode,
2115
+ isBuffer: isBuffer,
2116
+ isRegExp: isRegExp,
2117
+ maybeMap: maybeMap,
2118
+ merge: merge
2119
+ };
1991
2120
 
1992
- if (options.charsetSentinel) {
1993
- if (options.charset === 'iso-8859-1') {
1994
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
1995
- prefix += 'utf8=%26%2310003%3B&';
1996
- } else {
1997
- // encodeURIComponent('✓')
1998
- prefix += 'utf8=%E2%9C%93&';
1999
- }
2000
- }
2121
+ var getSideChannel = sideChannel;
2122
+ var utils$1 = utils$2;
2123
+ var formats$1 = formats$3;
2124
+ var has$1 = Object.prototype.hasOwnProperty;
2001
2125
 
2002
- return joined.length > 0 ? prefix + joined : '';
2126
+ var arrayPrefixGenerators = {
2127
+ brackets: function brackets(prefix) {
2128
+ return prefix + '[]';
2129
+ },
2130
+ comma: 'comma',
2131
+ indices: function indices(prefix, key) {
2132
+ return prefix + '[' + key + ']';
2133
+ },
2134
+ repeat: function repeat(prefix) {
2135
+ return prefix;
2136
+ }
2003
2137
  };
2004
2138
 
2005
- var utils = utils$2;
2139
+ var isArray$1 = Array.isArray;
2140
+ var push = Array.prototype.push;
2141
+ var pushToArray = function (arr, valueOrArray) {
2142
+ push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
2143
+ };
2006
2144
 
2007
- var has = Object.prototype.hasOwnProperty;
2008
- var isArray = Array.isArray;
2145
+ var toISO = Date.prototype.toISOString;
2009
2146
 
2010
- var defaults = {
2147
+ var defaultFormat = formats$1['default'];
2148
+ var defaults$1 = {
2149
+ addQueryPrefix: false,
2011
2150
  allowDots: false,
2012
- allowPrototypes: false,
2013
- allowSparse: false,
2014
- arrayLimit: 20,
2015
2151
  charset: 'utf-8',
2016
2152
  charsetSentinel: false,
2017
- comma: false,
2018
- decoder: utils.decode,
2019
2153
  delimiter: '&',
2020
- depth: 5,
2021
- ignoreQueryPrefix: false,
2022
- interpretNumericEntities: false,
2023
- parameterLimit: 1000,
2024
- parseArrays: true,
2025
- plainObjects: false,
2154
+ encode: true,
2155
+ encoder: utils$1.encode,
2156
+ encodeValuesOnly: false,
2157
+ format: defaultFormat,
2158
+ formatter: formats$1.formatters[defaultFormat],
2159
+ // deprecated
2160
+ indices: false,
2161
+ serializeDate: function serializeDate(date) {
2162
+ return toISO.call(date);
2163
+ },
2164
+ skipNulls: false,
2026
2165
  strictNullHandling: false
2027
2166
  };
2028
2167
 
2029
- var interpretNumericEntities = function (str) {
2030
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
2031
- return String.fromCharCode(parseInt(numberStr, 10));
2032
- });
2033
- };
2034
-
2035
- var parseArrayValue = function (val, options) {
2036
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
2037
- return val.split(',');
2038
- }
2039
-
2040
- return val;
2041
- };
2042
-
2043
- // This is what browsers will submit when the ✓ character occurs in an
2044
- // application/x-www-form-urlencoded body and the encoding of the page containing
2045
- // the form is iso-8859-1, or when the submitted form has an accept-charset
2046
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
2047
- // the ✓ character, such as us-ascii.
2048
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2168
+ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
2169
+ return typeof v === 'string'
2170
+ || typeof v === 'number'
2171
+ || typeof v === 'boolean'
2172
+ || typeof v === 'symbol'
2173
+ || typeof v === 'bigint';
2174
+ };
2049
2175
 
2050
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
2051
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2176
+ var sentinel = {};
2052
2177
 
2053
- var parseValues = function parseQueryStringValues(str, options) {
2054
- var obj = {};
2055
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2056
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2057
- var parts = cleanStr.split(options.delimiter, limit);
2058
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
2059
- var i;
2178
+ var stringify$1 = function stringify(
2179
+ object,
2180
+ prefix,
2181
+ generateArrayPrefix,
2182
+ commaRoundTrip,
2183
+ strictNullHandling,
2184
+ skipNulls,
2185
+ encoder,
2186
+ filter,
2187
+ sort,
2188
+ allowDots,
2189
+ serializeDate,
2190
+ format,
2191
+ formatter,
2192
+ encodeValuesOnly,
2193
+ charset,
2194
+ sideChannel
2195
+ ) {
2196
+ var obj = object;
2060
2197
 
2061
- var charset = options.charset;
2062
- if (options.charsetSentinel) {
2063
- for (i = 0; i < parts.length; ++i) {
2064
- if (parts[i].indexOf('utf8=') === 0) {
2065
- if (parts[i] === charsetSentinel) {
2066
- charset = 'utf-8';
2067
- } else if (parts[i] === isoSentinel) {
2068
- charset = 'iso-8859-1';
2069
- }
2070
- skipIndex = i;
2071
- i = parts.length; // The eslint settings do not allow break;
2198
+ var tmpSc = sideChannel;
2199
+ var step = 0;
2200
+ var findFlag = false;
2201
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
2202
+ // Where object last appeared in the ref tree
2203
+ var pos = tmpSc.get(object);
2204
+ step += 1;
2205
+ if (typeof pos !== 'undefined') {
2206
+ if (pos === step) {
2207
+ throw new RangeError('Cyclic object value');
2208
+ } else {
2209
+ findFlag = true; // Break while
2072
2210
  }
2073
2211
  }
2212
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
2213
+ step = 0;
2214
+ }
2074
2215
  }
2075
2216
 
2076
- for (i = 0; i < parts.length; ++i) {
2077
- if (i === skipIndex) {
2078
- continue;
2217
+ if (typeof filter === 'function') {
2218
+ obj = filter(prefix, obj);
2219
+ } else if (obj instanceof Date) {
2220
+ obj = serializeDate(obj);
2221
+ } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2222
+ obj = utils$1.maybeMap(obj, function (value) {
2223
+ if (value instanceof Date) {
2224
+ return serializeDate(value);
2225
+ }
2226
+ return value;
2227
+ });
2228
+ }
2229
+
2230
+ if (obj === null) {
2231
+ if (strictNullHandling) {
2232
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
2079
2233
  }
2080
- var part = parts[i];
2081
2234
 
2082
- var bracketEqualsPos = part.indexOf(']=');
2083
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
2235
+ obj = '';
2236
+ }
2084
2237
 
2085
- var key, val;
2086
- if (pos === -1) {
2087
- key = options.decoder(part, defaults.decoder, charset, 'key');
2088
- val = options.strictNullHandling ? null : '';
2089
- } else {
2090
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
2091
- val = utils.maybeMap(
2092
- parseArrayValue(part.slice(pos + 1), options),
2093
- function (encodedVal) {
2094
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
2095
- }
2096
- );
2238
+ if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
2239
+ if (encoder) {
2240
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
2241
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
2097
2242
  }
2243
+ return [formatter(prefix) + '=' + formatter(String(obj))];
2244
+ }
2098
2245
 
2099
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
2100
- val = interpretNumericEntities(val);
2101
- }
2246
+ var values = [];
2102
2247
 
2103
- if (part.indexOf('[]=') > -1) {
2104
- val = isArray(val) ? [val] : val;
2105
- }
2248
+ if (typeof obj === 'undefined') {
2249
+ return values;
2250
+ }
2106
2251
 
2107
- if (has.call(obj, key)) {
2108
- obj[key] = utils.combine(obj[key], val);
2109
- } else {
2110
- obj[key] = val;
2252
+ var objKeys;
2253
+ if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2254
+ // we need to join elements in
2255
+ if (encodeValuesOnly && encoder) {
2256
+ obj = utils$1.maybeMap(obj, encoder);
2111
2257
  }
2258
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
2259
+ } else if (isArray$1(filter)) {
2260
+ objKeys = filter;
2261
+ } else {
2262
+ var keys = Object.keys(obj);
2263
+ objKeys = sort ? keys.sort(sort) : keys;
2112
2264
  }
2113
2265
 
2114
- return obj;
2115
- };
2116
-
2117
- var parseObject = function (chain, val, options, valuesParsed) {
2118
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
2266
+ var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
2119
2267
 
2120
- for (var i = chain.length - 1; i >= 0; --i) {
2121
- var obj;
2122
- var root = chain[i];
2268
+ for (var j = 0; j < objKeys.length; ++j) {
2269
+ var key = objKeys[j];
2270
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
2123
2271
 
2124
- if (root === '[]' && options.parseArrays) {
2125
- obj = [].concat(leaf);
2126
- } else {
2127
- obj = options.plainObjects ? Object.create(null) : {};
2128
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2129
- var index = parseInt(cleanRoot, 10);
2130
- if (!options.parseArrays && cleanRoot === '') {
2131
- obj = { 0: leaf };
2132
- } else if (
2133
- !isNaN(index)
2134
- && root !== cleanRoot
2135
- && String(index) === cleanRoot
2136
- && index >= 0
2137
- && (options.parseArrays && index <= options.arrayLimit)
2138
- ) {
2139
- obj = [];
2140
- obj[index] = leaf;
2141
- } else if (cleanRoot !== '__proto__') {
2142
- obj[cleanRoot] = leaf;
2143
- }
2272
+ if (skipNulls && value === null) {
2273
+ continue;
2144
2274
  }
2145
2275
 
2146
- leaf = obj;
2276
+ var keyPrefix = isArray$1(obj)
2277
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
2278
+ : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
2279
+
2280
+ sideChannel.set(object, step);
2281
+ var valueSideChannel = getSideChannel();
2282
+ valueSideChannel.set(sentinel, sideChannel);
2283
+ pushToArray(values, stringify(
2284
+ value,
2285
+ keyPrefix,
2286
+ generateArrayPrefix,
2287
+ commaRoundTrip,
2288
+ strictNullHandling,
2289
+ skipNulls,
2290
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
2291
+ filter,
2292
+ sort,
2293
+ allowDots,
2294
+ serializeDate,
2295
+ format,
2296
+ formatter,
2297
+ encodeValuesOnly,
2298
+ charset,
2299
+ valueSideChannel
2300
+ ));
2147
2301
  }
2148
2302
 
2149
- return leaf;
2303
+ return values;
2150
2304
  };
2151
2305
 
2152
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2153
- if (!givenKey) {
2154
- return;
2306
+ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
2307
+ if (!opts) {
2308
+ return defaults$1;
2155
2309
  }
2156
2310
 
2157
- // Transform dot notation to bracket notation
2158
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
2159
-
2160
- // The regex chunks
2161
-
2162
- var brackets = /(\[[^[\]]*])/;
2163
- var child = /(\[[^[\]]*])/g;
2164
-
2165
- // Get the parent
2166
-
2167
- var segment = options.depth > 0 && brackets.exec(key);
2168
- var parent = segment ? key.slice(0, segment.index) : key;
2311
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
2312
+ throw new TypeError('Encoder has to be a function.');
2313
+ }
2169
2314
 
2170
- // Stash the parent if it exists
2315
+ var charset = opts.charset || defaults$1.charset;
2316
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2317
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2318
+ }
2171
2319
 
2172
- var keys = [];
2173
- if (parent) {
2174
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
2175
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
2176
- if (!options.allowPrototypes) {
2177
- return;
2178
- }
2320
+ var format = formats$1['default'];
2321
+ if (typeof opts.format !== 'undefined') {
2322
+ if (!has$1.call(formats$1.formatters, opts.format)) {
2323
+ throw new TypeError('Unknown format option provided.');
2179
2324
  }
2325
+ format = opts.format;
2326
+ }
2327
+ var formatter = formats$1.formatters[format];
2180
2328
 
2181
- keys.push(parent);
2329
+ var filter = defaults$1.filter;
2330
+ if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
2331
+ filter = opts.filter;
2182
2332
  }
2183
2333
 
2184
- // Loop through children appending to the array until we hit depth
2334
+ return {
2335
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
2336
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
2337
+ charset: charset,
2338
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
2339
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
2340
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
2341
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
2342
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
2343
+ filter: filter,
2344
+ format: format,
2345
+ formatter: formatter,
2346
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
2347
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
2348
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
2349
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
2350
+ };
2351
+ };
2185
2352
 
2186
- var i = 0;
2187
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2188
- i += 1;
2189
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2190
- if (!options.allowPrototypes) {
2191
- return;
2192
- }
2193
- }
2194
- keys.push(segment[1]);
2195
- }
2353
+ var stringify_1 = function (object, opts) {
2354
+ var obj = object;
2355
+ var options = normalizeStringifyOptions(opts);
2196
2356
 
2197
- // If there's a remainder, just add whatever is left
2357
+ var objKeys;
2358
+ var filter;
2198
2359
 
2199
- if (segment) {
2200
- keys.push('[' + key.slice(segment.index) + ']');
2360
+ if (typeof options.filter === 'function') {
2361
+ filter = options.filter;
2362
+ obj = filter('', obj);
2363
+ } else if (isArray$1(options.filter)) {
2364
+ filter = options.filter;
2365
+ objKeys = filter;
2201
2366
  }
2202
2367
 
2203
- return parseObject(keys, val, options, valuesParsed);
2204
- };
2368
+ var keys = [];
2205
2369
 
2206
- var normalizeParseOptions = function normalizeParseOptions(opts) {
2207
- if (!opts) {
2208
- return defaults;
2370
+ if (typeof obj !== 'object' || obj === null) {
2371
+ return '';
2209
2372
  }
2210
2373
 
2211
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
2212
- throw new TypeError('Decoder has to be a function.');
2374
+ var arrayFormat;
2375
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
2376
+ arrayFormat = opts.arrayFormat;
2377
+ } else if (opts && 'indices' in opts) {
2378
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
2379
+ } else {
2380
+ arrayFormat = 'indices';
2213
2381
  }
2214
2382
 
2215
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2216
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2383
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
2384
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
2385
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
2217
2386
  }
2218
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
2219
-
2220
- return {
2221
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
2222
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
2223
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2224
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2225
- charset: charset,
2226
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2227
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2228
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2229
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2230
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2231
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2232
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2233
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2234
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2235
- parseArrays: opts.parseArrays !== false,
2236
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2237
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2238
- };
2239
- };
2240
-
2241
- var parse$1 = function (str, opts) {
2242
- var options = normalizeParseOptions(opts);
2387
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
2243
2388
 
2244
- if (str === '' || str === null || typeof str === 'undefined') {
2245
- return options.plainObjects ? Object.create(null) : {};
2389
+ if (!objKeys) {
2390
+ objKeys = Object.keys(obj);
2246
2391
  }
2247
2392
 
2248
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2249
- var obj = options.plainObjects ? Object.create(null) : {};
2393
+ if (options.sort) {
2394
+ objKeys.sort(options.sort);
2395
+ }
2250
2396
 
2251
- // Iterate over the keys and setup the new object
2397
+ var sideChannel = getSideChannel();
2398
+ for (var i = 0; i < objKeys.length; ++i) {
2399
+ var key = objKeys[i];
2252
2400
 
2253
- var keys = Object.keys(tempObj);
2254
- for (var i = 0; i < keys.length; ++i) {
2255
- var key = keys[i];
2256
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2257
- obj = utils.merge(obj, newObj, options);
2401
+ if (options.skipNulls && obj[key] === null) {
2402
+ continue;
2403
+ }
2404
+ pushToArray(keys, stringify$1(
2405
+ obj[key],
2406
+ key,
2407
+ generateArrayPrefix,
2408
+ commaRoundTrip,
2409
+ options.strictNullHandling,
2410
+ options.skipNulls,
2411
+ options.encode ? options.encoder : null,
2412
+ options.filter,
2413
+ options.sort,
2414
+ options.allowDots,
2415
+ options.serializeDate,
2416
+ options.format,
2417
+ options.formatter,
2418
+ options.encodeValuesOnly,
2419
+ options.charset,
2420
+ sideChannel
2421
+ ));
2258
2422
  }
2259
2423
 
2260
- if (options.allowSparse === true) {
2261
- return obj;
2424
+ var joined = keys.join(options.delimiter);
2425
+ var prefix = options.addQueryPrefix === true ? '?' : '';
2426
+
2427
+ if (options.charsetSentinel) {
2428
+ if (options.charset === 'iso-8859-1') {
2429
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
2430
+ prefix += 'utf8=%26%2310003%3B&';
2431
+ } else {
2432
+ // encodeURIComponent('✓')
2433
+ prefix += 'utf8=%E2%9C%93&';
2434
+ }
2262
2435
  }
2263
2436
 
2264
- return utils.compact(obj);
2437
+ return joined.length > 0 ? prefix + joined : '';
2265
2438
  };
2266
2439
 
2267
- var stringify = stringify_1;
2268
- var parse = parse$1;
2269
- var formats = formats$3;
2270
-
2271
- var lib = {
2272
- formats: formats,
2273
- parse: parse,
2274
- stringify: stringify
2275
- };
2440
+ var utils = utils$2;
2276
2441
 
2277
- var _globalProps$organiza;
2278
- var newInstallationParams = lib.stringify({
2279
- integrator_id: initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
2280
- integrator_type: "Organization",
2281
- redirect_path: "/projects/new"
2282
- });
2283
- var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
2284
- var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
2442
+ var has = Object.prototype.hasOwnProperty;
2443
+ var isArray = Array.isArray;
2285
2444
 
2286
- var Configure = reactUtils.withT(function (_ref) {
2287
- var t = _ref.t,
2288
- isConnected = _ref.isConnected,
2289
- installationUrl = _ref.installationUrl;
2290
- return /*#__PURE__*/React__default["default"].createElement("div", {
2291
- className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
2292
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
2293
- className: "mt-1 text-indigo-600 xl:mt-3",
2294
- href: installationUrl,
2295
- icon: isConnected ? neetoIcons.Settings : neetoIcons.Plus,
2296
- iconPosition: "left",
2297
- iconSize: 20,
2298
- size: "small",
2299
- style: "text"
2300
- }, isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")));
2301
- });
2445
+ var defaults = {
2446
+ allowDots: false,
2447
+ allowPrototypes: false,
2448
+ allowSparse: false,
2449
+ arrayLimit: 20,
2450
+ charset: 'utf-8',
2451
+ charsetSentinel: false,
2452
+ comma: false,
2453
+ decoder: utils.decode,
2454
+ delimiter: '&',
2455
+ depth: 5,
2456
+ ignoreQueryPrefix: false,
2457
+ interpretNumericEntities: false,
2458
+ parameterLimit: 1000,
2459
+ parseArrays: true,
2460
+ plainObjects: false,
2461
+ strictNullHandling: false
2462
+ };
2302
2463
 
2303
- var Header = reactUtils.withT(function (_ref) {
2304
- var t = _ref.t;
2305
- return /*#__PURE__*/React__default["default"].createElement("div", {
2306
- className: "neeto-ui-text-gray-800 mb-1 flex w-full flex-row items-center space-x-2 font-sans text-lg font-medium leading-6 antialiased"
2307
- }, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
2308
- size: 16
2309
- }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2310
- style: "h4"
2311
- }, t("neetoGithub.github")));
2312
- });
2464
+ var interpretNumericEntities = function (str) {
2465
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
2466
+ return String.fromCharCode(parseInt(numberStr, 10));
2467
+ });
2468
+ };
2313
2469
 
2314
- var List$1 = reactUtils.withT(function (_ref) {
2315
- var t = _ref.t,
2316
- accounts = _ref.accounts;
2317
- return accounts.map(function (_ref2) {
2318
- var id = _ref2.id,
2319
- name = _ref2.name,
2320
- avatarUrl = _ref2.avatarUrl,
2321
- type = _ref2.type,
2322
- profileUrl = _ref2.profileUrl,
2323
- count = _ref2.count;
2324
- return /*#__PURE__*/React__default["default"].createElement("div", {
2325
- className: "neeto-ui-border-gray-300 flex w-full items-center space-x-2 border-b border-l-0 border-r-0 border-t-0 border-solid p-2",
2326
- key: id
2327
- }, type === "Organization" ? /*#__PURE__*/React__default["default"].createElement(neetoIcons.Building, {
2328
- className: "neeto-ui-text-gray-600",
2329
- size: 16
2330
- }) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.User, {
2331
- className: "neeto-ui-text-gray-600",
2332
- size: 16
2333
- }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2334
- className: "neeto-ui-text-gray-900",
2335
- style: "body2"
2336
- }, "@", name), /*#__PURE__*/React__default["default"].createElement("img", {
2337
- alt: name,
2338
- className: "neeto-ui-rounded-full h-4 w-4",
2339
- src: avatarUrl
2340
- }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
2341
- className: "text-indigo-600",
2342
- icon: neetoIcons.CannedResponses,
2343
- iconPosition: "left",
2344
- iconSize: 16,
2345
- size: "small",
2346
- style: "text",
2347
- onClick: function onClick() {
2348
- return window.open(profileUrl, "_blank");
2349
- }
2350
- }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2351
- className: "neeto-ui-text-gray-900 mx-2 text-sm",
2352
- component: "span",
2353
- style: "h3"
2354
- }, "\u2022"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2355
- style: "body2"
2356
- }, t("neetoGithub.countOf.repos", {
2357
- count: count
2358
- })));
2359
- });
2360
- });
2470
+ var parseArrayValue = function (val, options) {
2471
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
2472
+ return val.split(',');
2473
+ }
2361
2474
 
2362
- var Accounts = function Accounts(_ref) {
2363
- var isPane = _ref.isPane,
2364
- accounts = _ref.accounts,
2365
- isConnected = _ref.isConnected,
2366
- onConnect = _ref.onConnect,
2367
- installationUrl = _ref.installationUrl;
2368
- return /*#__PURE__*/React__default["default"].createElement("div", {
2369
- className: classNames__default["default"]("flex w-full flex-col border border-solid border-transparent px-0 py-2", {
2370
- "2xl:max-w-sm 2xl:px-8": isPane,
2371
- "xl:max-w-sm xl:px-8": !isPane
2372
- })
2373
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2374
- className: "mb-2"
2375
- }, /*#__PURE__*/React__default["default"].createElement(Header, null), /*#__PURE__*/React__default["default"].createElement(List$1, {
2376
- accounts: accounts,
2377
- isConnected: isConnected
2378
- }), /*#__PURE__*/React__default["default"].createElement(Configure, {
2379
- installationUrl: installationUrl,
2380
- isConnected: isConnected,
2381
- onConnect: onConnect
2382
- })));
2475
+ return val;
2383
2476
  };
2384
2477
 
2385
- function _arrayWithHoles(arr) {
2386
- if (Array.isArray(arr)) return arr;
2387
- }
2478
+ // This is what browsers will submit when the ✓ character occurs in an
2479
+ // application/x-www-form-urlencoded body and the encoding of the page containing
2480
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
2481
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
2482
+ // the ✓ character, such as us-ascii.
2483
+ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2388
2484
 
2389
- function _iterableToArrayLimit(arr, i) {
2390
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
2391
- if (null != _i) {
2392
- var _s,
2393
- _e,
2394
- _x,
2395
- _r,
2396
- _arr = [],
2397
- _n = !0,
2398
- _d = !1;
2399
- try {
2400
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
2401
- if (Object(_i) !== _i) return;
2402
- _n = !1;
2403
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
2404
- } catch (err) {
2405
- _d = !0, _e = err;
2406
- } finally {
2407
- try {
2408
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
2409
- } finally {
2410
- if (_d) throw _e;
2411
- }
2485
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
2486
+ var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2487
+
2488
+ var parseValues = function parseQueryStringValues(str, options) {
2489
+ var obj = { __proto__: null };
2490
+
2491
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2492
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2493
+ var parts = cleanStr.split(options.delimiter, limit);
2494
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
2495
+ var i;
2496
+
2497
+ var charset = options.charset;
2498
+ if (options.charsetSentinel) {
2499
+ for (i = 0; i < parts.length; ++i) {
2500
+ if (parts[i].indexOf('utf8=') === 0) {
2501
+ if (parts[i] === charsetSentinel) {
2502
+ charset = 'utf-8';
2503
+ } else if (parts[i] === isoSentinel) {
2504
+ charset = 'iso-8859-1';
2505
+ }
2506
+ skipIndex = i;
2507
+ i = parts.length; // The eslint settings do not allow break;
2508
+ }
2509
+ }
2412
2510
  }
2413
- return _arr;
2414
- }
2415
- }
2416
2511
 
2417
- function _arrayLikeToArray(arr, len) {
2418
- if (len == null || len > arr.length) len = arr.length;
2419
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2420
- return arr2;
2421
- }
2512
+ for (i = 0; i < parts.length; ++i) {
2513
+ if (i === skipIndex) {
2514
+ continue;
2515
+ }
2516
+ var part = parts[i];
2422
2517
 
2423
- function _unsupportedIterableToArray(o, minLen) {
2424
- if (!o) return;
2425
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2426
- var n = Object.prototype.toString.call(o).slice(8, -1);
2427
- if (n === "Object" && o.constructor) n = o.constructor.name;
2428
- if (n === "Map" || n === "Set") return Array.from(o);
2429
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2430
- }
2518
+ var bracketEqualsPos = part.indexOf(']=');
2519
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
2431
2520
 
2432
- function _nonIterableRest() {
2433
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2434
- }
2521
+ var key, val;
2522
+ if (pos === -1) {
2523
+ key = options.decoder(part, defaults.decoder, charset, 'key');
2524
+ val = options.strictNullHandling ? null : '';
2525
+ } else {
2526
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
2527
+ val = utils.maybeMap(
2528
+ parseArrayValue(part.slice(pos + 1), options),
2529
+ function (encodedVal) {
2530
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
2531
+ }
2532
+ );
2533
+ }
2435
2534
 
2436
- function _slicedToArray(arr, i) {
2437
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
2438
- }
2535
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
2536
+ val = interpretNumericEntities(val);
2537
+ }
2439
2538
 
2440
- var NoRepositories = reactUtils.withT(function (_ref) {
2441
- var t = _ref.t,
2442
- installationUrl = _ref.installationUrl,
2443
- troubleshootUrl = _ref.troubleshootUrl;
2444
- return /*#__PURE__*/React__default["default"].createElement("div", {
2445
- className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
2446
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2447
- style: "body2"
2448
- }, t("neetoGithub.noReposDescription")), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
2449
- href: installationUrl,
2450
- icon: misc.Github,
2451
- iconPosition: "left",
2452
- label: t("neetoGithub.connectRepository"),
2453
- size: "medium",
2454
- style: "primary"
2455
- }), /*#__PURE__*/React__default["default"].createElement("div", {
2456
- className: "text-xs"
2457
- }, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
2458
- i18nKey: "troubleshoot",
2459
- components: {
2460
- troubleshootLink: /*#__PURE__*/React__default["default"].createElement("a", {
2461
- className: "text-indigo-600 underline",
2462
- href: troubleshootUrl,
2463
- rel: "noopener noreferrer",
2464
- target: "_blank"
2465
- })
2539
+ if (part.indexOf('[]=') > -1) {
2540
+ val = isArray(val) ? [val] : val;
2541
+ }
2542
+
2543
+ if (has.call(obj, key)) {
2544
+ obj[key] = utils.combine(obj[key], val);
2545
+ } else {
2546
+ obj[key] = val;
2547
+ }
2466
2548
  }
2467
- })));
2468
- });
2469
2549
 
2470
- var RepositoryTile = function RepositoryTile(_ref) {
2471
- var onConnect = _ref.onConnect,
2472
- repository = _ref.repository;
2473
- var _useTranslation = reactI18next.useTranslation(),
2474
- t = _useTranslation.t;
2475
- var id = repository.id,
2476
- fullName = repository.fullName,
2477
- isPrivate = repository.isPrivate,
2478
- updatedAt = repository.updatedAt;
2479
- return /*#__PURE__*/React__default["default"].createElement("div", {
2480
- className: "neeto-ui-border-gray-300 flex items-center justify-between border-b border-l-0 border-r-0 border-t-0 border-solid py-3 pl-5 pr-3",
2481
- key: id
2482
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2483
- className: "width-calc flex items-center space-x-2"
2484
- }, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
2485
- size: 16
2486
- }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2487
- style: "body2"
2488
- }, fullName), isPrivate && /*#__PURE__*/React__default["default"].createElement(neetoIcons.Lock, {
2489
- size: 16
2490
- }), /*#__PURE__*/React__default["default"].createElement("div", {
2491
- className: "hidden md:inline-block"
2492
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2493
- className: "neeto-ui-text-gray-900 mx-2 text-sm",
2494
- component: "span",
2495
- style: "h3"
2496
- }, "\u2022"), /*#__PURE__*/React__default["default"].createElement(DateFormat__default["default"].FromNow, {
2497
- date: updatedAt
2498
- }))), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
2499
- style: "primary",
2500
- type: "button",
2501
- onClick: function onClick() {
2502
- return onConnect({
2503
- repoType: "private",
2504
- repository: repository
2505
- });
2550
+ return obj;
2551
+ };
2552
+
2553
+ var parseObject = function (chain, val, options, valuesParsed) {
2554
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
2555
+
2556
+ for (var i = chain.length - 1; i >= 0; --i) {
2557
+ var obj;
2558
+ var root = chain[i];
2559
+
2560
+ if (root === '[]' && options.parseArrays) {
2561
+ obj = [].concat(leaf);
2562
+ } else {
2563
+ obj = options.plainObjects ? Object.create(null) : {};
2564
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2565
+ var index = parseInt(cleanRoot, 10);
2566
+ if (!options.parseArrays && cleanRoot === '') {
2567
+ obj = { 0: leaf };
2568
+ } else if (
2569
+ !isNaN(index)
2570
+ && root !== cleanRoot
2571
+ && String(index) === cleanRoot
2572
+ && index >= 0
2573
+ && (options.parseArrays && index <= options.arrayLimit)
2574
+ ) {
2575
+ obj = [];
2576
+ obj[index] = leaf;
2577
+ } else if (cleanRoot !== '__proto__') {
2578
+ obj[cleanRoot] = leaf;
2579
+ }
2580
+ }
2581
+
2582
+ leaf = obj;
2506
2583
  }
2507
- }, t("neetoGithub.connect")));
2584
+
2585
+ return leaf;
2508
2586
  };
2509
2587
 
2510
- var List = reactUtils.withT(function (_ref) {
2511
- var t = _ref.t,
2512
- isPublicRepoAllowed = _ref.isPublicRepoAllowed,
2513
- filteredRepositories = _ref.filteredRepositories,
2514
- repositories = _ref.repositories,
2515
- onConnect = _ref.onConnect,
2516
- installationUrl = _ref.installationUrl,
2517
- troubleshootUrl = _ref.troubleshootUrl;
2518
- return /*#__PURE__*/React__default["default"].createElement("div", {
2519
- className: classNames__default["default"]("neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex flex-col items-center justify-center border border-solid p-0 2xl:h-96", {
2520
- "h-52": isPublicRepoAllowed,
2521
- "h-72": !isPublicRepoAllowed
2522
- })
2523
- }, neetoCist.isPresent(repositories) ? /*#__PURE__*/React__default["default"].createElement(Scrollable__default["default"], {
2524
- className: "m-0 h-full w-full overflow-y-scroll p-0 shadow-inner"
2525
- }, neetoCist.isPresent(filteredRepositories) ? filteredRepositories.map(function (repository) {
2526
- return /*#__PURE__*/React__default["default"].createElement(RepositoryTile, {
2527
- onConnect: onConnect,
2528
- repository: repository
2529
- });
2530
- }) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2531
- className: "flex h-full w-full items-center justify-center",
2532
- style: "body2"
2533
- }, t("neetoGithub.noRepos"))) : /*#__PURE__*/React__default["default"].createElement(NoRepositories, {
2534
- installationUrl: installationUrl,
2535
- troubleshootUrl: troubleshootUrl
2536
- }));
2537
- });
2588
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2589
+ if (!givenKey) {
2590
+ return;
2591
+ }
2592
+
2593
+ // Transform dot notation to bracket notation
2594
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
2595
+
2596
+ // The regex chunks
2597
+
2598
+ var brackets = /(\[[^[\]]*])/;
2599
+ var child = /(\[[^[\]]*])/g;
2600
+
2601
+ // Get the parent
2602
+
2603
+ var segment = options.depth > 0 && brackets.exec(key);
2604
+ var parent = segment ? key.slice(0, segment.index) : key;
2605
+
2606
+ // Stash the parent if it exists
2607
+
2608
+ var keys = [];
2609
+ if (parent) {
2610
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
2611
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
2612
+ if (!options.allowPrototypes) {
2613
+ return;
2614
+ }
2615
+ }
2616
+
2617
+ keys.push(parent);
2618
+ }
2619
+
2620
+ // Loop through children appending to the array until we hit depth
2621
+
2622
+ var i = 0;
2623
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2624
+ i += 1;
2625
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2626
+ if (!options.allowPrototypes) {
2627
+ return;
2628
+ }
2629
+ }
2630
+ keys.push(segment[1]);
2631
+ }
2538
2632
 
2539
- var NotConnected = reactUtils.withT(function (_ref) {
2540
- var t = _ref.t,
2541
- installationUrl = _ref.installationUrl;
2542
- return /*#__PURE__*/React__default["default"].createElement("div", {
2543
- className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
2544
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2545
- style: "body2"
2546
- }, t("neetoGithub.notConnectedDescription")), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
2547
- href: installationUrl,
2548
- icon: misc.Github,
2549
- iconPosition: "left",
2550
- label: t("neetoGithub.connectGithub"),
2551
- size: "medium",
2552
- style: "primary"
2553
- }));
2554
- });
2633
+ // If there's a remainder, just add whatever is left
2555
2634
 
2556
- var Private = function Private(_ref) {
2557
- var isConnected = _ref.isConnected,
2558
- isPublicRepoAllowed = _ref.isPublicRepoAllowed,
2559
- repositories = _ref.repositories,
2560
- onConnect = _ref.onConnect,
2561
- installationUrl = _ref.installationUrl,
2562
- troubleshootUrl = _ref.troubleshootUrl;
2563
- var _useTranslation = reactI18next.useTranslation(),
2564
- t = _useTranslation.t;
2565
- var _useState = React.useState(repositories),
2566
- _useState2 = _slicedToArray(_useState, 2),
2567
- filteredRepositories = _useState2[0],
2568
- setFilteredRepositories = _useState2[1];
2569
- var onSearch = function onSearch(searchTerm) {
2570
- if (!neetoCist.isPresent(searchTerm)) {
2571
- setFilteredRepositories(repositories);
2572
- return;
2635
+ if (segment) {
2636
+ keys.push('[' + key.slice(segment.index) + ']');
2573
2637
  }
2574
- var filteredRepositories = repositories.filter(function (_ref2) {
2575
- var fullName = _ref2.fullName;
2576
- return fullName.toLowerCase().includes(searchTerm.toLowerCase());
2577
- });
2578
- setFilteredRepositories(filteredRepositories);
2579
- };
2580
- return /*#__PURE__*/React__default["default"].createElement("div", {
2581
- className: "connect-repo neeto-ui-rounded-md neeto-ui-border-gray-300 border border-solid px-8 py-7"
2582
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2583
- className: "mb-2 pb-5 text-lg font-medium",
2584
- style: "h2"
2585
- }, t("neetoGithub.connectARepo")), isConnected ? /*#__PURE__*/React__default["default"].createElement("div", {
2586
- className: "flex w-full flex-col space-y-6"
2587
- }, /*#__PURE__*/React__default["default"].createElement(Search__default["default"], {
2588
- onSearch: onSearch,
2589
- className: "w-full",
2590
- suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2591
- style: "body2"
2592
- }, t("neetoGithub.countOf.repos", {
2593
- count: filteredRepositories.length
2594
- }))
2595
- }), /*#__PURE__*/React__default["default"].createElement(List, {
2596
- isPublicRepoAllowed: isPublicRepoAllowed,
2597
- filteredRepositories: filteredRepositories,
2598
- installationUrl: installationUrl,
2599
- onConnect: onConnect,
2600
- repositories: repositories,
2601
- troubleshootUrl: troubleshootUrl
2602
- })) : /*#__PURE__*/React__default["default"].createElement("div", {
2603
- className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
2604
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2605
- className: "neeto-ui-rounded-md neeto-ui-border-gray-300 m-0 flex h-[366px] flex-col items-center justify-center border border-solid p-4 shadow-inner"
2606
- }, /*#__PURE__*/React__default["default"].createElement(NotConnected, {
2607
- installationUrl: installationUrl
2608
- }))));
2638
+
2639
+ return parseObject(keys, val, options, valuesParsed);
2609
2640
  };
2610
2641
 
2611
- var Public = function Public(_ref) {
2612
- var onConnect = _ref.onConnect;
2613
- var _useTranslation = reactI18next.useTranslation(),
2614
- t = _useTranslation.t;
2615
- var _useState = React.useState(""),
2616
- _useState2 = _slicedToArray(_useState, 2),
2617
- publicRepoUrl = _useState2[0],
2618
- setPublicRepoUrl = _useState2[1];
2619
- return /*#__PURE__*/React__default["default"].createElement("div", {
2620
- className: "transition-drop-shadow neeto-ui-border-gray-300 neeto-ui-rounded-md border border-solid px-8 py-7 font-sans transition-colors"
2621
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2622
- className: "mb-2 pb-5"
2623
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2624
- className: "flex justify-between"
2625
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2626
- className: "pr-4"
2627
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2628
- className: "text-lg font-medium",
2629
- style: "h2"
2630
- }, t("neetoGithub.publicGitRepo")), /*#__PURE__*/React__default["default"].createElement("div", {
2631
- className: "neeto-ui-text-gray-900 mt-2 flex max-w-xl space-x-1 font-sans text-sm font-normal leading-6 antialiased"
2632
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2633
- style: "body2"
2634
- }, t("neetoGithub.publicGitRepoDescription")))))), /*#__PURE__*/React__default["default"].createElement("div", {
2635
- className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
2636
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2637
- className: "flex"
2638
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2639
- className: "z-0 flex-1"
2640
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2641
- className: "w-full"
2642
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
2643
- nakedInput: true,
2644
- autocomplete: "false",
2645
- className: "relative rounded-b rounded-l rounded-r-none rounded-t border-b border-l border-r-0 border-t border-solid px-2",
2646
- placeholder: t("neetoGithub.publicGitRepoPlaceholder"),
2647
- size: "large",
2648
- spellcheck: "false",
2649
- type: "text",
2650
- value: publicRepoUrl,
2651
- onChange: function onChange(e) {
2652
- return setPublicRepoUrl(e.target.value);
2642
+ var normalizeParseOptions = function normalizeParseOptions(opts) {
2643
+ if (!opts) {
2644
+ return defaults;
2653
2645
  }
2654
- }))), /*#__PURE__*/React__default["default"].createElement("div", {
2655
- className: "relative"
2656
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
2657
- className: "rounded-b rounded-l-none rounded-r rounded-t",
2658
- disabled: !neetoCist.isPresent(publicRepoUrl),
2659
- size: "large",
2660
- style: "primary",
2661
- type: "button",
2662
- onClick: function onClick() {
2663
- return onConnect({
2664
- repoType: "public",
2665
- repository: {
2666
- fullName: publicRepoUrl
2667
- }
2668
- });
2646
+
2647
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
2648
+ throw new TypeError('Decoder has to be a function.');
2669
2649
  }
2670
- }, t("neetoGithub.continue"))))));
2650
+
2651
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2652
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2653
+ }
2654
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
2655
+
2656
+ return {
2657
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
2658
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
2659
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2660
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2661
+ charset: charset,
2662
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2663
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2664
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2665
+ delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2666
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2667
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2668
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2669
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2670
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2671
+ parseArrays: opts.parseArrays !== false,
2672
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2673
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2674
+ };
2671
2675
  };
2672
2676
 
2673
- var Repositories = function Repositories(_ref) {
2674
- var isConnected = _ref.isConnected,
2675
- isPublicRepoAllowed = _ref.isPublicRepoAllowed,
2676
- repositories = _ref.repositories,
2677
- onConnect = _ref.onConnect,
2678
- installationUrl = _ref.installationUrl,
2679
- troubleshootUrl = _ref.troubleshootUrl;
2680
- return /*#__PURE__*/React__default["default"].createElement("div", {
2681
- className: "w-full space-y-6"
2682
- }, /*#__PURE__*/React__default["default"].createElement(Private, {
2683
- isPublicRepoAllowed: isPublicRepoAllowed,
2684
- installationUrl: installationUrl,
2685
- isConnected: isConnected,
2686
- onConnect: onConnect,
2687
- repositories: repositories,
2688
- troubleshootUrl: troubleshootUrl
2689
- }), isPublicRepoAllowed && /*#__PURE__*/React__default["default"].createElement(Public, {
2690
- onConnect: onConnect
2691
- }));
2677
+ var parse$1 = function (str, opts) {
2678
+ var options = normalizeParseOptions(opts);
2679
+
2680
+ if (str === '' || str === null || typeof str === 'undefined') {
2681
+ return options.plainObjects ? Object.create(null) : {};
2682
+ }
2683
+
2684
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2685
+ var obj = options.plainObjects ? Object.create(null) : {};
2686
+
2687
+ // Iterate over the keys and setup the new object
2688
+
2689
+ var keys = Object.keys(tempObj);
2690
+ for (var i = 0; i < keys.length; ++i) {
2691
+ var key = keys[i];
2692
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2693
+ obj = utils.merge(obj, newObj, options);
2694
+ }
2695
+
2696
+ if (options.allowSparse === true) {
2697
+ return obj;
2698
+ }
2699
+
2700
+ return utils.compact(obj);
2692
2701
  };
2693
2702
 
2694
- var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
2695
- var _ref$accounts = _ref.accounts,
2696
- accounts = _ref$accounts === void 0 ? [] : _ref$accounts,
2697
- installationUrl = _ref.installationUrl,
2698
- isConnected = _ref.isConnected,
2699
- _ref$isPublicRepoAllo = _ref.isPublicRepoAllowed,
2700
- isPublicRepoAllowed = _ref$isPublicRepoAllo === void 0 ? false : _ref$isPublicRepoAllo,
2701
- onConnect = _ref.onConnect,
2702
- _ref$repositories = _ref.repositories,
2703
- repositories = _ref$repositories === void 0 ? [] : _ref$repositories,
2704
- troubleshootUrl = _ref.troubleshootUrl,
2705
- _ref$isPane = _ref.isPane,
2706
- isPane = _ref$isPane === void 0 ? false : _ref$isPane;
2707
- return /*#__PURE__*/React__default["default"].createElement("div", {
2708
- className: "flex w-full flex-col-reverse 2xl:flex-row"
2709
- }, /*#__PURE__*/React__default["default"].createElement(Repositories, {
2710
- installationUrl: installationUrl,
2711
- isConnected: isConnected,
2712
- isPublicRepoAllowed: isPublicRepoAllowed,
2713
- onConnect: onConnect,
2714
- repositories: repositories,
2715
- troubleshootUrl: troubleshootUrl
2716
- }), /*#__PURE__*/React__default["default"].createElement(Accounts, {
2717
- accounts: accounts,
2718
- installationUrl: installationUrl,
2719
- isConnected: isConnected,
2720
- onConnect: onConnect,
2721
- isPane: isPane
2722
- }));
2703
+ var stringify = stringify_1;
2704
+ var parse = parse$1;
2705
+ var formats = formats$3;
2706
+
2707
+ var lib = {
2708
+ formats: formats,
2709
+ parse: parse,
2710
+ stringify: stringify
2723
2711
  };
2724
2712
 
2713
+ var _globalProps$organiza;
2714
+ var newInstallationParams = lib.stringify({
2715
+ integrator_id: initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
2716
+ integrator_type: "Organization",
2717
+ redirect_path: "/projects/new"
2718
+ });
2719
+ var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
2720
+ var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
2721
+
2725
2722
  var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
2726
2723
  var isOpen = _ref.isOpen,
2727
2724
  onClose = _ref.onClose,
@@ -2738,7 +2735,11 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
2738
2735
  _ref$troubleshootUrl = _ref.troubleshootUrl,
2739
2736
  troubleshootUrl = _ref$troubleshootUrl === void 0 ? TROUBLESHOOT_URL : _ref$troubleshootUrl,
2740
2737
  _ref$onConnect = _ref.onConnect,
2741
- onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect;
2738
+ onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
2739
+ _ref$title = _ref.title,
2740
+ title = _ref$title === void 0 ? "" : _ref$title,
2741
+ _ref$description = _ref.description,
2742
+ description = _ref$description === void 0 ? "" : _ref$description;
2742
2743
  var _useTranslation = reactI18next.useTranslation(),
2743
2744
  t = _useTranslation.t;
2744
2745
  var initialFocusRef = React.useRef(null);
@@ -2750,10 +2751,10 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
2750
2751
  size: "large"
2751
2752
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2752
2753
  style: "h2"
2753
- }, t("neetoGithub.modal.title")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2754
+ }, neetoCist.isPresent(title) ? title : t("neetoGithub.modal.title")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
2754
2755
  className: "mt-4",
2755
2756
  style: "body2"
2756
- }, t("neetoGithub.modal.description"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement(NeetoGithubNanoContainer, {
2757
+ }, neetoCist.isPresent(description) ? description : t("neetoGithub.modal.description"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement(NeetoGithubNanoContainer, {
2757
2758
  accounts: accounts,
2758
2759
  installationUrl: installationUrl,
2759
2760
  isConnected: isConnected,
@@ -2770,5 +2771,6 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
2770
2771
  var css = ".width-calc{width:calc(100% - 82px)}.neeto-github-modal-pane-wrapper{width:min(75%,1280px)}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3JlcG9zaXRvcnktdGlsZS5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyIsImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3BhbmUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUNFLHVCQ0NGLENDRkEsaUNBQ0UscUJES0YiLCJzb3VyY2VzQ29udGVudCI6WyIud2lkdGgtY2FsYyB7XG4gIHdpZHRoOiBjYWxjKDEwMCUgLSA4MnB4KTtcbn1cbiIsIi53aWR0aC1jYWxjIHtcbiAgd2lkdGg6IGNhbGMoMTAwJSAtIDgycHgpO1xufVxuXG4ubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gIHdpZHRoOiBtaW4oNzUlLCAxMjgwcHgpO1xufSIsIi5uZWV0by1naXRodWItbW9kYWwtcGFuZS13cmFwcGVyIHtcbiAgd2lkdGg6IG1pbig3NSUsIDEyODBweCk7XG59XG4iXX0= */";
2771
2772
  n(css,{});
2772
2773
 
2774
+ exports.NeetoGithubNanoContainer = NeetoGithubNanoContainer;
2773
2775
  exports.NeetoGithubNanoModal = NeetoGithubNanoModal;
2774
2776
  //# sourceMappingURL=index.cjs.js.map