@roudanio/awesome-comment 0.10.8 → 0.10.10

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.
@@ -1,210 +0,0 @@
1
- import { e as H, r as M, m as V, i as G, j as $, k as T, a as E, l as q, t as tt, n as et, p as nt, w as st, q as ot, u as ct, c as rt } from "./vendor-vue-BTtW1k2s.js";
2
- let B;
3
- const R = (t) => B = t, J = (
4
- /* istanbul ignore next */
5
- /* @__PURE__ */ Symbol()
6
- );
7
- function I(t) {
8
- return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
9
- }
10
- var g;
11
- (function(t) {
12
- t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
13
- })(g || (g = {}));
14
- function St() {
15
- const t = H(!0), c = t.run(() => M({}));
16
- let n = [], e = [];
17
- const u = V({
18
- install(a) {
19
- R(u), u._a = a, a.provide(J, u), a.config.globalProperties.$pinia = u, e.forEach((r) => n.push(r)), e = [];
20
- },
21
- use(a) {
22
- return this._a ? n.push(a) : e.push(a), this;
23
- },
24
- _p: n,
25
- // it's actually undefined here
26
- // @ts-expect-error
27
- _a: null,
28
- _e: t,
29
- _s: /* @__PURE__ */ new Map(),
30
- state: c
31
- });
32
- return u;
33
- }
34
- const K = () => {
35
- };
36
- function F(t, c, n, e = K) {
37
- t.add(c);
38
- const u = () => {
39
- t.delete(c) && e();
40
- };
41
- return !n && et() && nt(u), u;
42
- }
43
- function w(t, ...c) {
44
- t.forEach((n) => {
45
- n(...c);
46
- });
47
- }
48
- const ut = (t) => t(), A = /* @__PURE__ */ Symbol(), x = /* @__PURE__ */ Symbol();
49
- function W(t, c) {
50
- t instanceof Map && c instanceof Map ? c.forEach((n, e) => t.set(e, n)) : t instanceof Set && c instanceof Set && c.forEach(t.add, t);
51
- for (const n in c) {
52
- if (!c.hasOwnProperty(n))
53
- continue;
54
- const e = c[n], u = t[n];
55
- I(u) && I(e) && t.hasOwnProperty(n) && !E(e) && !q(e) ? t[n] = W(u, e) : t[n] = e;
56
- }
57
- return t;
58
- }
59
- const at = (
60
- /* istanbul ignore next */
61
- /* @__PURE__ */ Symbol()
62
- );
63
- function ft(t) {
64
- return !I(t) || !Object.prototype.hasOwnProperty.call(t, at);
65
- }
66
- const { assign: h } = Object;
67
- function lt(t) {
68
- return !!(E(t) && t.effect);
69
- }
70
- function it(t, c, n, e) {
71
- const { state: u, actions: a, getters: r } = c, P = n.state.value[t];
72
- let S;
73
- function b() {
74
- P || (n.state.value[t] = u ? u() : {});
75
- const y = ct(n.state.value[t]);
76
- return h(y, a, Object.keys(r || {}).reduce((v, d) => (v[d] = V(rt(() => {
77
- R(n);
78
- const m = n._s.get(t);
79
- return r[d].call(m, m);
80
- })), v), {}));
81
- }
82
- return S = z(t, b, c, n, e, !0), S;
83
- }
84
- function z(t, c, n = {}, e, u, a) {
85
- let r;
86
- const P = h({ actions: {} }, n), S = { deep: !0 };
87
- let b, y, v = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), m;
88
- const _ = e.state.value[t];
89
- !a && !_ && (e.state.value[t] = {}), M({});
90
- let L;
91
- function N(o) {
92
- let s;
93
- b = y = !1, typeof o == "function" ? (o(e.state.value[t]), s = {
94
- type: g.patchFunction,
95
- storeId: t,
96
- events: m
97
- }) : (W(e.state.value[t], o), s = {
98
- type: g.patchObject,
99
- payload: o,
100
- storeId: t,
101
- events: m
102
- });
103
- const f = L = /* @__PURE__ */ Symbol();
104
- ot().then(() => {
105
- L === f && (b = !0);
106
- }), y = !0, w(v, s, e.state.value[t]);
107
- }
108
- const Q = a ? function() {
109
- const { state: s } = n, f = s ? s() : {};
110
- this.$patch((j) => {
111
- h(j, f);
112
- });
113
- } : (
114
- /* istanbul ignore next */
115
- K
116
- );
117
- function U() {
118
- r.stop(), v.clear(), d.clear(), e._s.delete(t);
119
- }
120
- const D = (o, s = "") => {
121
- if (A in o)
122
- return o[x] = s, o;
123
- const f = function() {
124
- R(e);
125
- const j = Array.from(arguments), O = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set();
126
- function Y(l) {
127
- O.add(l);
128
- }
129
- function Z(l) {
130
- k.add(l);
131
- }
132
- w(d, {
133
- args: j,
134
- name: f[x],
135
- store: i,
136
- after: Y,
137
- onError: Z
138
- });
139
- let p;
140
- try {
141
- p = o.apply(this && this.$id === t ? this : i, j);
142
- } catch (l) {
143
- throw w(k, l), l;
144
- }
145
- return p instanceof Promise ? p.then((l) => (w(O, l), l)).catch((l) => (w(k, l), Promise.reject(l))) : (w(O, p), p);
146
- };
147
- return f[A] = !0, f[x] = s, f;
148
- }, X = {
149
- _p: e,
150
- // _s: scope,
151
- $id: t,
152
- $onAction: F.bind(null, d),
153
- $patch: N,
154
- $reset: Q,
155
- $subscribe(o, s = {}) {
156
- const f = F(v, o, s.detached, () => j()), j = r.run(() => st(() => e.state.value[t], (O) => {
157
- (s.flush === "sync" ? y : b) && o({
158
- storeId: t,
159
- type: g.direct,
160
- events: m
161
- }, O);
162
- }, h({}, S, s)));
163
- return f;
164
- },
165
- $dispose: U
166
- }, i = T(X);
167
- e._s.set(t, i);
168
- const C = (e._a && e._a.runWithContext || ut)(() => e._e.run(() => (r = H()).run(() => c({ action: D }))));
169
- for (const o in C) {
170
- const s = C[o];
171
- if (E(s) && !lt(s) || q(s))
172
- a || (_ && ft(s) && (E(s) ? s.value = _[o] : W(s, _[o])), e.state.value[t][o] = s);
173
- else if (typeof s == "function") {
174
- const f = D(s, o);
175
- C[o] = f, P.actions[o] = s;
176
- }
177
- }
178
- return h(i, C), h(tt(i), C), Object.defineProperty(i, "$state", {
179
- get: () => e.state.value[t],
180
- set: (o) => {
181
- N((s) => {
182
- h(s, o);
183
- });
184
- }
185
- }), e._p.forEach((o) => {
186
- h(i, r.run(() => o({
187
- store: i,
188
- app: e._a,
189
- pinia: e,
190
- options: P
191
- })));
192
- }), _ && a && n.hydrate && n.hydrate(i.$state, _), b = !0, y = !0, i;
193
- }
194
- // @__NO_SIDE_EFFECTS__
195
- function yt(t, c, n) {
196
- let e;
197
- const u = typeof c == "function";
198
- e = u ? n : c;
199
- function a(r, P) {
200
- const S = $();
201
- return r = // in test mode, ignore the argument provided as we can always retrieve a
202
- // pinia instance with getActivePinia()
203
- r || (S ? G(J, null) : null), r && R(r), r = B, r._s.has(t) || (u ? z(t, c, e, r) : it(t, e, r)), r._s.get(t);
204
- }
205
- return a.$id = t, a;
206
- }
207
- export {
208
- St as c,
209
- yt as d
210
- };