docx 8.2.0 → 8.2.2
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/README.md +0 -3
- package/build/export/formatter.spec.d.ts +1 -0
- package/build/export/packer/image-replacer.spec.d.ts +1 -0
- package/build/export/packer/next-compiler.spec.d.ts +1 -0
- package/build/export/packer/packer.spec.d.ts +1 -0
- package/build/file/border/border.spec.d.ts +1 -0
- package/build/file/checkbox/checkbox-util.spec.d.ts +1 -0
- package/build/file/checkbox/checkbox.spec.d.ts +1 -0
- package/build/file/content-types/content-types.spec.d.ts +1 -0
- package/build/file/core-properties/properties.spec.d.ts +1 -0
- package/build/file/custom-properties/custom-properties.spec.d.ts +1 -0
- package/build/file/document/body/body.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/columns.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/doc-grid.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/header-footer-reference.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/page-borders.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/page-size.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/page-text-direction.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/properties/section-type.spec.d.ts +1 -0
- package/build/file/document/body/section-properties/section-properties.spec.d.ts +1 -0
- package/build/file/document/document-background/document-background.spec.d.ts +1 -0
- package/build/file/document/document.spec.d.ts +1 -0
- package/build/file/document-wrapper.spec.d.ts +1 -0
- package/build/file/drawing/anchor/anchor.spec.d.ts +1 -0
- package/build/file/drawing/doc-properties/doc-properties-children.spec.d.ts +1 -0
- package/build/file/drawing/drawing.spec.d.ts +1 -0
- package/build/file/drawing/floating/align.spec.d.ts +1 -0
- package/build/file/drawing/floating/horizontal-position.spec.d.ts +1 -0
- package/build/file/drawing/floating/position-offset.spec.d.ts +1 -0
- package/build/file/drawing/floating/simple-pos.spec.d.ts +1 -0
- package/build/file/drawing/floating/vertical-position.spec.d.ts +1 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form.spec.d.ts +1 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.d.ts +4 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.spec.d.ts +1 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.d.ts +4 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.spec.d.ts +1 -0
- package/build/file/file.spec.d.ts +1 -0
- package/build/file/footer/footer.spec.d.ts +1 -0
- package/build/file/footer/index.d.ts +1 -0
- package/build/file/footer-wrapper.spec.d.ts +1 -0
- package/build/file/footnotes/footnote/footnote.spec.d.ts +1 -0
- package/build/file/footnotes-wrapper.spec.d.ts +1 -0
- package/build/file/header/header.spec.d.ts +1 -0
- package/build/file/header/index.d.ts +1 -0
- package/build/file/header-wrapper.spec.d.ts +1 -0
- package/build/file/media/media.spec.d.ts +1 -0
- package/build/file/numbering/abstract-numbering.spec.d.ts +1 -0
- package/build/file/numbering/concrete-numbering.spec.d.ts +1 -0
- package/build/file/numbering/level.spec.d.ts +1 -0
- package/build/file/numbering/numbering.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/alignment.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/border.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/break.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/indent.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/spacing.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/style.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/tab-stop.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/unordered-list.spec.d.ts +1 -0
- package/build/file/paragraph/formatting/width.d.ts +0 -0
- package/build/file/paragraph/formatting/word-wrap.spec.d.ts +1 -0
- package/build/file/paragraph/frame/frame-properties.spec.d.ts +1 -0
- package/build/file/paragraph/links/bookmark.spec.d.ts +1 -0
- package/build/file/paragraph/links/hyperlink.spec.d.ts +1 -0
- package/build/file/paragraph/links/outline-level.spec.d.ts +1 -0
- package/build/file/paragraph/links/pageref-field-instruction.spec.d.ts +1 -0
- package/build/file/paragraph/links/pageref.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-angled-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-beginning-character.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-bracket-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-curly-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-ending-character.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-round-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/brackets/math-square-brackets.spec.d.ts +1 -0
- package/build/file/paragraph/math/fraction/math-denominator.spec.d.ts +1 -0
- package/build/file/paragraph/math/fraction/math-fraction.spec.d.ts +1 -0
- package/build/file/paragraph/math/fraction/math-numerator.spec.d.ts +1 -0
- package/build/file/paragraph/math/function/math-function-name.spec.d.ts +1 -0
- package/build/file/paragraph/math/function/math-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/function/math-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/math-run.spec.d.ts +1 -0
- package/build/file/paragraph/math/math-text.spec.d.ts +1 -0
- package/build/file/paragraph/math/math.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-accent-character.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-base.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-integral.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-limit-location.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-n-ary-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-sub-script-hide.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-sub-script.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-sum.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-super-script-hide.spec.d.ts +1 -0
- package/build/file/paragraph/math/n-ary/math-super-script.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-degree-hide.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-degree.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-radical-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/radical/math-radical.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.d.ts +1 -0
- package/build/file/paragraph/math/script/super-script/math-super-script-function.spec.d.ts +1 -0
- package/build/file/paragraph/paragraph.spec.d.ts +1 -0
- package/build/file/paragraph/properties.spec.d.ts +1 -0
- package/build/file/paragraph/run/break.spec.d.ts +1 -0
- package/build/file/paragraph/run/comment-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/emphasis-mark.spec.d.ts +1 -0
- package/build/file/paragraph/run/empty-children.spec.d.ts +1 -0
- package/build/file/paragraph/run/formatting.spec.d.ts +1 -0
- package/build/file/paragraph/run/image-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/language.spec.d.ts +1 -0
- package/build/file/paragraph/run/page-number.spec.d.ts +1 -0
- package/build/file/paragraph/run/positional-tab.spec.d.ts +1 -0
- package/build/file/paragraph/run/run-components/symbol.spec.d.ts +1 -0
- package/build/file/paragraph/run/run-components/text.spec.d.ts +1 -0
- package/build/file/paragraph/run/run-fonts.spec.d.ts +1 -0
- package/build/file/paragraph/run/run.spec.d.ts +1 -0
- package/build/file/paragraph/run/script.spec.d.ts +1 -0
- package/build/file/paragraph/run/sequential-identifier.spec.d.ts +1 -0
- package/build/file/paragraph/run/simple-field.spec.d.ts +1 -0
- package/build/file/paragraph/run/symbol-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/text-run.spec.d.ts +1 -0
- package/build/file/paragraph/run/underline.spec.d.ts +1 -0
- package/build/file/relationships/relationships.spec.d.ts +1 -0
- package/build/file/settings/compatibility-setting/compatibility-setting.spec.d.ts +1 -0
- package/build/file/settings/compatibility.spec.d.ts +1 -0
- package/build/file/settings/settings.spec.d.ts +1 -0
- package/build/file/shading/shading.spec.d.ts +1 -0
- package/build/file/styles/defaults/document-defaults.spec.d.ts +1 -0
- package/build/file/styles/external-styles-factory.spec.d.ts +1 -0
- package/build/file/styles/latent-styles/exceptions.d.ts +20 -0
- package/build/file/styles/latent-styles/exceptions.spec.d.ts +1 -0
- package/build/file/styles/latent-styles/index.d.ts +1 -0
- package/build/file/styles/latent-styles/latent-styles.d.ts +5 -0
- package/build/file/styles/latent-styles/latent-styles.spec.d.ts +1 -0
- package/build/file/styles/sample/default-style.d.ts +1 -0
- package/build/file/styles/sample/default-style.spec.d.ts +1 -0
- package/build/file/styles/sample/index.d.ts +1 -0
- package/build/file/styles/style/character-style.spec.d.ts +1 -0
- package/build/file/styles/style/components.spec.d.ts +1 -0
- package/build/file/styles/style/default-styles.spec.d.ts +1 -0
- package/build/file/styles/style/paragraph-style.spec.d.ts +1 -0
- package/build/file/styles/style/style.spec.d.ts +1 -0
- package/build/file/styles/styles.spec.d.ts +1 -0
- package/build/file/table/grid.spec.d.ts +1 -0
- package/build/file/table/table-cell/table-cell-properties.spec.d.ts +1 -0
- package/build/file/table/table-cell/table-cell.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-borders.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-cell-margin.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-float-properties.spec.d.ts +1 -0
- package/build/file/table/table-properties/table-properties.spec.d.ts +1 -0
- package/build/file/table/table-row/table-row-properties.spec.d.ts +1 -0
- package/build/file/table/table-row/table-row.spec.d.ts +1 -0
- package/build/file/table/table.spec.d.ts +1 -0
- package/build/file/table-of-contents/table-of-contents.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/deleted-page-number.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/deleted-text-run.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/deleted-text.spec.d.ts +1 -0
- package/build/file/track-revision/track-revision-components/inserted-text-run.spec.d.ts +1 -0
- package/build/file/xml-components/attribute.spec.d.ts +1 -0
- package/build/file/xml-components/imported-xml-component.spec.d.ts +1 -0
- package/build/file/xml-components/simple-elements.spec.d.ts +1 -0
- package/build/file/xml-components/xml-component.spec.d.ts +1 -0
- package/build/index.cjs +1002 -1002
- package/build/index.iife.js +1002 -1002
- package/build/index.js +1002 -1002
- package/build/index.spec.d.ts +1 -0
- package/build/{index.umd.cjs → index.umd.js} +1002 -1002
- package/build/patcher/content-types-manager.spec.d.ts +1 -0
- package/build/patcher/from-docx.d.ts +1 -1
- package/build/patcher/from-docx.spec.d.ts +1 -0
- package/build/patcher/paragraph-split-inject.spec.d.ts +1 -0
- package/build/patcher/paragraph-token-replacer.spec.d.ts +1 -0
- package/build/patcher/relationship-manager.spec.d.ts +1 -0
- package/build/patcher/replacer.spec.d.ts +1 -0
- package/build/patcher/run-renderer.spec.d.ts +1 -0
- package/build/patcher/traverser.spec.d.ts +1 -0
- package/build/patcher/util.spec.d.ts +1 -0
- package/build/tests/utility.d.ts +3 -0
- package/build/util/convenience-functions.spec.d.ts +1 -0
- package/build/util/values.spec.d.ts +1 -0
- package/package.json +7 -11
package/build/index.js
CHANGED
|
@@ -110,448 +110,843 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
|
|
|
110
110
|
function getDefaultExportFromCjs(x) {
|
|
111
111
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
112
112
|
}
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
113
|
+
var sax$1 = {};
|
|
114
|
+
var events = { exports: {} };
|
|
115
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
116
|
+
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
117
|
+
return Function.prototype.apply.call(target, receiver, args);
|
|
118
|
+
};
|
|
119
|
+
var ReflectOwnKeys;
|
|
120
|
+
if (R && typeof R.ownKeys === "function") {
|
|
121
|
+
ReflectOwnKeys = R.ownKeys;
|
|
122
|
+
} else if (Object.getOwnPropertySymbols) {
|
|
123
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
124
|
+
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
125
|
+
};
|
|
126
|
+
} else {
|
|
127
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
128
|
+
return Object.getOwnPropertyNames(target);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function ProcessEmitWarning(warning) {
|
|
132
|
+
if (console && console.warn)
|
|
133
|
+
console.warn(warning);
|
|
134
|
+
}
|
|
135
|
+
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
136
|
+
return value !== value;
|
|
137
|
+
};
|
|
138
|
+
function EventEmitter() {
|
|
139
|
+
EventEmitter.init.call(this);
|
|
140
|
+
}
|
|
141
|
+
events.exports = EventEmitter;
|
|
142
|
+
events.exports.once = once2;
|
|
143
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
144
|
+
EventEmitter.prototype._events = void 0;
|
|
145
|
+
EventEmitter.prototype._eventsCount = 0;
|
|
146
|
+
EventEmitter.prototype._maxListeners = void 0;
|
|
147
|
+
var defaultMaxListeners = 10;
|
|
148
|
+
function checkListener(listener) {
|
|
149
|
+
if (typeof listener !== "function") {
|
|
150
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
130
151
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
152
|
+
}
|
|
153
|
+
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function() {
|
|
156
|
+
return defaultMaxListeners;
|
|
157
|
+
},
|
|
158
|
+
set: function(arg) {
|
|
159
|
+
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
160
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
137
161
|
}
|
|
138
|
-
|
|
139
|
-
if (validLen === -1)
|
|
140
|
-
validLen = len2;
|
|
141
|
-
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
142
|
-
return [validLen, placeHoldersLen];
|
|
162
|
+
defaultMaxListeners = arg;
|
|
143
163
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
164
|
+
});
|
|
165
|
+
EventEmitter.init = function() {
|
|
166
|
+
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
167
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
168
|
+
this._eventsCount = 0;
|
|
149
169
|
}
|
|
150
|
-
|
|
151
|
-
|
|
170
|
+
this._maxListeners = this._maxListeners || void 0;
|
|
171
|
+
};
|
|
172
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
173
|
+
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
|
174
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
|
152
175
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
this._maxListeners = n;
|
|
177
|
+
return this;
|
|
178
|
+
};
|
|
179
|
+
function _getMaxListeners(that) {
|
|
180
|
+
if (that._maxListeners === void 0)
|
|
181
|
+
return EventEmitter.defaultMaxListeners;
|
|
182
|
+
return that._maxListeners;
|
|
183
|
+
}
|
|
184
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
185
|
+
return _getMaxListeners(this);
|
|
186
|
+
};
|
|
187
|
+
EventEmitter.prototype.emit = function emit(type) {
|
|
188
|
+
var args = [];
|
|
189
|
+
for (var i = 1; i < arguments.length; i++)
|
|
190
|
+
args.push(arguments[i]);
|
|
191
|
+
var doError = type === "error";
|
|
192
|
+
var events2 = this._events;
|
|
193
|
+
if (events2 !== void 0)
|
|
194
|
+
doError = doError && events2.error === void 0;
|
|
195
|
+
else if (!doError)
|
|
196
|
+
return false;
|
|
197
|
+
if (doError) {
|
|
198
|
+
var er;
|
|
199
|
+
if (args.length > 0)
|
|
200
|
+
er = args[0];
|
|
201
|
+
if (er instanceof Error) {
|
|
202
|
+
throw er;
|
|
176
203
|
}
|
|
177
|
-
|
|
204
|
+
var err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
|
205
|
+
err.context = er;
|
|
206
|
+
throw err;
|
|
178
207
|
}
|
|
179
|
-
|
|
180
|
-
|
|
208
|
+
var handler = events2[type];
|
|
209
|
+
if (handler === void 0)
|
|
210
|
+
return false;
|
|
211
|
+
if (typeof handler === "function") {
|
|
212
|
+
ReflectApply(handler, this, args);
|
|
213
|
+
} else {
|
|
214
|
+
var len = handler.length;
|
|
215
|
+
var listeners2 = arrayClone(handler, len);
|
|
216
|
+
for (var i = 0; i < len; ++i)
|
|
217
|
+
ReflectApply(listeners2[i], this, args);
|
|
181
218
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
219
|
+
return true;
|
|
220
|
+
};
|
|
221
|
+
function _addListener(target, type, listener, prepend) {
|
|
222
|
+
var m;
|
|
223
|
+
var events2;
|
|
224
|
+
var existing;
|
|
225
|
+
checkListener(listener);
|
|
226
|
+
events2 = target._events;
|
|
227
|
+
if (events2 === void 0) {
|
|
228
|
+
events2 = target._events = /* @__PURE__ */ Object.create(null);
|
|
229
|
+
target._eventsCount = 0;
|
|
230
|
+
} else {
|
|
231
|
+
if (events2.newListener !== void 0) {
|
|
232
|
+
target.emit(
|
|
233
|
+
"newListener",
|
|
234
|
+
type,
|
|
235
|
+
listener.listener ? listener.listener : listener
|
|
236
|
+
);
|
|
237
|
+
events2 = target._events;
|
|
188
238
|
}
|
|
189
|
-
|
|
239
|
+
existing = events2[type];
|
|
190
240
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
241
|
+
if (existing === void 0) {
|
|
242
|
+
existing = events2[type] = listener;
|
|
243
|
+
++target._eventsCount;
|
|
244
|
+
} else {
|
|
245
|
+
if (typeof existing === "function") {
|
|
246
|
+
existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
|
|
247
|
+
} else if (prepend) {
|
|
248
|
+
existing.unshift(listener);
|
|
249
|
+
} else {
|
|
250
|
+
existing.push(listener);
|
|
199
251
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
);
|
|
252
|
+
m = _getMaxListeners(target);
|
|
253
|
+
if (m > 0 && existing.length > m && !existing.warned) {
|
|
254
|
+
existing.warned = true;
|
|
255
|
+
var w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
256
|
+
w.name = "MaxListenersExceededWarning";
|
|
257
|
+
w.emitter = target;
|
|
258
|
+
w.type = type;
|
|
259
|
+
w.count = existing.length;
|
|
260
|
+
ProcessEmitWarning(w);
|
|
210
261
|
}
|
|
211
|
-
return parts.join("");
|
|
212
262
|
}
|
|
213
|
-
return
|
|
263
|
+
return target;
|
|
214
264
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
265
|
+
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
266
|
+
return _addListener(this, type, listener, false);
|
|
267
|
+
};
|
|
268
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
269
|
+
EventEmitter.prototype.prependListener = function prependListener(type, listener) {
|
|
270
|
+
return _addListener(this, type, listener, true);
|
|
271
|
+
};
|
|
272
|
+
function onceWrapper() {
|
|
273
|
+
if (!this.fired) {
|
|
274
|
+
this.target.removeListener(this.type, this.wrapFn);
|
|
275
|
+
this.fired = true;
|
|
276
|
+
if (arguments.length === 0)
|
|
277
|
+
return this.listener.call(this.target);
|
|
278
|
+
return this.listener.apply(this.target, arguments);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function _onceWrap(target, type, listener) {
|
|
282
|
+
var state2 = { fired: false, wrapFn: void 0, target, type, listener };
|
|
283
|
+
var wrapped = onceWrapper.bind(state2);
|
|
284
|
+
wrapped.listener = listener;
|
|
285
|
+
state2.wrapFn = wrapped;
|
|
286
|
+
return wrapped;
|
|
287
|
+
}
|
|
288
|
+
EventEmitter.prototype.once = function once(type, listener) {
|
|
289
|
+
checkListener(listener);
|
|
290
|
+
this.on(type, _onceWrap(this, type, listener));
|
|
291
|
+
return this;
|
|
292
|
+
};
|
|
293
|
+
EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
|
|
294
|
+
checkListener(listener);
|
|
295
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
|
296
|
+
return this;
|
|
297
|
+
};
|
|
298
|
+
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
|
299
|
+
var list, events2, position, i, originalListener;
|
|
300
|
+
checkListener(listener);
|
|
301
|
+
events2 = this._events;
|
|
302
|
+
if (events2 === void 0)
|
|
303
|
+
return this;
|
|
304
|
+
list = events2[type];
|
|
305
|
+
if (list === void 0)
|
|
306
|
+
return this;
|
|
307
|
+
if (list === listener || list.listener === listener) {
|
|
308
|
+
if (--this._eventsCount === 0)
|
|
309
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
310
|
+
else {
|
|
311
|
+
delete events2[type];
|
|
312
|
+
if (events2.removeListener)
|
|
313
|
+
this.emit("removeListener", type, list.listener || listener);
|
|
249
314
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
258
|
-
var i = isLE ? 0 : nBytes - 1;
|
|
259
|
-
var d = isLE ? 1 : -1;
|
|
260
|
-
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
261
|
-
value = Math.abs(value);
|
|
262
|
-
if (isNaN(value) || value === Infinity) {
|
|
263
|
-
m = isNaN(value) ? 1 : 0;
|
|
264
|
-
e = eMax;
|
|
265
|
-
} else {
|
|
266
|
-
e = Math.floor(Math.log(value) / Math.LN2);
|
|
267
|
-
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
268
|
-
e--;
|
|
269
|
-
c *= 2;
|
|
270
|
-
}
|
|
271
|
-
if (e + eBias >= 1) {
|
|
272
|
-
value += rt / c;
|
|
273
|
-
} else {
|
|
274
|
-
value += rt * Math.pow(2, 1 - eBias);
|
|
275
|
-
}
|
|
276
|
-
if (value * c >= 2) {
|
|
277
|
-
e++;
|
|
278
|
-
c /= 2;
|
|
279
|
-
}
|
|
280
|
-
if (e + eBias >= eMax) {
|
|
281
|
-
m = 0;
|
|
282
|
-
e = eMax;
|
|
283
|
-
} else if (e + eBias >= 1) {
|
|
284
|
-
m = (value * c - 1) * Math.pow(2, mLen);
|
|
285
|
-
e = e + eBias;
|
|
286
|
-
} else {
|
|
287
|
-
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
288
|
-
e = 0;
|
|
315
|
+
} else if (typeof list !== "function") {
|
|
316
|
+
position = -1;
|
|
317
|
+
for (i = list.length - 1; i >= 0; i--) {
|
|
318
|
+
if (list[i] === listener || list[i].listener === listener) {
|
|
319
|
+
originalListener = list[i].listener;
|
|
320
|
+
position = i;
|
|
321
|
+
break;
|
|
289
322
|
}
|
|
290
323
|
}
|
|
291
|
-
|
|
324
|
+
if (position < 0)
|
|
325
|
+
return this;
|
|
326
|
+
if (position === 0)
|
|
327
|
+
list.shift();
|
|
328
|
+
else {
|
|
329
|
+
spliceOne(list, position);
|
|
292
330
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
331
|
+
if (list.length === 1)
|
|
332
|
+
events2[type] = list[0];
|
|
333
|
+
if (events2.removeListener !== void 0)
|
|
334
|
+
this.emit("removeListener", type, originalListener || listener);
|
|
335
|
+
}
|
|
336
|
+
return this;
|
|
337
|
+
};
|
|
338
|
+
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
339
|
+
EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
|
|
340
|
+
var listeners2, events2, i;
|
|
341
|
+
events2 = this._events;
|
|
342
|
+
if (events2 === void 0)
|
|
343
|
+
return this;
|
|
344
|
+
if (events2.removeListener === void 0) {
|
|
345
|
+
if (arguments.length === 0) {
|
|
346
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
347
|
+
this._eventsCount = 0;
|
|
348
|
+
} else if (events2[type] !== void 0) {
|
|
349
|
+
if (--this._eventsCount === 0)
|
|
350
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
351
|
+
else
|
|
352
|
+
delete events2[type];
|
|
296
353
|
}
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
var hasRequiredBuffer;
|
|
308
|
-
function requireBuffer() {
|
|
309
|
-
if (hasRequiredBuffer)
|
|
310
|
-
return buffer;
|
|
311
|
-
hasRequiredBuffer = 1;
|
|
312
|
-
(function(exports) {
|
|
313
|
-
var base64 = requireBase64Js();
|
|
314
|
-
var ieee7542 = requireIeee754();
|
|
315
|
-
var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
316
|
-
exports.Buffer = Buffer2;
|
|
317
|
-
exports.SlowBuffer = SlowBuffer;
|
|
318
|
-
exports.INSPECT_MAX_BYTES = 50;
|
|
319
|
-
var K_MAX_LENGTH = 2147483647;
|
|
320
|
-
exports.kMaxLength = K_MAX_LENGTH;
|
|
321
|
-
Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
322
|
-
if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
323
|
-
console.error(
|
|
324
|
-
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
325
|
-
);
|
|
354
|
+
return this;
|
|
355
|
+
}
|
|
356
|
+
if (arguments.length === 0) {
|
|
357
|
+
var keys = Object.keys(events2);
|
|
358
|
+
var key;
|
|
359
|
+
for (i = 0; i < keys.length; ++i) {
|
|
360
|
+
key = keys[i];
|
|
361
|
+
if (key === "removeListener")
|
|
362
|
+
continue;
|
|
363
|
+
this.removeAllListeners(key);
|
|
326
364
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
365
|
+
this.removeAllListeners("removeListener");
|
|
366
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
367
|
+
this._eventsCount = 0;
|
|
368
|
+
return this;
|
|
369
|
+
}
|
|
370
|
+
listeners2 = events2[type];
|
|
371
|
+
if (typeof listeners2 === "function") {
|
|
372
|
+
this.removeListener(type, listeners2);
|
|
373
|
+
} else if (listeners2 !== void 0) {
|
|
374
|
+
for (i = listeners2.length - 1; i >= 0; i--) {
|
|
375
|
+
this.removeListener(type, listeners2[i]);
|
|
339
376
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
377
|
+
}
|
|
378
|
+
return this;
|
|
379
|
+
};
|
|
380
|
+
function _listeners(target, type, unwrap) {
|
|
381
|
+
var events2 = target._events;
|
|
382
|
+
if (events2 === void 0)
|
|
383
|
+
return [];
|
|
384
|
+
var evlistener = events2[type];
|
|
385
|
+
if (evlistener === void 0)
|
|
386
|
+
return [];
|
|
387
|
+
if (typeof evlistener === "function")
|
|
388
|
+
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
389
|
+
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
390
|
+
}
|
|
391
|
+
EventEmitter.prototype.listeners = function listeners(type) {
|
|
392
|
+
return _listeners(this, type, true);
|
|
393
|
+
};
|
|
394
|
+
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
|
395
|
+
return _listeners(this, type, false);
|
|
396
|
+
};
|
|
397
|
+
EventEmitter.listenerCount = function(emitter, type) {
|
|
398
|
+
if (typeof emitter.listenerCount === "function") {
|
|
399
|
+
return emitter.listenerCount(type);
|
|
400
|
+
} else {
|
|
401
|
+
return listenerCount.call(emitter, type);
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
EventEmitter.prototype.listenerCount = listenerCount;
|
|
405
|
+
function listenerCount(type) {
|
|
406
|
+
var events2 = this._events;
|
|
407
|
+
if (events2 !== void 0) {
|
|
408
|
+
var evlistener = events2[type];
|
|
409
|
+
if (typeof evlistener === "function") {
|
|
410
|
+
return 1;
|
|
411
|
+
} else if (evlistener !== void 0) {
|
|
412
|
+
return evlistener.length;
|
|
363
413
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
414
|
+
}
|
|
415
|
+
return 0;
|
|
416
|
+
}
|
|
417
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
|
418
|
+
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
419
|
+
};
|
|
420
|
+
function arrayClone(arr, n) {
|
|
421
|
+
var copy = new Array(n);
|
|
422
|
+
for (var i = 0; i < n; ++i)
|
|
423
|
+
copy[i] = arr[i];
|
|
424
|
+
return copy;
|
|
425
|
+
}
|
|
426
|
+
function spliceOne(list, index) {
|
|
427
|
+
for (; index + 1 < list.length; index++)
|
|
428
|
+
list[index] = list[index + 1];
|
|
429
|
+
list.pop();
|
|
430
|
+
}
|
|
431
|
+
function unwrapListeners(arr) {
|
|
432
|
+
var ret = new Array(arr.length);
|
|
433
|
+
for (var i = 0; i < ret.length; ++i) {
|
|
434
|
+
ret[i] = arr[i].listener || arr[i];
|
|
435
|
+
}
|
|
436
|
+
return ret;
|
|
437
|
+
}
|
|
438
|
+
function once2(emitter, name) {
|
|
439
|
+
return new Promise(function(resolve2, reject) {
|
|
440
|
+
function errorListener(err) {
|
|
441
|
+
emitter.removeListener(name, resolver);
|
|
442
|
+
reject(err);
|
|
374
443
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return fromString(value, encodingOrOffset);
|
|
379
|
-
}
|
|
380
|
-
if (ArrayBuffer.isView(value)) {
|
|
381
|
-
return fromArrayView(value);
|
|
382
|
-
}
|
|
383
|
-
if (value == null) {
|
|
384
|
-
throw new TypeError(
|
|
385
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
389
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
390
|
-
}
|
|
391
|
-
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
392
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
393
|
-
}
|
|
394
|
-
if (typeof value === "number") {
|
|
395
|
-
throw new TypeError(
|
|
396
|
-
'The "value" argument must not be of type number. Received type number'
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
var valueOf = value.valueOf && value.valueOf();
|
|
400
|
-
if (valueOf != null && valueOf !== value) {
|
|
401
|
-
return Buffer2.from(valueOf, encodingOrOffset, length);
|
|
402
|
-
}
|
|
403
|
-
var b = fromObject(value);
|
|
404
|
-
if (b)
|
|
405
|
-
return b;
|
|
406
|
-
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
407
|
-
return Buffer2.from(
|
|
408
|
-
value[Symbol.toPrimitive]("string"),
|
|
409
|
-
encodingOrOffset,
|
|
410
|
-
length
|
|
411
|
-
);
|
|
444
|
+
function resolver() {
|
|
445
|
+
if (typeof emitter.removeListener === "function") {
|
|
446
|
+
emitter.removeListener("error", errorListener);
|
|
412
447
|
}
|
|
413
|
-
|
|
414
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
415
|
-
);
|
|
448
|
+
resolve2([].slice.call(arguments));
|
|
416
449
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
Object.setPrototypeOf(Buffer2.prototype, Uint8Array.prototype);
|
|
421
|
-
Object.setPrototypeOf(Buffer2, Uint8Array);
|
|
422
|
-
function assertSize(size) {
|
|
423
|
-
if (typeof size !== "number") {
|
|
424
|
-
throw new TypeError('"size" argument must be of type number');
|
|
425
|
-
} else if (size < 0) {
|
|
426
|
-
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
427
|
-
}
|
|
450
|
+
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
|
451
|
+
if (name !== "error") {
|
|
452
|
+
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
428
453
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
457
|
+
if (typeof emitter.on === "function") {
|
|
458
|
+
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
462
|
+
if (typeof emitter.on === "function") {
|
|
463
|
+
if (flags.once) {
|
|
464
|
+
emitter.once(name, listener);
|
|
465
|
+
} else {
|
|
466
|
+
emitter.on(name, listener);
|
|
467
|
+
}
|
|
468
|
+
} else if (typeof emitter.addEventListener === "function") {
|
|
469
|
+
emitter.addEventListener(name, function wrapListener(arg) {
|
|
470
|
+
if (flags.once) {
|
|
471
|
+
emitter.removeEventListener(name, wrapListener);
|
|
436
472
|
}
|
|
437
|
-
|
|
473
|
+
listener(arg);
|
|
474
|
+
});
|
|
475
|
+
} else {
|
|
476
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
var eventsExports = events.exports;
|
|
480
|
+
var inherits_browser = { exports: {} };
|
|
481
|
+
if (typeof Object.create === "function") {
|
|
482
|
+
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
483
|
+
if (superCtor) {
|
|
484
|
+
ctor.super_ = superCtor;
|
|
485
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
486
|
+
constructor: {
|
|
487
|
+
value: ctor,
|
|
488
|
+
enumerable: false,
|
|
489
|
+
writable: true,
|
|
490
|
+
configurable: true
|
|
491
|
+
}
|
|
492
|
+
});
|
|
438
493
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
494
|
+
};
|
|
495
|
+
} else {
|
|
496
|
+
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
497
|
+
if (superCtor) {
|
|
498
|
+
ctor.super_ = superCtor;
|
|
499
|
+
var TempCtor = function() {
|
|
500
|
+
};
|
|
501
|
+
TempCtor.prototype = superCtor.prototype;
|
|
502
|
+
ctor.prototype = new TempCtor();
|
|
503
|
+
ctor.prototype.constructor = ctor;
|
|
445
504
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
var inherits_browserExports = inherits_browser.exports;
|
|
508
|
+
var buffer = {};
|
|
509
|
+
var base64Js = {};
|
|
510
|
+
var hasRequiredBase64Js;
|
|
511
|
+
function requireBase64Js() {
|
|
512
|
+
if (hasRequiredBase64Js)
|
|
513
|
+
return base64Js;
|
|
514
|
+
hasRequiredBase64Js = 1;
|
|
515
|
+
base64Js.byteLength = byteLength;
|
|
516
|
+
base64Js.toByteArray = toByteArray;
|
|
517
|
+
base64Js.fromByteArray = fromByteArray;
|
|
518
|
+
var lookup = [];
|
|
519
|
+
var revLookup = [];
|
|
520
|
+
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
521
|
+
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
522
|
+
for (var i = 0, len = code.length; i < len; ++i) {
|
|
523
|
+
lookup[i] = code[i];
|
|
524
|
+
revLookup[code.charCodeAt(i)] = i;
|
|
525
|
+
}
|
|
526
|
+
revLookup["-".charCodeAt(0)] = 62;
|
|
527
|
+
revLookup["_".charCodeAt(0)] = 63;
|
|
528
|
+
function getLens(b64) {
|
|
529
|
+
var len2 = b64.length;
|
|
530
|
+
if (len2 % 4 > 0) {
|
|
531
|
+
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
466
532
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
533
|
+
var validLen = b64.indexOf("=");
|
|
534
|
+
if (validLen === -1)
|
|
535
|
+
validLen = len2;
|
|
536
|
+
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
537
|
+
return [validLen, placeHoldersLen];
|
|
538
|
+
}
|
|
539
|
+
function byteLength(b64) {
|
|
540
|
+
var lens = getLens(b64);
|
|
541
|
+
var validLen = lens[0];
|
|
542
|
+
var placeHoldersLen = lens[1];
|
|
543
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
544
|
+
}
|
|
545
|
+
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
546
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
547
|
+
}
|
|
548
|
+
function toByteArray(b64) {
|
|
549
|
+
var tmp;
|
|
550
|
+
var lens = getLens(b64);
|
|
551
|
+
var validLen = lens[0];
|
|
552
|
+
var placeHoldersLen = lens[1];
|
|
553
|
+
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
554
|
+
var curByte = 0;
|
|
555
|
+
var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
556
|
+
var i2;
|
|
557
|
+
for (i2 = 0; i2 < len2; i2 += 4) {
|
|
558
|
+
tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
|
|
559
|
+
arr[curByte++] = tmp >> 16 & 255;
|
|
560
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
561
|
+
arr[curByte++] = tmp & 255;
|
|
474
562
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
|
|
479
|
-
}
|
|
480
|
-
return fromArrayLike(arrayView);
|
|
563
|
+
if (placeHoldersLen === 2) {
|
|
564
|
+
tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
|
|
565
|
+
arr[curByte++] = tmp & 255;
|
|
481
566
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
567
|
+
if (placeHoldersLen === 1) {
|
|
568
|
+
tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
|
|
569
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
570
|
+
arr[curByte++] = tmp & 255;
|
|
571
|
+
}
|
|
572
|
+
return arr;
|
|
573
|
+
}
|
|
574
|
+
function tripletToBase64(num) {
|
|
575
|
+
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
576
|
+
}
|
|
577
|
+
function encodeChunk(uint8, start, end) {
|
|
578
|
+
var tmp;
|
|
579
|
+
var output = [];
|
|
580
|
+
for (var i2 = start; i2 < end; i2 += 3) {
|
|
581
|
+
tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
|
|
582
|
+
output.push(tripletToBase64(tmp));
|
|
583
|
+
}
|
|
584
|
+
return output.join("");
|
|
585
|
+
}
|
|
586
|
+
function fromByteArray(uint8) {
|
|
587
|
+
var tmp;
|
|
588
|
+
var len2 = uint8.length;
|
|
589
|
+
var extraBytes = len2 % 3;
|
|
590
|
+
var parts = [];
|
|
591
|
+
var maxChunkLength = 16383;
|
|
592
|
+
for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
|
|
593
|
+
parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));
|
|
594
|
+
}
|
|
595
|
+
if (extraBytes === 1) {
|
|
596
|
+
tmp = uint8[len2 - 1];
|
|
597
|
+
parts.push(
|
|
598
|
+
lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
|
|
599
|
+
);
|
|
600
|
+
} else if (extraBytes === 2) {
|
|
601
|
+
tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
|
|
602
|
+
parts.push(
|
|
603
|
+
lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
return parts.join("");
|
|
607
|
+
}
|
|
608
|
+
return base64Js;
|
|
609
|
+
}
|
|
610
|
+
var ieee754 = {};
|
|
611
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
612
|
+
var hasRequiredIeee754;
|
|
613
|
+
function requireIeee754() {
|
|
614
|
+
if (hasRequiredIeee754)
|
|
615
|
+
return ieee754;
|
|
616
|
+
hasRequiredIeee754 = 1;
|
|
617
|
+
ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
|
|
618
|
+
var e, m;
|
|
619
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
620
|
+
var eMax = (1 << eLen) - 1;
|
|
621
|
+
var eBias = eMax >> 1;
|
|
622
|
+
var nBits = -7;
|
|
623
|
+
var i = isLE ? nBytes - 1 : 0;
|
|
624
|
+
var d = isLE ? -1 : 1;
|
|
625
|
+
var s = buffer2[offset + i];
|
|
626
|
+
i += d;
|
|
627
|
+
e = s & (1 << -nBits) - 1;
|
|
628
|
+
s >>= -nBits;
|
|
629
|
+
nBits += eLen;
|
|
630
|
+
for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
631
|
+
}
|
|
632
|
+
m = e & (1 << -nBits) - 1;
|
|
633
|
+
e >>= -nBits;
|
|
634
|
+
nBits += mLen;
|
|
635
|
+
for (; nBits > 0; m = m * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
636
|
+
}
|
|
637
|
+
if (e === 0) {
|
|
638
|
+
e = 1 - eBias;
|
|
639
|
+
} else if (e === eMax) {
|
|
640
|
+
return m ? NaN : (s ? -1 : 1) * Infinity;
|
|
641
|
+
} else {
|
|
642
|
+
m = m + Math.pow(2, mLen);
|
|
643
|
+
e = e - eBias;
|
|
644
|
+
}
|
|
645
|
+
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
|
646
|
+
};
|
|
647
|
+
ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
648
|
+
var e, m, c;
|
|
649
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
650
|
+
var eMax = (1 << eLen) - 1;
|
|
651
|
+
var eBias = eMax >> 1;
|
|
652
|
+
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
653
|
+
var i = isLE ? 0 : nBytes - 1;
|
|
654
|
+
var d = isLE ? 1 : -1;
|
|
655
|
+
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
656
|
+
value = Math.abs(value);
|
|
657
|
+
if (isNaN(value) || value === Infinity) {
|
|
658
|
+
m = isNaN(value) ? 1 : 0;
|
|
659
|
+
e = eMax;
|
|
660
|
+
} else {
|
|
661
|
+
e = Math.floor(Math.log(value) / Math.LN2);
|
|
662
|
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
663
|
+
e--;
|
|
664
|
+
c *= 2;
|
|
665
|
+
}
|
|
666
|
+
if (e + eBias >= 1) {
|
|
667
|
+
value += rt / c;
|
|
494
668
|
} else {
|
|
495
|
-
|
|
669
|
+
value += rt * Math.pow(2, 1 - eBias);
|
|
496
670
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
function fromObject(obj) {
|
|
501
|
-
if (Buffer2.isBuffer(obj)) {
|
|
502
|
-
var len = checked(obj.length) | 0;
|
|
503
|
-
var buf = createBuffer(len);
|
|
504
|
-
if (buf.length === 0) {
|
|
505
|
-
return buf;
|
|
506
|
-
}
|
|
507
|
-
obj.copy(buf, 0, 0, len);
|
|
508
|
-
return buf;
|
|
671
|
+
if (value * c >= 2) {
|
|
672
|
+
e++;
|
|
673
|
+
c /= 2;
|
|
509
674
|
}
|
|
510
|
-
if (
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
675
|
+
if (e + eBias >= eMax) {
|
|
676
|
+
m = 0;
|
|
677
|
+
e = eMax;
|
|
678
|
+
} else if (e + eBias >= 1) {
|
|
679
|
+
m = (value * c - 1) * Math.pow(2, mLen);
|
|
680
|
+
e = e + eBias;
|
|
681
|
+
} else {
|
|
682
|
+
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
683
|
+
e = 0;
|
|
515
684
|
}
|
|
516
|
-
|
|
517
|
-
|
|
685
|
+
}
|
|
686
|
+
for (; mLen >= 8; buffer2[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
|
|
687
|
+
}
|
|
688
|
+
e = e << mLen | m;
|
|
689
|
+
eLen += mLen;
|
|
690
|
+
for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
691
|
+
}
|
|
692
|
+
buffer2[offset + i - d] |= s * 128;
|
|
693
|
+
};
|
|
694
|
+
return ieee754;
|
|
695
|
+
}
|
|
696
|
+
/*!
|
|
697
|
+
* The buffer module from node.js, for the browser.
|
|
698
|
+
*
|
|
699
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
700
|
+
* @license MIT
|
|
701
|
+
*/
|
|
702
|
+
var hasRequiredBuffer;
|
|
703
|
+
function requireBuffer() {
|
|
704
|
+
if (hasRequiredBuffer)
|
|
705
|
+
return buffer;
|
|
706
|
+
hasRequiredBuffer = 1;
|
|
707
|
+
(function(exports) {
|
|
708
|
+
var base64 = requireBase64Js();
|
|
709
|
+
var ieee7542 = requireIeee754();
|
|
710
|
+
var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
711
|
+
exports.Buffer = Buffer2;
|
|
712
|
+
exports.SlowBuffer = SlowBuffer;
|
|
713
|
+
exports.INSPECT_MAX_BYTES = 50;
|
|
714
|
+
var K_MAX_LENGTH = 2147483647;
|
|
715
|
+
exports.kMaxLength = K_MAX_LENGTH;
|
|
716
|
+
Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
717
|
+
if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
718
|
+
console.error(
|
|
719
|
+
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
function typedArraySupport() {
|
|
723
|
+
try {
|
|
724
|
+
var arr = new Uint8Array(1);
|
|
725
|
+
var proto = { foo: function() {
|
|
726
|
+
return 42;
|
|
727
|
+
} };
|
|
728
|
+
Object.setPrototypeOf(proto, Uint8Array.prototype);
|
|
729
|
+
Object.setPrototypeOf(arr, proto);
|
|
730
|
+
return arr.foo() === 42;
|
|
731
|
+
} catch (e) {
|
|
732
|
+
return false;
|
|
518
733
|
}
|
|
519
734
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
735
|
+
Object.defineProperty(Buffer2.prototype, "parent", {
|
|
736
|
+
enumerable: true,
|
|
737
|
+
get: function() {
|
|
738
|
+
if (!Buffer2.isBuffer(this))
|
|
739
|
+
return void 0;
|
|
740
|
+
return this.buffer;
|
|
523
741
|
}
|
|
524
|
-
|
|
742
|
+
});
|
|
743
|
+
Object.defineProperty(Buffer2.prototype, "offset", {
|
|
744
|
+
enumerable: true,
|
|
745
|
+
get: function() {
|
|
746
|
+
if (!Buffer2.isBuffer(this))
|
|
747
|
+
return void 0;
|
|
748
|
+
return this.byteOffset;
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
function createBuffer(length) {
|
|
752
|
+
if (length > K_MAX_LENGTH) {
|
|
753
|
+
throw new RangeError('The value "' + length + '" is invalid for option "size"');
|
|
754
|
+
}
|
|
755
|
+
var buf = new Uint8Array(length);
|
|
756
|
+
Object.setPrototypeOf(buf, Buffer2.prototype);
|
|
757
|
+
return buf;
|
|
525
758
|
}
|
|
526
|
-
function
|
|
527
|
-
if (
|
|
528
|
-
|
|
759
|
+
function Buffer2(arg, encodingOrOffset, length) {
|
|
760
|
+
if (typeof arg === "number") {
|
|
761
|
+
if (typeof encodingOrOffset === "string") {
|
|
762
|
+
throw new TypeError(
|
|
763
|
+
'The "string" argument must be of type string. Received type number'
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
return allocUnsafe(arg);
|
|
529
767
|
}
|
|
530
|
-
return
|
|
768
|
+
return from(arg, encodingOrOffset, length);
|
|
531
769
|
}
|
|
532
|
-
Buffer2.
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
if (
|
|
770
|
+
Buffer2.poolSize = 8192;
|
|
771
|
+
function from(value, encodingOrOffset, length) {
|
|
772
|
+
if (typeof value === "string") {
|
|
773
|
+
return fromString(value, encodingOrOffset);
|
|
774
|
+
}
|
|
775
|
+
if (ArrayBuffer.isView(value)) {
|
|
776
|
+
return fromArrayView(value);
|
|
777
|
+
}
|
|
778
|
+
if (value == null) {
|
|
541
779
|
throw new TypeError(
|
|
542
|
-
|
|
780
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
543
781
|
);
|
|
544
782
|
}
|
|
545
|
-
if (
|
|
546
|
-
return
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
783
|
+
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
784
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
785
|
+
}
|
|
786
|
+
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
787
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
788
|
+
}
|
|
789
|
+
if (typeof value === "number") {
|
|
790
|
+
throw new TypeError(
|
|
791
|
+
'The "value" argument must not be of type number. Received type number'
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
var valueOf = value.valueOf && value.valueOf();
|
|
795
|
+
if (valueOf != null && valueOf !== value) {
|
|
796
|
+
return Buffer2.from(valueOf, encodingOrOffset, length);
|
|
797
|
+
}
|
|
798
|
+
var b = fromObject(value);
|
|
799
|
+
if (b)
|
|
800
|
+
return b;
|
|
801
|
+
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
802
|
+
return Buffer2.from(
|
|
803
|
+
value[Symbol.toPrimitive]("string"),
|
|
804
|
+
encodingOrOffset,
|
|
805
|
+
length
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
throw new TypeError(
|
|
809
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
810
|
+
);
|
|
811
|
+
}
|
|
812
|
+
Buffer2.from = function(value, encodingOrOffset, length) {
|
|
813
|
+
return from(value, encodingOrOffset, length);
|
|
814
|
+
};
|
|
815
|
+
Object.setPrototypeOf(Buffer2.prototype, Uint8Array.prototype);
|
|
816
|
+
Object.setPrototypeOf(Buffer2, Uint8Array);
|
|
817
|
+
function assertSize(size) {
|
|
818
|
+
if (typeof size !== "number") {
|
|
819
|
+
throw new TypeError('"size" argument must be of type number');
|
|
820
|
+
} else if (size < 0) {
|
|
821
|
+
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
function alloc(size, fill, encoding) {
|
|
825
|
+
assertSize(size);
|
|
826
|
+
if (size <= 0) {
|
|
827
|
+
return createBuffer(size);
|
|
828
|
+
}
|
|
829
|
+
if (fill !== void 0) {
|
|
830
|
+
return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
|
|
831
|
+
}
|
|
832
|
+
return createBuffer(size);
|
|
833
|
+
}
|
|
834
|
+
Buffer2.alloc = function(size, fill, encoding) {
|
|
835
|
+
return alloc(size, fill, encoding);
|
|
836
|
+
};
|
|
837
|
+
function allocUnsafe(size) {
|
|
838
|
+
assertSize(size);
|
|
839
|
+
return createBuffer(size < 0 ? 0 : checked(size) | 0);
|
|
840
|
+
}
|
|
841
|
+
Buffer2.allocUnsafe = function(size) {
|
|
842
|
+
return allocUnsafe(size);
|
|
843
|
+
};
|
|
844
|
+
Buffer2.allocUnsafeSlow = function(size) {
|
|
845
|
+
return allocUnsafe(size);
|
|
846
|
+
};
|
|
847
|
+
function fromString(string, encoding) {
|
|
848
|
+
if (typeof encoding !== "string" || encoding === "") {
|
|
849
|
+
encoding = "utf8";
|
|
850
|
+
}
|
|
851
|
+
if (!Buffer2.isEncoding(encoding)) {
|
|
852
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
853
|
+
}
|
|
854
|
+
var length = byteLength(string, encoding) | 0;
|
|
855
|
+
var buf = createBuffer(length);
|
|
856
|
+
var actual = buf.write(string, encoding);
|
|
857
|
+
if (actual !== length) {
|
|
858
|
+
buf = buf.slice(0, actual);
|
|
859
|
+
}
|
|
860
|
+
return buf;
|
|
861
|
+
}
|
|
862
|
+
function fromArrayLike(array) {
|
|
863
|
+
var length = array.length < 0 ? 0 : checked(array.length) | 0;
|
|
864
|
+
var buf = createBuffer(length);
|
|
865
|
+
for (var i = 0; i < length; i += 1) {
|
|
866
|
+
buf[i] = array[i] & 255;
|
|
867
|
+
}
|
|
868
|
+
return buf;
|
|
869
|
+
}
|
|
870
|
+
function fromArrayView(arrayView) {
|
|
871
|
+
if (isInstance(arrayView, Uint8Array)) {
|
|
872
|
+
var copy = new Uint8Array(arrayView);
|
|
873
|
+
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
|
|
874
|
+
}
|
|
875
|
+
return fromArrayLike(arrayView);
|
|
876
|
+
}
|
|
877
|
+
function fromArrayBuffer(array, byteOffset, length) {
|
|
878
|
+
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
879
|
+
throw new RangeError('"offset" is outside of buffer bounds');
|
|
880
|
+
}
|
|
881
|
+
if (array.byteLength < byteOffset + (length || 0)) {
|
|
882
|
+
throw new RangeError('"length" is outside of buffer bounds');
|
|
883
|
+
}
|
|
884
|
+
var buf;
|
|
885
|
+
if (byteOffset === void 0 && length === void 0) {
|
|
886
|
+
buf = new Uint8Array(array);
|
|
887
|
+
} else if (length === void 0) {
|
|
888
|
+
buf = new Uint8Array(array, byteOffset);
|
|
889
|
+
} else {
|
|
890
|
+
buf = new Uint8Array(array, byteOffset, length);
|
|
891
|
+
}
|
|
892
|
+
Object.setPrototypeOf(buf, Buffer2.prototype);
|
|
893
|
+
return buf;
|
|
894
|
+
}
|
|
895
|
+
function fromObject(obj) {
|
|
896
|
+
if (Buffer2.isBuffer(obj)) {
|
|
897
|
+
var len = checked(obj.length) | 0;
|
|
898
|
+
var buf = createBuffer(len);
|
|
899
|
+
if (buf.length === 0) {
|
|
900
|
+
return buf;
|
|
901
|
+
}
|
|
902
|
+
obj.copy(buf, 0, 0, len);
|
|
903
|
+
return buf;
|
|
904
|
+
}
|
|
905
|
+
if (obj.length !== void 0) {
|
|
906
|
+
if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
|
|
907
|
+
return createBuffer(0);
|
|
908
|
+
}
|
|
909
|
+
return fromArrayLike(obj);
|
|
910
|
+
}
|
|
911
|
+
if (obj.type === "Buffer" && Array.isArray(obj.data)) {
|
|
912
|
+
return fromArrayLike(obj.data);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
function checked(length) {
|
|
916
|
+
if (length >= K_MAX_LENGTH) {
|
|
917
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
|
|
918
|
+
}
|
|
919
|
+
return length | 0;
|
|
920
|
+
}
|
|
921
|
+
function SlowBuffer(length) {
|
|
922
|
+
if (+length != length) {
|
|
923
|
+
length = 0;
|
|
924
|
+
}
|
|
925
|
+
return Buffer2.alloc(+length);
|
|
926
|
+
}
|
|
927
|
+
Buffer2.isBuffer = function isBuffer(b) {
|
|
928
|
+
return b != null && b._isBuffer === true && b !== Buffer2.prototype;
|
|
929
|
+
};
|
|
930
|
+
Buffer2.compare = function compare(a, b) {
|
|
931
|
+
if (isInstance(a, Uint8Array))
|
|
932
|
+
a = Buffer2.from(a, a.offset, a.byteLength);
|
|
933
|
+
if (isInstance(b, Uint8Array))
|
|
934
|
+
b = Buffer2.from(b, b.offset, b.byteLength);
|
|
935
|
+
if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
|
|
936
|
+
throw new TypeError(
|
|
937
|
+
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
if (a === b)
|
|
941
|
+
return 0;
|
|
942
|
+
var x = a.length;
|
|
943
|
+
var y = b.length;
|
|
944
|
+
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
945
|
+
if (a[i] !== b[i]) {
|
|
946
|
+
x = a[i];
|
|
947
|
+
y = b[i];
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
555
950
|
}
|
|
556
951
|
if (x < y)
|
|
557
952
|
return -1;
|
|
@@ -1734,626 +2129,231 @@ function requireBuffer() {
|
|
|
1734
2129
|
}
|
|
1735
2130
|
return byteArray;
|
|
1736
2131
|
}
|
|
1737
|
-
function utf16leToBytes(str, units) {
|
|
1738
|
-
var c, hi, lo;
|
|
1739
|
-
var byteArray = [];
|
|
1740
|
-
for (var i = 0; i < str.length; ++i) {
|
|
1741
|
-
if ((units -= 2) < 0)
|
|
1742
|
-
break;
|
|
1743
|
-
c = str.charCodeAt(i);
|
|
1744
|
-
hi = c >> 8;
|
|
1745
|
-
lo = c % 256;
|
|
1746
|
-
byteArray.push(lo);
|
|
1747
|
-
byteArray.push(hi);
|
|
1748
|
-
}
|
|
1749
|
-
return byteArray;
|
|
1750
|
-
}
|
|
1751
|
-
function base64ToBytes(str) {
|
|
1752
|
-
return base64.toByteArray(base64clean(str));
|
|
1753
|
-
}
|
|
1754
|
-
function blitBuffer(src2, dst, offset, length) {
|
|
1755
|
-
for (var i = 0; i < length; ++i) {
|
|
1756
|
-
if (i + offset >= dst.length || i >= src2.length)
|
|
1757
|
-
break;
|
|
1758
|
-
dst[i + offset] = src2[i];
|
|
1759
|
-
}
|
|
1760
|
-
return i;
|
|
1761
|
-
}
|
|
1762
|
-
function isInstance(obj, type) {
|
|
1763
|
-
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
1764
|
-
}
|
|
1765
|
-
function numberIsNaN(obj) {
|
|
1766
|
-
return obj !== obj;
|
|
1767
|
-
}
|
|
1768
|
-
var hexSliceLookupTable = function() {
|
|
1769
|
-
var alphabet = "0123456789abcdef";
|
|
1770
|
-
var table = new Array(256);
|
|
1771
|
-
for (var i = 0; i < 16; ++i) {
|
|
1772
|
-
var i16 = i * 16;
|
|
1773
|
-
for (var j = 0; j < 16; ++j) {
|
|
1774
|
-
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
return table;
|
|
1778
|
-
}();
|
|
1779
|
-
})(buffer);
|
|
1780
|
-
return buffer;
|
|
1781
|
-
}
|
|
1782
|
-
var bufferExports = requireBuffer();
|
|
1783
|
-
var browser$1 = { exports: {} };
|
|
1784
|
-
var process = browser$1.exports = {};
|
|
1785
|
-
var cachedSetTimeout;
|
|
1786
|
-
var cachedClearTimeout;
|
|
1787
|
-
function defaultSetTimout() {
|
|
1788
|
-
throw new Error("setTimeout has not been defined");
|
|
1789
|
-
}
|
|
1790
|
-
function defaultClearTimeout() {
|
|
1791
|
-
throw new Error("clearTimeout has not been defined");
|
|
1792
|
-
}
|
|
1793
|
-
(function() {
|
|
1794
|
-
try {
|
|
1795
|
-
if (typeof setTimeout === "function") {
|
|
1796
|
-
cachedSetTimeout = setTimeout;
|
|
1797
|
-
} else {
|
|
1798
|
-
cachedSetTimeout = defaultSetTimout;
|
|
1799
|
-
}
|
|
1800
|
-
} catch (e) {
|
|
1801
|
-
cachedSetTimeout = defaultSetTimout;
|
|
1802
|
-
}
|
|
1803
|
-
try {
|
|
1804
|
-
if (typeof clearTimeout === "function") {
|
|
1805
|
-
cachedClearTimeout = clearTimeout;
|
|
1806
|
-
} else {
|
|
1807
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
1808
|
-
}
|
|
1809
|
-
} catch (e) {
|
|
1810
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
1811
|
-
}
|
|
1812
|
-
})();
|
|
1813
|
-
function runTimeout(fun) {
|
|
1814
|
-
if (cachedSetTimeout === setTimeout) {
|
|
1815
|
-
return setTimeout(fun, 0);
|
|
1816
|
-
}
|
|
1817
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
1818
|
-
cachedSetTimeout = setTimeout;
|
|
1819
|
-
return setTimeout(fun, 0);
|
|
1820
|
-
}
|
|
1821
|
-
try {
|
|
1822
|
-
return cachedSetTimeout(fun, 0);
|
|
1823
|
-
} catch (e) {
|
|
1824
|
-
try {
|
|
1825
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
1826
|
-
} catch (e2) {
|
|
1827
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
function runClearTimeout(marker) {
|
|
1832
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
1833
|
-
return clearTimeout(marker);
|
|
1834
|
-
}
|
|
1835
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
1836
|
-
cachedClearTimeout = clearTimeout;
|
|
1837
|
-
return clearTimeout(marker);
|
|
1838
|
-
}
|
|
1839
|
-
try {
|
|
1840
|
-
return cachedClearTimeout(marker);
|
|
1841
|
-
} catch (e) {
|
|
1842
|
-
try {
|
|
1843
|
-
return cachedClearTimeout.call(null, marker);
|
|
1844
|
-
} catch (e2) {
|
|
1845
|
-
return cachedClearTimeout.call(this, marker);
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1849
|
-
var queue = [];
|
|
1850
|
-
var draining = false;
|
|
1851
|
-
var currentQueue;
|
|
1852
|
-
var queueIndex = -1;
|
|
1853
|
-
function cleanUpNextTick() {
|
|
1854
|
-
if (!draining || !currentQueue) {
|
|
1855
|
-
return;
|
|
1856
|
-
}
|
|
1857
|
-
draining = false;
|
|
1858
|
-
if (currentQueue.length) {
|
|
1859
|
-
queue = currentQueue.concat(queue);
|
|
1860
|
-
} else {
|
|
1861
|
-
queueIndex = -1;
|
|
1862
|
-
}
|
|
1863
|
-
if (queue.length) {
|
|
1864
|
-
drainQueue();
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
function drainQueue() {
|
|
1868
|
-
if (draining) {
|
|
1869
|
-
return;
|
|
1870
|
-
}
|
|
1871
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
1872
|
-
draining = true;
|
|
1873
|
-
var len = queue.length;
|
|
1874
|
-
while (len) {
|
|
1875
|
-
currentQueue = queue;
|
|
1876
|
-
queue = [];
|
|
1877
|
-
while (++queueIndex < len) {
|
|
1878
|
-
if (currentQueue) {
|
|
1879
|
-
currentQueue[queueIndex].run();
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
queueIndex = -1;
|
|
1883
|
-
len = queue.length;
|
|
1884
|
-
}
|
|
1885
|
-
currentQueue = null;
|
|
1886
|
-
draining = false;
|
|
1887
|
-
runClearTimeout(timeout);
|
|
1888
|
-
}
|
|
1889
|
-
process.nextTick = function(fun) {
|
|
1890
|
-
var args = new Array(arguments.length - 1);
|
|
1891
|
-
if (arguments.length > 1) {
|
|
1892
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1893
|
-
args[i - 1] = arguments[i];
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
queue.push(new Item(fun, args));
|
|
1897
|
-
if (queue.length === 1 && !draining) {
|
|
1898
|
-
runTimeout(drainQueue);
|
|
1899
|
-
}
|
|
1900
|
-
};
|
|
1901
|
-
function Item(fun, array) {
|
|
1902
|
-
this.fun = fun;
|
|
1903
|
-
this.array = array;
|
|
1904
|
-
}
|
|
1905
|
-
Item.prototype.run = function() {
|
|
1906
|
-
this.fun.apply(null, this.array);
|
|
1907
|
-
};
|
|
1908
|
-
process.title = "browser";
|
|
1909
|
-
process.browser = true;
|
|
1910
|
-
process.env = {};
|
|
1911
|
-
process.argv = [];
|
|
1912
|
-
process.version = "";
|
|
1913
|
-
process.versions = {};
|
|
1914
|
-
function noop() {
|
|
1915
|
-
}
|
|
1916
|
-
process.on = noop;
|
|
1917
|
-
process.addListener = noop;
|
|
1918
|
-
process.once = noop;
|
|
1919
|
-
process.off = noop;
|
|
1920
|
-
process.removeListener = noop;
|
|
1921
|
-
process.removeAllListeners = noop;
|
|
1922
|
-
process.emit = noop;
|
|
1923
|
-
process.prependListener = noop;
|
|
1924
|
-
process.prependOnceListener = noop;
|
|
1925
|
-
process.listeners = function(name) {
|
|
1926
|
-
return [];
|
|
1927
|
-
};
|
|
1928
|
-
process.binding = function(name) {
|
|
1929
|
-
throw new Error("process.binding is not supported");
|
|
1930
|
-
};
|
|
1931
|
-
process.cwd = function() {
|
|
1932
|
-
return "/";
|
|
1933
|
-
};
|
|
1934
|
-
process.chdir = function(dir) {
|
|
1935
|
-
throw new Error("process.chdir is not supported");
|
|
1936
|
-
};
|
|
1937
|
-
process.umask = function() {
|
|
1938
|
-
return 0;
|
|
1939
|
-
};
|
|
1940
|
-
var browserExports = browser$1.exports;
|
|
1941
|
-
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
1942
|
-
(function(Object2) {
|
|
1943
|
-
function get() {
|
|
1944
|
-
var _global2 = this || self;
|
|
1945
|
-
delete Object2.prototype.__magic__;
|
|
1946
|
-
return _global2;
|
|
1947
|
-
}
|
|
1948
|
-
if (typeof globalThis === "object") {
|
|
1949
|
-
return globalThis;
|
|
1950
|
-
}
|
|
1951
|
-
if (this) {
|
|
1952
|
-
return get();
|
|
1953
|
-
} else {
|
|
1954
|
-
Object2.defineProperty(Object2.prototype, "__magic__", {
|
|
1955
|
-
configurable: true,
|
|
1956
|
-
get
|
|
1957
|
-
});
|
|
1958
|
-
var _global = __magic__;
|
|
1959
|
-
return _global;
|
|
1960
|
-
}
|
|
1961
|
-
})(Object);
|
|
1962
|
-
var sax$1 = {};
|
|
1963
|
-
var events = { exports: {} };
|
|
1964
|
-
var R = typeof Reflect === "object" ? Reflect : null;
|
|
1965
|
-
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
1966
|
-
return Function.prototype.apply.call(target, receiver, args);
|
|
1967
|
-
};
|
|
1968
|
-
var ReflectOwnKeys;
|
|
1969
|
-
if (R && typeof R.ownKeys === "function") {
|
|
1970
|
-
ReflectOwnKeys = R.ownKeys;
|
|
1971
|
-
} else if (Object.getOwnPropertySymbols) {
|
|
1972
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
1973
|
-
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
1974
|
-
};
|
|
1975
|
-
} else {
|
|
1976
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
1977
|
-
return Object.getOwnPropertyNames(target);
|
|
1978
|
-
};
|
|
1979
|
-
}
|
|
1980
|
-
function ProcessEmitWarning(warning) {
|
|
1981
|
-
if (console && console.warn)
|
|
1982
|
-
console.warn(warning);
|
|
1983
|
-
}
|
|
1984
|
-
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
1985
|
-
return value !== value;
|
|
1986
|
-
};
|
|
1987
|
-
function EventEmitter() {
|
|
1988
|
-
EventEmitter.init.call(this);
|
|
1989
|
-
}
|
|
1990
|
-
events.exports = EventEmitter;
|
|
1991
|
-
events.exports.once = once2;
|
|
1992
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
1993
|
-
EventEmitter.prototype._events = void 0;
|
|
1994
|
-
EventEmitter.prototype._eventsCount = 0;
|
|
1995
|
-
EventEmitter.prototype._maxListeners = void 0;
|
|
1996
|
-
var defaultMaxListeners = 10;
|
|
1997
|
-
function checkListener(listener) {
|
|
1998
|
-
if (typeof listener !== "function") {
|
|
1999
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
2003
|
-
enumerable: true,
|
|
2004
|
-
get: function() {
|
|
2005
|
-
return defaultMaxListeners;
|
|
2006
|
-
},
|
|
2007
|
-
set: function(arg) {
|
|
2008
|
-
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
2009
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
2010
|
-
}
|
|
2011
|
-
defaultMaxListeners = arg;
|
|
2012
|
-
}
|
|
2013
|
-
});
|
|
2014
|
-
EventEmitter.init = function() {
|
|
2015
|
-
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
2016
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
2017
|
-
this._eventsCount = 0;
|
|
2018
|
-
}
|
|
2019
|
-
this._maxListeners = this._maxListeners || void 0;
|
|
2020
|
-
};
|
|
2021
|
-
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
2022
|
-
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
|
2023
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
|
2024
|
-
}
|
|
2025
|
-
this._maxListeners = n;
|
|
2026
|
-
return this;
|
|
2027
|
-
};
|
|
2028
|
-
function _getMaxListeners(that) {
|
|
2029
|
-
if (that._maxListeners === void 0)
|
|
2030
|
-
return EventEmitter.defaultMaxListeners;
|
|
2031
|
-
return that._maxListeners;
|
|
2032
|
-
}
|
|
2033
|
-
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
2034
|
-
return _getMaxListeners(this);
|
|
2035
|
-
};
|
|
2036
|
-
EventEmitter.prototype.emit = function emit(type) {
|
|
2037
|
-
var args = [];
|
|
2038
|
-
for (var i = 1; i < arguments.length; i++)
|
|
2039
|
-
args.push(arguments[i]);
|
|
2040
|
-
var doError = type === "error";
|
|
2041
|
-
var events2 = this._events;
|
|
2042
|
-
if (events2 !== void 0)
|
|
2043
|
-
doError = doError && events2.error === void 0;
|
|
2044
|
-
else if (!doError)
|
|
2045
|
-
return false;
|
|
2046
|
-
if (doError) {
|
|
2047
|
-
var er;
|
|
2048
|
-
if (args.length > 0)
|
|
2049
|
-
er = args[0];
|
|
2050
|
-
if (er instanceof Error) {
|
|
2051
|
-
throw er;
|
|
2132
|
+
function utf16leToBytes(str, units) {
|
|
2133
|
+
var c, hi, lo;
|
|
2134
|
+
var byteArray = [];
|
|
2135
|
+
for (var i = 0; i < str.length; ++i) {
|
|
2136
|
+
if ((units -= 2) < 0)
|
|
2137
|
+
break;
|
|
2138
|
+
c = str.charCodeAt(i);
|
|
2139
|
+
hi = c >> 8;
|
|
2140
|
+
lo = c % 256;
|
|
2141
|
+
byteArray.push(lo);
|
|
2142
|
+
byteArray.push(hi);
|
|
2143
|
+
}
|
|
2144
|
+
return byteArray;
|
|
2052
2145
|
}
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
throw err;
|
|
2056
|
-
}
|
|
2057
|
-
var handler = events2[type];
|
|
2058
|
-
if (handler === void 0)
|
|
2059
|
-
return false;
|
|
2060
|
-
if (typeof handler === "function") {
|
|
2061
|
-
ReflectApply(handler, this, args);
|
|
2062
|
-
} else {
|
|
2063
|
-
var len = handler.length;
|
|
2064
|
-
var listeners2 = arrayClone(handler, len);
|
|
2065
|
-
for (var i = 0; i < len; ++i)
|
|
2066
|
-
ReflectApply(listeners2[i], this, args);
|
|
2067
|
-
}
|
|
2068
|
-
return true;
|
|
2069
|
-
};
|
|
2070
|
-
function _addListener(target, type, listener, prepend) {
|
|
2071
|
-
var m;
|
|
2072
|
-
var events2;
|
|
2073
|
-
var existing;
|
|
2074
|
-
checkListener(listener);
|
|
2075
|
-
events2 = target._events;
|
|
2076
|
-
if (events2 === void 0) {
|
|
2077
|
-
events2 = target._events = /* @__PURE__ */ Object.create(null);
|
|
2078
|
-
target._eventsCount = 0;
|
|
2079
|
-
} else {
|
|
2080
|
-
if (events2.newListener !== void 0) {
|
|
2081
|
-
target.emit(
|
|
2082
|
-
"newListener",
|
|
2083
|
-
type,
|
|
2084
|
-
listener.listener ? listener.listener : listener
|
|
2085
|
-
);
|
|
2086
|
-
events2 = target._events;
|
|
2146
|
+
function base64ToBytes(str) {
|
|
2147
|
+
return base64.toByteArray(base64clean(str));
|
|
2087
2148
|
}
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
|
|
2096
|
-
} else if (prepend) {
|
|
2097
|
-
existing.unshift(listener);
|
|
2098
|
-
} else {
|
|
2099
|
-
existing.push(listener);
|
|
2149
|
+
function blitBuffer(src2, dst, offset, length) {
|
|
2150
|
+
for (var i = 0; i < length; ++i) {
|
|
2151
|
+
if (i + offset >= dst.length || i >= src2.length)
|
|
2152
|
+
break;
|
|
2153
|
+
dst[i + offset] = src2[i];
|
|
2154
|
+
}
|
|
2155
|
+
return i;
|
|
2100
2156
|
}
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
existing.warned = true;
|
|
2104
|
-
var w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2105
|
-
w.name = "MaxListenersExceededWarning";
|
|
2106
|
-
w.emitter = target;
|
|
2107
|
-
w.type = type;
|
|
2108
|
-
w.count = existing.length;
|
|
2109
|
-
ProcessEmitWarning(w);
|
|
2157
|
+
function isInstance(obj, type) {
|
|
2158
|
+
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
2110
2159
|
}
|
|
2111
|
-
|
|
2112
|
-
|
|
2160
|
+
function numberIsNaN(obj) {
|
|
2161
|
+
return obj !== obj;
|
|
2162
|
+
}
|
|
2163
|
+
var hexSliceLookupTable = function() {
|
|
2164
|
+
var alphabet = "0123456789abcdef";
|
|
2165
|
+
var table = new Array(256);
|
|
2166
|
+
for (var i = 0; i < 16; ++i) {
|
|
2167
|
+
var i16 = i * 16;
|
|
2168
|
+
for (var j = 0; j < 16; ++j) {
|
|
2169
|
+
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
return table;
|
|
2173
|
+
}();
|
|
2174
|
+
})(buffer);
|
|
2175
|
+
return buffer;
|
|
2113
2176
|
}
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
};
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
function onceWrapper() {
|
|
2122
|
-
if (!this.fired) {
|
|
2123
|
-
this.target.removeListener(this.type, this.wrapFn);
|
|
2124
|
-
this.fired = true;
|
|
2125
|
-
if (arguments.length === 0)
|
|
2126
|
-
return this.listener.call(this.target);
|
|
2127
|
-
return this.listener.apply(this.target, arguments);
|
|
2128
|
-
}
|
|
2177
|
+
requireBuffer();
|
|
2178
|
+
var browser$1 = { exports: {} };
|
|
2179
|
+
var process = browser$1.exports = {};
|
|
2180
|
+
var cachedSetTimeout;
|
|
2181
|
+
var cachedClearTimeout;
|
|
2182
|
+
function defaultSetTimout() {
|
|
2183
|
+
throw new Error("setTimeout has not been defined");
|
|
2129
2184
|
}
|
|
2130
|
-
function
|
|
2131
|
-
|
|
2132
|
-
var wrapped = onceWrapper.bind(state2);
|
|
2133
|
-
wrapped.listener = listener;
|
|
2134
|
-
state2.wrapFn = wrapped;
|
|
2135
|
-
return wrapped;
|
|
2185
|
+
function defaultClearTimeout() {
|
|
2186
|
+
throw new Error("clearTimeout has not been defined");
|
|
2136
2187
|
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
checkListener(listener);
|
|
2144
|
-
this.prependListener(type, _onceWrap(this, type, listener));
|
|
2145
|
-
return this;
|
|
2146
|
-
};
|
|
2147
|
-
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
|
2148
|
-
var list, events2, position, i, originalListener;
|
|
2149
|
-
checkListener(listener);
|
|
2150
|
-
events2 = this._events;
|
|
2151
|
-
if (events2 === void 0)
|
|
2152
|
-
return this;
|
|
2153
|
-
list = events2[type];
|
|
2154
|
-
if (list === void 0)
|
|
2155
|
-
return this;
|
|
2156
|
-
if (list === listener || list.listener === listener) {
|
|
2157
|
-
if (--this._eventsCount === 0)
|
|
2158
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
2159
|
-
else {
|
|
2160
|
-
delete events2[type];
|
|
2161
|
-
if (events2.removeListener)
|
|
2162
|
-
this.emit("removeListener", type, list.listener || listener);
|
|
2163
|
-
}
|
|
2164
|
-
} else if (typeof list !== "function") {
|
|
2165
|
-
position = -1;
|
|
2166
|
-
for (i = list.length - 1; i >= 0; i--) {
|
|
2167
|
-
if (list[i] === listener || list[i].listener === listener) {
|
|
2168
|
-
originalListener = list[i].listener;
|
|
2169
|
-
position = i;
|
|
2170
|
-
break;
|
|
2171
|
-
}
|
|
2188
|
+
(function() {
|
|
2189
|
+
try {
|
|
2190
|
+
if (typeof setTimeout === "function") {
|
|
2191
|
+
cachedSetTimeout = setTimeout;
|
|
2192
|
+
} else {
|
|
2193
|
+
cachedSetTimeout = defaultSetTimout;
|
|
2172
2194
|
}
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2195
|
+
} catch (e) {
|
|
2196
|
+
cachedSetTimeout = defaultSetTimout;
|
|
2197
|
+
}
|
|
2198
|
+
try {
|
|
2199
|
+
if (typeof clearTimeout === "function") {
|
|
2200
|
+
cachedClearTimeout = clearTimeout;
|
|
2201
|
+
} else {
|
|
2202
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
2179
2203
|
}
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
if (events2.removeListener !== void 0)
|
|
2183
|
-
this.emit("removeListener", type, originalListener || listener);
|
|
2204
|
+
} catch (e) {
|
|
2205
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
2184
2206
|
}
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
return
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
delete events2[type];
|
|
2207
|
+
})();
|
|
2208
|
+
function runTimeout(fun) {
|
|
2209
|
+
if (cachedSetTimeout === setTimeout) {
|
|
2210
|
+
return setTimeout(fun, 0);
|
|
2211
|
+
}
|
|
2212
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
2213
|
+
cachedSetTimeout = setTimeout;
|
|
2214
|
+
return setTimeout(fun, 0);
|
|
2215
|
+
}
|
|
2216
|
+
try {
|
|
2217
|
+
return cachedSetTimeout(fun, 0);
|
|
2218
|
+
} catch (e) {
|
|
2219
|
+
try {
|
|
2220
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
2221
|
+
} catch (e2) {
|
|
2222
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
2202
2223
|
}
|
|
2203
|
-
return this;
|
|
2204
2224
|
}
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
key = keys[i];
|
|
2210
|
-
if (key === "removeListener")
|
|
2211
|
-
continue;
|
|
2212
|
-
this.removeAllListeners(key);
|
|
2213
|
-
}
|
|
2214
|
-
this.removeAllListeners("removeListener");
|
|
2215
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
2216
|
-
this._eventsCount = 0;
|
|
2217
|
-
return this;
|
|
2225
|
+
}
|
|
2226
|
+
function runClearTimeout(marker) {
|
|
2227
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
2228
|
+
return clearTimeout(marker);
|
|
2218
2229
|
}
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
|
|
2230
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
2231
|
+
cachedClearTimeout = clearTimeout;
|
|
2232
|
+
return clearTimeout(marker);
|
|
2233
|
+
}
|
|
2234
|
+
try {
|
|
2235
|
+
return cachedClearTimeout(marker);
|
|
2236
|
+
} catch (e) {
|
|
2237
|
+
try {
|
|
2238
|
+
return cachedClearTimeout.call(null, marker);
|
|
2239
|
+
} catch (e2) {
|
|
2240
|
+
return cachedClearTimeout.call(this, marker);
|
|
2225
2241
|
}
|
|
2226
2242
|
}
|
|
2227
|
-
return this;
|
|
2228
|
-
};
|
|
2229
|
-
function _listeners(target, type, unwrap) {
|
|
2230
|
-
var events2 = target._events;
|
|
2231
|
-
if (events2 === void 0)
|
|
2232
|
-
return [];
|
|
2233
|
-
var evlistener = events2[type];
|
|
2234
|
-
if (evlistener === void 0)
|
|
2235
|
-
return [];
|
|
2236
|
-
if (typeof evlistener === "function")
|
|
2237
|
-
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
2238
|
-
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
2239
2243
|
}
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2244
|
+
var queue = [];
|
|
2245
|
+
var draining = false;
|
|
2246
|
+
var currentQueue;
|
|
2247
|
+
var queueIndex = -1;
|
|
2248
|
+
function cleanUpNextTick() {
|
|
2249
|
+
if (!draining || !currentQueue) {
|
|
2250
|
+
return;
|
|
2251
|
+
}
|
|
2252
|
+
draining = false;
|
|
2253
|
+
if (currentQueue.length) {
|
|
2254
|
+
queue = currentQueue.concat(queue);
|
|
2249
2255
|
} else {
|
|
2250
|
-
|
|
2256
|
+
queueIndex = -1;
|
|
2251
2257
|
}
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
function listenerCount(type) {
|
|
2255
|
-
var events2 = this._events;
|
|
2256
|
-
if (events2 !== void 0) {
|
|
2257
|
-
var evlistener = events2[type];
|
|
2258
|
-
if (typeof evlistener === "function") {
|
|
2259
|
-
return 1;
|
|
2260
|
-
} else if (evlistener !== void 0) {
|
|
2261
|
-
return evlistener.length;
|
|
2262
|
-
}
|
|
2258
|
+
if (queue.length) {
|
|
2259
|
+
drainQueue();
|
|
2263
2260
|
}
|
|
2264
|
-
return 0;
|
|
2265
|
-
}
|
|
2266
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
2267
|
-
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
2268
|
-
};
|
|
2269
|
-
function arrayClone(arr, n) {
|
|
2270
|
-
var copy = new Array(n);
|
|
2271
|
-
for (var i = 0; i < n; ++i)
|
|
2272
|
-
copy[i] = arr[i];
|
|
2273
|
-
return copy;
|
|
2274
|
-
}
|
|
2275
|
-
function spliceOne(list, index) {
|
|
2276
|
-
for (; index + 1 < list.length; index++)
|
|
2277
|
-
list[index] = list[index + 1];
|
|
2278
|
-
list.pop();
|
|
2279
2261
|
}
|
|
2280
|
-
function
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
ret[i] = arr[i].listener || arr[i];
|
|
2262
|
+
function drainQueue() {
|
|
2263
|
+
if (draining) {
|
|
2264
|
+
return;
|
|
2284
2265
|
}
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
if (typeof emitter.removeListener === "function") {
|
|
2295
|
-
emitter.removeListener("error", errorListener);
|
|
2266
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
2267
|
+
draining = true;
|
|
2268
|
+
var len = queue.length;
|
|
2269
|
+
while (len) {
|
|
2270
|
+
currentQueue = queue;
|
|
2271
|
+
queue = [];
|
|
2272
|
+
while (++queueIndex < len) {
|
|
2273
|
+
if (currentQueue) {
|
|
2274
|
+
currentQueue[queueIndex].run();
|
|
2296
2275
|
}
|
|
2297
|
-
resolve2([].slice.call(arguments));
|
|
2298
|
-
}
|
|
2299
|
-
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
|
2300
|
-
if (name !== "error") {
|
|
2301
|
-
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
2302
2276
|
}
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
2306
|
-
if (typeof emitter.on === "function") {
|
|
2307
|
-
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
|
2277
|
+
queueIndex = -1;
|
|
2278
|
+
len = queue.length;
|
|
2308
2279
|
}
|
|
2280
|
+
currentQueue = null;
|
|
2281
|
+
draining = false;
|
|
2282
|
+
runClearTimeout(timeout);
|
|
2309
2283
|
}
|
|
2310
|
-
function
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
emitter.on(name, listener);
|
|
2284
|
+
process.nextTick = function(fun) {
|
|
2285
|
+
var args = new Array(arguments.length - 1);
|
|
2286
|
+
if (arguments.length > 1) {
|
|
2287
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2288
|
+
args[i - 1] = arguments[i];
|
|
2316
2289
|
}
|
|
2317
|
-
} else if (typeof emitter.addEventListener === "function") {
|
|
2318
|
-
emitter.addEventListener(name, function wrapListener(arg) {
|
|
2319
|
-
if (flags.once) {
|
|
2320
|
-
emitter.removeEventListener(name, wrapListener);
|
|
2321
|
-
}
|
|
2322
|
-
listener(arg);
|
|
2323
|
-
});
|
|
2324
|
-
} else {
|
|
2325
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
2326
2290
|
}
|
|
2291
|
+
queue.push(new Item(fun, args));
|
|
2292
|
+
if (queue.length === 1 && !draining) {
|
|
2293
|
+
runTimeout(drainQueue);
|
|
2294
|
+
}
|
|
2295
|
+
};
|
|
2296
|
+
function Item(fun, array) {
|
|
2297
|
+
this.fun = fun;
|
|
2298
|
+
this.array = array;
|
|
2327
2299
|
}
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
writable: true,
|
|
2339
|
-
configurable: true
|
|
2340
|
-
}
|
|
2341
|
-
});
|
|
2342
|
-
}
|
|
2343
|
-
};
|
|
2344
|
-
} else {
|
|
2345
|
-
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
2346
|
-
if (superCtor) {
|
|
2347
|
-
ctor.super_ = superCtor;
|
|
2348
|
-
var TempCtor = function() {
|
|
2349
|
-
};
|
|
2350
|
-
TempCtor.prototype = superCtor.prototype;
|
|
2351
|
-
ctor.prototype = new TempCtor();
|
|
2352
|
-
ctor.prototype.constructor = ctor;
|
|
2353
|
-
}
|
|
2354
|
-
};
|
|
2300
|
+
Item.prototype.run = function() {
|
|
2301
|
+
this.fun.apply(null, this.array);
|
|
2302
|
+
};
|
|
2303
|
+
process.title = "browser";
|
|
2304
|
+
process.browser = true;
|
|
2305
|
+
process.env = {};
|
|
2306
|
+
process.argv = [];
|
|
2307
|
+
process.version = "";
|
|
2308
|
+
process.versions = {};
|
|
2309
|
+
function noop() {
|
|
2355
2310
|
}
|
|
2356
|
-
|
|
2311
|
+
process.on = noop;
|
|
2312
|
+
process.addListener = noop;
|
|
2313
|
+
process.once = noop;
|
|
2314
|
+
process.off = noop;
|
|
2315
|
+
process.removeListener = noop;
|
|
2316
|
+
process.removeAllListeners = noop;
|
|
2317
|
+
process.emit = noop;
|
|
2318
|
+
process.prependListener = noop;
|
|
2319
|
+
process.prependOnceListener = noop;
|
|
2320
|
+
process.listeners = function(name) {
|
|
2321
|
+
return [];
|
|
2322
|
+
};
|
|
2323
|
+
process.binding = function(name) {
|
|
2324
|
+
throw new Error("process.binding is not supported");
|
|
2325
|
+
};
|
|
2326
|
+
process.cwd = function() {
|
|
2327
|
+
return "/";
|
|
2328
|
+
};
|
|
2329
|
+
process.chdir = function(dir) {
|
|
2330
|
+
throw new Error("process.chdir is not supported");
|
|
2331
|
+
};
|
|
2332
|
+
process.umask = function() {
|
|
2333
|
+
return 0;
|
|
2334
|
+
};
|
|
2335
|
+
var browserExports = browser$1.exports;
|
|
2336
|
+
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
2337
|
+
(function(Object2) {
|
|
2338
|
+
function get() {
|
|
2339
|
+
var _global2 = this || self;
|
|
2340
|
+
delete Object2.prototype.__magic__;
|
|
2341
|
+
return _global2;
|
|
2342
|
+
}
|
|
2343
|
+
if (typeof globalThis === "object") {
|
|
2344
|
+
return globalThis;
|
|
2345
|
+
}
|
|
2346
|
+
if (this) {
|
|
2347
|
+
return get();
|
|
2348
|
+
} else {
|
|
2349
|
+
Object2.defineProperty(Object2.prototype, "__magic__", {
|
|
2350
|
+
configurable: true,
|
|
2351
|
+
get
|
|
2352
|
+
});
|
|
2353
|
+
var _global = __magic__;
|
|
2354
|
+
return _global;
|
|
2355
|
+
}
|
|
2356
|
+
})(Object);
|
|
2357
2357
|
var streamBrowser;
|
|
2358
2358
|
var hasRequiredStreamBrowser;
|
|
2359
2359
|
function requireStreamBrowser() {
|
|
@@ -7131,7 +7131,7 @@ Stream$1.prototype.pipe = function(dest, options2) {
|
|
|
7131
7131
|
}
|
|
7132
7132
|
});
|
|
7133
7133
|
SAXStream.prototype.write = function(data) {
|
|
7134
|
-
if (typeof
|
|
7134
|
+
if (typeof Buffer === "function" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(data)) {
|
|
7135
7135
|
if (!this._decoder) {
|
|
7136
7136
|
var SD = requireString_decoder().StringDecoder;
|
|
7137
7137
|
this._decoder = new SD("utf8");
|
|
@@ -9080,7 +9080,7 @@ var js2xml$2 = function(js, options2) {
|
|
|
9080
9080
|
};
|
|
9081
9081
|
var js2xml$1 = js2xml$2;
|
|
9082
9082
|
var json2xml$1 = function(json, options2) {
|
|
9083
|
-
if (json instanceof
|
|
9083
|
+
if (json instanceof Buffer) {
|
|
9084
9084
|
json = json.toString();
|
|
9085
9085
|
}
|
|
9086
9086
|
var js = null;
|
|
@@ -15775,19 +15775,19 @@ var jszip_min = { exports: {} };
|
|
|
15775
15775
|
this._helper.resume();
|
|
15776
15776
|
}, t.exports = n;
|
|
15777
15777
|
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(e, t, r) {
|
|
15778
|
-
t.exports = { isNode: "undefined" != typeof
|
|
15779
|
-
if (
|
|
15780
|
-
return
|
|
15778
|
+
t.exports = { isNode: "undefined" != typeof Buffer, newBufferFrom: function(e2, t2) {
|
|
15779
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from)
|
|
15780
|
+
return Buffer.from(e2, t2);
|
|
15781
15781
|
if ("number" == typeof e2)
|
|
15782
15782
|
throw new Error('The "data" argument must not be a number');
|
|
15783
|
-
return new
|
|
15783
|
+
return new Buffer(e2, t2);
|
|
15784
15784
|
}, allocBuffer: function(e2) {
|
|
15785
|
-
if (
|
|
15786
|
-
return
|
|
15787
|
-
var t2 = new
|
|
15785
|
+
if (Buffer.alloc)
|
|
15786
|
+
return Buffer.alloc(e2);
|
|
15787
|
+
var t2 = new Buffer(e2);
|
|
15788
15788
|
return t2.fill(0), t2;
|
|
15789
15789
|
}, isBuffer: function(e2) {
|
|
15790
|
-
return
|
|
15790
|
+
return Buffer.isBuffer(e2);
|
|
15791
15791
|
}, isStream: function(e2) {
|
|
15792
15792
|
return e2 && "function" == typeof e2.on && "function" == typeof e2.pause && "function" == typeof e2.resume;
|
|
15793
15793
|
} };
|
|
@@ -16141,7 +16141,7 @@ var jszip_min = { exports: {} };
|
|
|
16141
16141
|
i3.set(t3[r3], n3), n3 += t3[r3].length;
|
|
16142
16142
|
return i3;
|
|
16143
16143
|
case "nodebuffer":
|
|
16144
|
-
return
|
|
16144
|
+
return Buffer.concat(t3);
|
|
16145
16145
|
default:
|
|
16146
16146
|
throw new Error("concat : unsupported type '" + e4 + "'");
|
|
16147
16147
|
}
|
|
@@ -16189,7 +16189,7 @@ var jszip_min = { exports: {} };
|
|
|
16189
16189
|
return new o(this, { objectMode: "nodebuffer" !== this._outputType }, e2);
|
|
16190
16190
|
} }, t.exports = f;
|
|
16191
16191
|
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(e, t, r) {
|
|
16192
|
-
if (r.base64 = true, r.array = true, r.string = true, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof
|
|
16192
|
+
if (r.base64 = true, r.array = true, r.string = true, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof Buffer, r.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer)
|
|
16193
16193
|
r.blob = false;
|
|
16194
16194
|
else {
|
|
16195
16195
|
var n = new ArrayBuffer(0);
|
|
@@ -19144,7 +19144,7 @@ const patchDocument = async (data, options2) => {
|
|
|
19144
19144
|
const binaryContentMap = /* @__PURE__ */ new Map();
|
|
19145
19145
|
for (const [key, value] of Object.entries(zipContent.files)) {
|
|
19146
19146
|
if (!key.endsWith(".xml") && !key.endsWith(".rels")) {
|
|
19147
|
-
binaryContentMap.set(key, await value.async("
|
|
19147
|
+
binaryContentMap.set(key, await value.async("uint8array"));
|
|
19148
19148
|
continue;
|
|
19149
19149
|
}
|
|
19150
19150
|
const json = toJson(await value.async("text"));
|
|
@@ -19259,7 +19259,7 @@ const patchDocument = async (data, options2) => {
|
|
|
19259
19259
|
zip.file(`word/media/${fileName}`, stream);
|
|
19260
19260
|
}
|
|
19261
19261
|
return zip.generateAsync({
|
|
19262
|
-
type: "
|
|
19262
|
+
type: "uint8array",
|
|
19263
19263
|
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19264
19264
|
compression: "DEFLATE"
|
|
19265
19265
|
});
|