@excalidraw/excalidraw 0.12.0-57cc4b6 → 0.12.0-5abbf73
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/excalidraw-assets/vendor-52b1f3361986b6c6a4fe.js +2 -0
- package/dist/excalidraw-assets/vendor-52b1f3361986b6c6a4fe.js.LICENSE.txt +12 -0
- package/dist/excalidraw.development.js +4 -4
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -2
- package/package.json +6 -6
- package/types/analytics.d.ts +1 -1
- package/types/clients.d.ts +1 -1
- package/types/data/blob.d.ts +4 -4
- package/types/data/json.d.ts +1 -1
- package/types/element/binding.d.ts +3 -3
- package/types/element/dragElements.d.ts +1 -1
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/textElement.d.ts +1 -1
- package/types/element/typeChecks.d.ts +3 -3
- package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-a9598c709179a54ea2cd.d.ts → vendor-52b1f3361986b6c6a4fe.d.ts} +0 -0
- package/types/renderer/renderElement.d.ts +1 -1
- package/types/utils.d.ts +6 -6
- package/dist/excalidraw-assets/vendor-a9598c709179a54ea2cd.js +0 -2
- package/dist/excalidraw-assets/vendor-a9598c709179a54ea2cd.js.LICENSE.txt +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@excalidraw/excalidraw",
|
|
3
|
-
"version": "0.12.0-
|
|
3
|
+
"version": "0.12.0-5abbf73",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@babel/core": "7.18.9",
|
|
48
|
-
"@babel/plugin-transform-arrow-functions": "7.
|
|
48
|
+
"@babel/plugin-transform-arrow-functions": "7.18.6",
|
|
49
49
|
"@babel/plugin-transform-async-to-generator": "7.18.6",
|
|
50
|
-
"@babel/plugin-transform-runtime": "7.
|
|
50
|
+
"@babel/plugin-transform-runtime": "7.18.9",
|
|
51
51
|
"@babel/plugin-transform-typescript": "7.18.8",
|
|
52
52
|
"@babel/preset-env": "7.18.6",
|
|
53
53
|
"@babel/preset-react": "7.18.6",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"css-loader": "6.7.1",
|
|
60
60
|
"dotenv": "16.0.1",
|
|
61
61
|
"mini-css-extract-plugin": "2.6.1",
|
|
62
|
-
"postcss-loader": "
|
|
63
|
-
"sass-loader": "
|
|
62
|
+
"postcss-loader": "7.0.1",
|
|
63
|
+
"sass-loader": "13.0.2",
|
|
64
64
|
"terser-webpack-plugin": "5.3.3",
|
|
65
65
|
"ts-loader": "9.3.1",
|
|
66
|
-
"typescript": "4.
|
|
66
|
+
"typescript": "4.7.4",
|
|
67
67
|
"webpack": "5.73.0",
|
|
68
68
|
"webpack-bundle-analyzer": "4.5.0",
|
|
69
69
|
"webpack-cli": "4.10.0",
|
package/types/analytics.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const trackEvent: (category: string, action: string, label?: string
|
|
1
|
+
export declare const trackEvent: (category: string, action: string, label?: string, value?: number) => void;
|
package/types/clients.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export declare const getClientColors: (clientId: string, appState: AppState) =>
|
|
|
3
3
|
background: string;
|
|
4
4
|
stroke: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const getClientInitials: (username?: string | null
|
|
6
|
+
export declare const getClientInitials: (username?: string | null) => string;
|
package/types/data/blob.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ export declare const getFileHandleType: (handle: FileSystemHandle | null) => str
|
|
|
8
8
|
export declare const isImageFileHandleType: (type: string | null) => type is "svg" | "png";
|
|
9
9
|
export declare const isImageFileHandle: (handle: FileSystemHandle | null) => boolean;
|
|
10
10
|
export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
|
|
11
|
-
type: typeof ALLOWED_IMAGE_MIME_TYPES[number];
|
|
11
|
+
type: (typeof ALLOWED_IMAGE_MIME_TYPES)[number];
|
|
12
12
|
};
|
|
13
|
-
export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null
|
|
13
|
+
export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null) => Promise<{
|
|
14
14
|
type: "application/vnd.excalidraw+json";
|
|
15
15
|
data: import("./restore").RestoredDataState;
|
|
16
16
|
} | {
|
|
17
17
|
type: "application/vnd.excalidrawlib+json";
|
|
18
18
|
data: ImportedLibraryData;
|
|
19
19
|
}>;
|
|
20
|
-
export declare const loadFromBlob: (blob: Blob, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null
|
|
20
|
+
export declare const loadFromBlob: (blob: Blob, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null) => Promise<import("./restore").RestoredDataState>;
|
|
21
21
|
export declare const parseLibraryJSON: (json: string, defaultStatus?: LibraryItem["status"]) => LibraryItem[];
|
|
22
22
|
export declare const loadLibraryFromBlob: (blob: Blob, defaultStatus?: LibraryItem["status"]) => Promise<LibraryItem[]>;
|
|
23
23
|
export declare const canvasToBlob: (canvas: HTMLCanvasElement) => Promise<Blob>;
|
|
@@ -28,7 +28,7 @@ export declare const getDataURL: (file: Blob | File) => Promise<DataURL>;
|
|
|
28
28
|
export declare const dataURLToFile: (dataURL: DataURL, filename?: string) => File;
|
|
29
29
|
export declare const resizeImageFile: (file: File, opts: {
|
|
30
30
|
/** undefined indicates auto */
|
|
31
|
-
outputType?: typeof MIME_TYPES["jpg"];
|
|
31
|
+
outputType?: (typeof MIME_TYPES)["jpg"];
|
|
32
32
|
maxWidthOrHeight: number;
|
|
33
33
|
}) => Promise<File>;
|
|
34
34
|
export declare const SVGStringToFile: (SVGString: string, filename?: string) => File & {
|
package/types/data/json.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const isValidExcalidrawData: (data?: {
|
|
|
10
10
|
type?: any;
|
|
11
11
|
elements?: any;
|
|
12
12
|
appState?: any;
|
|
13
|
-
}
|
|
13
|
+
}) => data is ImportedDataState;
|
|
14
14
|
export declare const isValidLibrary: (json: any) => json is ImportedLibraryData;
|
|
15
15
|
export declare const serializeLibraryAsJSON: (libraryItems: LibraryItems) => string;
|
|
16
16
|
export declare const saveLibraryAsJSON: (libraryItems: LibraryItems) => Promise<void>;
|
|
@@ -22,12 +22,12 @@ export declare const getHoveredElementForBinding: (pointerCoords: {
|
|
|
22
22
|
y: number;
|
|
23
23
|
}, scene: Scene) => NonDeleted<ExcalidrawBindableElement> | null;
|
|
24
24
|
export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement, options?: {
|
|
25
|
-
simultaneouslyUpdated?: readonly ExcalidrawElement[]
|
|
25
|
+
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
26
26
|
newSize?: {
|
|
27
27
|
width: number;
|
|
28
28
|
height: number;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
29
|
+
};
|
|
30
|
+
}) => void;
|
|
31
31
|
export declare const getEligibleElementsForBinding: (elements: NonDeleted<ExcalidrawElement>[]) => SuggestedBinding[];
|
|
32
32
|
export declare const fixBindingsAfterDuplication: (sceneElements: readonly ExcalidrawElement[], oldElements: readonly ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>, duplicatesServeAsOld?: "duplicatesServeAsOld" | undefined) => void;
|
|
33
33
|
export declare const fixBindingsAfterDeletion: (sceneElements: readonly ExcalidrawElement[], deletedElements: readonly ExcalidrawElement[]) => void;
|
|
@@ -2,4 +2,4 @@ import { NonDeletedExcalidrawElement } from "./types";
|
|
|
2
2
|
import { AppState, PointerDownState } from "../types";
|
|
3
3
|
export declare const dragSelectedElements: (pointerDownState: PointerDownState, selectedElements: NonDeletedExcalidrawElement[], pointerX: number, pointerY: number, lockDirection: boolean | undefined, distanceX: number | undefined, distanceY: number | undefined, appState: AppState) => void;
|
|
4
4
|
export declare const getDragOffsetXY: (selectedElements: NonDeletedExcalidrawElement[], x: number, y: number) => [number, number];
|
|
5
|
-
export declare const dragNewElement: (draggingElement: NonDeletedExcalidrawElement, elementType: AppState["activeTool"]["type"], originX: number, originY: number, x: number, y: number, width: number, height: number, shouldMaintainAspectRatio: boolean, shouldResizeFromCenter: boolean, widthAspectRatio?: number | null
|
|
5
|
+
export declare const dragNewElement: (draggingElement: NonDeletedExcalidrawElement, elementType: AppState["activeTool"]["type"], originX: number, originY: number, x: number, y: number, width: number, height: number, shouldMaintainAspectRatio: boolean, shouldResizeFromCenter: boolean, widthAspectRatio?: number | null) => void;
|
|
@@ -7,5 +7,5 @@ export declare const newElementWith: <TElement extends ExcalidrawElement>(elemen
|
|
|
7
7
|
*
|
|
8
8
|
* NOTE: does not trigger re-render.
|
|
9
9
|
*/
|
|
10
|
-
export declare const bumpVersion: (element: Mutable<ExcalidrawElement>, version?:
|
|
10
|
+
export declare const bumpVersion: (element: Mutable<ExcalidrawElement>, version?: ExcalidrawElement["version"]) => Mutable<ExcalidrawElement>;
|
|
11
11
|
export {};
|
|
@@ -3,7 +3,7 @@ import { MaybeTransformHandleType } from "./transformHandles";
|
|
|
3
3
|
export declare const redrawTextBoundingBox: (element: ExcalidrawTextElement, container: ExcalidrawElement | null) => void;
|
|
4
4
|
export declare const bindTextToShapeAfterDuplication: (sceneElements: ExcalidrawElement[], oldElements: ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
|
|
5
5
|
export declare const handleBindTextResize: (element: NonDeletedExcalidrawElement, transformHandleType: MaybeTransformHandleType) => void;
|
|
6
|
-
export declare const measureText: (text: string, font: FontString, maxWidth?: number | null
|
|
6
|
+
export declare const measureText: (text: string, font: FontString, maxWidth?: number | null) => {
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
baseline: number;
|
|
@@ -4,11 +4,11 @@ export declare const isGenericElement: (element: ExcalidrawElement | null) => el
|
|
|
4
4
|
export declare const isInitializedImageElement: (element: ExcalidrawElement | null) => element is InitializedExcalidrawImageElement;
|
|
5
5
|
export declare const isImageElement: (element: ExcalidrawElement | null) => element is ExcalidrawImageElement;
|
|
6
6
|
export declare const isTextElement: (element: ExcalidrawElement | null) => element is ExcalidrawTextElement;
|
|
7
|
-
export declare const isFreeDrawElement: (element?: ExcalidrawElement | null
|
|
7
|
+
export declare const isFreeDrawElement: (element?: ExcalidrawElement | null) => element is ExcalidrawFreeDrawElement;
|
|
8
8
|
export declare const isFreeDrawElementType: (elementType: ExcalidrawElement["type"]) => boolean;
|
|
9
|
-
export declare const isLinearElement: (element?: ExcalidrawElement | null
|
|
9
|
+
export declare const isLinearElement: (element?: ExcalidrawElement | null) => element is ExcalidrawLinearElement;
|
|
10
10
|
export declare const isLinearElementType: (elementType: AppState["activeTool"]["type"]) => boolean;
|
|
11
|
-
export declare const isBindingElement: (element?: ExcalidrawElement | null
|
|
11
|
+
export declare const isBindingElement: (element?: ExcalidrawElement | null, includeLocked?: boolean) => element is ExcalidrawLinearElement;
|
|
12
12
|
export declare const isBindingElementType: (elementType: AppState["activeTool"]["type"]) => boolean;
|
|
13
13
|
export declare const isBindableElement: (element: ExcalidrawElement | null, includeLocked?: boolean) => element is ExcalidrawBindableElement;
|
|
14
14
|
export declare const isTextBindableContainer: (element: ExcalidrawElement | null, includeLocked?: boolean) => element is ExcalidrawTextContainer;
|
|
File without changes
|
|
@@ -26,7 +26,7 @@ export declare const setShapeForElement: <T extends ExcalidrawElement>(element:
|
|
|
26
26
|
export declare const invalidateShapeForElement: (element: ExcalidrawElement) => boolean;
|
|
27
27
|
export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean) => Options;
|
|
28
28
|
export declare const renderElement: (element: NonDeletedExcalidrawElement, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig: RenderConfig) => void;
|
|
29
|
-
export declare const renderElementToSvg: (element: NonDeletedExcalidrawElement, rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, offsetX?: number
|
|
29
|
+
export declare const renderElementToSvg: (element: NonDeletedExcalidrawElement, rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, offsetX?: number, offsetY?: number, exportWithDarkMode?: boolean) => void;
|
|
30
30
|
export declare const pathsCache: WeakMap<ExcalidrawFreeDrawElement, Path2D>;
|
|
31
31
|
export declare function generateFreeDrawShape(element: ExcalidrawFreeDrawElement): Path2D;
|
|
32
32
|
export declare function getFreeDrawPath2D(element: ExcalidrawFreeDrawElement): Path2D | undefined;
|
package/types/utils.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
|
6
6
|
export declare const getDateTime: () => string;
|
|
7
7
|
export declare const capitalizeString: (str: string) => string;
|
|
8
8
|
export declare const isToolIcon: (target: Element | EventTarget | null) => target is HTMLElement;
|
|
9
|
-
export declare const isInputLike: (target: Element | EventTarget | null) => target is
|
|
10
|
-
export declare const isWritableElement: (target: Element | EventTarget | null) => target is
|
|
9
|
+
export declare const isInputLike: (target: Element | EventTarget | null) => target is HTMLBRElement | HTMLDivElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
10
|
+
export declare const isWritableElement: (target: Element | EventTarget | null) => target is HTMLBRElement | HTMLDivElement | HTMLInputElement | HTMLTextAreaElement;
|
|
11
11
|
export declare const getFontFamilyString: ({ fontFamily, }: {
|
|
12
12
|
fontFamily: FontFamilyValues;
|
|
13
13
|
}) => string;
|
|
@@ -22,8 +22,8 @@ export declare const debounce: <T extends any[]>(fn: (...args: T) => void, timeo
|
|
|
22
22
|
cancel(): void;
|
|
23
23
|
};
|
|
24
24
|
export declare const throttleRAF: <T extends any[]>(fn: (...args: T) => void, opts?: {
|
|
25
|
-
trailing?: boolean
|
|
26
|
-
}
|
|
25
|
+
trailing?: boolean;
|
|
26
|
+
}) => {
|
|
27
27
|
(...args: T): void;
|
|
28
28
|
flush(): void;
|
|
29
29
|
cancel(): void;
|
|
@@ -33,7 +33,7 @@ export declare const selectNode: (node: Element) => void;
|
|
|
33
33
|
export declare const removeSelection: () => void;
|
|
34
34
|
export declare const distance: (x: number, y: number) => number;
|
|
35
35
|
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: ({
|
|
36
|
-
type: typeof SHAPES[number]["value"] | "eraser";
|
|
36
|
+
type: (typeof SHAPES)[number]["value"] | "eraser";
|
|
37
37
|
} | {
|
|
38
38
|
type: "custom";
|
|
39
39
|
customType: string;
|
|
@@ -87,7 +87,7 @@ export declare const tupleToCoors: (xyTuple: readonly [number, number]) => {
|
|
|
87
87
|
y: number;
|
|
88
88
|
};
|
|
89
89
|
/** use as a rejectionHandler to mute filesystem Abort errors */
|
|
90
|
-
export declare const muteFSAbortError: (error?: Error
|
|
90
|
+
export declare const muteFSAbortError: (error?: Error) => void;
|
|
91
91
|
export declare const findIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
92
92
|
export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
93
93
|
export declare const isTransparent: (color: string) => boolean;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see vendor-a9598c709179a54ea2cd.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[]).push([[736],{4881:function(t){t.exports=function(){function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};e[a][0].call(c.exports,(function(t){return i(e[a][1][t]||t)}),c,c.exports,t,e,r,n)}return r[a].exports}for(var o=void 0,a=0;a<n.length;a++)i(n[a]);return i}return t}()({1:[function(t,e,r){"use strict";var n=t("inherits"),i=t("multimath"),o=t("./mm_unsharp_mask"),a=t("./mm_resize");function s(t){var e=t||[],r={js:e.indexOf("js")>=0,wasm:e.indexOf("wasm")>=0};i.call(this,r),this.features={js:r.js,wasm:r.wasm&&this.has_wasm()},this.use(o),this.use(a)}n(s,i),s.prototype.resizeAndUnsharp=function(t,e){var r=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(r,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),r},e.exports=s},{"./mm_resize":4,"./mm_unsharp_mask":9,inherits:19,multimath:20}],2:[function(t,e,r){"use strict";function n(t){return t<0?0:t>255?255:t}function i(t,e,r,i,o,a){var s,u,c,h,A,f,l,p,g,d,m,v=0,y=0;for(g=0;g<i;g++){for(A=0,d=0;d<o;d++){for(f=a[A++],l=a[A++],p=v+4*f|0,s=u=c=h=0;l>0;l--)h=h+(m=a[A++])*t[p+3]|0,c=c+m*t[p+2]|0,u=u+m*t[p+1]|0,s=s+m*t[p]|0,p=p+4|0;e[y+3]=n(h+8192>>14),e[y+2]=n(c+8192>>14),e[y+1]=n(u+8192>>14),e[y]=n(s+8192>>14),y=y+4*i|0}y=4*(g+1)|0,v=(g+1)*r*4|0}}function o(t,e,r,i,o,a){var s,u,c,h,A,f,l,p,g,d,m,v=0,y=0;for(g=0;g<i;g++){for(A=0,d=0;d<o;d++){for(f=a[A++],l=a[A++],p=v+4*f|0,s=u=c=h=0;l>0;l--)h=h+(m=a[A++])*t[p+3]|0,c=c+m*t[p+2]|0,u=u+m*t[p+1]|0,s=s+m*t[p]|0,p=p+4|0;e[y+3]=n(h+8192>>14),e[y+2]=n(c+8192>>14),e[y+1]=n(u+8192>>14),e[y]=n(s+8192>>14),y=y+4*i|0}y=4*(g+1)|0,v=(g+1)*r*4|0}}e.exports={convolveHorizontally:i,convolveVertically:o}},{}],3:[function(t,e,r){"use strict";e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs="},{}],4:[function(t,e,r){"use strict";e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,r){"use strict";var n=t("./resize_filter_gen"),i=t("./convolve").convolveHorizontally,o=t("./convolve").convolveVertically;function a(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}e.exports=function(t){var e=t.src,r=t.width,s=t.height,u=t.toWidth,c=t.toHeight,h=t.scaleX||t.toWidth/t.width,A=t.scaleY||t.toHeight/t.height,f=t.offsetX||0,l=t.offsetY||0,p=t.dest||new Uint8Array(u*c*4),g=void 0===t.quality?3:t.quality,d=t.alpha||!1,m=n(g,r,u,h,f),v=n(g,s,c,A,l),y=new Uint8Array(u*s*4);return i(e,y,r,s,u,m),o(y,p,s,u,c,v),d||a(p,u,c),p}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(t,e,r){"use strict";var n=t("./resize_filter_info"),i=14;function o(t){return Math.round(t*((1<<i)-1))}e.exports=function(t,e,r,i,a){var s,u,c,h,A,f,l,p,g,d,m,v,y,w,_,b,I,E=n[t].filter,B=1/i,x=Math.min(1,i),C=n[t].win/x,Q=Math.floor(2*(C+1)),L=new Int16Array((Q+2)*r),k=0,j=!L.subarray||!L.set;for(s=0;s<r;s++){for(u=(s+.5)*B+a,c=Math.max(0,Math.floor(u-C)),A=(h=Math.min(e-1,Math.ceil(u+C)))-c+1,f=new Float32Array(A),l=new Int16Array(A),p=0,g=c,d=0;g<=h;g++,d++)p+=m=E((g+.5-u)*x),f[d]=m;for(v=0,d=0;d<f.length;d++)v+=y=f[d]/p,l[d]=o(y);for(l[r>>1]+=o(1-v),w=0;w<l.length&&0===l[w];)w++;if(w<l.length){for(_=l.length-1;_>0&&0===l[_];)_--;if(b=c+w,I=_-w+1,L[k++]=b,L[k++]=I,j)for(d=w;d<=_;d++)L[k++]=l[d];else L.set(l.subarray(w,_+1),k),k+=I}else L[k++]=0,L[k++]=0}return L}},{"./resize_filter_info":7}],7:[function(t,e,r){"use strict";e.exports=[{win:.5,filter:function(t){return t>=-.5&&t<.5?1:0}},{win:1,filter:function(t){if(t<=-1||t>=1)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},{win:2,filter:function(t){if(t<=-2||t>=2)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},{win:3,filter:function(t){if(t<=-3||t>=3)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}}]},{}],8:[function(t,e,r){"use strict";var n=t("./resize_filter_gen");function i(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}function o(t){return new Uint8Array(t.buffer,0,t.byteLength)}var a=!0;try{a=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(t){}function s(t,e,r){if(a)e.set(o(t),r);else for(var n=r,i=0;i<t.length;i++){var s=t[i];e[n++]=255&s,e[n++]=s>>8&255}}e.exports=function(t){var e=t.src,r=t.width,o=t.height,a=t.toWidth,u=t.toHeight,c=t.scaleX||t.toWidth/t.width,h=t.scaleY||t.toHeight/t.height,A=t.offsetX||0,f=t.offsetY||0,l=t.dest||new Uint8Array(a*u*4),p=void 0===t.quality?3:t.quality,g=t.alpha||!1,d=n(p,r,a,c,A),m=n(p,o,u,h,f),v=0,y=this.__align(v+Math.max(e.byteLength,l.byteLength)),w=this.__align(y+o*a*4),_=this.__align(w+d.byteLength),b=_+m.byteLength,I=this.__instance("resize",b),E=new Uint8Array(this.__memory.buffer),B=new Uint32Array(this.__memory.buffer),x=new Uint32Array(e.buffer);return B.set(x),s(d,E,w),s(m,E,_),(I.exports.convolveHV||I.exports._convolveHV)(w,_,y,r,o,a,u),new Uint32Array(l.buffer).set(new Uint32Array(this.__memory.buffer,0,u*a)),g||i(l,a,u),l}},{"./resize_filter_gen":6}],9:[function(t,e,r){"use strict";e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(t,e,r){"use strict";var n=t("glur/mono16");function i(t,e,r){for(var n,i,o,a,s=e*r,u=new Uint16Array(s),c=0;c<s;c++)n=t[4*c],i=t[4*c+1],o=t[4*c+2],a=n>=i&&n>=o?n:i>=o&&i>=n?i:o,u[c]=a<<8;return u}e.exports=function(t,e,r,o,a,s){var u,c,h,A,f;if(!(0===o||a<.5)){a>2&&(a=2);var l=i(t,e,r),p=new Uint16Array(l);n(p,e,r,a);for(var g=o/100*4096+.5|0,d=s<<8,m=e*r,v=0;v<m;v++)A=(u=l[v])-p[v],Math.abs(A)>=d&&(h=((c=(c=(c=u+(g*A+2048>>12))>65280?65280:c)<0?0:c)<<12)/(u=0!==u?u:1)|0,t[f=4*v]=t[f]*h+2048>>12,t[f+1]=t[f+1]*h+2048>>12,t[f+2]=t[f+2]*h+2048>>12)}}},{"glur/mono16":18}],11:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,o){if(!(0===n||i<.5)){i>2&&(i=2);var a=e*r,s=4*a,u=2*a,c=2*a,h=4*Math.max(e,r),A=32,f=0,l=s,p=l+u,g=p+c,d=g+c,m=d+h,v=this.__instance("unsharp_mask",s+u+2*c+h+A,{exp:Math.exp}),y=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(y);var w=v.exports.hsv_v16||v.exports._hsv_v16;w(f,l,e,r),(w=v.exports.blurMono16||v.exports._blurMono16)(l,p,g,d,m,e,r,i),(w=v.exports.unsharp||v.exports._unsharp)(f,f,l,p,e,r,n,o),y.set(new Uint32Array(this.__memory.buffer,0,a))}}},{}],12:[function(t,e,r){"use strict";e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBAUgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL"},{}],13:[function(t,e,r){"use strict";var n=100;function i(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}i.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},i.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout((function(){return e.gc()}),n))},i.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter((function(r){return!(e-r.lastUsed>t.idle&&(r.destroy(),1))})),0!==this.available.length?this.timeoutId=setTimeout((function(){return t.gc()}),n):this.timeoutId=0},e.exports=i},{}],14:[function(t,e,r){"use strict";var n=2;e.exports=function(t,e,r,i,o,a){var s=r/t,u=i/e,c=(2*a+n+1)/o;if(c>.5)return[[r,i]];var h=Math.ceil(Math.log(Math.min(s,u))/Math.log(c));if(h<=1)return[[r,i]];for(var A=[],f=0;f<h;f++){var l=Math.round(Math.pow(Math.pow(t,h-f-1)*Math.pow(r,f+1),1/h)),p=Math.round(Math.pow(Math.pow(e,h-f-1)*Math.pow(i,f+1),1/h));A.push([l,p])}return A}},{}],15:[function(t,e,r){"use strict";var n=1e-5;function i(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.floor(t)}function o(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.ceil(t)}e.exports=function(t){var e,r,n,a,s,u,c=t.toWidth/t.width,h=t.toHeight/t.height,A=i(t.srcTileSize*c)-2*t.destTileBorder,f=i(t.srcTileSize*h)-2*t.destTileBorder;if(A<1||f<1)throw new Error("Internal error in pica: target tile width/height is too small.");var l,p=[];for(a=0;a<t.toHeight;a+=f)for(n=0;n<t.toWidth;n+=A)(e=n-t.destTileBorder)<0&&(e=0),e+(s=n+A+t.destTileBorder-e)>=t.toWidth&&(s=t.toWidth-e),(r=a-t.destTileBorder)<0&&(r=0),r+(u=a+f+t.destTileBorder-r)>=t.toHeight&&(u=t.toHeight-r),l={toX:e,toY:r,toWidth:s,toHeight:u,toInnerX:n,toInnerY:a,toInnerWidth:A,toInnerHeight:f,offsetX:e/c-i(e/c),offsetY:r/h-i(r/h),scaleX:c,scaleY:h,x:i(e/c),y:i(r/h),width:o(s/c),height:o(u/h)},p.push(l);return p}},{}],16:[function(t,e,r){"use strict";function n(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=n(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===n(t)},e.exports.isImageBitmap=function(t){return"[object ImageBitmap]"===n(t)},e.exports.limiter=function(t){var e=0,r=[];function n(){e<t&&r.length&&(e++,r.shift()())}return function(t){return new Promise((function(i,o){r.push((function(){t().then((function(t){i(t),e--,n()}),(function(t){o(t),e--,n()}))})),n()}))}},e.exports.cib_quality_name=function(t){switch(t){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},e.exports.cib_support=function(t){return Promise.resolve().then((function(){if("undefined"==typeof createImageBitmap)return!1;var e=t(100,100);return createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then((function(t){var r=10===t.width;return t.close(),e=null,r}))})).catch((function(){return!1}))},e.exports.worker_offscreen_canvas_support=function(){return new Promise((function(t,e){if("undefined"!=typeof OffscreenCanvas){var r=btoa("(".concat(i.toString(),")(self);")),n=new Worker("data:text/javascript;base64,".concat(r));n.onmessage=function(e){return t(e.data)},n.onerror=e}else t(!1);function i(t){"undefined"!=typeof createImageBitmap?Promise.resolve().then((function(){var t=new OffscreenCanvas(10,10);return t.getContext("2d").rect(0,0,1,1),createImageBitmap(t,0,0,1,1)})).then((function(){return t.postMessage(!0)}),(function(){return t.postMessage(!1)})):t.postMessage(!1)}})).then((function(t){return t}),(function(){return!1}))},e.exports.can_use_canvas=function(t){var e=!1;try{var r=t(2,1).getContext("2d"),n=r.createImageData(2,1);n.data[0]=12,n.data[1]=23,n.data[2]=34,n.data[3]=255,n.data[4]=45,n.data[5]=56,n.data[6]=67,n.data[7]=255,r.putImageData(n,0,0),n=null,12===(n=r.getImageData(0,0,2,1)).data[0]&&23===n.data[1]&&34===n.data[2]&&255===n.data[3]&&45===n.data[4]&&56===n.data[5]&&67===n.data[6]&&255===n.data[7]&&(e=!0)}catch(t){}return e},e.exports.cib_can_use_region=function(){return new Promise((function(t){if("undefined"!=typeof createImageBitmap){var e=new Image;e.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",e.onload=function(){createImageBitmap(e,0,0,e.width,e.height).then((function(r){r.width===e.width&&r.height===e.height?t(!0):t(!1)}),(function(){return t(!1)}))},e.onerror=function(){return t(!1)}}else t(!1)}))}},{}],17:[function(t,e,r){"use strict";e.exports=function(){var e,r=t("./mathlib");onmessage=function(t){var n=t.data.opts,i=!1;if(!n.src&&n.srcBitmap){var o=new OffscreenCanvas(n.width,n.height),a=o.getContext("2d",{alpha:Boolean(n.alpha)});a.drawImage(n.srcBitmap,0,0),n.src=a.getImageData(0,0,n.width,n.height).data,o.width=o.height=0,o=null,n.srcBitmap.close(),n.srcBitmap=null,i=!0}e||(e=new r(t.data.features));var s=e.resizeAndUnsharp(n);if(i){var u=new ImageData(new Uint8ClampedArray(s),n.toWidth,n.toHeight),c=new OffscreenCanvas(n.toWidth,n.toHeight);c.getContext("2d",{alpha:Boolean(n.alpha)}).putImageData(u,0,0),createImageBitmap(c).then((function(t){postMessage({bitmap:t},[t])}))}else postMessage({data:s},[s.buffer])}}},{"./mathlib":1}],18:[function(t,e,r){var n,i,o,a,s,u;function c(t){t<.5&&(t=.5);var e=Math.exp(.527076)/t,r=Math.exp(-e),c=Math.exp(-2*e),h=(1-r)*(1-r)/(1+2*e*r-c);return n=h,i=h*(e-1)*r,o=h*(e+1)*r,a=-h*c,s=2*r,u=-c,new Float32Array([n,i,o,a,s,u,(n+i)/(1-s-u),(o+a)/(1-s-u)])}function h(t,e,r,n,i,o){var a,s,u,c,h,A,f,l,p,g,d,m,v,y;for(p=0;p<o;p++){for(f=p,l=0,c=h=(a=t[A=p*i])*n[6],d=n[0],m=n[1],v=n[4],y=n[5],g=0;g<i;g++)u=(s=t[A])*d+a*m+c*v+h*y,h=c,c=u,a=s,r[l]=c,l++,A++;for(l--,f+=o*(i-1),c=h=(a=t[--A])*n[7],s=a,d=n[2],m=n[3],g=i-1;g>=0;g--)u=s*d+a*m+c*v+h*y,h=c,c=u,a=s,s=t[A],e[f]=r[l]+c,A--,l--,f-=o}}function A(t,e,r,n){if(n){var i=new Uint16Array(t.length),o=new Float32Array(Math.max(e,r)),a=c(n);h(t,i,o,a,e,r,n),h(i,t,o,a,r,e,n)}}e.exports=A},{}],19:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],20:[function(t,e,r){"use strict";var n=t("object-assign"),i=t("./lib/base64decode"),o=t("./lib/wa_detect"),a={js:!0,wasm:!0};function s(t){if(!(this instanceof s))return new s(t);var e=n({},a,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}s.prototype.has_wasm=o,s.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},s.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map((function(e){var r=t.__modules[e];return t.options.wasm&&t.has_wasm()&&r.wasm_fn?t.__wasm[e]?null:WebAssembly.compile(t.__base64decode(r.wasm_src)).then((function(r){t.__wasm[e]=r})):null}))).then((function(){return t})),this.__init_promise},s.prototype.__base64decode=i,s.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e<t&&this.__memory.grow(Math.ceil((t-e)/65536)),this.__memory},s.prototype.__instance=function(t,e,r){if(e&&this.__reallocate(e),!this.__wasm[t]){var i=this.__modules[t];this.__wasm[t]=new WebAssembly.Module(this.__base64decode(i.wasm_src))}if(!this.__cache[t]){var o={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[t]=new WebAssembly.Instance(this.__wasm[t],{env:n(o,r||{})})}return this.__cache[t]},s.prototype.__align=function(t,e){var r=t%(e=e||8);return t+(r?e-r:0)},e.exports=s},{"./lib/base64decode":21,"./lib/wa_detect":22,"object-assign":23}],21:[function(t,e,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports=function(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,i=new Uint8Array(3*r>>2),o=0,a=0,s=0;s<r;s++)s%4==0&&s&&(i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=255&o),o=o<<6|n.indexOf(e.charAt(s));var u=r%4*6;return 0===u?(i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=255&o):18===u?(i[a++]=o>>10&255,i[a++]=o>>2&255):12===u&&(i[a++]=o>>4&255),i}},{}],22:[function(t,e,r){"use strict";var n;e.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t);return 0!==new WebAssembly.Instance(e,{}).exports.test(4)&&(n=!0),n}catch(t){}return n}},{}],23:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function s(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}e.exports=s()?Object.assign:function(t,e){for(var r,s,u=a(t),c=1;c<arguments.length;c++){for(var h in r=Object(arguments[c]))i.call(r,h)&&(u[h]=r[h]);if(n){s=n(r);for(var A=0;A<s.length;A++)o.call(r,s[A])&&(u[s[A]]=r[s[A]])}}return u}},{}],24:[function(t,e,r){var n=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){for(var r,s=Object.keys(o),u=0,c=s.length;u<c;u++){var h=s[u],A=o[h].exports;if(A===t||A&&A.default===t){r=h;break}}if(!r){r=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var f={};for(u=0,c=s.length;u<c;u++)f[h=s[u]]=h;i[r]=["function(require,module,exports){"+t+"(self); }",f]}var l=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[r]=r,i[l]=["function(require,module,exports){var f = require("+a(r)+");(f.default ? f.default : f)(self);}",p];var g={};function d(t){for(var e in g[t]=!0,i[t][1]){var r=i[t][1][e];g[r]||d(r)}}d(l);var m="("+n+")({"+Object.keys(g).map((function(t){return a(t)+":["+i[t][0]+","+a(i[t][1])+"]"})).join(",")+"},{},["+a(l)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([m],{type:"text/javascript"});if(e&&e.bare)return y;var w=v.createObjectURL(y),_=new Worker(w);return _.objectURL=w,_}},{}],"/index.js":[function(t,e,r){"use strict";function n(t,e){return u(t)||s(t,e)||o(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}function u(t){if(Array.isArray(t))return t}var c=t("object-assign"),h=t("webworkify"),A=t("./lib/mathlib"),f=t("./lib/pool"),l=t("./lib/utils"),p=t("./lib/worker"),g=t("./lib/stepper"),d=t("./lib/tiler"),m={},v=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(v=navigator.userAgent.indexOf("Safari")>=0)}catch(t){}var y=1;"undefined"!=typeof navigator&&(y=Math.min(navigator.hardwareConcurrency||1,4));var w={tile:1024,concurrency:y,features:["js","wasm","ww"],idle:2e3,createCanvas:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}},_={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},b=!1,I=!1,E=!1,B=!1,x=!1;function C(){return{value:h(p),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function Q(t){if(!(this instanceof Q))return new Q(t);this.options=c({},w,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=m[e]||l.limiter(this.options.concurrency),m[e]||(m[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}Q.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if("undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray)try{new ImageData(new Uint8ClampedArray(400),10,10),b=!0}catch(t){}"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?I=!0:this.debug("ImageBitmap does not support .close(), disabled"));var r=this.options.features.slice();if(r.indexOf("all")>=0&&(r=["cib","wasm","js","ww"]),this.__requested_features=r,this.__mathlib=new A(r),r.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")((function(){})).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));m[n]?this.__workersPool=m[n]:(this.__workersPool=new f(C,this.options.idle),m[n]=this.__workersPool)}catch(t){}var i,o,a=this.__mathlib.init().then((function(t){c(e.features,t.features)}));i=I?l.cib_support(this.options.createCanvas).then((function(t){e.features.cib&&r.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):r.indexOf("cib")>=0&&(e.features.cib=t)})):Promise.resolve(!1),E=l.can_use_canvas(this.options.createCanvas),o=(o=I&&b&&-1!==r.indexOf("ww")?l.worker_offscreen_canvas_support():Promise.resolve(!1)).then((function(t){B=t}));var s=l.cib_can_use_region().then((function(t){x=t}));return this.__initPromise=Promise.all([a,i,o,s]).then((function(){return e})),this.__initPromise},Q.prototype.__invokeResize=function(t,e){var r=this;return e.__mathCache=e.__mathCache||{},Promise.resolve().then((function(){return r.features.ww?new Promise((function(n,i){var o=r.__workersPool.acquire();e.cancelToken&&e.cancelToken.catch((function(t){return i(t)})),o.value.onmessage=function(t){o.release(),t.data.err?i(t.data.err):n(t.data)};var a=[];t.src&&a.push(t.src.buffer),t.srcBitmap&&a.push(t.srcBitmap),o.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},a)})):{data:r.__mathlib.resizeAndUnsharp(t,e.__mathCache)}}))},Q.prototype.__extractTileData=function(t,e,r,n,i){if(this.features.ww&&B&&(l.isCanvas(e)||x))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(n.srcImageBitmap||e,t.x,t.y,t.width,t.height).then((function(t){return i.srcBitmap=t,i}));if(l.isCanvas(e))return n.srcCtx||(n.srcCtx=e.getContext("2d",{alpha:Boolean(r.alpha)})),this.debug("Get tile pixel data"),i.src=n.srcCtx.getImageData(t.x,t.y,t.width,t.height).data,i;this.debug("Draw tile imageBitmap/image to temporary canvas");var o=this.options.createCanvas(t.width,t.height),a=o.getContext("2d",{alpha:Boolean(r.alpha)});return a.globalCompositeOperation="copy",a.drawImage(n.srcImageBitmap||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),this.debug("Get tile pixel data"),i.src=a.getImageData(0,0,t.width,t.height).data,o.width=o.height=0,i},Q.prototype.__landTileData=function(t,e,r){var n;if(this.debug("Convert raw rgba tile result to ImageData"),e.bitmap)return r.toCtx.drawImage(e.bitmap,t.toX,t.toY),null;if(b)n=new ImageData(new Uint8ClampedArray(e.data),t.toWidth,t.toHeight);else if((n=r.toCtx.createImageData(t.toWidth,t.toHeight)).data.set)n.data.set(e.data);else for(var i=n.data.length-1;i>=0;i--)n.data[i]=e.data[i];return this.debug("Draw tile"),v?r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null},Q.prototype.__tileAndResize=function(t,e,r){var n=this,i={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null},o=function(e){return n.__limit((function(){if(r.canceled)return r.cancelToken;var o={width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:r.quality,alpha:r.alpha,unsharpAmount:r.unsharpAmount,unsharpRadius:r.unsharpRadius,unsharpThreshold:r.unsharpThreshold};return n.debug("Invoke resize math"),Promise.resolve(o).then((function(o){return n.__extractTileData(e,t,r,i,o)})).then((function(t){return n.debug("Invoke resize math"),n.__invokeResize(t,r)})).then((function(t){return r.canceled?r.cancelToken:(i.srcImageData=null,n.__landTileData(e,t,i))}))}))};return Promise.resolve().then((function(){if(i.toCtx=e.getContext("2d",{alpha:Boolean(r.alpha)}),l.isCanvas(t))return null;if(l.isImageBitmap(t))return i.srcImageBitmap=t,i.isImageBitmapReused=!0,null;if(l.isImage(t))return I?(n.debug("Decode image via createImageBitmap"),createImageBitmap(t).then((function(t){i.srcImageBitmap=t})).catch((function(t){return null}))):null;throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap')})).then((function(){if(r.canceled)return r.cancelToken;n.debug("Calculate tiles");var t=d({width:r.width,height:r.height,srcTileSize:n.options.tile,toWidth:r.toWidth,toHeight:r.toHeight,destTileBorder:r.__destTileBorder}).map((function(t){return o(t)}));function a(t){t.srcImageBitmap&&(t.isImageBitmapReused||t.srcImageBitmap.close(),t.srcImageBitmap=null)}return n.debug("Process tiles"),Promise.all(t).then((function(){return n.debug("Finished!"),a(i),e}),(function(t){throw a(i),t}))}))},Q.prototype.__processStages=function(t,e,r,i){var o=this;if(i.canceled)return i.cancelToken;var a,s=n(t.shift(),2),u=s[0],h=s[1],A=0===t.length;return i=c({},i,{toWidth:u,toHeight:h,quality:A?i.quality:Math.min(1,i.quality)}),A||(a=this.options.createCanvas(u,h)),this.__tileAndResize(e,A?r:a,i).then((function(){return A?r:(i.width=u,i.height=h,o.__processStages(t,a,r,i))})).then((function(t){return a&&(a.width=a.height=0),t}))},Q.prototype.__resizeViaCreateImageBitmap=function(t,e,r){var n=this,i=e.getContext("2d",{alpha:Boolean(r.alpha)});return this.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:r.toWidth,resizeHeight:r.toHeight,resizeQuality:l.cib_quality_name(r.quality)}).then((function(t){if(r.canceled)return r.cancelToken;if(!r.unsharpAmount)return i.drawImage(t,0,0),t.close(),i=null,n.debug("Finished!"),e;n.debug("Unsharp result");var o=n.options.createCanvas(r.toWidth,r.toHeight),a=o.getContext("2d",{alpha:Boolean(r.alpha)});a.drawImage(t,0,0),t.close();var s=a.getImageData(0,0,r.toWidth,r.toHeight);return n.__mathlib.unsharp_mask(s.data,r.toWidth,r.toHeight,r.unsharpAmount,r.unsharpRadius,r.unsharpThreshold),i.putImageData(s,0,0),o.width=o.height=0,s=a=o=i=null,n.debug("Finished!"),e}))},Q.prototype.resize=function(t,e,r){var n=this;this.debug("Start resize...");var i=c({},_);if(isNaN(r)?r&&(i=c(i,r)):i=c(i,{quality:r}),i.toWidth=e.width,i.toHeight=e.height,i.width=t.naturalWidth||t.width,i.height=t.naturalHeight||t.height,0===e.width||0===e.height)return Promise.reject(new Error("Invalid output size: ".concat(e.width,"x").concat(e.height)));i.unsharpRadius>2&&(i.unsharpRadius=2),i.canceled=!1,i.cancelToken&&(i.cancelToken=i.cancelToken.then((function(t){throw i.canceled=!0,t}),(function(t){throw i.canceled=!0,t})));var o=3;return i.__destTileBorder=Math.ceil(Math.max(o,2.5*i.unsharpRadius|0)),this.init().then((function(){if(i.canceled)return i.cancelToken;if(n.features.cib)return n.__resizeViaCreateImageBitmap(t,e,i);if(!E){var r=new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw r.code="ERR_GET_IMAGE_DATA",r}var o=g(i.width,i.height,i.toWidth,i.toHeight,n.options.tile,i.__destTileBorder);return n.__processStages(o,t,e,i)}))},Q.prototype.resizeBuffer=function(t){var e=this,r=c({},_,t);return this.init().then((function(){return e.__mathlib.resizeAndUnsharp(r)}))},Q.prototype.toBlob=function(t,e,r){return e=e||"image/png",new Promise((function(n){if(t.toBlob)t.toBlob((function(t){return n(t)}),e,r);else if(t.convertToBlob)n(t.convertToBlob({type:e,quality:r}));else{for(var i=atob(t.toDataURL(e,r).split(",")[1]),o=i.length,a=new Uint8Array(o),s=0;s<o;s++)a[s]=i.charCodeAt(s);n(new Blob([a],{type:e}))}}))},Q.prototype.debug=function(){},e.exports=Q},{"./lib/mathlib":1,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":23,webworkify:24}]},{},[])("/index.js")},100:function(t,e,r){"use strict";r.r(e);function n(t,e){var r={};return e.forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])})),r}var i={assign:function(t){for(var e,r=1;r<arguments.length;r++)for(var n in e=Object(arguments[r]))Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},pick:n,pick_pica_resize_options:function(t){return n(t,["alpha","unsharpAmount","unsharpRadius","unsharpThreshold","cancelToken"])}};function o(t){var e={exports:{}};return t(e,e.exports),e.exports}function a(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var s=o((function(t,e){t.exports=function(){function t(e,r,n){function i(s,u){if(!r[s]){if(!e[s]){if(!u&&a)return a(s);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,(function(t){return i(e[s][1][t]||t)}),h,h.exports,t,e,r,n)}return r[s].exports}for(var o=a,s=0;s<n.length;s++)i(n[s]);return i}return t}()({1:[function(t,e,r){var n=t("inherits"),i=t("multimath"),o=t("./mm_unsharp_mask"),a=t("./mm_resize");function s(t){var e=t||[],r={js:e.indexOf("js")>=0,wasm:e.indexOf("wasm")>=0};i.call(this,r),this.features={js:r.js,wasm:r.wasm&&this.has_wasm()},this.use(o),this.use(a)}n(s,i),s.prototype.resizeAndUnsharp=function(t,e){var r=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(r,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),r},e.exports=s},{"./mm_resize":4,"./mm_unsharp_mask":9,inherits:19,multimath:20}],2:[function(t,e,r){function n(t){return t<0?0:t>255?255:t}function i(t,e,r,i,o,a){var s,u,c,h,A,f,l,p,g,d,m,v=0,y=0;for(g=0;g<i;g++){for(A=0,d=0;d<o;d++){for(f=a[A++],l=a[A++],p=v+4*f|0,s=u=c=h=0;l>0;l--)h=h+(m=a[A++])*t[p+3]|0,c=c+m*t[p+2]|0,u=u+m*t[p+1]|0,s=s+m*t[p]|0,p=p+4|0;e[y+3]=n(h+8192>>14),e[y+2]=n(c+8192>>14),e[y+1]=n(u+8192>>14),e[y]=n(s+8192>>14),y=y+4*i|0}y=4*(g+1)|0,v=(g+1)*r*4|0}}function o(t,e,r,i,o,a){var s,u,c,h,A,f,l,p,g,d,m,v=0,y=0;for(g=0;g<i;g++){for(A=0,d=0;d<o;d++){for(f=a[A++],l=a[A++],p=v+4*f|0,s=u=c=h=0;l>0;l--)h=h+(m=a[A++])*t[p+3]|0,c=c+m*t[p+2]|0,u=u+m*t[p+1]|0,s=s+m*t[p]|0,p=p+4|0;e[y+3]=n(h+8192>>14),e[y+2]=n(c+8192>>14),e[y+1]=n(u+8192>>14),e[y]=n(s+8192>>14),y=y+4*i|0}y=4*(g+1)|0,v=(g+1)*r*4|0}}e.exports={convolveHorizontally:i,convolveVertically:o}},{}],3:[function(t,e,r){e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs="},{}],4:[function(t,e,r){e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,r){var n=t("./resize_filter_gen"),i=t("./convolve").convolveHorizontally,o=t("./convolve").convolveVertically;function a(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}e.exports=function(t){var e=t.src,r=t.width,s=t.height,u=t.toWidth,c=t.toHeight,h=t.scaleX||t.toWidth/t.width,A=t.scaleY||t.toHeight/t.height,f=t.offsetX||0,l=t.offsetY||0,p=t.dest||new Uint8Array(u*c*4),g=void 0===t.quality?3:t.quality,d=t.alpha||!1,m=n(g,r,u,h,f),v=n(g,s,c,A,l),y=new Uint8Array(u*s*4);return i(e,y,r,s,u,m),o(y,p,s,u,c,v),d||a(p,u,c),p}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(t,e,r){var n=t("./resize_filter_info"),i=14;function o(t){return Math.round(t*((1<<i)-1))}e.exports=function(t,e,r,i,a){var s,u,c,h,A,f,l,p,g,d,m,v,y,w,_,b,I,E=n[t].filter,B=1/i,x=Math.min(1,i),C=n[t].win/x,Q=Math.floor(2*(C+1)),L=new Int16Array((Q+2)*r),k=0,j=!L.subarray||!L.set;for(s=0;s<r;s++){for(u=(s+.5)*B+a,c=Math.max(0,Math.floor(u-C)),A=(h=Math.min(e-1,Math.ceil(u+C)))-c+1,f=new Float32Array(A),l=new Int16Array(A),p=0,g=c,d=0;g<=h;g++,d++)p+=m=E((g+.5-u)*x),f[d]=m;for(v=0,d=0;d<f.length;d++)v+=y=f[d]/p,l[d]=o(y);for(l[r>>1]+=o(1-v),w=0;w<l.length&&0===l[w];)w++;if(w<l.length){for(_=l.length-1;_>0&&0===l[_];)_--;if(b=c+w,I=_-w+1,L[k++]=b,L[k++]=I,j)for(d=w;d<=_;d++)L[k++]=l[d];else L.set(l.subarray(w,_+1),k),k+=I}else L[k++]=0,L[k++]=0}return L}},{"./resize_filter_info":7}],7:[function(t,e,r){e.exports=[{win:.5,filter:function(t){return t>=-.5&&t<.5?1:0}},{win:1,filter:function(t){if(t<=-1||t>=1)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},{win:2,filter:function(t){if(t<=-2||t>=2)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},{win:3,filter:function(t){if(t<=-3||t>=3)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}}]},{}],8:[function(t,e,r){var n=t("./resize_filter_gen");function i(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}function o(t){return new Uint8Array(t.buffer,0,t.byteLength)}var a=!0;try{a=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(t){}function s(t,e,r){if(a)e.set(o(t),r);else for(var n=r,i=0;i<t.length;i++){var s=t[i];e[n++]=255&s,e[n++]=s>>8&255}}e.exports=function(t){var e=t.src,r=t.width,o=t.height,a=t.toWidth,u=t.toHeight,c=t.scaleX||t.toWidth/t.width,h=t.scaleY||t.toHeight/t.height,A=t.offsetX||0,f=t.offsetY||0,l=t.dest||new Uint8Array(a*u*4),p=void 0===t.quality?3:t.quality,g=t.alpha||!1,d=n(p,r,a,c,A),m=n(p,o,u,h,f),v=0,y=this.__align(v+Math.max(e.byteLength,l.byteLength)),w=this.__align(y+o*a*4),_=this.__align(w+d.byteLength),b=_+m.byteLength,I=this.__instance("resize",b),E=new Uint8Array(this.__memory.buffer),B=new Uint32Array(this.__memory.buffer),x=new Uint32Array(e.buffer);return B.set(x),s(d,E,w),s(m,E,_),(I.exports.convolveHV||I.exports._convolveHV)(w,_,y,r,o,a,u),new Uint32Array(l.buffer).set(new Uint32Array(this.__memory.buffer,0,u*a)),g||i(l,a,u),l}},{"./resize_filter_gen":6}],9:[function(t,e,r){e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(t,e,r){var n=t("glur/mono16");function i(t,e,r){for(var n,i,o,a,s=e*r,u=new Uint16Array(s),c=0;c<s;c++)n=t[4*c],i=t[4*c+1],o=t[4*c+2],a=n>=i&&n>=o?n:i>=o&&i>=n?i:o,u[c]=a<<8;return u}e.exports=function(t,e,r,o,a,s){var u,c,h,A,f;if(!(0===o||a<.5)){a>2&&(a=2);var l=i(t,e,r),p=new Uint16Array(l);n(p,e,r,a);for(var g=o/100*4096+.5|0,d=s<<8,m=e*r,v=0;v<m;v++)A=(u=l[v])-p[v],Math.abs(A)>=d&&(h=((c=(c=(c=u+(g*A+2048>>12))>65280?65280:c)<0?0:c)<<12)/(u=0!==u?u:1)|0,t[f=4*v]=t[f]*h+2048>>12,t[f+1]=t[f+1]*h+2048>>12,t[f+2]=t[f+2]*h+2048>>12)}}},{"glur/mono16":18}],11:[function(t,e,r){e.exports=function(t,e,r,n,i,o){if(!(0===n||i<.5)){i>2&&(i=2);var a=e*r,s=4*a,u=2*a,c=2*a,h=4*Math.max(e,r),A=32,f=0,l=s,p=l+u,g=p+c,d=g+c,m=d+h,v=this.__instance("unsharp_mask",s+u+2*c+h+A,{exp:Math.exp}),y=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(y);var w=v.exports.hsv_v16||v.exports._hsv_v16;w(f,l,e,r),(w=v.exports.blurMono16||v.exports._blurMono16)(l,p,g,d,m,e,r,i),(w=v.exports.unsharp||v.exports._unsharp)(f,f,l,p,e,r,n,o),y.set(new Uint32Array(this.__memory.buffer,0,a))}}},{}],12:[function(t,e,r){e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBAUgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL"},{}],13:[function(t,e,r){var n=100;function i(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}i.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},i.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout((function(){return e.gc()}),n))},i.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter((function(r){return!(e-r.lastUsed>t.idle&&(r.destroy(),1))})),0!==this.available.length?this.timeoutId=setTimeout((function(){return t.gc()}),n):this.timeoutId=0},e.exports=i},{}],14:[function(t,e,r){var n=2;e.exports=function(t,e,r,i,o,a){var s=r/t,u=i/e,c=(2*a+n+1)/o;if(c>.5)return[[r,i]];var h=Math.ceil(Math.log(Math.min(s,u))/Math.log(c));if(h<=1)return[[r,i]];for(var A=[],f=0;f<h;f++){var l=Math.round(Math.pow(Math.pow(t,h-f-1)*Math.pow(r,f+1),1/h)),p=Math.round(Math.pow(Math.pow(e,h-f-1)*Math.pow(i,f+1),1/h));A.push([l,p])}return A}},{}],15:[function(t,e,r){var n=1e-5;function i(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.floor(t)}function o(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.ceil(t)}e.exports=function(t){var e,r,n,a,s,u,c=t.toWidth/t.width,h=t.toHeight/t.height,A=i(t.srcTileSize*c)-2*t.destTileBorder,f=i(t.srcTileSize*h)-2*t.destTileBorder;if(A<1||f<1)throw new Error("Internal error in pica: target tile width/height is too small.");var l,p=[];for(a=0;a<t.toHeight;a+=f)for(n=0;n<t.toWidth;n+=A)(e=n-t.destTileBorder)<0&&(e=0),e+(s=n+A+t.destTileBorder-e)>=t.toWidth&&(s=t.toWidth-e),(r=a-t.destTileBorder)<0&&(r=0),r+(u=a+f+t.destTileBorder-r)>=t.toHeight&&(u=t.toHeight-r),l={toX:e,toY:r,toWidth:s,toHeight:u,toInnerX:n,toInnerY:a,toInnerWidth:A,toInnerHeight:f,offsetX:e/c-i(e/c),offsetY:r/h-i(r/h),scaleX:c,scaleY:h,x:i(e/c),y:i(r/h),width:o(s/c),height:o(u/h)},p.push(l);return p}},{}],16:[function(t,e,r){function n(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=n(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===n(t)},e.exports.isImageBitmap=function(t){return"[object ImageBitmap]"===n(t)},e.exports.limiter=function(t){var e=0,r=[];function n(){e<t&&r.length&&(e++,r.shift()())}return function(t){return new Promise((function(i,o){r.push((function(){t().then((function(t){i(t),e--,n()}),(function(t){o(t),e--,n()}))})),n()}))}},e.exports.cib_quality_name=function(t){switch(t){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},e.exports.cib_support=function(t){return Promise.resolve().then((function(){if("undefined"==typeof createImageBitmap)return!1;var e=t(100,100);return createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then((function(t){var r=10===t.width;return t.close(),e=null,r}))})).catch((function(){return!1}))},e.exports.worker_offscreen_canvas_support=function(){return new Promise((function(t,e){if("undefined"!=typeof OffscreenCanvas){var r=btoa("(".concat(i.toString(),")(self);")),n=new Worker("data:text/javascript;base64,".concat(r));n.onmessage=function(e){return t(e.data)},n.onerror=e}else t(!1);function i(t){"undefined"!=typeof createImageBitmap?Promise.resolve().then((function(){var t=new OffscreenCanvas(10,10);return t.getContext("2d").rect(0,0,1,1),createImageBitmap(t,0,0,1,1)})).then((function(){return t.postMessage(!0)}),(function(){return t.postMessage(!1)})):t.postMessage(!1)}})).then((function(t){return t}),(function(){return!1}))},e.exports.can_use_canvas=function(t){var e=!1;try{var r=t(2,1).getContext("2d"),n=r.createImageData(2,1);n.data[0]=12,n.data[1]=23,n.data[2]=34,n.data[3]=255,n.data[4]=45,n.data[5]=56,n.data[6]=67,n.data[7]=255,r.putImageData(n,0,0),n=null,12===(n=r.getImageData(0,0,2,1)).data[0]&&23===n.data[1]&&34===n.data[2]&&255===n.data[3]&&45===n.data[4]&&56===n.data[5]&&67===n.data[6]&&255===n.data[7]&&(e=!0)}catch(t){}return e},e.exports.cib_can_use_region=function(){return new Promise((function(t){if("undefined"!=typeof createImageBitmap){var e=new Image;e.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",e.onload=function(){createImageBitmap(e,0,0,e.width,e.height).then((function(r){r.width===e.width&&r.height===e.height?t(!0):t(!1)}),(function(){return t(!1)}))},e.onerror=function(){return t(!1)}}else t(!1)}))}},{}],17:[function(t,e,r){e.exports=function(){var e,r=t("./mathlib");onmessage=function(t){var n=t.data.opts,i=!1;if(!n.src&&n.srcBitmap){var o=new OffscreenCanvas(n.width,n.height),a=o.getContext("2d",{alpha:Boolean(n.alpha)});a.drawImage(n.srcBitmap,0,0),n.src=a.getImageData(0,0,n.width,n.height).data,o.width=o.height=0,o=null,n.srcBitmap.close(),n.srcBitmap=null,i=!0}e||(e=new r(t.data.features));var s=e.resizeAndUnsharp(n);if(i){var u=new ImageData(new Uint8ClampedArray(s),n.toWidth,n.toHeight),c=new OffscreenCanvas(n.toWidth,n.toHeight);c.getContext("2d",{alpha:Boolean(n.alpha)}).putImageData(u,0,0),createImageBitmap(c).then((function(t){postMessage({bitmap:t},[t])}))}else postMessage({data:s},[s.buffer])}}},{"./mathlib":1}],18:[function(t,e,r){var n,i,o,a,s,u;function c(t){t<.5&&(t=.5);var e=Math.exp(.527076)/t,r=Math.exp(-e),c=Math.exp(-2*e),h=(1-r)*(1-r)/(1+2*e*r-c);return n=h,i=h*(e-1)*r,o=h*(e+1)*r,a=-h*c,s=2*r,u=-c,new Float32Array([n,i,o,a,s,u,(n+i)/(1-s-u),(o+a)/(1-s-u)])}function h(t,e,r,n,i,o){var a,s,u,c,h,A,f,l,p,g,d,m,v,y;for(p=0;p<o;p++){for(f=p,l=0,c=h=(a=t[A=p*i])*n[6],d=n[0],m=n[1],v=n[4],y=n[5],g=0;g<i;g++)u=(s=t[A])*d+a*m+c*v+h*y,h=c,c=u,a=s,r[l]=c,l++,A++;for(l--,f+=o*(i-1),c=h=(a=t[--A])*n[7],s=a,d=n[2],m=n[3],g=i-1;g>=0;g--)u=s*d+a*m+c*v+h*y,h=c,c=u,a=s,s=t[A],e[f]=r[l]+c,A--,l--,f-=o}}function A(t,e,r,n){if(n){var i=new Uint16Array(t.length),o=new Float32Array(Math.max(e,r)),a=c(n);h(t,i,o,a,e,r),h(i,t,o,a,r,e)}}e.exports=A},{}],19:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],20:[function(t,e,r){var n=t("object-assign"),i=t("./lib/base64decode"),o=t("./lib/wa_detect"),a={js:!0,wasm:!0};function s(t){if(!(this instanceof s))return new s(t);var e=n({},a,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}s.prototype.has_wasm=o,s.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},s.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map((function(e){var r=t.__modules[e];return t.options.wasm&&t.has_wasm()&&r.wasm_fn?t.__wasm[e]?null:WebAssembly.compile(t.__base64decode(r.wasm_src)).then((function(r){t.__wasm[e]=r})):null}))).then((function(){return t})),this.__init_promise},s.prototype.__base64decode=i,s.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e<t&&this.__memory.grow(Math.ceil((t-e)/65536)),this.__memory},s.prototype.__instance=function(t,e,r){if(e&&this.__reallocate(e),!this.__wasm[t]){var i=this.__modules[t];this.__wasm[t]=new WebAssembly.Module(this.__base64decode(i.wasm_src))}if(!this.__cache[t]){var o={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[t]=new WebAssembly.Instance(this.__wasm[t],{env:n(o,r||{})})}return this.__cache[t]},s.prototype.__align=function(t,e){var r=t%(e=e||8);return t+(r?e-r:0)},e.exports=s},{"./lib/base64decode":21,"./lib/wa_detect":22,"object-assign":23}],21:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports=function(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,i=new Uint8Array(3*r>>2),o=0,a=0,s=0;s<r;s++)s%4==0&&s&&(i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=255&o),o=o<<6|n.indexOf(e.charAt(s));var u=r%4*6;return 0===u?(i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=255&o):18===u?(i[a++]=o>>10&255,i[a++]=o>>2&255):12===u&&(i[a++]=o>>4&255),i}},{}],22:[function(t,e,r){var n;e.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t);return 0!==new WebAssembly.Instance(e,{}).exports.test(4)&&(n=!0),n}catch(t){}return n}},{}],23:[function(t,e,r){var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function s(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}e.exports=s()?Object.assign:function(t,e){for(var r,s,u=a(t),c=1;c<arguments.length;c++){for(var h in r=Object(arguments[c]))i.call(r,h)&&(u[h]=r[h]);if(n){s=n(r);for(var A=0;A<s.length;A++)o.call(r,s[A])&&(u[s[A]]=r[s[A]])}}return u}},{}],24:[function(t,e,r){var n=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){for(var r,s=Object.keys(o),u=0,c=s.length;u<c;u++){var h=s[u],A=o[h].exports;if(A===t||A&&A.default===t){r=h;break}}if(!r){r=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var f={};for(u=0,c=s.length;u<c;u++)f[h=s[u]]=h;i[r]=["function(require,module,exports){"+t+"(self); }",f]}var l=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[r]=r,i[l]=["function(require,module,exports){var f = require("+a(r)+");(f.default ? f.default : f)(self);}",p];var g={};function d(t){for(var e in g[t]=!0,i[t][1]){var r=i[t][1][e];g[r]||d(r)}}d(l);var m="("+n+")({"+Object.keys(g).map((function(t){return a(t)+":["+i[t][0]+","+a(i[t][1])+"]"})).join(",")+"},{},["+a(l)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([m],{type:"text/javascript"});if(e&&e.bare)return y;var w=v.createObjectURL(y),_=new Worker(w);return _.objectURL=w,_}},{}],"/index.js":[function(t,e,r){function n(t,e){return u(t)||s(t,e)||o(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}function u(t){if(Array.isArray(t))return t}var c=t("object-assign"),h=t("webworkify"),A=t("./lib/mathlib"),f=t("./lib/pool"),l=t("./lib/utils"),p=t("./lib/worker"),g=t("./lib/stepper"),d=t("./lib/tiler"),m={},v=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(v=navigator.userAgent.indexOf("Safari")>=0)}catch(t){}var y=1;"undefined"!=typeof navigator&&(y=Math.min(navigator.hardwareConcurrency||1,4));var w={tile:1024,concurrency:y,features:["js","wasm","ww"],idle:2e3,createCanvas:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}},_={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},b=!1,I=!1,E=!1,B=!1,x=!1;function C(){return{value:h(p),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function Q(t){if(!(this instanceof Q))return new Q(t);this.options=c({},w,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=m[e]||l.limiter(this.options.concurrency),m[e]||(m[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}Q.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if("undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray)try{new ImageData(new Uint8ClampedArray(400),10,10),b=!0}catch(t){}"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?I=!0:this.debug("ImageBitmap does not support .close(), disabled"));var r=this.options.features.slice();if(r.indexOf("all")>=0&&(r=["cib","wasm","js","ww"]),this.__requested_features=r,this.__mathlib=new A(r),r.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")((function(){})).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));m[n]?this.__workersPool=m[n]:(this.__workersPool=new f(C,this.options.idle),m[n]=this.__workersPool)}catch(t){}var i,o,a=this.__mathlib.init().then((function(t){c(e.features,t.features)}));i=I?l.cib_support(this.options.createCanvas).then((function(t){e.features.cib&&r.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):r.indexOf("cib")>=0&&(e.features.cib=t)})):Promise.resolve(!1),E=l.can_use_canvas(this.options.createCanvas),o=(o=I&&b&&-1!==r.indexOf("ww")?l.worker_offscreen_canvas_support():Promise.resolve(!1)).then((function(t){B=t}));var s=l.cib_can_use_region().then((function(t){x=t}));return this.__initPromise=Promise.all([a,i,o,s]).then((function(){return e})),this.__initPromise},Q.prototype.__invokeResize=function(t,e){var r=this;return e.__mathCache=e.__mathCache||{},Promise.resolve().then((function(){return r.features.ww?new Promise((function(n,i){var o=r.__workersPool.acquire();e.cancelToken&&e.cancelToken.catch((function(t){return i(t)})),o.value.onmessage=function(t){o.release(),t.data.err?i(t.data.err):n(t.data)};var a=[];t.src&&a.push(t.src.buffer),t.srcBitmap&&a.push(t.srcBitmap),o.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},a)})):{data:r.__mathlib.resizeAndUnsharp(t,e.__mathCache)}}))},Q.prototype.__extractTileData=function(t,e,r,n,i){if(this.features.ww&&B&&(l.isCanvas(e)||x))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(n.srcImageBitmap||e,t.x,t.y,t.width,t.height).then((function(t){return i.srcBitmap=t,i}));if(l.isCanvas(e))return n.srcCtx||(n.srcCtx=e.getContext("2d",{alpha:Boolean(r.alpha)})),this.debug("Get tile pixel data"),i.src=n.srcCtx.getImageData(t.x,t.y,t.width,t.height).data,i;this.debug("Draw tile imageBitmap/image to temporary canvas");var o=this.options.createCanvas(t.width,t.height),a=o.getContext("2d",{alpha:Boolean(r.alpha)});return a.globalCompositeOperation="copy",a.drawImage(n.srcImageBitmap||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),this.debug("Get tile pixel data"),i.src=a.getImageData(0,0,t.width,t.height).data,o.width=o.height=0,i},Q.prototype.__landTileData=function(t,e,r){var n;if(this.debug("Convert raw rgba tile result to ImageData"),e.bitmap)return r.toCtx.drawImage(e.bitmap,t.toX,t.toY),null;if(b)n=new ImageData(new Uint8ClampedArray(e.data),t.toWidth,t.toHeight);else if((n=r.toCtx.createImageData(t.toWidth,t.toHeight)).data.set)n.data.set(e.data);else for(var i=n.data.length-1;i>=0;i--)n.data[i]=e.data[i];return this.debug("Draw tile"),v?r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null},Q.prototype.__tileAndResize=function(t,e,r){var n=this,i={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null},o=function(e){return n.__limit((function(){if(r.canceled)return r.cancelToken;var o={width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:r.quality,alpha:r.alpha,unsharpAmount:r.unsharpAmount,unsharpRadius:r.unsharpRadius,unsharpThreshold:r.unsharpThreshold};return n.debug("Invoke resize math"),Promise.resolve(o).then((function(o){return n.__extractTileData(e,t,r,i,o)})).then((function(t){return n.debug("Invoke resize math"),n.__invokeResize(t,r)})).then((function(t){return r.canceled?r.cancelToken:(i.srcImageData=null,n.__landTileData(e,t,i))}))}))};return Promise.resolve().then((function(){if(i.toCtx=e.getContext("2d",{alpha:Boolean(r.alpha)}),l.isCanvas(t))return null;if(l.isImageBitmap(t))return i.srcImageBitmap=t,i.isImageBitmapReused=!0,null;if(l.isImage(t))return I?(n.debug("Decode image via createImageBitmap"),createImageBitmap(t).then((function(t){i.srcImageBitmap=t})).catch((function(t){return null}))):null;throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap')})).then((function(){if(r.canceled)return r.cancelToken;n.debug("Calculate tiles");var t=d({width:r.width,height:r.height,srcTileSize:n.options.tile,toWidth:r.toWidth,toHeight:r.toHeight,destTileBorder:r.__destTileBorder}).map((function(t){return o(t)}));function a(t){t.srcImageBitmap&&(t.isImageBitmapReused||t.srcImageBitmap.close(),t.srcImageBitmap=null)}return n.debug("Process tiles"),Promise.all(t).then((function(){return n.debug("Finished!"),a(i),e}),(function(t){throw a(i),t}))}))},Q.prototype.__processStages=function(t,e,r,i){var o=this;if(i.canceled)return i.cancelToken;var a,s=n(t.shift(),2),u=s[0],h=s[1],A=0===t.length;return i=c({},i,{toWidth:u,toHeight:h,quality:A?i.quality:Math.min(1,i.quality)}),A||(a=this.options.createCanvas(u,h)),this.__tileAndResize(e,A?r:a,i).then((function(){return A?r:(i.width=u,i.height=h,o.__processStages(t,a,r,i))})).then((function(t){return a&&(a.width=a.height=0),t}))},Q.prototype.__resizeViaCreateImageBitmap=function(t,e,r){var n=this,i=e.getContext("2d",{alpha:Boolean(r.alpha)});return this.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:r.toWidth,resizeHeight:r.toHeight,resizeQuality:l.cib_quality_name(r.quality)}).then((function(t){if(r.canceled)return r.cancelToken;if(!r.unsharpAmount)return i.drawImage(t,0,0),t.close(),i=null,n.debug("Finished!"),e;n.debug("Unsharp result");var o=n.options.createCanvas(r.toWidth,r.toHeight),a=o.getContext("2d",{alpha:Boolean(r.alpha)});a.drawImage(t,0,0),t.close();var s=a.getImageData(0,0,r.toWidth,r.toHeight);return n.__mathlib.unsharp_mask(s.data,r.toWidth,r.toHeight,r.unsharpAmount,r.unsharpRadius,r.unsharpThreshold),i.putImageData(s,0,0),o.width=o.height=0,s=a=o=i=null,n.debug("Finished!"),e}))},Q.prototype.resize=function(t,e,r){var n=this;this.debug("Start resize...");var i=c({},_);if(isNaN(r)?r&&(i=c(i,r)):i=c(i,{quality:r}),i.toWidth=e.width,i.toHeight=e.height,i.width=t.naturalWidth||t.width,i.height=t.naturalHeight||t.height,0===e.width||0===e.height)return Promise.reject(new Error("Invalid output size: ".concat(e.width,"x").concat(e.height)));i.unsharpRadius>2&&(i.unsharpRadius=2),i.canceled=!1,i.cancelToken&&(i.cancelToken=i.cancelToken.then((function(t){throw i.canceled=!0,t}),(function(t){throw i.canceled=!0,t})));var o=3;return i.__destTileBorder=Math.ceil(Math.max(o,2.5*i.unsharpRadius|0)),this.init().then((function(){if(i.canceled)return i.cancelToken;if(n.features.cib)return n.__resizeViaCreateImageBitmap(t,e,i);if(!E){var r=new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw r.code="ERR_GET_IMAGE_DATA",r}var o=g(i.width,i.height,i.toWidth,i.toHeight,n.options.tile,i.__destTileBorder);return n.__processStages(o,t,e,i)}))},Q.prototype.resizeBuffer=function(t){var e=this,r=c({},_,t);return this.init().then((function(){return e.__mathlib.resizeAndUnsharp(r)}))},Q.prototype.toBlob=function(t,e,r){return e=e||"image/png",new Promise((function(n){if(t.toBlob)t.toBlob((function(t){return n(t)}),e,r);else if(t.convertToBlob)n(t.convertToBlob({type:e,quality:r}));else{for(var i=atob(t.toDataURL(e,r).split(",")[1]),o=i.length,a=new Uint8Array(o),s=0;s<o;s++)a[s]=i.charCodeAt(s);n(new Blob([a],{type:e}))}}))},Q.prototype.debug=function(){},e.exports=Q},{"./lib/mathlib":1,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":23,webworkify:24}]},{},[])("/index.js")})),u=o((function(t){function e(t,e){var r=new Error(t);return r.code=e,r}function r(t){for(var e=t.toString(16).toUpperCase(),r=2-e.length;r>0;r--)e="0"+e;return"0x"+e}function n(t){try{return decodeURIComponent(escape(t))}catch(e){return t}}function i(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function o(t,r,n){this.input=t.subarray(r,n),this.start=r;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if("II*\0"!==i&&"MM\0*"!==i)throw e("invalid TIFF signature","EBADDATA");this.big_endian="M"===i[0]}o.prototype.each=function(t){this.aborted=!1;var e=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:e}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},o.prototype.filter=function(t){var r={ifd0:{id:0,entries:[]}};this.each((function(e){(!1!==t(e)||e.is_subifd_link)&&(e.is_subifd_link&&1!==e.count&&4!==e.format||(r["ifd"+e.ifd]||(r["ifd"+e.ifd]={id:e.ifd,entries:[]}),r["ifd"+e.ifd].entries.push(e)))})),delete r.ifd1;var n=8;Object.keys(r).forEach((function(t){n+=2,r[t].entries.forEach((function(t){n+=12+(t.data_length>4?2*Math.ceil(t.data_length/2):0)})),n+=4})),this.output=new Uint8Array(n),this.output[0]=this.output[1]=(this.big_endian?"M":"I").charCodeAt(0),this.write_uint16(2,42);var i=8,o=this;if(this.write_uint32(4,i),Object.keys(r).forEach((function(t){r[t].written_offset=i;var e=i,n=e+2+12*r[t].entries.length+4;i=n,o.write_uint16(e,r[t].entries.length),r[t].entries.sort((function(t,e){return t.tag-e.tag})).forEach((function(t,n){var a=e+2+12*n;o.write_uint16(a,t.tag),o.write_uint16(a+2,t.format),o.write_uint32(a+4,t.count),t.is_subifd_link?r["ifd"+t.tag]&&(r["ifd"+t.tag].link_offset=a+8):t.data_length<=4?o.output.set(o.input.subarray(t.data_offset-o.start,t.data_offset-o.start+4),a+8):(o.write_uint32(a+8,i),o.output.set(o.input.subarray(t.data_offset-o.start,t.data_offset-o.start+t.data_length),i),i+=2*Math.ceil(t.data_length/2))}));var a=r["ifd"+(r[t].id+1)];a&&(a.link_offset=n-4)})),Object.keys(r).forEach((function(t){r[t].written_offset&&r[t].link_offset&&o.write_uint32(r[t].link_offset,r[t].written_offset)})),this.output.length!==i)throw e("internal error: incorrect buffer size allocated");return this.output},o.prototype.read_uint16=function(t){var r=this.input;if(t+2>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?256*r[t]+r[t+1]:r[t]+256*r[t+1]},o.prototype.read_uint32=function(t){var r=this.input;if(t+4>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?16777216*r[t]+65536*r[t+1]+256*r[t+2]+r[t+3]:r[t]+256*r[t+1]+65536*r[t+2]+16777216*r[t+3]},o.prototype.write_uint16=function(t,e){var r=this.output;this.big_endian?(r[t]=e>>>8&255,r[t+1]=255&e):(r[t]=255&e,r[t+1]=e>>>8&255)},o.prototype.write_uint32=function(t,e){var r=this.output;this.big_endian?(r[t]=e>>>24&255,r[t+1]=e>>>16&255,r[t+2]=e>>>8&255,r[t+3]=255&e):(r[t]=255&e,r[t+1]=e>>>8&255,r[t+2]=e>>>16&255,r[t+3]=e>>>24&255)},o.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},o.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},o.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));default:return null}},o.prototype.scan_ifd=function(t,r,i){var o=this.read_uint16(r);r+=2;for(var a=0;a<o;a++){var s=this.read_uint16(r),u=this.read_uint16(r+2),c=this.read_uint32(r+4),h=this.exif_format_length(u),A=c*h,f=A<=4?r+8:this.read_uint32(r+8),l=!1;if(f+A>this.input.length)throw e("unexpected EOF","EBADDATA");for(var p=[],g=f,d=0;d<c;d++,g+=h){var m=this.exif_format_read(u,g);if(null===m){p=null;break}p.push(m)}if(Array.isArray(p)&&2===u){try{p=n(String.fromCharCode.apply(null,p))}catch(t){p=null}p&&"\0"===p[p.length-1]&&(p=p.slice(0,-1))}if(this.is_subifd_link(t,s)&&Array.isArray(p)&&Number.isInteger(p[0])&&p[0]>0&&(this.ifds_to_read.push({id:s,offset:p[0]}),l=!0),!1===i({is_big_endian:this.big_endian,ifd:t,tag:s,format:u,count:c,entry_offset:r+this.start,data_length:A,data_offset:f+this.start,value:p,is_subifd_link:l}))return void(this.aborted=!0);r+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(r)})},t.exports.is_jpeg=function(t){return t.length>=4&&255===t[0]&&216===t[1]&&255===t[2]},t.exports.jpeg_segments_each=function(n,o){if(!i(n))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof o)throw e("Invalid argument (on_segment), Function expected","EINVAL");if(!t.exports.is_jpeg(n))throw e("Unknown file format","ENOTJPEG");for(var a=0,s=n.length,u=!1;;){var c,h;if(a+1>=s)throw e("Unexpected EOF","EBADDATA");var A=n[a],f=n[a+1];if(255===A&&255===f)c=255,h=1;else if(255===A&&0!==f){if(h=2,208<=(c=f)&&c<=217||1===c);else{if(a+3>=s)throw e("Unexpected EOF","EBADDATA");if((h+=256*n[a+2]+n[a+3])<2)throw e("Invalid segment length","EBADDATA");if(a+h-1>=s)throw e("Unexpected EOF","EBADDATA")}u&&(c>=208&&c<=215||(u=!1)),218===c&&(u=!0)}else{if(!u)throw e("Unexpected byte at segment start: "+r(A)+" (offset "+r(a)+")","EBADDATA");for(var l=a+1;;l++){if(l>=s)throw e("Unexpected EOF","EBADDATA");if(255===n[l]){if(l+1>=s)throw e("Unexpected EOF","EBADDATA");if(0!==n[l+1]){c=0,h=l-a;break}}}}if(!1===o({code:c,offset:a,length:h}))break;if(217===c)break;a+=h}},t.exports.jpeg_segments_filter=function(r,n){if(!i(r))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof n)throw e("Invalid argument (on_segment), Function expected","EINVAL");var o=[],a=0;t.exports.jpeg_segments_each(r,(function(t){var e=n(t);if(i(e))o.push({data:e}),a+=e.length;else if(Array.isArray(e))e.filter(i).forEach((function(t){o.push({data:t}),a+=t.length}));else if(!1!==e){var r={start:t.offset,end:t.offset+t.length};o.length>0&&o[o.length-1].end===r.start?o[o.length-1].end=r.end:o.push(r),a+=t.length}}));var s=new Uint8Array(a),u=0;return o.forEach((function(t){var e=t.data||r.subarray(t.start,t.end);s.set(e,u),u+=e.length})),s},t.exports.jpeg_exif_tags_each=function(r,n){if(!i(r))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof n)throw e("Invalid argument (on_exif_entry), Function expected","EINVAL");t.exports.jpeg_segments_each(r,(function(t){return 218!==t.code&&(225===t.code&&t.length>=10&&69===r[t.offset+4]&&120===r[t.offset+5]&&105===r[t.offset+6]&&102===r[t.offset+7]&&0===r[t.offset+8]&&0===r[t.offset+9]?(new o(r,t.offset+10,t.offset+t.length).each(n),!1):void 0)}))},t.exports.jpeg_exif_tags_filter=function(r,n){if(!i(r))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof n)throw e("Invalid argument (on_exif_entry), Function expected","EINVAL");var a=!1;return t.exports.jpeg_segments_filter(r,(function(t){if(!a&&(218===t.code&&(a=!0),225===t.code&&t.length>=10&&69===r[t.offset+4]&&120===r[t.offset+5]&&105===r[t.offset+6]&&102===r[t.offset+7]&&0===r[t.offset+8]&&0===r[t.offset+9])){var e=new o(r,t.offset+10,t.offset+t.length).filter(n);if(!e)return!1;var i=new Uint8Array(10);return i.set(r.slice(t.offset,t.offset+10)),i[2]=e.length+8>>>8&255,i[3]=e.length+8&255,a=!0,[i,e]}}))},t.exports.jpeg_add_comment=function(e,r){var n=!1,i=0;return t.exports.jpeg_segments_filter(e,(function(t){if(!(1===++i&&216===t.code||2===i&&224===t.code||n)){r=function(t){try{return unescape(encodeURIComponent(t))}catch(e){return t}}(r);var o=new Uint8Array(5+r.length),a=0;return o[a++]=255,o[a++]=254,o[a++]=r.length+3>>>8&255,o[a++]=r.length+3&255,r.split("").forEach((function(t){o[a++]=255&t.charCodeAt(0)})),o[a++]=0,n=!0,[o,e.subarray(t.offset,t.offset+t.length)]}}))}}));function c(t){return this._getUint8Array(t.blob).then((function(e){if(t.is_jpeg=u.is_jpeg(e),!t.is_jpeg)return Promise.resolve(t);t.orig_blob=t.blob;try{var r,n;if(u.jpeg_exif_tags_each(e,(function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t.orientation=e.value[0]||1,r=e.is_big_endian,n=e.data_offset,!1})),n){var i=r?new Uint8Array([0,1]):new Uint8Array([1,0]);t.blob=new Blob([e.slice(0,n),i,e.slice(n+2)],{type:"image/jpeg"})}}catch(t){}return t}))}function h(t){if(!t.is_jpeg)return Promise.resolve(t);var e,r=t.orientation-1;if(!r)return Promise.resolve(t);var n=(e=4&r?this.pica.options.createCanvas(t.out_canvas.height,t.out_canvas.width):this.pica.options.createCanvas(t.out_canvas.width,t.out_canvas.height)).getContext("2d");return n.save(),1&r&&n.transform(-1,0,0,1,e.width,0),2&r&&n.transform(-1,0,0,-1,e.width,e.height),4&r&&n.transform(0,1,1,0,0,0),n.drawImage(t.out_canvas,0,0),n.restore(),t.out_canvas.width=t.out_canvas.height=0,t.out_canvas=e,Promise.resolve(t)}function A(t){return t.is_jpeg?Promise.all([this._getUint8Array(t.blob),this._getUint8Array(t.out_blob)]).then((function(e){var r=e[0],n=e[1];if(!u.is_jpeg(r))return Promise.resolve(t);var i=[];return u.jpeg_segments_each(r,(function(t){if(218===t.code)return!1;i.push(t)})),i=i.filter((function(t){return 226!==t.code&&(t.code>=224&&t.code<240||254===t.code)})).map((function(t){return r.slice(t.offset,t.offset+t.length)})),t.out_blob=new Blob([n.slice(0,2)].concat(i).concat([n.slice(20)]),{type:"image/jpeg"}),t})):Promise.resolve(t)}var f={jpeg_patch_exif:c,jpeg_rotate_canvas:h,jpeg_attach_orig_segments:A,assign:function(t){t.before("_blob_to_image",c),t.after("_transform",h),t.after("_create_blob",A)}};function l(t){if(!(this instanceof l))return new l(t);t=t||{},this.pica=t.pica||s({}),this.initialized=!1,this.utils=i}l.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},l.prototype.init=function(){this.use(f.assign)},l.prototype.toBlob=function(t,e){var r={blob:t,opts:i.assign({max:1/0},e)};return this.initialized||(this.init(),this.initialized=!0),Promise.resolve(r).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then(this._create_blob).then((function(t){return t.out_canvas.width=t.out_canvas.height=0,t.out_blob}))},l.prototype.toCanvas=function(t,e){var r={blob:t,opts:i.assign({max:1/0},e)};return this.initialized||(this.init(),this.initialized=!0),Promise.resolve(r).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then((function(t){return t.out_canvas}))},l.prototype.before=function(t,e){if(!this[t])throw new Error('Method "'+t+'" does not exist');if("function"!=typeof e)throw new Error('Invalid argument "fn", function expected');var r=this[t],n=this;return this[t]=function(t){return e.call(n,t).then((function(t){return r.call(n,t)}))},this},l.prototype.after=function(t,e){if(!this[t])throw new Error('Method "'+t+'" does not exist');if("function"!=typeof e)throw new Error('Invalid argument "fn", function expected');var r=this[t],n=this;return this[t]=function(t){return r.call(n,t).then((function(t){return e.call(n,t)}))},this},l.prototype._blob_to_image=function(t){var e=window.URL||window.webkitURL||window.mozURL||window.msURL;return t.image=document.createElement("img"),t.image_url=e.createObjectURL(t.blob),t.image.src=t.image_url,new Promise((function(e,r){t.image.onerror=function(){r(new Error("ImageBlobReduce: failed to create Image() from blob"))},t.image.onload=function(){e(t)}}))},l.prototype._calculate_size=function(t){var e=t.opts.max/Math.max(t.image.width,t.image.height);return e>1&&(e=1),t.transform_width=Math.max(Math.round(t.image.width*e),1),t.transform_height=Math.max(Math.round(t.image.height*e),1),t.scale_factor=e,Promise.resolve(t)},l.prototype._transform=function(t){t.out_canvas=this.pica.options.createCanvas(t.transform_width,t.transform_height),t.transform_width=null,t.transform_height=null;var e={alpha:"image/png"===t.blob.type};return this.utils.assign(e,this.utils.pick_pica_resize_options(t.opts)),this.pica.resize(t.image,t.out_canvas,e).then((function(){return t}))},l.prototype._cleanup=function(t){t.image.src="",t.image=null;var e=window.URL||window.webkitURL||window.mozURL||window.msURL;return e.revokeObjectURL&&e.revokeObjectURL(t.image_url),t.image_url=null,Promise.resolve(t)},l.prototype._create_blob=function(t){return this.pica.toBlob(t.out_canvas,t.blob.type).then((function(e){return t.out_blob=e,t}))},l.prototype._getUint8Array=function(t){return t.arrayBuffer?t.arrayBuffer().then((function(t){return new Uint8Array(t)})):new Promise((function(e,r){var n=new FileReader;n.readAsArrayBuffer(t),n.onload=function(){e(new Uint8Array(n.result))},n.onerror=function(){r(new Error("ImageBlobReduce: failed to load data from input blob")),n.abort()},n.onabort=function(){r(new Error("ImageBlobReduce: failed to load data from input blob (aborted)"))}}))},l.pica=s;var p=l;e.default=p},9521:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return a}});var n=r(6655),i=r(8950);function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new B(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=A(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function A(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function l(){}function p(){}function g(){}var d={};c(d,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==e&&r.call(v,a)&&(d=v);var y=g.prototype=l.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function i(o,a,s,u){var c=A(t[o],t,a);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==(0,n.Z)(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):e.resolve(f).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=A(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function x(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=g,c(y,"constructor",g),c(g,"constructor",p),p.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new _(h(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),c(y,u,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var a=function(){var t=(0,i.Z)(o().mark((function t(){var e,r=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:[{}],t.abrupt("return",(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((function(t,r){var n=document.createElement("input");n.type="file",n.webkitdirectory=!0;var i=function(e){"function"==typeof o&&o(),t(e)},o=e[0].legacySetup&&e[0].legacySetup(i,(function(){return o(r)}),n);n.addEventListener("change",(function(){var t=Array.from(n.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter((function(t){return t.webkitRelativePath.split("/").every((function(t){return!e[0].skipDirectory({name:t,kind:"directory"})}))}))):t=t.filter((function(t){return 2===t.webkitRelativePath.split("/").length})),i(t)})),n.click()}))));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},6474:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return c}});var n=r(6655),i=r(1930),o=r(8950);function a(){a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new B(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=A(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function A(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function l(){}function p(){}function g(){}var d={};c(d,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==e&&r.call(v,o)&&(d=v);var y=g.prototype=l.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function i(o,a,s,u){var c=A(t[o],t,a);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==(0,n.Z)(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):e.resolve(f).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=A(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=g,c(y,"constructor",g),c(g,"constructor",p),p.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new _(h(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),c(y,u,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function s(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return(s=function(t){this.s=t,this.n=t.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s.return;return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new s(t)}var u=function(){var t=(0,o.Z)(a().mark((function t(e,r){var n,o,c,h,A,f,l,p,g,d,m=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=m.length>2&&void 0!==m[2]?m[2]:e.name,o=m.length>3?m[3]:void 0,c=[],h=[],f=!1,l=!1,t.prev=4,p=function(){var t=g.value,i="".concat(n,"/").concat(t.name);"file"===t.kind?h.push(t.getFile().then((function(r){return r.directoryHandle=e,r.handle=t,Object.defineProperty(r,"webkitRelativePath",{configurable:!0,enumerable:!0,get:function(){return i}})}))):"directory"!==t.kind||!r||o&&o(t)||c.push(u(t,r,i,o))},d=function(t){var e,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(e=t[r]))return e.call(t);if(n&&null!=(e=t[n]))return new s(e.call(t));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}(e.values());case 7:return t.next=9,d.next();case 9:if(!(f=!(g=t.sent).done)){t.next=14;break}p();case 11:f=!1,t.next=7;break;case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(4),l=!0,A=t.t0;case 19:if(t.prev=19,t.prev=20,t.t1=f&&null!=d.return,!t.t1){t.next=25;break}return t.next=25,d.return();case 25:if(t.prev=25,!l){t.next=28;break}throw A;case 28:return t.finish(25);case 29:return t.finish(19);case 30:return t.t2=[],t.t3=i.Z,t.next=34,Promise.all(c);case 34:return t.t4=t.sent.flat(),t.t5=(0,t.t3)(t.t4),t.t6=i.Z,t.next=39,Promise.all(h);case 39:return t.t7=t.sent,t.t8=(0,t.t6)(t.t7),t.abrupt("return",t.t2.concat.call(t.t2,t.t5,t.t8));case 42:case"end":return t.stop()}}),t,null,[[4,16,19,30],[20,,25,29]])})));return function(e,r){return t.apply(this,arguments)}}(),c=function(){var t=(0,o.Z)(a().mark((function t(){var e,r,n=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=n.length>0&&void 0!==n[0]?n[0]:{}).recursive=e.recursive||!1,t.next=4,window.showDirectoryPicker({id:e.id,startIn:e.startIn});case 4:return r=t.sent,t.abrupt("return",u(r,e.recursive,void 0,e.skipDirectory));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},2254:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return s}});var n=r(6655),i=r(8950);function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new B(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=A(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function A(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function l(){}function p(){}function g(){}var d={};c(d,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==e&&r.call(v,a)&&(d=v);var y=g.prototype=l.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function i(o,a,s,u){var c=A(t[o],t,a);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==(0,n.Z)(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):e.resolve(f).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=A(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function x(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=g,c(y,"constructor",g),c(g,"constructor",p),p.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new _(h(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),c(y,u,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var a=function(){var t=(0,i.Z)(o().mark((function t(e){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getFile();case 2:return r=t.sent,t.abrupt("return",(r.handle=e,r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),s=function(){var t=(0,i.Z)(o().mark((function t(){var e,r,n,i,s=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=s.length>0&&void 0!==s[0]?s[0]:[{}],Array.isArray(e)||(e=[e]),r=[],e.forEach((function(t,e){r[e]={description:t.description||"",accept:{}},t.mimeTypes?t.mimeTypes.map((function(n){r[e].accept[n]=t.extensions||[]})):r[e].accept["*/*"]=t.extensions||[]})),t.next=6,window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:r,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1});case 6:return n=t.sent,t.next=9,Promise.all(n.map(a));case 9:return i=t.sent,t.abrupt("return",e[0].multiple?i:i[0]);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},3499:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return s}});var n=r(6655),i=r(1930),o=r(8950);function a(){a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new B(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=A(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function A(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function l(){}function p(){}function g(){}var d={};c(d,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==e&&r.call(v,o)&&(d=v);var y=g.prototype=l.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function i(o,a,s,u){var c=A(t[o],t,a);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==(0,n.Z)(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):e.resolve(f).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=A(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=g,c(y,"constructor",g),c(g,"constructor",p),p.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new _(h(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),c(y,u,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var s=function(){var t=(0,o.Z)(a().mark((function t(){var e,r=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:[{}],t.abrupt("return",(Array.isArray(e)||(e=[e]),new Promise((function(t,r){var n=document.createElement("input");n.type="file";var o=[].concat((0,i.Z)(e.map((function(t){return t.mimeTypes||[]}))),(0,i.Z)(e.map((function(t){return t.extensions||[]})))).join();n.multiple=e[0].multiple||!1,n.accept=o||"";var a=function(e){"function"==typeof s&&s(),t(e)},s=e[0].legacySetup&&e[0].legacySetup(a,(function(){return s(r)}),n);n.addEventListener("change",(function(){a(n.multiple?Array.from(n.files):n.files[0])})),n.click()}))));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},6281:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return a}});var n=r(6655),i=r(8950);function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new B(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=A(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function A(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function l(){}function p(){}function g(){}var d={};c(d,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==e&&r.call(v,a)&&(d=v);var y=g.prototype=l.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function i(o,a,s,u){var c=A(t[o],t,a);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==(0,n.Z)(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):e.resolve(f).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=A(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function x(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=g,c(y,"constructor",g),c(g,"constructor",p),p.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new _(h(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),c(y,u,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var a=function(){var t=(0,i.Z)(o().mark((function t(e){var r,n,a,s,u,c=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:{},Array.isArray(r)&&(r=r[0]),n=document.createElement("a"),a=e,t.t0="body"in e,!t.t0){t.next=9;break}return t.next=8,function(){var t=(0,i.Z)(o().mark((function t(e,r){var n,a,s,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getReader(),a=new ReadableStream({start:function(t){return function(){var e=(0,i.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.read().then((function(e){var n=e.done,i=e.value;if(!n)return t.enqueue(i),r();t.close()})));case 1:case"end":return e.stop()}}),e)})));function r(){return e.apply(this,arguments)}return r}()()}}),s=new Response(a),t.next=5,s.blob();case 5:return u=t.sent,t.abrupt("return",(n.releaseLock(),new Blob([u],{type:r})));case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()(e.body,e.headers.get("content-type"));case 8:a=t.sent;case 9:return n.download=r.fileName||"Untitled",t.t1=URL,t.next=13,a;case 13:return t.t2=t.sent,n.href=t.t1.createObjectURL.call(t.t1,t.t2),s=function(){"function"==typeof u&&u()},u=r.legacySetup&&r.legacySetup(s,(function(){return u(reject)}),n),t.abrupt("return",(n.addEventListener("click",(function(){setTimeout((function(){return URL.revokeObjectURL(n.href)}),3e4),s()})),n.click(),null));case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},9475:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return a}});var n=r(6655),i=r(8950);function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new B(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=A(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function A(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function l(){}function p(){}function g(){}var d={};c(d,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==e&&r.call(v,a)&&(d=v);var y=g.prototype=l.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function i(o,a,s,u){var c=A(t[o],t,a);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==(0,n.Z)(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):e.resolve(f).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=A(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function x(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=g,c(y,"constructor",g),c(g,"constructor",p),p.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new _(h(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),c(y,u,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var a=function(){var t=(0,i.Z)(o().mark((function t(e){var r,n,i,a,s,u,c,h,A,f=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=f.length>1&&void 0!==f[1]?f[1]:[{}],n=f.length>2&&void 0!==f[2]?f[2]:null,i=f.length>3&&void 0!==f[3]&&f[3],a=f.length>4&&void 0!==f[4]?f[4]:null,Array.isArray(r)||(r=[r]),r[0].fileName=r[0].fileName||"Untitled",s=[],u=null,e instanceof Blob&&e.type?u=e.type:e.headers&&e.headers.get("content-type")&&(u=e.headers.get("content-type")),r.forEach((function(t,e){s[e]={description:t.description||"",accept:{}},t.mimeTypes?(0===e&&u&&t.mimeTypes.push(u),t.mimeTypes.map((function(r){s[e].accept[r]=t.extensions||[]}))):u&&(s[e].accept[u]=t.extensions||[])})),!n){t.next=17;break}return t.prev=8,t.next=11,n.getFile();case 11:t.next=17;break;case 13:if(t.prev=13,t.t0=t.catch(8),n=null,!i){t.next=17;break}throw t.t0;case 17:if(t.t1=n,t.t1){t.next=22;break}return t.next=21,window.showSaveFilePicker({suggestedName:r[0].fileName,id:r[0].id,startIn:r[0].startIn,types:s,excludeAcceptAllOption:r[0].excludeAcceptAllOption||!1});case 21:t.t1=t.sent;case 22:return c=t.t1,!n&&a&&a(),t.next=26,c.createWritable();case 26:if(h=t.sent,!("stream"in e)){t.next=32;break}return A=e.stream(),t.next=31,A.pipeTo(h);case 31:return t.abrupt("return",c);case 32:if(!("body"in e)){t.next=38;break}return t.next=35,e.body.pipeTo(h);case 35:t.t2=c,t.next=47;break;case 38:return t.t3=h,t.next=41,e;case 41:return t.t4=t.sent,t.next=44,t.t3.write.call(t.t3,t.t4);case 44:return t.next=46,h.close();case 46:t.t2=c;case 47:return t.abrupt("return",t.t2);case 48:case"end":return t.stop()}}),t,null,[[8,13]])})));return function(e){return t.apply(this,arguments)}}()}}]);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
|
|
9
|
-
pica
|
|
10
|
-
https://github.com/nodeca/pica
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|