artalk 2.4.3 → 2.4.4

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/Artalk.es.js CHANGED
@@ -3276,6 +3276,9 @@ function GetLayerWrap(ctx) {
3276
3276
  _defineProperties(Constructor.prototype, protoProps);
3277
3277
  if (staticProps)
3278
3278
  _defineProperties(Constructor, staticProps);
3279
+ Object.defineProperty(Constructor, "prototype", {
3280
+ writable: false
3281
+ });
3279
3282
  return Constructor;
3280
3283
  }
3281
3284
  function _inherits(subClass, superClass) {
@@ -3289,17 +3292,20 @@ function GetLayerWrap(ctx) {
3289
3292
  configurable: true
3290
3293
  }
3291
3294
  });
3295
+ Object.defineProperty(subClass, "prototype", {
3296
+ writable: false
3297
+ });
3292
3298
  if (superClass)
3293
3299
  _setPrototypeOf(subClass, superClass);
3294
3300
  }
3295
3301
  function _getPrototypeOf(o) {
3296
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
3302
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
3297
3303
  return o2.__proto__ || Object.getPrototypeOf(o2);
3298
3304
  };
3299
3305
  return _getPrototypeOf(o);
3300
3306
  }
3301
3307
  function _setPrototypeOf(o, p) {
3302
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
3308
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
3303
3309
  o2.__proto__ = p2;
3304
3310
  return o2;
3305
3311
  };
@@ -3329,6 +3335,8 @@ function GetLayerWrap(ctx) {
3329
3335
  function _possibleConstructorReturn(self2, call) {
3330
3336
  if (call && (typeof call === "object" || typeof call === "function")) {
3331
3337
  return call;
3338
+ } else if (call !== void 0) {
3339
+ throw new TypeError("Derived constructors may only return object or undefined");
3332
3340
  }
3333
3341
  return _assertThisInitialized(self2);
3334
3342
  }
@@ -3353,22 +3361,22 @@ function GetLayerWrap(ctx) {
3353
3361
  }
3354
3362
  return object;
3355
3363
  }
3356
- function _get(target, property, receiver) {
3364
+ function _get() {
3357
3365
  if (typeof Reflect !== "undefined" && Reflect.get) {
3358
- _get = Reflect.get;
3366
+ _get = Reflect.get.bind();
3359
3367
  } else {
3360
- _get = function _get2(target2, property2, receiver2) {
3361
- var base = _superPropBase(target2, property2);
3368
+ _get = function _get2(target, property, receiver) {
3369
+ var base = _superPropBase(target, property);
3362
3370
  if (!base)
3363
3371
  return;
3364
- var desc = Object.getOwnPropertyDescriptor(base, property2);
3372
+ var desc = Object.getOwnPropertyDescriptor(base, property);
3365
3373
  if (desc.get) {
3366
- return desc.get.call(receiver2);
3374
+ return desc.get.call(arguments.length < 3 ? target : receiver);
3367
3375
  }
3368
3376
  return desc.value;
3369
3377
  };
3370
3378
  }
3371
- return _get(target, property, receiver || target);
3379
+ return _get.apply(this, arguments);
3372
3380
  }
3373
3381
  var Emitter = /* @__PURE__ */ function() {
3374
3382
  function Emitter2() {
@@ -3450,6 +3458,11 @@ function GetLayerWrap(ctx) {
3450
3458
  writable: true,
3451
3459
  configurable: true
3452
3460
  });
3461
+ Object.defineProperty(_assertThisInitialized(_this), "reason", {
3462
+ value: void 0,
3463
+ writable: true,
3464
+ configurable: true
3465
+ });
3453
3466
  return _this;
3454
3467
  }
3455
3468
  _createClass(AbortSignal2, [{
@@ -3482,7 +3495,7 @@ function GetLayerWrap(ctx) {
3482
3495
  }
3483
3496
  _createClass(AbortController3, [{
3484
3497
  key: "abort",
3485
- value: function abort() {
3498
+ value: function abort(reason) {
3486
3499
  var event;
3487
3500
  try {
3488
3501
  event = new Event("abort");
@@ -3503,6 +3516,21 @@ function GetLayerWrap(ctx) {
3503
3516
  };
3504
3517
  }
3505
3518
  }
3519
+ var signalReason = reason;
3520
+ if (signalReason === void 0) {
3521
+ if (typeof document === "undefined") {
3522
+ signalReason = new Error("This operation was aborted");
3523
+ signalReason.name = "AbortError";
3524
+ } else {
3525
+ try {
3526
+ signalReason = new DOMException("signal is aborted without reason");
3527
+ } catch (err) {
3528
+ signalReason = new Error("This operation was aborted");
3529
+ signalReason.name = "AbortError";
3530
+ }
3531
+ }
3532
+ }
3533
+ this.signal.reason = signalReason;
3506
3534
  this.signal.dispatchEvent(event);
3507
3535
  }
3508
3536
  }, {
@@ -4132,7 +4160,7 @@ class Api {
4132
4160
  return `${this.ctx.conf.server}/api`;
4133
4161
  }
4134
4162
  }
4135
- const version = "2.4.3";
4163
+ const version = "2.4.4";
4136
4164
  const backendMinVersion = "2.3.0";
4137
4165
  const ListHTML = '<div class="atk-list">\n <div class="atk-list-header">\n <div class="atk-comment-count">\n <div class="atk-text"></div>\n </div>\n <div class="atk-right-action">\n <span data-action="admin-close-comment" class="atk-hide" atk-only-admin-show></span>\n <span data-action="open-sidebar" class="atk-hide atk-on">\n <span class="atk-unread-badge" style="display: none;"></span>\n <div class="atk-text"></div>\n </span>\n </div>\n </div>\n <div class="atk-list-body"></div>\n <div class="atk-list-footer">\n <div class="atk-copyright"></div>\n </div>\n</div>\n';
4138
4166
  const win = window || {};
@@ -6036,8 +6064,6 @@ class Context {
6036
6064
  return getI18n(this.conf.locale, key, args);
6037
6065
  }
6038
6066
  setDarkMode(darkMode) {
6039
- if (this.conf.darkMode === darkMode)
6040
- return;
6041
6067
  const darkModeClassName = "atk-dark-mode";
6042
6068
  this.conf.darkMode = darkMode;
6043
6069
  if (darkMode)
@@ -7151,6 +7177,8 @@ class Editor extends Component {
7151
7177
  this.openedPlugName = null;
7152
7178
  this.$plugBtnWrap.innerHTML = "";
7153
7179
  const disabledPlugs = [];
7180
+ if (!this.conf.imgUpload)
7181
+ disabledPlugs.push("upload");
7154
7182
  if (!this.conf.emoticons)
7155
7183
  disabledPlugs.push("emoticons");
7156
7184
  if (!this.conf.preview)