@bagelink/vue 0.0.587 → 0.0.596

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.mjs CHANGED
@@ -110,12 +110,21 @@ function getPaddingObject(padding) {
110
110
  };
111
111
  }
112
112
  function rectToClientRect$1(rect) {
113
+ const {
114
+ x: x2,
115
+ y: y2,
116
+ width,
117
+ height
118
+ } = rect;
113
119
  return {
114
- ...rect,
115
- top: rect.y,
116
- left: rect.x,
117
- right: rect.x + rect.width,
118
- bottom: rect.y + rect.height
120
+ width,
121
+ height,
122
+ top: y2,
123
+ left: x2,
124
+ right: x2 + width,
125
+ bottom: y2 + height,
126
+ x: x2,
127
+ y: y2
119
128
  };
120
129
  }
121
130
  function computeCoordsFromPlacement(_ref, placement, rtl) {
@@ -286,9 +295,10 @@ async function detectOverflow$1(state2, options) {
286
295
  strategy
287
296
  }));
288
297
  const rect = elementContext === "floating" ? {
289
- ...rects.floating,
290
298
  x: x2,
291
- y: y2
299
+ y: y2,
300
+ width: rects.floating.width,
301
+ height: rects.floating.height
292
302
  } : rects.reference;
293
303
  const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
294
304
  const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
@@ -499,10 +509,12 @@ const flip$2 = function(options) {
499
509
  return {};
500
510
  }
501
511
  const side = getSide$1(placement);
512
+ const initialSideAxis = getSideAxis(initialPlacement);
502
513
  const isBasePlacement = getSide$1(initialPlacement) === initialPlacement;
503
514
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
504
515
  const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement$1(initialPlacement)] : getExpandedPlacements(initialPlacement));
505
- if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
516
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
517
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
506
518
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
507
519
  }
508
520
  const placements2 = [initialPlacement, ...fallbackPlacements];
@@ -539,8 +551,16 @@ const flip$2 = function(options) {
539
551
  if (!resetPlacement) {
540
552
  switch (fallbackStrategy) {
541
553
  case "bestFit": {
542
- var _overflowsData$map$so;
543
- const placement2 = (_overflowsData$map$so = overflowsData.map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
554
+ var _overflowsData$filter2;
555
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d2) => {
556
+ if (hasFallbackAxisSideDirection) {
557
+ const currentSideAxis = getSideAxis(d2.placement);
558
+ return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
559
+ // reading directions favoring greater width.
560
+ currentSideAxis === "y";
561
+ }
562
+ return true;
563
+ }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
544
564
  if (placement2) {
545
565
  resetPlacement = placement2;
546
566
  }
@@ -735,16 +755,16 @@ const size = function(options) {
735
755
  widthSide = side;
736
756
  heightSide = alignment === "end" ? "top" : "bottom";
737
757
  }
738
- const overflowAvailableHeight = height - overflow[heightSide];
739
- const overflowAvailableWidth = width - overflow[widthSide];
758
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
759
+ const maximumClippingWidth = width - overflow.left - overflow.right;
760
+ const overflowAvailableHeight = min$3(height - overflow[heightSide], maximumClippingHeight);
761
+ const overflowAvailableWidth = min$3(width - overflow[widthSide], maximumClippingWidth);
740
762
  const noShift = !state2.middlewareData.shift;
741
763
  let availableHeight = overflowAvailableHeight;
742
764
  let availableWidth = overflowAvailableWidth;
743
765
  if (isYAxis) {
744
- const maximumClippingWidth = width - overflow.left - overflow.right;
745
766
  availableWidth = alignment || noShift ? min$3(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
746
767
  } else {
747
- const maximumClippingHeight = height - overflow.top - overflow.bottom;
748
768
  availableHeight = alignment || noShift ? min$3(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
749
769
  }
750
770
  if (noShift && !alignment) {
@@ -3381,7 +3401,6 @@ const defaults$1 = {
3381
3401
  utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
3382
3402
  defaults$1.headers[method] = {};
3383
3403
  });
3384
- const defaults$2 = defaults$1;
3385
3404
  const ignoreDuplicateOf = utils$1.toObjectSet([
3386
3405
  "age",
3387
3406
  "authorization",
@@ -3643,11 +3662,10 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
3643
3662
  };
3644
3663
  });
3645
3664
  utils$1.freezeMethods(AxiosHeaders);
3646
- const AxiosHeaders$1 = AxiosHeaders;
3647
3665
  function transformData(fns, response) {
3648
- const config = this || defaults$2;
3666
+ const config = this || defaults$1;
3649
3667
  const context = response || config;
3650
- const headers = AxiosHeaders$1.from(context.headers);
3668
+ const headers = AxiosHeaders.from(context.headers);
3651
3669
  let data2 = context.data;
3652
3670
  utils$1.forEach(fns, function transform(fn3) {
3653
3671
  data2 = fn3.call(config, data2, headers.normalize(), response ? response.status : void 0);
@@ -3846,7 +3864,7 @@ function buildFullPath(baseURL, requestedURL) {
3846
3864
  }
3847
3865
  return requestedURL;
3848
3866
  }
3849
- const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
3867
+ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
3850
3868
  function mergeConfig(config1, config2) {
3851
3869
  config2 = config2 || {};
3852
3870
  const config = {};
@@ -3927,7 +3945,7 @@ function mergeConfig(config1, config2) {
3927
3945
  const resolveConfig = (config) => {
3928
3946
  const newConfig = mergeConfig({}, config);
3929
3947
  let { data: data2, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
3930
- newConfig.headers = headers = AxiosHeaders$1.from(headers);
3948
+ newConfig.headers = headers = AxiosHeaders.from(headers);
3931
3949
  newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
3932
3950
  if (auth) {
3933
3951
  headers.set(
@@ -3960,7 +3978,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
3960
3978
  return new Promise(function dispatchXhrRequest(resolve, reject3) {
3961
3979
  const _config = resolveConfig(config);
3962
3980
  let requestData = _config.data;
3963
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
3981
+ const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
3964
3982
  let { responseType } = _config;
3965
3983
  let onCanceled;
3966
3984
  function done() {
@@ -3978,7 +3996,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
3978
3996
  if (!request) {
3979
3997
  return;
3980
3998
  }
3981
- const responseHeaders = AxiosHeaders$1.from(
3999
+ const responseHeaders = AxiosHeaders.from(
3982
4000
  "getAllResponseHeaders" in request && request.getAllResponseHeaders()
3983
4001
  );
3984
4002
  const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
@@ -4294,7 +4312,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
4294
4312
  return await new Promise((resolve, reject3) => {
4295
4313
  settle(resolve, reject3, {
4296
4314
  data: responseData,
4297
- headers: AxiosHeaders$1.from(response.headers),
4315
+ headers: AxiosHeaders.from(response.headers),
4298
4316
  status: response.status,
4299
4317
  statusText: response.statusText,
4300
4318
  config,
@@ -4376,7 +4394,7 @@ function throwIfCancellationRequested(config) {
4376
4394
  }
4377
4395
  function dispatchRequest(config) {
4378
4396
  throwIfCancellationRequested(config);
4379
- config.headers = AxiosHeaders$1.from(config.headers);
4397
+ config.headers = AxiosHeaders.from(config.headers);
4380
4398
  config.data = transformData.call(
4381
4399
  config,
4382
4400
  config.transformRequest
@@ -4384,7 +4402,7 @@ function dispatchRequest(config) {
4384
4402
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
4385
4403
  config.headers.setContentType("application/x-www-form-urlencoded", false);
4386
4404
  }
4387
- const adapter = adapters.getAdapter(config.adapter || defaults$2.adapter);
4405
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
4388
4406
  return adapter(config).then(function onAdapterResolution(response) {
4389
4407
  throwIfCancellationRequested(config);
4390
4408
  response.data = transformData.call(
@@ -4392,7 +4410,7 @@ function dispatchRequest(config) {
4392
4410
  config.transformResponse,
4393
4411
  response
4394
4412
  );
4395
- response.headers = AxiosHeaders$1.from(response.headers);
4413
+ response.headers = AxiosHeaders.from(response.headers);
4396
4414
  return response;
4397
4415
  }, function onAdapterRejection(reason) {
4398
4416
  if (!isCancel(reason)) {
@@ -4403,7 +4421,7 @@ function dispatchRequest(config) {
4403
4421
  config.transformResponse,
4404
4422
  reason.response
4405
4423
  );
4406
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
4424
+ reason.response.headers = AxiosHeaders.from(reason.response.headers);
4407
4425
  }
4408
4426
  }
4409
4427
  return Promise.reject(reason);
@@ -4542,7 +4560,7 @@ class Axios {
4542
4560
  delete headers[method];
4543
4561
  }
4544
4562
  );
4545
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
4563
+ config.headers = AxiosHeaders.concat(contextHeaders, headers);
4546
4564
  const requestInterceptorChain = [];
4547
4565
  let synchronousRequestInterceptors = true;
4548
4566
  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
@@ -4626,7 +4644,6 @@ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method)
4626
4644
  Axios.prototype[method] = generateHTTPMethod();
4627
4645
  Axios.prototype[method + "Form"] = generateHTTPMethod(true);
4628
4646
  });
4629
- const Axios$1 = Axios;
4630
4647
  class CancelToken {
4631
4648
  constructor(executor) {
4632
4649
  if (typeof executor !== "function") {
@@ -4713,7 +4730,6 @@ class CancelToken {
4713
4730
  };
4714
4731
  }
4715
4732
  }
4716
- const CancelToken$1 = CancelToken;
4717
4733
  function spread(callback) {
4718
4734
  return function wrap2(arr) {
4719
4735
  return callback.apply(null, arr);
@@ -4790,21 +4806,20 @@ const HttpStatusCode = {
4790
4806
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
4791
4807
  HttpStatusCode[value] = key;
4792
4808
  });
4793
- const HttpStatusCode$1 = HttpStatusCode;
4794
4809
  function createInstance(defaultConfig2) {
4795
- const context = new Axios$1(defaultConfig2);
4796
- const instance = bind$2(Axios$1.prototype.request, context);
4797
- utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
4810
+ const context = new Axios(defaultConfig2);
4811
+ const instance = bind$2(Axios.prototype.request, context);
4812
+ utils$1.extend(instance, Axios.prototype, context, { allOwnKeys: true });
4798
4813
  utils$1.extend(instance, context, null, { allOwnKeys: true });
4799
4814
  instance.create = function create(instanceConfig) {
4800
4815
  return createInstance(mergeConfig(defaultConfig2, instanceConfig));
4801
4816
  };
4802
4817
  return instance;
4803
4818
  }
4804
- const axios$1 = createInstance(defaults$2);
4805
- axios$1.Axios = Axios$1;
4819
+ const axios$1 = createInstance(defaults$1);
4820
+ axios$1.Axios = Axios;
4806
4821
  axios$1.CanceledError = CanceledError;
4807
- axios$1.CancelToken = CancelToken$1;
4822
+ axios$1.CancelToken = CancelToken;
4808
4823
  axios$1.isCancel = isCancel;
4809
4824
  axios$1.VERSION = VERSION;
4810
4825
  axios$1.toFormData = toFormData;
@@ -4816,10 +4831,10 @@ axios$1.all = function all(promises) {
4816
4831
  axios$1.spread = spread;
4817
4832
  axios$1.isAxiosError = isAxiosError;
4818
4833
  axios$1.mergeConfig = mergeConfig;
4819
- axios$1.AxiosHeaders = AxiosHeaders$1;
4834
+ axios$1.AxiosHeaders = AxiosHeaders;
4820
4835
  axios$1.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
4821
4836
  axios$1.getAdapter = adapters.getAdapter;
4822
- axios$1.HttpStatusCode = HttpStatusCode$1;
4837
+ axios$1.HttpStatusCode = HttpStatusCode;
4823
4838
  axios$1.default = axios$1;
4824
4839
  var __defProp = Object.defineProperty;
4825
4840
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -5063,7 +5078,10 @@ class Bagel {
5063
5078
  this._setAuthorization();
5064
5079
  const formData = new FormData();
5065
5080
  formData.append("file", file);
5066
- const { data: data2 } = await axios.post("/static_files/upload", formData, {
5081
+ let url = "/static_files/upload";
5082
+ if (options == null ? void 0 : options.topic)
5083
+ url = `/static_files/upload?topic=${options.topic}`;
5084
+ const { data: data2 } = await axios.post(url, formData, {
5067
5085
  headers: {
5068
5086
  "Content-Type": "multipart/form-data"
5069
5087
  },
@@ -5788,13 +5806,17 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
5788
5806
  var _a2;
5789
5807
  return (_a2 = modal.value) == null ? void 0 : _a2.closeModal();
5790
5808
  };
5809
+ let submitting = ref(false);
5791
5810
  async function runSubmit() {
5792
5811
  var _a2, _b, _c, _d;
5812
+ if (submitting.value) return;
5813
+ submitting.value = true;
5793
5814
  if (((_b = (_a2 = form.value) == null ? void 0 : _a2.validateForm) == null ? void 0 : _b.call(_a2)) === false) return;
5794
5815
  try {
5795
5816
  await ((_c = props2.onSubmit) == null ? void 0 : _c.call(props2, formData.value));
5796
5817
  closeModal();
5797
5818
  } catch (err) {
5819
+ submitting.value = false;
5798
5820
  if (props2.onError) props2.onError(err);
5799
5821
  else (_d = bagel.onError) == null ? void 0 : _d.call(bagel, err);
5800
5822
  }
@@ -5862,7 +5884,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
5862
5884
  };
5863
5885
  }
5864
5886
  });
5865
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-9b1b63ca"]]);
5887
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-b0a25141"]]);
5866
5888
  const _hoisted_1$G = { class: "accordion-item" };
5867
5889
  const _hoisted_2$x = ["aria-expanded", "aria-controls"];
5868
5890
  const _hoisted_3$l = { class: "accordion-label" };
@@ -6028,7 +6050,7 @@ function toValue(r2) {
6028
6050
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
6029
6051
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
6030
6052
  function getLifeCycleTarget(target) {
6031
- return target || getCurrentInstance();
6053
+ return getCurrentInstance();
6032
6054
  }
6033
6055
  function tryOnMounted(fn3, sync = true, target) {
6034
6056
  const instance = getLifeCycleTarget();
@@ -17264,12 +17286,7 @@ function eachDayOfInterval(interval, options) {
17264
17286
  const endTime = reversed ? +startDate : +endDate;
17265
17287
  const currentDate = reversed ? endDate : startDate;
17266
17288
  currentDate.setHours(0, 0, 0, 0);
17267
- let step = (options == null ? void 0 : options.step) ?? 1;
17268
- if (!step) return [];
17269
- if (step < 0) {
17270
- step = -step;
17271
- reversed = !reversed;
17272
- }
17289
+ let step = 1;
17273
17290
  const dates = [];
17274
17291
  while (+currentDate <= endTime) {
17275
17292
  dates.push(toDate(currentDate));
@@ -17292,12 +17309,7 @@ function eachQuarterOfInterval(interval, options) {
17292
17309
  let reversed = +startDate > +endDate;
17293
17310
  const endTime = reversed ? +startOfQuarter(startDate) : +startOfQuarter(endDate);
17294
17311
  let currentDate = reversed ? startOfQuarter(endDate) : startOfQuarter(startDate);
17295
- let step = (options == null ? void 0 : options.step) ?? 1;
17296
- if (!step) return [];
17297
- if (step < 0) {
17298
- step = -step;
17299
- reversed = !reversed;
17300
- }
17312
+ let step = 1;
17301
17313
  const dates = [];
17302
17314
  while (+currentDate <= endTime) {
17303
17315
  dates.push(toDate(currentDate));
@@ -26143,10 +26155,8 @@ function isScrolledPast(el, elSide, parentSide) {
26143
26155
  var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide];
26144
26156
  while (parent) {
26145
26157
  var parentSideVal = getRect(parent)[parentSide], visible = void 0;
26146
- if (parentSide === "top" || parentSide === "left") {
26158
+ {
26147
26159
  visible = elSideVal >= parentSideVal;
26148
- } else {
26149
- visible = elSideVal <= parentSideVal;
26150
26160
  }
26151
26161
  if (!visible) return parent;
26152
26162
  if (parent === getWindowScrollingElement()) break;
@@ -29863,8 +29873,6 @@ function removeRange(content, from2, to2) {
29863
29873
  function insertInto(content, dist, insert, parent) {
29864
29874
  let { index: index2, offset: offset2 } = content.findIndex(dist), child = content.maybeChild(index2);
29865
29875
  if (offset2 == dist || child.isText) {
29866
- if (parent && !parent.canReplace(index2, index2, insert))
29867
- return null;
29868
29876
  return content.cut(0, dist).append(insert).append(content.cut(dist));
29869
29877
  }
29870
29878
  let inner = insertInto(child.content, dist - offset2 - 1, insert);
@@ -37975,8 +37983,7 @@ function updateSelection(view, selection, origin2) {
37975
37983
  if (!view.focused)
37976
37984
  view.focus();
37977
37985
  let tr2 = view.state.tr.setSelection(selection);
37978
- if (origin2 == "pointer")
37979
- tr2.setMeta("pointer", true);
37986
+ tr2.setMeta("pointer", true);
37980
37987
  view.dispatch(tr2);
37981
37988
  }
37982
37989
  function selectClickedLeaf(view, inside) {
@@ -37984,7 +37991,7 @@ function selectClickedLeaf(view, inside) {
37984
37991
  return false;
37985
37992
  let $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;
37986
37993
  if (node && node.isAtom && NodeSelection.isSelectable(node)) {
37987
- updateSelection(view, new NodeSelection($pos), "pointer");
37994
+ updateSelection(view, new NodeSelection($pos));
37988
37995
  return true;
37989
37996
  }
37990
37997
  return false;
@@ -38007,7 +38014,7 @@ function selectClickedNode(view, inside) {
38007
38014
  }
38008
38015
  }
38009
38016
  if (selectAt != null) {
38010
- updateSelection(view, NodeSelection.create(view.state.doc, selectAt), "pointer");
38017
+ updateSelection(view, NodeSelection.create(view.state.doc, selectAt));
38011
38018
  return true;
38012
38019
  } else {
38013
38020
  return false;
@@ -38028,7 +38035,7 @@ function defaultTripleClick(view, inside, event) {
38028
38035
  let doc2 = view.state.doc;
38029
38036
  if (inside == -1) {
38030
38037
  if (doc2.inlineContent) {
38031
- updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size), "pointer");
38038
+ updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size));
38032
38039
  return true;
38033
38040
  }
38034
38041
  return false;
@@ -38038,9 +38045,9 @@ function defaultTripleClick(view, inside, event) {
38038
38045
  let node = i2 > $pos.depth ? $pos.nodeAfter : $pos.node(i2);
38039
38046
  let nodePos = $pos.before(i2);
38040
38047
  if (node.inlineContent)
38041
- updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size), "pointer");
38048
+ updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size));
38042
38049
  else if (NodeSelection.isSelectable(node))
38043
- updateSelection(view, NodeSelection.create(doc2, nodePos), "pointer");
38050
+ updateSelection(view, NodeSelection.create(doc2, nodePos));
38044
38051
  else
38045
38052
  continue;
38046
38053
  return true;
@@ -38157,7 +38164,7 @@ class MouseDown {
38157
38164
  // thus doesn't get a reaction from ProseMirror. This
38158
38165
  // works around that.
38159
38166
  chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {
38160
- updateSelection(this.view, Selection$1.near(this.view.state.doc.resolve(pos.pos)), "pointer");
38167
+ updateSelection(this.view, Selection$1.near(this.view.state.doc.resolve(pos.pos)));
38161
38168
  event.preventDefault();
38162
38169
  } else {
38163
38170
  setSelectionOrigin(this.view, "pointer");
@@ -42090,9 +42097,8 @@ class Extension {
42090
42097
  configure(options = {}) {
42091
42098
  const extension = this.extend({
42092
42099
  ...this.config,
42093
- addOptions() {
42094
- var _a2;
42095
- return mergeDeep(((_a2 = this.parent) === null || _a2 === void 0 ? void 0 : _a2.call(this)) || {}, options);
42100
+ addOptions: () => {
42101
+ return mergeDeep(this.options, options);
42096
42102
  }
42097
42103
  });
42098
42104
  extension.name = this.name;
@@ -44059,7 +44065,7 @@ img.ProseMirror-separator {
44059
44065
  opacity: 0
44060
44066
  }`;
44061
44067
  function createStyleTag(style2, nonce, suffix) {
44062
- const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ""}]`);
44068
+ const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${""}]`);
44063
44069
  if (tiptapStyleTag !== null) {
44064
44070
  return tiptapStyleTag;
44065
44071
  }
@@ -44067,7 +44073,7 @@ function createStyleTag(style2, nonce, suffix) {
44067
44073
  if (nonce) {
44068
44074
  styleNode.setAttribute("nonce", nonce);
44069
44075
  }
44070
- styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ""}`, "");
44076
+ styleNode.setAttribute(`data-tiptap-style${""}`, "");
44071
44077
  styleNode.innerHTML = style2;
44072
44078
  document.getElementsByTagName("head")[0].appendChild(styleNode);
44073
44079
  return styleNode;
@@ -44608,9 +44614,8 @@ class Mark {
44608
44614
  configure(options = {}) {
44609
44615
  const extension = this.extend({
44610
44616
  ...this.config,
44611
- addOptions() {
44612
- var _a2;
44613
- return mergeDeep(((_a2 = this.parent) === null || _a2 === void 0 ? void 0 : _a2.call(this)) || {}, options);
44617
+ addOptions: () => {
44618
+ return mergeDeep(this.options, options);
44614
44619
  }
44615
44620
  });
44616
44621
  extension.name = this.name;
@@ -44690,9 +44695,8 @@ let Node$2 = class Node3 {
44690
44695
  configure(options = {}) {
44691
44696
  const extension = this.extend({
44692
44697
  ...this.config,
44693
- addOptions() {
44694
- var _a2;
44695
- return mergeDeep(((_a2 = this.parent) === null || _a2 === void 0 ? void 0 : _a2.call(this)) || {}, options);
44698
+ addOptions: () => {
44699
+ return mergeDeep(this.options, options);
44696
44700
  }
44697
44701
  });
44698
44702
  extension.name = this.name;
@@ -52582,9 +52586,6 @@ function createColGroup(node, cellMinWidth, overrideCol, overrideValue) {
52582
52586
  return { colgroup, tableWidth, tableMinWidth };
52583
52587
  }
52584
52588
  function createCell(cellType, cellContent) {
52585
- if (cellContent) {
52586
- return cellType.createChecked(null, cellContent);
52587
- }
52588
52589
  return cellType.createAndFill();
52589
52590
  }
52590
52591
  function getTableNodeTypes(schema) {
@@ -52606,12 +52607,12 @@ function createTable$1(schema, rowsCount, colsCount, withHeaderRow, cellContent)
52606
52607
  const headerCells = [];
52607
52608
  const cells = [];
52608
52609
  for (let index2 = 0; index2 < colsCount; index2 += 1) {
52609
- const cell = createCell(types.cell, cellContent);
52610
+ const cell = createCell(types.cell);
52610
52611
  if (cell) {
52611
52612
  cells.push(cell);
52612
52613
  }
52613
52614
  if (withHeaderRow) {
52614
- const headerCell = createCell(types.header_cell, cellContent);
52615
+ const headerCell = createCell(types.header_cell);
52615
52616
  if (headerCell) {
52616
52617
  headerCells.push(headerCell);
52617
52618
  }
@@ -53166,18 +53167,7 @@ function _typeof$1(obj) {
53166
53167
  return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
53167
53168
  }, _typeof$1(obj);
53168
53169
  }
53169
- function _defineProperties$2(target, props2) {
53170
- for (var i2 = 0; i2 < props2.length; i2++) {
53171
- var descriptor = props2[i2];
53172
- descriptor.enumerable = descriptor.enumerable || false;
53173
- descriptor.configurable = true;
53174
- if ("value" in descriptor) descriptor.writable = true;
53175
- Object.defineProperty(target, descriptor.key, descriptor);
53176
- }
53177
- }
53178
53170
  function _createClass$2(Constructor, protoProps, staticProps) {
53179
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
53180
- if (staticProps) _defineProperties$2(Constructor, staticProps);
53181
53171
  Object.defineProperty(Constructor, "prototype", { writable: false });
53182
53172
  return Constructor;
53183
53173
  }
@@ -53354,7 +53344,6 @@ function _defineProperties$1(target, props2) {
53354
53344
  }
53355
53345
  function _createClass$1(Constructor, protoProps, staticProps) {
53356
53346
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
53357
- if (staticProps) _defineProperties$1(Constructor, staticProps);
53358
53347
  Object.defineProperty(Constructor, "prototype", { writable: false });
53359
53348
  return Constructor;
53360
53349
  }
@@ -53996,10 +53985,10 @@ var DIGITS = {
53996
53985
  function parseDigit(character) {
53997
53986
  return DIGITS[character];
53998
53987
  }
53999
- function _createForOfIteratorHelperLoose$4(o2, allowArrayLike) {
53988
+ function _createForOfIteratorHelperLoose$3(o2, allowArrayLike) {
54000
53989
  var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
54001
53990
  if (it2) return (it2 = it2.call(o2)).next.bind(it2);
54002
- if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$5(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
53991
+ if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$4(o2)) || allowArrayLike) {
54003
53992
  if (it2) o2 = it2;
54004
53993
  var i2 = 0;
54005
53994
  return function() {
@@ -54009,15 +53998,15 @@ function _createForOfIteratorHelperLoose$4(o2, allowArrayLike) {
54009
53998
  }
54010
53999
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
54011
54000
  }
54012
- function _unsupportedIterableToArray$5(o2, minLen) {
54001
+ function _unsupportedIterableToArray$4(o2, minLen) {
54013
54002
  if (!o2) return;
54014
- if (typeof o2 === "string") return _arrayLikeToArray$5(o2, minLen);
54003
+ if (typeof o2 === "string") return _arrayLikeToArray$4(o2, minLen);
54015
54004
  var n2 = Object.prototype.toString.call(o2).slice(8, -1);
54016
54005
  if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name;
54017
54006
  if (n2 === "Map" || n2 === "Set") return Array.from(o2);
54018
- if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$5(o2, minLen);
54007
+ if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$4(o2, minLen);
54019
54008
  }
54020
- function _arrayLikeToArray$5(arr, len) {
54009
+ function _arrayLikeToArray$4(arr, len) {
54021
54010
  if (len == null || len > arr.length) len = arr.length;
54022
54011
  for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
54023
54012
  arr2[i2] = arr[i2];
@@ -54026,7 +54015,7 @@ function _arrayLikeToArray$5(arr, len) {
54026
54015
  }
54027
54016
  function parseIncompletePhoneNumber(string2) {
54028
54017
  var result2 = "";
54029
- for (var _iterator = _createForOfIteratorHelperLoose$4(string2.split("")), _step; !(_step = _iterator()).done; ) {
54018
+ for (var _iterator = _createForOfIteratorHelperLoose$3(string2.split("")), _step; !(_step = _iterator()).done; ) {
54030
54019
  var character = _step.value;
54031
54020
  result2 += parsePhoneNumberCharacter(character, result2) || "";
54032
54021
  }
@@ -54035,55 +54024,12 @@ function parseIncompletePhoneNumber(string2) {
54035
54024
  function parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent) {
54036
54025
  if (character === "+") {
54037
54026
  if (prevParsedCharacters) {
54038
- if (typeof emitEvent === "function") {
54039
- emitEvent("end");
54040
- }
54041
54027
  return;
54042
54028
  }
54043
54029
  return "+";
54044
54030
  }
54045
54031
  return parseDigit(character);
54046
54032
  }
54047
- function _createForOfIteratorHelperLoose$3(o2, allowArrayLike) {
54048
- var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
54049
- if (it2) return (it2 = it2.call(o2)).next.bind(it2);
54050
- if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$4(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
54051
- if (it2) o2 = it2;
54052
- var i2 = 0;
54053
- return function() {
54054
- if (i2 >= o2.length) return { done: true };
54055
- return { done: false, value: o2[i2++] };
54056
- };
54057
- }
54058
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
54059
- }
54060
- function _unsupportedIterableToArray$4(o2, minLen) {
54061
- if (!o2) return;
54062
- if (typeof o2 === "string") return _arrayLikeToArray$4(o2, minLen);
54063
- var n2 = Object.prototype.toString.call(o2).slice(8, -1);
54064
- if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name;
54065
- if (n2 === "Map" || n2 === "Set") return Array.from(o2);
54066
- if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$4(o2, minLen);
54067
- }
54068
- function _arrayLikeToArray$4(arr, len) {
54069
- if (len == null || len > arr.length) len = arr.length;
54070
- for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
54071
- arr2[i2] = arr[i2];
54072
- }
54073
- return arr2;
54074
- }
54075
- function mergeArrays(a2, b2) {
54076
- var merged = a2.slice();
54077
- for (var _iterator = _createForOfIteratorHelperLoose$3(b2), _step; !(_step = _iterator()).done; ) {
54078
- var element = _step.value;
54079
- if (a2.indexOf(element) < 0) {
54080
- merged.push(element);
54081
- }
54082
- }
54083
- return merged.sort(function(a3, b3) {
54084
- return a3 - b3;
54085
- });
54086
- }
54087
54033
  function checkNumberLength(nationalNumber, metadata2) {
54088
54034
  return checkNumberLengthForType(nationalNumber, void 0, metadata2);
54089
54035
  }
@@ -54093,17 +54039,6 @@ function checkNumberLengthForType(nationalNumber, type3, metadata2) {
54093
54039
  if (!possible_lengths) {
54094
54040
  return "IS_POSSIBLE";
54095
54041
  }
54096
- if (type3 === "FIXED_LINE_OR_MOBILE") {
54097
- if (!metadata2.type("FIXED_LINE")) {
54098
- return checkNumberLengthForType(nationalNumber, "MOBILE", metadata2);
54099
- }
54100
- var mobile_type = metadata2.type("MOBILE");
54101
- if (mobile_type) {
54102
- possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());
54103
- }
54104
- } else if (type3 && !type_info) {
54105
- return "INVALID_LENGTH";
54106
- }
54107
54042
  var actual_length = nationalNumber.length;
54108
54043
  var minimum_length = possible_lengths[0];
54109
54044
  if (minimum_length === actual_length) {
@@ -54168,7 +54103,7 @@ function matchesEntirely(text, regular_expression) {
54168
54103
  function _createForOfIteratorHelperLoose$2(o2, allowArrayLike) {
54169
54104
  var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
54170
54105
  if (it2) return (it2 = it2.call(o2)).next.bind(it2);
54171
- if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$3(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
54106
+ if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$3(o2)) || allowArrayLike) {
54172
54107
  if (it2) o2 = it2;
54173
54108
  var i2 = 0;
54174
54109
  return function() {
@@ -54268,8 +54203,6 @@ function applyInternationalSeparatorStyle(formattedNumber) {
54268
54203
  var FIRST_GROUP_PATTERN = /(\$\d)/;
54269
54204
  function formatNationalNumberUsingFormat(number2, format2, _ref) {
54270
54205
  var useInternationalFormat = _ref.useInternationalFormat, withNationalPrefix = _ref.withNationalPrefix;
54271
- _ref.carrierCode;
54272
- _ref.metadata;
54273
54206
  var formattedNumber = number2.replace(new RegExp(format2.pattern()), useInternationalFormat ? format2.internationalFormat() : (
54274
54207
  // This library doesn't use `domestic_carrier_code_formatting_rule`,
54275
54208
  // because that one is only used when formatting phone numbers
@@ -54315,7 +54248,7 @@ function formatRFC3966(_ref) {
54315
54248
  function _createForOfIteratorHelperLoose$1(o2, allowArrayLike) {
54316
54249
  var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
54317
54250
  if (it2) return (it2 = it2.call(o2)).next.bind(it2);
54318
- if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$2(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
54251
+ if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$2(o2)) || allowArrayLike) {
54319
54252
  if (it2) o2 = it2;
54320
54253
  var i2 = 0;
54321
54254
  return function() {
@@ -54511,7 +54444,6 @@ function _defineProperties(target, props2) {
54511
54444
  }
54512
54445
  function _createClass(Constructor, protoProps, staticProps) {
54513
54446
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
54514
- if (staticProps) _defineProperties(Constructor, staticProps);
54515
54447
  Object.defineProperty(Constructor, "prototype", { writable: false });
54516
54448
  return Constructor;
54517
54449
  }
@@ -54808,7 +54740,7 @@ function extractCountryCallingCode(number2, country, callingCode, metadata2) {
54808
54740
  function _createForOfIteratorHelperLoose(o2, allowArrayLike) {
54809
54741
  var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
54810
54742
  if (it2) return (it2 = it2.call(o2)).next.bind(it2);
54811
- if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$1(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
54743
+ if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$1(o2)) || allowArrayLike) {
54812
54744
  if (it2) o2 = it2;
54813
54745
  var i2 = 0;
54814
54746
  return function() {
@@ -54862,14 +54794,8 @@ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
54862
54794
  return matchingCountries[0];
54863
54795
  }
54864
54796
  }
54865
- var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
54866
54797
  function getCountryByCallingCode(callingCode, _ref) {
54867
54798
  var nationalPhoneNumber = _ref.nationalNumber, defaultCountry = _ref.defaultCountry, metadata2 = _ref.metadata;
54868
- if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
54869
- if (metadata2.isNonGeographicCallingCode(callingCode)) {
54870
- return "001";
54871
- }
54872
- }
54873
54799
  var possibleCountries = metadata2.getCountryCodesForCallingCode(callingCode);
54874
54800
  if (!possibleCountries) {
54875
54801
  return;
@@ -57703,7 +57629,7 @@ const bisectCenter = bisector(number$2).center;
57703
57629
  function extent(values3, valueof) {
57704
57630
  let min2;
57705
57631
  let max2;
57706
- if (valueof === void 0) {
57632
+ {
57707
57633
  for (const value of values3) {
57708
57634
  if (value != null) {
57709
57635
  if (min2 === void 0) {
@@ -57714,18 +57640,6 @@ function extent(values3, valueof) {
57714
57640
  }
57715
57641
  }
57716
57642
  }
57717
- } else {
57718
- let index2 = -1;
57719
- for (let value of values3) {
57720
- if ((value = valueof(value, ++index2, values3)) != null) {
57721
- if (min2 === void 0) {
57722
- if (value >= value) min2 = max2 = value;
57723
- } else {
57724
- if (min2 > value) min2 = value;
57725
- if (max2 < value) max2 = value;
57726
- }
57727
- }
57728
- }
57729
57643
  }
57730
57644
  return [min2, max2];
57731
57645
  }