@harbour-enterprises/superdoc 0.13.0-next.5 → 0.13.2-rev1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{index-B4J7wgs6.cjs → index-B0t3i_io.cjs} +1 -1
- package/dist/chunks/{index-Cdsq63Xq.cjs → index-Bk160jQ2.cjs} +2 -2
- package/dist/chunks/{index-Diu6UKHt.es.js → index-D_HUrFWV.es.js} +2 -2
- package/dist/chunks/{index-Hr3Um-Bg.es.js → index-KzH9VKHh.es.js} +1 -1
- package/dist/chunks/{super-editor.es-DiMCL_ka.cjs → super-editor.es--NMYzIh3.cjs} +18 -8
- package/dist/chunks/{super-editor.es-BUhPIiSe.es.js → super-editor.es-DyTkLKR1.es.js} +18 -8
- package/dist/chunks/{url-BIzg4y2i.cjs → url-CWyTQ-Xy.cjs} +1 -1
- package/dist/chunks/{url-CHayXMZH.es.js → url-DsBQArCl.es.js} +1 -1
- package/dist/chunks/{xml-js-BjqmFOSP.cjs → xml-js-Bu1ZZzmb.cjs} +79 -100
- package/dist/chunks/{xml-js-CfClL-1b.es.js → xml-js-CdiD26MJ.es.js} +79 -100
- package/dist/style.css +2 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DOyDZC9F.js → converter-CJ9kHtZx.js} +7 -5
- package/dist/super-editor/chunks/{docx-zipper-DZ-zYy-E.js → docx-zipper-scQqOWXA.js} +1 -1
- package/dist/super-editor/chunks/{editor-Dz35c20r.js → editor-DM6yaxu_.js} +13 -5
- package/dist/super-editor/chunks/{toolbar-BXs-eLuz.js → toolbar-CIHbdcnv.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +2 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts +3 -0
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts.map +1 -0
- package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +5 -5
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +19 -9
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-BTAcmbVg.cjs");
|
|
3
3
|
const vue = require("./vue-HIY1g7dm.cjs");
|
|
4
|
-
const xmlJs = require("./xml-js-
|
|
5
|
-
const url = require("./url-
|
|
4
|
+
const xmlJs = require("./xml-js-Bu1ZZzmb.cjs");
|
|
5
|
+
const url = require("./url-CWyTQ-Xy.cjs");
|
|
6
6
|
function _mergeNamespaces(n, m) {
|
|
7
7
|
for (var i = 0; i < m.length; i++) {
|
|
8
8
|
const e = m[i];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./jszip-DckFs3A7.es.js";
|
|
2
2
|
import { p as process$1 } from "./vue-Bi1uWinj.es.js";
|
|
3
|
-
import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-
|
|
4
|
-
import { u as url } from "./url-
|
|
3
|
+
import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-CdiD26MJ.es.js";
|
|
4
|
+
import { u as url } from "./url-DsBQArCl.es.js";
|
|
5
5
|
function _mergeNamespaces(n, m) {
|
|
6
6
|
for (var i = 0; i < m.length; i++) {
|
|
7
7
|
const e = m[i];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./jszip-DckFs3A7.es.js";
|
|
2
|
-
import { s as streamHttp, r as require$$1 } from "./index-
|
|
2
|
+
import { s as streamHttp, r as require$$1 } from "./index-D_HUrFWV.es.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
5
5
|
const e = m[i];
|
|
@@ -18875,13 +18875,13 @@ function exportSchemaToJson(params2) {
|
|
|
18875
18875
|
function translateBodyNode(params2) {
|
|
18876
18876
|
let sectPr = params2.bodyNode?.elements.find((n) => n.name === "w:sectPr") || {};
|
|
18877
18877
|
if (params2.converter) {
|
|
18878
|
-
const hasHeader = sectPr
|
|
18878
|
+
const hasHeader = sectPr?.elements?.some((n) => n.name === "w:headerReference");
|
|
18879
18879
|
const hasDefaultHeader = params2.converter.headerIds?.default;
|
|
18880
18880
|
if (!hasHeader && hasDefaultHeader && !params2.editor.options.isHeaderOrFooter) {
|
|
18881
18881
|
const defaultHeader = generateDefaultHeaderFooter("header", params2.converter.headerIds?.default);
|
|
18882
18882
|
sectPr.elements.push(defaultHeader);
|
|
18883
18883
|
}
|
|
18884
|
-
const hasFooter = sectPr
|
|
18884
|
+
const hasFooter = sectPr?.elements?.some((n) => n.name === "w:footerReference");
|
|
18885
18885
|
const hasDefaultFooter = params2.converter.footerIds?.default;
|
|
18886
18886
|
if (!hasFooter && hasDefaultFooter && !params2.editor.options.isHeaderOrFooter) {
|
|
18887
18887
|
const defaultFooter = generateDefaultHeaderFooter("footer", params2.converter.footerIds?.default);
|
|
@@ -23241,7 +23241,7 @@ function addDefaultStylesIfMissing(styles) {
|
|
|
23241
23241
|
});
|
|
23242
23242
|
return updatedStyles;
|
|
23243
23243
|
}
|
|
23244
|
-
const importHeadersFooters = (docx, converter,
|
|
23244
|
+
const importHeadersFooters = (docx, converter, mainEditor) => {
|
|
23245
23245
|
const rels = docx["word/_rels/document.xml.rels"];
|
|
23246
23246
|
const relationships = rels.elements.find((el) => el.name === "Relationships");
|
|
23247
23247
|
const { elements } = relationships;
|
|
@@ -23251,6 +23251,8 @@ const importHeadersFooters = (docx, converter, editor) => {
|
|
|
23251
23251
|
const footers = elements.filter((el) => el.attributes["Type"] === footerType);
|
|
23252
23252
|
const sectPr = findSectPr(docx["word/document.xml"]) || [];
|
|
23253
23253
|
const allSectPrElements = sectPr.flatMap((el) => el.elements);
|
|
23254
|
+
const editor = { ...mainEditor };
|
|
23255
|
+
editor.options.annotations = true;
|
|
23254
23256
|
headers.forEach((header) => {
|
|
23255
23257
|
const { rId, referenceFile, currentFileName } = getHeaderFooterSectionData(header, docx);
|
|
23256
23258
|
const sectPrHeader = allSectPrElements.find((el) => el.name === "w:headerReference" && el.attributes["r:id"] === rId);
|
|
@@ -23410,7 +23412,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23410
23412
|
return;
|
|
23411
23413
|
}
|
|
23412
23414
|
}
|
|
23413
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.
|
|
23415
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev1") {
|
|
23414
23416
|
const customLocation = "docProps/custom.xml";
|
|
23415
23417
|
if (!docx[customLocation]) {
|
|
23416
23418
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23877,7 +23879,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23877
23879
|
function generateCustomXml() {
|
|
23878
23880
|
return DEFAULT_CUSTOM_XML;
|
|
23879
23881
|
}
|
|
23880
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.13.
|
|
23882
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev1") {
|
|
23881
23883
|
return {
|
|
23882
23884
|
type: "element",
|
|
23883
23885
|
name: "property",
|
|
@@ -41257,7 +41259,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41257
41259
|
* @returns {Object | void} Migration results
|
|
41258
41260
|
*/
|
|
41259
41261
|
processCollaborationMigrations() {
|
|
41260
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.13.
|
|
41262
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev1");
|
|
41261
41263
|
if (!this.options.ydoc) return;
|
|
41262
41264
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41263
41265
|
let docVersion = metaMap.get("version");
|
|
@@ -41301,6 +41303,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41301
41303
|
__privateMethod$1(this, _Editor_instances, initMedia_fn).call(this);
|
|
41302
41304
|
this.initDefaultStyles();
|
|
41303
41305
|
if (this.options.ydoc && this.options.collaborationProvider) {
|
|
41306
|
+
updateYdocDocxData(this);
|
|
41304
41307
|
this.initializeCollaborationData(true);
|
|
41305
41308
|
} else {
|
|
41306
41309
|
__privateMethod$1(this, _Editor_instances, insertNewFileData_fn).call(this);
|
|
@@ -48734,7 +48737,7 @@ const getImagePositionDecorations = (state2, view) => {
|
|
|
48734
48737
|
let style2 = "";
|
|
48735
48738
|
let className = "";
|
|
48736
48739
|
const { vRelativeFrom, alignH } = node2.attrs.anchorData;
|
|
48737
|
-
const { size: size2, padding } = node2.attrs;
|
|
48740
|
+
const { size: size2, padding, marginOffset } = node2.attrs;
|
|
48738
48741
|
const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
|
|
48739
48742
|
if (pageBreak) {
|
|
48740
48743
|
switch (alignH) {
|
|
@@ -48748,9 +48751,16 @@ const getImagePositionDecorations = (state2, view) => {
|
|
|
48748
48751
|
style2 += "display: block; margin-left: auto; margin-right: auto; ";
|
|
48749
48752
|
break;
|
|
48750
48753
|
}
|
|
48751
|
-
|
|
48754
|
+
const topPos = marginOffset.top !== void 0 ? marginOffset.top : pageBreak?.offsetTop + pageBreak?.offsetHeight;
|
|
48755
|
+
style2 += vRelativeFrom === "margin" ? `position: absolute; top: ${topPos}px; ` : "";
|
|
48752
48756
|
if (vRelativeFrom === "margin") {
|
|
48753
48757
|
const nextPos = view.posAtDOM(pageBreak, 1);
|
|
48758
|
+
if (nextPos < 0) {
|
|
48759
|
+
const $pos = view.state.doc.resolve(pos);
|
|
48760
|
+
decorations.push(
|
|
48761
|
+
Decoration.node(pos - 1, pos + $pos.parent.nodeSize - 1, { style: `height: ${size2.height + parseInt(padding.top) + parseInt(padding.bottom)}px` })
|
|
48762
|
+
);
|
|
48763
|
+
}
|
|
48754
48764
|
const imageBlock = document.createElement("div");
|
|
48755
48765
|
imageBlock.className = "anchor-image-placeholder";
|
|
48756
48766
|
imageBlock.style.float = alignH;
|
|
@@ -18858,13 +18858,13 @@ function exportSchemaToJson(params2) {
|
|
|
18858
18858
|
function translateBodyNode(params2) {
|
|
18859
18859
|
let sectPr = params2.bodyNode?.elements.find((n) => n.name === "w:sectPr") || {};
|
|
18860
18860
|
if (params2.converter) {
|
|
18861
|
-
const hasHeader = sectPr
|
|
18861
|
+
const hasHeader = sectPr?.elements?.some((n) => n.name === "w:headerReference");
|
|
18862
18862
|
const hasDefaultHeader = params2.converter.headerIds?.default;
|
|
18863
18863
|
if (!hasHeader && hasDefaultHeader && !params2.editor.options.isHeaderOrFooter) {
|
|
18864
18864
|
const defaultHeader = generateDefaultHeaderFooter("header", params2.converter.headerIds?.default);
|
|
18865
18865
|
sectPr.elements.push(defaultHeader);
|
|
18866
18866
|
}
|
|
18867
|
-
const hasFooter = sectPr
|
|
18867
|
+
const hasFooter = sectPr?.elements?.some((n) => n.name === "w:footerReference");
|
|
18868
18868
|
const hasDefaultFooter = params2.converter.footerIds?.default;
|
|
18869
18869
|
if (!hasFooter && hasDefaultFooter && !params2.editor.options.isHeaderOrFooter) {
|
|
18870
18870
|
const defaultFooter = generateDefaultHeaderFooter("footer", params2.converter.footerIds?.default);
|
|
@@ -23224,7 +23224,7 @@ function addDefaultStylesIfMissing(styles) {
|
|
|
23224
23224
|
});
|
|
23225
23225
|
return updatedStyles;
|
|
23226
23226
|
}
|
|
23227
|
-
const importHeadersFooters = (docx, converter,
|
|
23227
|
+
const importHeadersFooters = (docx, converter, mainEditor) => {
|
|
23228
23228
|
const rels = docx["word/_rels/document.xml.rels"];
|
|
23229
23229
|
const relationships = rels.elements.find((el) => el.name === "Relationships");
|
|
23230
23230
|
const { elements } = relationships;
|
|
@@ -23234,6 +23234,8 @@ const importHeadersFooters = (docx, converter, editor) => {
|
|
|
23234
23234
|
const footers = elements.filter((el) => el.attributes["Type"] === footerType);
|
|
23235
23235
|
const sectPr = findSectPr(docx["word/document.xml"]) || [];
|
|
23236
23236
|
const allSectPrElements = sectPr.flatMap((el) => el.elements);
|
|
23237
|
+
const editor = { ...mainEditor };
|
|
23238
|
+
editor.options.annotations = true;
|
|
23237
23239
|
headers.forEach((header) => {
|
|
23238
23240
|
const { rId, referenceFile, currentFileName } = getHeaderFooterSectionData(header, docx);
|
|
23239
23241
|
const sectPrHeader = allSectPrElements.find((el) => el.name === "w:headerReference" && el.attributes["r:id"] === rId);
|
|
@@ -23393,7 +23395,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23393
23395
|
return;
|
|
23394
23396
|
}
|
|
23395
23397
|
}
|
|
23396
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.
|
|
23398
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev1") {
|
|
23397
23399
|
const customLocation = "docProps/custom.xml";
|
|
23398
23400
|
if (!docx[customLocation]) {
|
|
23399
23401
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23860,7 +23862,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23860
23862
|
function generateCustomXml() {
|
|
23861
23863
|
return DEFAULT_CUSTOM_XML;
|
|
23862
23864
|
}
|
|
23863
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.13.
|
|
23865
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev1") {
|
|
23864
23866
|
return {
|
|
23865
23867
|
type: "element",
|
|
23866
23868
|
name: "property",
|
|
@@ -41240,7 +41242,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41240
41242
|
* @returns {Object | void} Migration results
|
|
41241
41243
|
*/
|
|
41242
41244
|
processCollaborationMigrations() {
|
|
41243
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.13.
|
|
41245
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev1");
|
|
41244
41246
|
if (!this.options.ydoc) return;
|
|
41245
41247
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41246
41248
|
let docVersion = metaMap.get("version");
|
|
@@ -41284,6 +41286,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41284
41286
|
__privateMethod$1(this, _Editor_instances, initMedia_fn).call(this);
|
|
41285
41287
|
this.initDefaultStyles();
|
|
41286
41288
|
if (this.options.ydoc && this.options.collaborationProvider) {
|
|
41289
|
+
updateYdocDocxData(this);
|
|
41287
41290
|
this.initializeCollaborationData(true);
|
|
41288
41291
|
} else {
|
|
41289
41292
|
__privateMethod$1(this, _Editor_instances, insertNewFileData_fn).call(this);
|
|
@@ -48717,7 +48720,7 @@ const getImagePositionDecorations = (state2, view) => {
|
|
|
48717
48720
|
let style2 = "";
|
|
48718
48721
|
let className = "";
|
|
48719
48722
|
const { vRelativeFrom, alignH } = node2.attrs.anchorData;
|
|
48720
|
-
const { size: size2, padding } = node2.attrs;
|
|
48723
|
+
const { size: size2, padding, marginOffset } = node2.attrs;
|
|
48721
48724
|
const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
|
|
48722
48725
|
if (pageBreak) {
|
|
48723
48726
|
switch (alignH) {
|
|
@@ -48731,9 +48734,16 @@ const getImagePositionDecorations = (state2, view) => {
|
|
|
48731
48734
|
style2 += "display: block; margin-left: auto; margin-right: auto; ";
|
|
48732
48735
|
break;
|
|
48733
48736
|
}
|
|
48734
|
-
|
|
48737
|
+
const topPos = marginOffset.top !== void 0 ? marginOffset.top : pageBreak?.offsetTop + pageBreak?.offsetHeight;
|
|
48738
|
+
style2 += vRelativeFrom === "margin" ? `position: absolute; top: ${topPos}px; ` : "";
|
|
48735
48739
|
if (vRelativeFrom === "margin") {
|
|
48736
48740
|
const nextPos = view.posAtDOM(pageBreak, 1);
|
|
48741
|
+
if (nextPos < 0) {
|
|
48742
|
+
const $pos = view.state.doc.resolve(pos);
|
|
48743
|
+
decorations.push(
|
|
48744
|
+
Decoration.node(pos - 1, pos + $pos.parent.nodeSize - 1, { style: `height: ${size2.height + parseInt(padding.top) + parseInt(padding.bottom)}px` })
|
|
48745
|
+
);
|
|
48746
|
+
}
|
|
48737
48747
|
const imageBlock = document.createElement("div");
|
|
48738
48748
|
imageBlock.className = "anchor-image-placeholder";
|
|
48739
48749
|
imageBlock.style.float = alignH;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-BTAcmbVg.cjs");
|
|
3
|
-
const xmlJs = require("./xml-js-
|
|
3
|
+
const xmlJs = require("./xml-js-Bu1ZZzmb.cjs");
|
|
4
4
|
const __viteBrowserExternal = require("./__vite-browser-external-DWbQq7bv.cjs");
|
|
5
5
|
var punycode$1 = { exports: {} };
|
|
6
6
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs, a as getAugmentedNamespace } from "./jszip-DckFs3A7.es.js";
|
|
2
|
-
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-
|
|
2
|
+
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-CdiD26MJ.es.js";
|
|
3
3
|
import { _ as __viteBrowserExternal } from "./__vite-browser-external-CURh0WXD.es.js";
|
|
4
4
|
var punycode$1 = { exports: {} };
|
|
5
5
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
@@ -457,7 +457,7 @@ var type = TypeError;
|
|
|
457
457
|
var uri = URIError;
|
|
458
458
|
var abs$1 = Math.abs;
|
|
459
459
|
var floor$1 = Math.floor;
|
|
460
|
-
var max$
|
|
460
|
+
var max$2 = Math.max;
|
|
461
461
|
var min$1 = Math.min;
|
|
462
462
|
var pow$1 = Math.pow;
|
|
463
463
|
var round$1 = Math.round;
|
|
@@ -517,99 +517,78 @@ function requireHasSymbols() {
|
|
|
517
517
|
var Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
518
518
|
var $Object$2 = esObjectAtoms;
|
|
519
519
|
var Object_getPrototypeOf = $Object$2.getPrototypeOf || null;
|
|
520
|
-
var
|
|
521
|
-
var
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
var
|
|
526
|
-
var
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
var str = "";
|
|
548
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
549
|
-
str += arr[i];
|
|
550
|
-
if (i + 1 < arr.length) {
|
|
551
|
-
str += joiner;
|
|
552
|
-
}
|
|
520
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
521
|
+
var toStr$3 = Object.prototype.toString;
|
|
522
|
+
var max$1 = Math.max;
|
|
523
|
+
var funcType = "[object Function]";
|
|
524
|
+
var concatty = function concatty2(a, b) {
|
|
525
|
+
var arr = [];
|
|
526
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
527
|
+
arr[i] = a[i];
|
|
528
|
+
}
|
|
529
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
530
|
+
arr[j + a.length] = b[j];
|
|
531
|
+
}
|
|
532
|
+
return arr;
|
|
533
|
+
};
|
|
534
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
535
|
+
var arr = [];
|
|
536
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
537
|
+
arr[j] = arrLike[i];
|
|
538
|
+
}
|
|
539
|
+
return arr;
|
|
540
|
+
};
|
|
541
|
+
var joiny = function(arr, joiner) {
|
|
542
|
+
var str = "";
|
|
543
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
544
|
+
str += arr[i];
|
|
545
|
+
if (i + 1 < arr.length) {
|
|
546
|
+
str += joiner;
|
|
553
547
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
);
|
|
569
|
-
if (Object(result) === result) {
|
|
570
|
-
return result;
|
|
571
|
-
}
|
|
572
|
-
return this;
|
|
573
|
-
}
|
|
574
|
-
return target.apply(
|
|
575
|
-
that,
|
|
548
|
+
}
|
|
549
|
+
return str;
|
|
550
|
+
};
|
|
551
|
+
var implementation$1 = function bind(that) {
|
|
552
|
+
var target = this;
|
|
553
|
+
if (typeof target !== "function" || toStr$3.apply(target) !== funcType) {
|
|
554
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
555
|
+
}
|
|
556
|
+
var args = slicy(arguments, 1);
|
|
557
|
+
var bound;
|
|
558
|
+
var binder = function() {
|
|
559
|
+
if (this instanceof bound) {
|
|
560
|
+
var result = target.apply(
|
|
561
|
+
this,
|
|
576
562
|
concatty(args, arguments)
|
|
577
563
|
);
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
boundArgs[i] = "$" + i;
|
|
583
|
-
}
|
|
584
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
585
|
-
if (target.prototype) {
|
|
586
|
-
var Empty = function Empty2() {
|
|
587
|
-
};
|
|
588
|
-
Empty.prototype = target.prototype;
|
|
589
|
-
bound.prototype = new Empty();
|
|
590
|
-
Empty.prototype = null;
|
|
564
|
+
if (Object(result) === result) {
|
|
565
|
+
return result;
|
|
566
|
+
}
|
|
567
|
+
return this;
|
|
591
568
|
}
|
|
592
|
-
return
|
|
569
|
+
return target.apply(
|
|
570
|
+
that,
|
|
571
|
+
concatty(args, arguments)
|
|
572
|
+
);
|
|
593
573
|
};
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
var
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
574
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
575
|
+
var boundArgs = [];
|
|
576
|
+
for (var i = 0; i < boundLength; i++) {
|
|
577
|
+
boundArgs[i] = "$" + i;
|
|
578
|
+
}
|
|
579
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
580
|
+
if (target.prototype) {
|
|
581
|
+
var Empty = function Empty2() {
|
|
582
|
+
};
|
|
583
|
+
Empty.prototype = target.prototype;
|
|
584
|
+
bound.prototype = new Empty();
|
|
585
|
+
Empty.prototype = null;
|
|
586
|
+
}
|
|
587
|
+
return bound;
|
|
588
|
+
};
|
|
589
|
+
var implementation = implementation$1;
|
|
590
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
591
|
+
var functionCall = Function.prototype.call;
|
|
613
592
|
var functionApply;
|
|
614
593
|
var hasRequiredFunctionApply;
|
|
615
594
|
function requireFunctionApply() {
|
|
@@ -619,14 +598,14 @@ function requireFunctionApply() {
|
|
|
619
598
|
return functionApply;
|
|
620
599
|
}
|
|
621
600
|
var reflectApply$1 = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
622
|
-
var bind$3 =
|
|
601
|
+
var bind$3 = functionBind;
|
|
623
602
|
var $apply$2 = requireFunctionApply();
|
|
624
|
-
var $call$2 =
|
|
603
|
+
var $call$2 = functionCall;
|
|
625
604
|
var $reflectApply = reflectApply$1;
|
|
626
605
|
var actualApply$1 = $reflectApply || bind$3.call($call$2, $apply$2);
|
|
627
|
-
var bind$2 =
|
|
606
|
+
var bind$2 = functionBind;
|
|
628
607
|
var $TypeError$4 = type;
|
|
629
|
-
var $call$1 =
|
|
608
|
+
var $call$1 = functionCall;
|
|
630
609
|
var $actualApply = actualApply$1;
|
|
631
610
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
632
611
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -678,8 +657,8 @@ function requireHasown() {
|
|
|
678
657
|
hasRequiredHasown = 1;
|
|
679
658
|
var call = Function.prototype.call;
|
|
680
659
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
681
|
-
var
|
|
682
|
-
hasown =
|
|
660
|
+
var bind3 = functionBind;
|
|
661
|
+
hasown = bind3.call(call, $hasOwn);
|
|
683
662
|
return hasown;
|
|
684
663
|
}
|
|
685
664
|
var undefined$1;
|
|
@@ -693,7 +672,7 @@ var $TypeError$3 = type;
|
|
|
693
672
|
var $URIError = uri;
|
|
694
673
|
var abs = abs$1;
|
|
695
674
|
var floor = floor$1;
|
|
696
|
-
var max = max$
|
|
675
|
+
var max = max$2;
|
|
697
676
|
var min = min$1;
|
|
698
677
|
var pow = pow$1;
|
|
699
678
|
var round = round$1;
|
|
@@ -727,7 +706,7 @@ var getProto$2 = getProto$3;
|
|
|
727
706
|
var $ObjectGPO = Object_getPrototypeOf;
|
|
728
707
|
var $ReflectGPO = Reflect_getPrototypeOf;
|
|
729
708
|
var $apply$1 = requireFunctionApply();
|
|
730
|
-
var $call =
|
|
709
|
+
var $call = functionCall;
|
|
731
710
|
var needsEval = {};
|
|
732
711
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto$2 ? undefined$1 : getProto$2(Uint8Array);
|
|
733
712
|
var INTRINSICS = {
|
|
@@ -898,7 +877,7 @@ var LEGACY_ALIASES = {
|
|
|
898
877
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
899
878
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
900
879
|
};
|
|
901
|
-
var bind$1 =
|
|
880
|
+
var bind$1 = functionBind;
|
|
902
881
|
var hasOwn$1 = requireHasown();
|
|
903
882
|
var $concat = bind$1.call($call, Array.prototype.concat);
|
|
904
883
|
var $spliceApply = bind$1.call($apply$1, Array.prototype.splice);
|
|
@@ -1440,11 +1419,11 @@ var setFunctionLength = function setFunctionLength2(fn2, length) {
|
|
|
1440
1419
|
}
|
|
1441
1420
|
return fn2;
|
|
1442
1421
|
};
|
|
1443
|
-
var
|
|
1422
|
+
var bind2 = functionBind;
|
|
1444
1423
|
var $apply = requireFunctionApply();
|
|
1445
1424
|
var actualApply = actualApply$1;
|
|
1446
1425
|
var applyBind = function applyBind2() {
|
|
1447
|
-
return actualApply(
|
|
1426
|
+
return actualApply(bind2, $apply, arguments);
|
|
1448
1427
|
};
|
|
1449
1428
|
(function(module2) {
|
|
1450
1429
|
var setFunctionLength$1 = setFunctionLength;
|