filepond 5.0.0-beta.2 → 5.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -4
- package/cdn/assets/index.js +1 -1
- package/cdn/dev/index.js +1 -0
- package/cdn/extensions/blob-loader.js +1 -1
- package/cdn/extensions/canvas-loader.js +1 -1
- package/cdn/extensions/chunked-upload-store.js +1 -1
- package/cdn/extensions/clipboard-source.js +1 -1
- package/cdn/extensions/console-view.js +1 -1
- package/cdn/extensions/data-transfer-loader.js +1 -1
- package/cdn/extensions/data-url-store.js +1 -1
- package/cdn/extensions/drag-drop-source.js +1 -1
- package/cdn/extensions/dropbox-source.js +1 -1
- package/cdn/extensions/entry-list-view.js +1 -1
- package/cdn/extensions/file-extension-validator.js +1 -1
- package/cdn/extensions/file-input-source.js +1 -1
- package/cdn/extensions/file-input-store.js +1 -1
- package/cdn/extensions/file-mime-type-validator.js +1 -1
- package/cdn/extensions/file-name-transform.js +1 -1
- package/cdn/extensions/file-name-validator.js +1 -1
- package/cdn/extensions/file-size-validator.js +1 -1
- package/cdn/extensions/form-post-store.js +1 -1
- package/cdn/extensions/image-bitmap-transform.js +1 -0
- package/cdn/extensions/index.js +1 -1
- package/cdn/extensions/list-count-validator.js +1 -1
- package/cdn/extensions/list-size-validator.js +1 -1
- package/cdn/extensions/media-resolution-validator.js +1 -1
- package/cdn/extensions/object-url-store.js +1 -1
- package/cdn/extensions/simulated-loader.js +1 -1
- package/cdn/extensions/simulated-store.js +1 -1
- package/cdn/extensions/text-input-store.js +1 -1
- package/cdn/extensions/url-loader.js +1 -1
- package/cdn/extensions/value-callback-store.js +1 -1
- package/cdn/index.js +1 -7
- package/cdn/locales/ar-ar.js +72 -48
- package/cdn/locales/bn-bd.js +72 -48
- package/cdn/locales/cs-cz.js +83 -59
- package/cdn/locales/da-dk.js +74 -50
- package/cdn/locales/de-de.js +72 -42
- package/cdn/locales/el-gr.js +72 -48
- package/cdn/locales/en-gb.js +85 -62
- package/cdn/locales/es-es.js +69 -39
- package/cdn/locales/fi-fi.js +69 -45
- package/cdn/locales/fr-fr.js +78 -48
- package/cdn/locales/hi-in.js +72 -42
- package/cdn/locales/hu-hu.js +66 -42
- package/cdn/locales/index.js +1 -1
- package/cdn/locales/is-is.js +71 -47
- package/cdn/locales/it-it.js +73 -43
- package/cdn/locales/ja-jp.js +72 -42
- package/cdn/locales/ko-kr.js +72 -42
- package/cdn/locales/nb-no.js +74 -44
- package/cdn/locales/nl-nl.js +71 -48
- package/cdn/locales/pl-pl.js +76 -52
- package/cdn/locales/pt-pt.js +71 -41
- package/cdn/locales/sv-se.js +73 -43
- package/cdn/locales/tr-tr.js +83 -59
- package/cdn/locales/uk-ua.js +72 -48
- package/cdn/locales/vi-vn.js +82 -58
- package/cdn/locales/zh-cn.js +72 -42
- package/cdn/main.js +7 -0
- package/cdn/templates/entry.js +1 -1
- package/cdn/templates/helpers.js +1 -1
- package/cdn/templates/index.js +1 -1
- package/cdn/templates/media.js +1 -1
- package/cdn/workers/httpRequest.js +45 -0
- package/cdn/workers/httpRequestWorker.js +37 -0
- package/cdn/workers/readFile.js +14 -0
- package/cdn/workers/readFileWorker.js +6 -0
- package/cdn/workers/transformImage.js +16 -0
- package/cdn/workers/transformImageWorker.js +8 -0
- package/esm/assets/index.js +1 -1
- package/esm/common/console.js +1 -1
- package/esm/common/entry.js +1 -1
- package/esm/common/perceivedPerformanceProxy.js +1 -1
- package/esm/common/readEntriesFromDataTransfer.js +1 -1
- package/esm/common/ssr.js +1 -1
- package/esm/common/status.js +1 -1
- package/esm/core/entryTree.js +142 -133
- package/esm/core/extensionManager.js +89 -86
- package/esm/core/taskScheduler.js +78 -97
- package/esm/dev/index.js +122 -0
- package/esm/elements/FilePondDefault/index.css.js +2 -2
- package/esm/elements/FilePondDefault/index.js +164 -125
- package/esm/elements/FilePondDropArea/index.css.js +1 -1
- package/esm/elements/FilePondDropArea/index.js +1 -1
- package/esm/elements/FilePondDropArea/index.svelte.js +38 -40
- package/esm/elements/FilePondDropIndicator/index.css.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.svelte.js +65 -67
- package/esm/elements/FilePondEntryList/components/Entry/index.css.js +2 -2
- package/esm/elements/FilePondEntryList/components/Entry/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/Entry/index.svelte.js +37 -37
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.css.js +2 -2
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.js +1 -2
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.svelte.js +115 -86
- package/esm/elements/FilePondEntryList/components/EntryList/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryList/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryList/index.svelte.js +159 -154
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.js +1 -2
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.svelte.js +70 -46
- package/esm/elements/FilePondEntryList/components/EntryListItemPlaceholder/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.js +1 -2
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.svelte.js +62 -62
- package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRenderer.svelte.js +65 -60
- package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRendererCache.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.js +2 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.svelte.js +91 -83
- package/esm/elements/FilePondEntryList/components/MediaPane/index.css.js +2 -2
- package/esm/elements/FilePondEntryList/components/MediaPane/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaPane/index.svelte.js +33 -35
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.svelte.js +88 -88
- package/esm/elements/FilePondEntryList/contexts/appContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/dragContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/dropContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/entryContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/springElementTreeContext.js +1 -1
- package/esm/elements/FilePondEntryList/index.css.js +2 -2
- package/esm/elements/FilePondEntryList/index.js +11 -14
- package/esm/elements/FilePondEntryList/index.svelte.js +351 -271
- package/esm/elements/FilePondInput/index.css.js +3 -3
- package/esm/elements/FilePondInput/index.js +252 -191
- package/esm/elements/FilePondSvelteComponent/index.svelte.js +11 -11
- package/esm/elements/attachments/dragarea.js +62 -63
- package/esm/elements/attachments/droparea.js +1 -1
- package/esm/elements/attachments/measurable.js +1 -1
- package/esm/elements/attachments/resizable.js +1 -1
- package/esm/elements/attachments/transitions.js +1 -1
- package/esm/elements/common/animationGuard.js +1 -1
- package/esm/elements/common/animationPreference.svelte.js +35 -41
- package/esm/elements/common/dragDrop.js +1 -1
- package/esm/elements/common/event.js +1 -1
- package/esm/elements/common/extendStyles.js +1 -1
- package/esm/elements/common/getClosestElement.js +1 -1
- package/esm/elements/common/html.js +4 -4
- package/esm/elements/common/nodeTree.js +9 -9
- package/esm/elements/common/store.svelte.js +1 -1
- package/esm/elements/common/string.js +75 -55
- package/esm/elements/common/transition.js +1 -1
- package/esm/elements/components/BooleanInput/index.css.js +1 -1
- package/esm/elements/components/BooleanInput/index.js +1 -1
- package/esm/elements/components/BooleanInput/index.svelte.js +31 -33
- package/esm/elements/components/Button/index.css.js +2 -2
- package/esm/elements/components/Button/index.js +1 -1
- package/esm/elements/components/Button/index.svelte.js +49 -49
- package/esm/elements/components/ElementPane/index.css.js +1 -1
- package/esm/elements/components/ElementPane/index.js +1 -1
- package/esm/elements/components/ElementPane/index.svelte.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.css.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.svelte.js +1 -1
- package/esm/elements/components/FilenameInput/index.css.js +2 -2
- package/esm/elements/components/FilenameInput/index.js +1 -1
- package/esm/elements/components/FilenameInput/index.svelte.js +1 -1
- package/esm/elements/components/NodeList/index.svelte.js +174 -200
- package/esm/elements/components/ProgressIndicator/index.css.js +2 -2
- package/esm/elements/components/ProgressIndicator/index.js +1 -1
- package/esm/elements/components/ProgressIndicator/index.svelte.js +98 -124
- package/esm/elements/components/RangeInput/index.css.js +2 -2
- package/esm/elements/components/RangeInput/index.js +1 -1
- package/esm/elements/components/RangeInput/index.svelte.js +86 -85
- package/esm/elements/components/SpringElement/index.svelte.js +91 -90
- package/esm/elements/components/TextInput/index.css.js +1 -1
- package/esm/elements/components/TextInput/index.js +1 -1
- package/esm/elements/components/TextInput/index.svelte.js +25 -27
- package/esm/extensions/blob-loader.js +1 -1
- package/esm/extensions/canvas-loader.js +1 -1
- package/esm/extensions/chunked-upload-store.js +1 -1
- package/esm/extensions/clipboard-source.js +1 -1
- package/esm/extensions/common/createExtension.js +38 -37
- package/esm/extensions/common/createStoreExtension.js +1 -1
- package/esm/extensions/common/createTransformExtension.js +1 -1
- package/esm/extensions/common/createValidatorExtension.js +1 -1
- package/esm/extensions/console-view.js +36 -33
- package/esm/extensions/data-transfer-loader.js +1 -1
- package/esm/extensions/data-url-store.js +24 -19
- package/esm/extensions/drag-drop-source.js +1 -1
- package/esm/extensions/dropbox-source.js +1 -1
- package/esm/extensions/entry-list-view.js +35 -29
- package/esm/extensions/file-extension-validator.js +1 -1
- package/esm/extensions/file-input-source.js +1 -1
- package/esm/extensions/file-input-store.js +1 -1
- package/esm/extensions/file-mime-type-validator.js +21 -17
- package/esm/extensions/file-name-transform.js +1 -1
- package/esm/extensions/file-name-validator.js +1 -1
- package/esm/extensions/file-size-validator.js +33 -22
- package/esm/extensions/form-post-store.js +1 -1
- package/esm/extensions/image-bitmap-transform.js +109 -0
- package/esm/extensions/index.js +23 -21
- package/esm/extensions/list-count-validator.js +21 -21
- package/esm/extensions/list-size-validator.js +42 -31
- package/esm/extensions/media-resolution-validator.js +57 -47
- package/esm/extensions/object-url-store.js +1 -1
- package/esm/extensions/simulated-loader.js +74 -65
- package/esm/extensions/simulated-store.js +1 -1
- package/esm/extensions/text-input-store.js +1 -1
- package/esm/extensions/url-loader.js +74 -71
- package/esm/extensions/value-callback-store.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locales/ar-ar.js +72 -48
- package/esm/locales/bn-bd.js +72 -48
- package/esm/locales/cs-cz.js +83 -59
- package/esm/locales/da-dk.js +74 -50
- package/esm/locales/de-de.js +72 -42
- package/esm/locales/el-gr.js +72 -48
- package/esm/locales/en-gb.js +85 -62
- package/esm/locales/es-es.js +69 -39
- package/esm/locales/fi-fi.js +69 -45
- package/esm/locales/fr-fr.js +78 -48
- package/esm/locales/hi-in.js +72 -42
- package/esm/locales/hu-hu.js +66 -42
- package/esm/locales/index.js +1 -1
- package/esm/locales/is-is.js +71 -47
- package/esm/locales/it-it.js +73 -43
- package/esm/locales/ja-jp.js +72 -42
- package/esm/locales/ko-kr.js +72 -42
- package/esm/locales/nb-no.js +74 -44
- package/esm/locales/nl-nl.js +71 -48
- package/esm/locales/pl-pl.js +76 -52
- package/esm/locales/pt-pt.js +71 -41
- package/esm/locales/sv-se.js +73 -43
- package/esm/locales/tr-tr.js +83 -59
- package/esm/locales/uk-ua.js +72 -48
- package/esm/locales/vi-vn.js +82 -58
- package/esm/locales/zh-cn.js +72 -42
- package/esm/svelte/svelte/src/constants.js +13 -12
- package/esm/svelte/svelte/src/internal/client/constants.js +29 -24
- package/esm/svelte/svelte/src/internal/client/context.js +33 -28
- package/esm/svelte/svelte/src/internal/client/dom/blocks/boundary.js +185 -126
- package/esm/svelte/svelte/src/internal/client/dom/blocks/branches.js +42 -43
- package/esm/svelte/svelte/src/internal/client/dom/blocks/each.js +175 -150
- package/esm/svelte/svelte/src/internal/client/dom/blocks/html.js +55 -32
- package/esm/svelte/svelte/src/internal/client/dom/blocks/if.js +12 -12
- package/esm/svelte/svelte/src/internal/client/dom/blocks/svelte-element.js +17 -17
- package/esm/svelte/svelte/src/internal/client/dom/elements/attributes.js +111 -113
- package/esm/svelte/svelte/src/internal/client/dom/elements/bindings/this.js +29 -16
- package/esm/svelte/svelte/src/internal/client/dom/elements/events.js +65 -60
- package/esm/svelte/svelte/src/internal/client/dom/elements/transitions.js +54 -54
- package/esm/svelte/svelte/src/internal/client/dom/operations.js +30 -22
- package/esm/svelte/svelte/src/internal/client/dom/reconciler.js +19 -4
- package/esm/svelte/svelte/src/internal/client/error-handling.js +17 -17
- package/esm/svelte/svelte/src/internal/client/errors.js +24 -20
- package/esm/svelte/svelte/src/internal/client/proxy.js +1 -1
- package/esm/svelte/svelte/src/internal/client/reactivity/async.js +60 -40
- package/esm/svelte/svelte/src/internal/client/reactivity/batch.js +273 -236
- package/esm/svelte/svelte/src/internal/client/reactivity/deriveds.js +110 -84
- package/esm/svelte/svelte/src/internal/client/reactivity/effects.js +160 -157
- package/esm/svelte/svelte/src/internal/client/reactivity/props.js +2 -1
- package/esm/svelte/svelte/src/internal/client/reactivity/sources.js +69 -70
- package/esm/svelte/svelte/src/internal/client/reactivity/status.js +12 -0
- package/esm/svelte/svelte/src/internal/client/reactivity/utils.js +16 -0
- package/esm/svelte/svelte/src/internal/client/render.js +68 -64
- package/esm/svelte/svelte/src/internal/client/runtime.js +174 -170
- package/esm/svelte/svelte/src/internal/shared/attributes.js +32 -32
- package/esm/svelte/svelte/src/internal/shared/utils.js +16 -15
- package/esm/svelte/svelte/src/motion/spring.js +7 -7
- package/esm/svelte/svelte/src/reactivity/map.js +17 -21
- package/esm/templates/entry.js +194 -159
- package/esm/templates/helpers.js +85 -75
- package/esm/templates/index.js +1 -1
- package/esm/templates/media.js +163 -131
- package/esm/utils/array.js +1 -1
- package/esm/utils/bounds.js +1 -1
- package/esm/utils/cache.js +1 -1
- package/esm/utils/canvasToBlob.js +1 -1
- package/esm/utils/date.js +1 -1
- package/esm/utils/debounce.js +1 -1
- package/esm/utils/dom.js +84 -74
- package/esm/utils/file.js +82 -69
- package/esm/utils/functionToBlob.js +1 -1
- package/esm/utils/keyboard.js +34 -0
- package/esm/utils/math.js +14 -7
- package/esm/utils/media.js +1 -1
- package/esm/utils/number.js +11 -16
- package/esm/utils/object.js +1 -1
- package/esm/utils/objectURL.js +1 -1
- package/esm/utils/placeholder.js +1 -1
- package/esm/utils/poly.js +1 -1
- package/esm/utils/pubsub.js +1 -1
- package/esm/utils/rect.js +39 -30
- package/esm/utils/size.js +1 -1
- package/esm/utils/sleep.js +1 -1
- package/esm/utils/string.js +25 -21
- package/esm/utils/support.js +5 -6
- package/esm/utils/test.js +1 -1
- package/esm/utils/thread.js +50 -43
- package/esm/utils/tree.js +1 -1
- package/esm/utils/url.js +2 -2
- package/esm/utils/vector.js +1 -1
- package/esm/utils/window.js +1 -1
- package/esm/utils/xhr.js +88 -113
- package/esm/workers/httpRequest.js +45 -0
- package/esm/workers/httpRequestWorker.js +37 -0
- package/esm/workers/readFile.js +14 -0
- package/esm/workers/readFileWorker.js +6 -0
- package/esm/workers/transformImage.js +16 -0
- package/esm/workers/transformImageWorker.js +8 -0
- package/package.json +17 -12
- package/types/core/entryTree.d.ts +6 -2
- package/types/core/extensionManager.d.ts +16 -2
- package/types/core/taskScheduler.d.ts +2 -2
- package/types/dev/index.d.ts +11 -3
- package/types/elements/FilePondDefault/index.d.ts +15 -5
- package/types/elements/FilePondEntryList/components/MediaImage/index.d.ts +1 -1
- package/types/elements/FilePondEntryList/components/MediaVideo/index.d.ts +1 -1
- package/types/elements/FilePondEntryList/contexts/appContext.d.ts +1 -0
- package/types/elements/FilePondEntryList/contexts/entryContext.d.ts +1 -0
- package/types/elements/FilePondEntryList/index.d.ts +10 -11
- package/types/elements/FilePondInput/index.d.ts +22 -11
- package/types/elements/common/animationPreference.svelte.d.ts +6 -3
- package/types/elements/common/nodeTree.d.ts +1 -1
- package/types/elements/common/string.d.ts +1 -1
- package/types/extensions/common/createTransformExtension.d.ts +1 -1
- package/types/extensions/data-url-store.d.ts +2 -0
- package/types/extensions/file-name-transform.d.ts +1 -1
- package/types/extensions/file-size-validator.d.ts +2 -0
- package/types/extensions/image-bitmap-transform.d.ts +32 -0
- package/types/extensions/index.d.ts +1 -0
- package/types/extensions/list-size-validator.d.ts +2 -0
- package/types/extensions/simulated-loader.d.ts +2 -0
- package/types/extensions/simulated-store.d.ts +1 -1
- package/types/extensions/url-loader.d.ts +2 -0
- package/types/locales/ar-ar.d.ts +101 -76
- package/types/locales/bn-bd.d.ts +101 -76
- package/types/locales/cs-cz.d.ts +101 -76
- package/types/locales/da-dk.d.ts +101 -76
- package/types/locales/de-de.d.ts +101 -76
- package/types/locales/el-gr.d.ts +101 -76
- package/types/locales/en-gb.d.ts +102 -82
- package/types/locales/es-es.d.ts +101 -76
- package/types/locales/fi-fi.d.ts +101 -76
- package/types/locales/fr-fr.d.ts +101 -76
- package/types/locales/hi-in.d.ts +101 -76
- package/types/locales/hu-hu.d.ts +101 -76
- package/types/locales/is-is.d.ts +101 -76
- package/types/locales/it-it.d.ts +101 -76
- package/types/locales/ja-jp.d.ts +101 -76
- package/types/locales/ko-kr.d.ts +101 -76
- package/types/locales/nb-no.d.ts +101 -76
- package/types/locales/nl-nl.d.ts +101 -76
- package/types/locales/pl-pl.d.ts +101 -76
- package/types/locales/pt-pt.d.ts +101 -76
- package/types/locales/sv-se.d.ts +101 -76
- package/types/locales/tr-tr.d.ts +101 -76
- package/types/locales/uk-ua.d.ts +101 -76
- package/types/locales/vi-vn.d.ts +101 -76
- package/types/locales/zh-cn.d.ts +101 -76
- package/types/templates/entry.d.ts +15 -16
- package/types/templates/helpers.d.ts +5 -1
- package/types/templates/media.d.ts +43 -6
- package/types/types/index.d.ts +9 -15
- package/types/utils/file.d.ts +7 -15
- package/types/utils/keyboard.d.ts +5 -0
- package/types/utils/rect.d.ts +5 -0
- package/types/utils/string.d.ts +1 -0
- package/types/utils/thread.d.ts +6 -0
- package/types/utils/xhr.d.ts +1 -0
- package/types/workers/httpRequest.d.ts +23 -0
- package/types/workers/readFile.d.ts +9 -0
- package/types/workers/transformImage.d.ts +6 -0
- package/types/elements/FilePondEntryList/components/EntryContext/index.d.ts +0 -1
package/esm/utils/rect.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.21
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
6
6
|
*/
|
|
7
|
-
import { vectorCreate as
|
|
8
|
-
function
|
|
7
|
+
import { vectorCreate as g } from "./vector.js";
|
|
8
|
+
function n(t = 0, h = 0, e = 0, i = 0) {
|
|
9
9
|
return {
|
|
10
10
|
x: t,
|
|
11
|
-
y:
|
|
12
|
-
width:
|
|
13
|
-
height:
|
|
11
|
+
y: h,
|
|
12
|
+
width: e,
|
|
13
|
+
height: i
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function l(t) {
|
|
17
17
|
return {
|
|
18
18
|
x: t.left,
|
|
19
19
|
y: t.top,
|
|
@@ -21,42 +21,51 @@ function s(t) {
|
|
|
21
21
|
height: t.bottom - t.top
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
function m(t,
|
|
25
|
-
return t.x ===
|
|
24
|
+
function m(t, h) {
|
|
25
|
+
return t.x === h.x && t.y === h.y && t.width === h.width && t.height === h.height;
|
|
26
26
|
}
|
|
27
27
|
function c(t) {
|
|
28
|
-
return
|
|
28
|
+
return g(t.x + t.width * 0.5, t.y + t.height * 0.5);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
return !(
|
|
30
|
+
function d(t, h) {
|
|
31
|
+
const e = t.x, i = t.x + t.width, r = t.y, o = t.y + t.height, u = h.x, f = h.x + h.width, x = h.y, y = h.y + h.height;
|
|
32
|
+
return !(e > f || u > i || r > y || x > o);
|
|
33
33
|
}
|
|
34
|
-
function C(t,
|
|
35
|
-
return !(
|
|
34
|
+
function C(t, h) {
|
|
35
|
+
return !(h.x < t.x || h.y < t.y || h.x > t.x + t.width || h.y > t.y + t.height);
|
|
36
36
|
}
|
|
37
|
-
function B(t,
|
|
38
|
-
return
|
|
39
|
-
x:
|
|
40
|
-
y:
|
|
41
|
-
width:
|
|
42
|
-
height:
|
|
37
|
+
function B(t, h, e) {
|
|
38
|
+
return e = e ?? c(t), {
|
|
39
|
+
x: h * (t.x - e.x) + e.x,
|
|
40
|
+
y: h * (t.y - e.y) + e.y,
|
|
41
|
+
width: h * t.width,
|
|
42
|
+
height: h * t.height
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function F(t, h) {
|
|
46
46
|
return {
|
|
47
|
-
x: t.x -
|
|
48
|
-
y: t.y -
|
|
49
|
-
width: t.width +
|
|
50
|
-
height: t.height +
|
|
47
|
+
x: t.x - h,
|
|
48
|
+
y: t.y - h,
|
|
49
|
+
width: t.width + h * 2,
|
|
50
|
+
height: t.height + h * 2
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
+
function L(t, h = t.width / t.height) {
|
|
54
|
+
let { width: e } = t, i = e / h;
|
|
55
|
+
return i > t.height && (i = t.height, e = i * h), n((t.width - e) * 0.5, (t.height - i) * 0.5, e, i);
|
|
56
|
+
}
|
|
57
|
+
function P(t, h) {
|
|
58
|
+
return n(h(t.x), h(t.y), h(t.width), h(t.height));
|
|
59
|
+
}
|
|
53
60
|
export {
|
|
61
|
+
P as rectApply,
|
|
54
62
|
c as rectCenter,
|
|
55
63
|
C as rectContainsPoint,
|
|
56
|
-
|
|
64
|
+
n as rectCreate,
|
|
57
65
|
m as rectEqual,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
l as rectFromBounds,
|
|
67
|
+
L as rectFromSize,
|
|
68
|
+
d as rectIntersectWithRect,
|
|
69
|
+
F as rectPad,
|
|
61
70
|
B as rectScale
|
|
62
71
|
};
|
package/esm/utils/size.js
CHANGED
package/esm/utils/sleep.js
CHANGED
package/esm/utils/string.js
CHANGED
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.21
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
6
6
|
*/
|
|
7
|
-
function n(
|
|
8
|
-
return t
|
|
7
|
+
function n(t, e) {
|
|
8
|
+
return e(t.charAt(0)) + t.slice(1);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return n(
|
|
10
|
+
function s(t) {
|
|
11
|
+
return n(t, (e) => e.toUpperCase());
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return Math.random().toString(36).substring(2, 2 + Math.min(
|
|
13
|
+
function l(t = 11) {
|
|
14
|
+
return Math.random().toString(36).substring(2, 2 + Math.min(t, 11));
|
|
15
15
|
}
|
|
16
|
-
function a(
|
|
17
|
-
return n(
|
|
16
|
+
function a(t) {
|
|
17
|
+
return n(t, (e) => e.toLowerCase());
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return a(u(
|
|
19
|
+
function c(t, e = "-") {
|
|
20
|
+
return a(u(t, e));
|
|
21
21
|
}
|
|
22
|
-
function u(
|
|
23
|
-
return
|
|
22
|
+
function u(t, e = "-") {
|
|
23
|
+
return t.replace(new RegExp(`${e}.`, "g"), (o) => o.charAt(1).toUpperCase());
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
25
|
+
function i(t) {
|
|
26
|
+
return t.split(/[\s_\b]|(?=[A-Z])/);
|
|
27
|
+
}
|
|
28
|
+
function f(t) {
|
|
29
|
+
return i(t).join("-").toLowerCase();
|
|
27
30
|
}
|
|
28
31
|
let r = null;
|
|
29
|
-
function
|
|
32
|
+
function p() {
|
|
30
33
|
return r === null && (r = new Intl.NumberFormat().resolvedOptions().locale), r;
|
|
31
34
|
}
|
|
32
35
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
p as getRuntimeDefaultLocale,
|
|
37
|
+
l as getUniqueId,
|
|
35
38
|
a as lowerCaseFirstLetter,
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
c as toCamelCase,
|
|
40
|
+
i as toCamelParts,
|
|
41
|
+
f as toKebabCase,
|
|
38
42
|
u as toPascalCase,
|
|
39
43
|
n as transformFirstLetter,
|
|
40
|
-
|
|
44
|
+
s as upperCaseFirstLetter
|
|
41
45
|
};
|
package/esm/utils/support.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.21
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
6
6
|
*/
|
|
7
7
|
import { createTest as e } from "./test.js";
|
|
8
|
-
const
|
|
8
|
+
const r = e(
|
|
9
9
|
() => "requestFullscreen" in document.documentElement
|
|
10
|
-
),
|
|
10
|
+
), s = e(() => "requestVideoFrameCallback" in document.createElement("video"));
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
s as supportsURLPattern
|
|
12
|
+
r as supportsRequestFullscreen,
|
|
13
|
+
s as supportsRequestVideoFrameCallback
|
|
15
14
|
};
|
package/esm/utils/test.js
CHANGED
package/esm/utils/thread.js
CHANGED
|
@@ -1,74 +1,81 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.21
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import E from "./functionToBlob.js";
|
|
8
8
|
import { arrayRemoveInPlace as T } from "./array.js";
|
|
9
|
-
import { requestIdleCallback as
|
|
10
|
-
import { createObjectURL as
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import { requestIdleCallback as M } from "./poly.js";
|
|
10
|
+
import { createObjectURL as O } from "./objectURL.js";
|
|
11
|
+
import { isString as I } from "./test.js";
|
|
12
|
+
const U = (o) => `function () {self.onmessage = function (message) {(${o.toString()}).apply(null, message.data.concat([function (err, response, transferList = []) {const message = { content: response, error: err };return self.postMessage(message, transferList);},{onprogress: function({ lengthComputable, loaded, total }) {self.postMessage({ type: 'progress', content: { lengthComputable, loaded, total }, error: null })}}]))}}`, a = [], n = [], A = 5e3;
|
|
13
|
+
function B(o, l) {
|
|
14
|
+
return o ? `${o}/${l.fileName}Worker.js` : l;
|
|
15
|
+
}
|
|
16
|
+
function K(o, l, S = {}) {
|
|
17
|
+
return new Promise((k, u) => {
|
|
18
|
+
const v = navigator.hardwareConcurrency, p = ({ fn: s, args: h, options: y, promise: w }) => {
|
|
15
19
|
const {
|
|
16
|
-
abortController:
|
|
17
|
-
transferList:
|
|
18
|
-
onabort:
|
|
20
|
+
abortController: g = new AbortController(),
|
|
21
|
+
transferList: C = [],
|
|
22
|
+
onabort: m,
|
|
19
23
|
onprogress: R
|
|
20
|
-
} =
|
|
21
|
-
let e =
|
|
24
|
+
} = y, W = !I(s), f = W ? s.toString() : s;
|
|
25
|
+
let e = a.find((r) => r.fnStr === f && !r.busy);
|
|
22
26
|
if (!e) {
|
|
23
|
-
if (
|
|
27
|
+
if (a.filter((t) => t.busy).length >= v) {
|
|
24
28
|
const t = {
|
|
25
|
-
fn:
|
|
26
|
-
fnStr:
|
|
27
|
-
args:
|
|
28
|
-
options:
|
|
29
|
-
promise: { resolve:
|
|
29
|
+
fn: s,
|
|
30
|
+
fnStr: f,
|
|
31
|
+
args: h,
|
|
32
|
+
options: y,
|
|
33
|
+
promise: { resolve: k, reject: u }
|
|
30
34
|
};
|
|
31
|
-
|
|
32
|
-
T(
|
|
35
|
+
n.push(t), g.signal.onabort = () => {
|
|
36
|
+
T(n, (c) => c === t), m && m();
|
|
33
37
|
};
|
|
34
38
|
return;
|
|
35
39
|
}
|
|
36
|
-
const r =
|
|
37
|
-
e = {
|
|
40
|
+
const r = W ? O(E(U(s))) : f, i = new window.Worker(r);
|
|
41
|
+
i.addEventListener("error", u), e = {
|
|
38
42
|
busy: !1,
|
|
39
|
-
fnStr:
|
|
40
|
-
url:
|
|
41
|
-
worker:
|
|
43
|
+
fnStr: f,
|
|
44
|
+
url: r,
|
|
45
|
+
worker: i,
|
|
42
46
|
terminationTimeout: void 0,
|
|
43
47
|
terminate: () => {
|
|
44
|
-
clearTimeout(e.terminationTimeout), e.worker.terminate(), URL.revokeObjectURL(
|
|
45
|
-
|
|
48
|
+
clearTimeout(e.terminationTimeout), e.worker.terminate(), i.addEventListener("error", u), r.startsWith("blob:") && URL.revokeObjectURL(r), T(
|
|
49
|
+
a,
|
|
46
50
|
(t) => t === e
|
|
47
|
-
),
|
|
51
|
+
), n.length && p(n.shift());
|
|
48
52
|
}
|
|
49
|
-
},
|
|
53
|
+
}, a.find((t) => t.busy === !1)?.terminate(), a.push(e);
|
|
50
54
|
}
|
|
51
55
|
e.busy = !0, clearTimeout(e.terminationTimeout), e.worker.onmessage = function(r) {
|
|
52
|
-
const { type:
|
|
53
|
-
if (
|
|
54
|
-
return R && R(
|
|
56
|
+
const { type: i, content: b, error: t } = r.data;
|
|
57
|
+
if (i === "progress")
|
|
58
|
+
return R && R(b);
|
|
55
59
|
clearTimeout(e.terminationTimeout), e.terminationTimeout = setTimeout(() => {
|
|
56
60
|
e.terminate();
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
61
|
+
}, A), t ? w.reject(t) : w.resolve(b);
|
|
62
|
+
const c = n.filter((d) => d.fnStr === e.fnStr);
|
|
63
|
+
if (!c.length) {
|
|
64
|
+
e.busy = !1;
|
|
60
65
|
return;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
}
|
|
67
|
+
const L = c.shift();
|
|
68
|
+
T(n, (d) => d === L), M(() => {
|
|
69
|
+
e.busy = !1, p(L);
|
|
64
70
|
});
|
|
65
|
-
}, e.worker.postMessage(
|
|
66
|
-
e.terminate(),
|
|
71
|
+
}, e.worker.postMessage(h, C), g && (g.signal.onabort = () => {
|
|
72
|
+
e.terminate(), m && m();
|
|
67
73
|
});
|
|
68
74
|
};
|
|
69
|
-
|
|
75
|
+
p({ fn: o, args: l, options: S, promise: { resolve: k, reject: u } });
|
|
70
76
|
});
|
|
71
77
|
}
|
|
72
78
|
export {
|
|
73
|
-
|
|
79
|
+
B as createThreadWorker,
|
|
80
|
+
K as thread
|
|
74
81
|
};
|
package/esm/utils/tree.js
CHANGED
package/esm/utils/url.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.21
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
@@ -12,7 +12,7 @@ function l(n) {
|
|
|
12
12
|
return n.split("?")[0].split("/").filter((t) => t.length).slice(-1)[0];
|
|
13
13
|
}
|
|
14
14
|
function r(n) {
|
|
15
|
-
return e(n) ? n instanceof URL ? n : new URL(n) : new URL(n, location
|
|
15
|
+
return e(n) ? n instanceof URL ? n : new URL(n) : new URL(n, location?.href);
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
18
|
o as getFilenameFromURL,
|
package/esm/utils/vector.js
CHANGED
package/esm/utils/window.js
CHANGED
package/esm/utils/xhr.js
CHANGED
|
@@ -1,151 +1,126 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.21
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
6
6
|
*/
|
|
7
|
-
import { toKebabCase as
|
|
8
|
-
import { toURL as
|
|
9
|
-
import { noop as
|
|
10
|
-
import { thread as
|
|
11
|
-
import { arrayRemoveFalsy as
|
|
12
|
-
|
|
7
|
+
import { toKebabCase as P, toCamelCase as b } from "./string.js";
|
|
8
|
+
import { toURL as F } from "./url.js";
|
|
9
|
+
import { noop as d } from "./placeholder.js";
|
|
10
|
+
import { thread as U, createThreadWorker as y } from "./thread.js";
|
|
11
|
+
import { arrayRemoveFalsy as E } from "./array.js";
|
|
12
|
+
import { httpRequest as h } from "../workers/httpRequest.js";
|
|
13
|
+
function j(t, r) {
|
|
13
14
|
const {
|
|
14
15
|
method: e,
|
|
15
|
-
queryString:
|
|
16
|
-
headers:
|
|
17
|
-
data:
|
|
18
|
-
formData:
|
|
16
|
+
queryString: n,
|
|
17
|
+
headers: s,
|
|
18
|
+
data: o,
|
|
19
|
+
formData: m,
|
|
19
20
|
responseType: g,
|
|
20
|
-
withCredentials:
|
|
21
|
-
timeout:
|
|
22
|
-
useWebWorkers:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
withCredentials: R,
|
|
22
|
+
timeout: w,
|
|
23
|
+
useWebWorkers: C = !1,
|
|
24
|
+
workersURL: H,
|
|
25
|
+
abortController: q,
|
|
26
|
+
onprogress: v = d,
|
|
27
|
+
onabort: L = d
|
|
28
|
+
} = r ?? {}, p = {
|
|
29
|
+
url: W(t, n),
|
|
28
30
|
responseType: g,
|
|
29
31
|
method: e,
|
|
30
|
-
headers: Object.entries(
|
|
31
|
-
|
|
32
|
+
headers: Object.entries(s ?? {}).map(([a, i]) => [
|
|
33
|
+
P(a),
|
|
32
34
|
`${i}`
|
|
33
35
|
]),
|
|
34
|
-
data:
|
|
35
|
-
formData:
|
|
36
|
-
timeout:
|
|
37
|
-
withCredentials:
|
|
38
|
-
},
|
|
39
|
-
function
|
|
40
|
-
return new Promise((i,
|
|
41
|
-
|
|
36
|
+
data: o,
|
|
37
|
+
formData: m,
|
|
38
|
+
timeout: w,
|
|
39
|
+
withCredentials: R
|
|
40
|
+
}, l = { abortController: q, onprogress: v, onabort: L };
|
|
41
|
+
function f(a) {
|
|
42
|
+
return new Promise((i, u) => {
|
|
43
|
+
a.then((c) => {
|
|
42
44
|
i({
|
|
43
|
-
getAllResponseHeaders: () =>
|
|
44
|
-
response:
|
|
45
|
+
getAllResponseHeaders: () => c.responseHeaders,
|
|
46
|
+
response: c.response
|
|
45
47
|
});
|
|
46
|
-
}).catch(
|
|
48
|
+
}).catch(u);
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
return f(
|
|
52
|
+
C ? (
|
|
53
|
+
// @ts-ignore fix types
|
|
54
|
+
U(y(H, h), [p], l)
|
|
55
|
+
) : new Promise(
|
|
56
|
+
(a, i) => (
|
|
57
|
+
// httpRequest()
|
|
58
|
+
h(
|
|
59
|
+
p,
|
|
60
|
+
(u, c) => {
|
|
61
|
+
if (u) {
|
|
62
|
+
i(new Error(u));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
a(c);
|
|
66
|
+
},
|
|
67
|
+
l
|
|
68
|
+
)
|
|
69
|
+
)
|
|
60
70
|
)
|
|
61
|
-
)
|
|
71
|
+
);
|
|
62
72
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
data: o,
|
|
68
|
-
headers: a = [],
|
|
69
|
-
timeout: u = 0,
|
|
70
|
-
withCredentials: c = !1,
|
|
71
|
-
responseType: g = "text"
|
|
72
|
-
}, f, { abortController: R = new AbortController(), onprogress: H, onabort: w }) {
|
|
73
|
-
function m() {
|
|
74
|
-
f(r.status + " (" + r.statusText + ")");
|
|
75
|
-
}
|
|
76
|
-
function E() {
|
|
77
|
-
const s = {
|
|
78
|
-
response: r.response,
|
|
79
|
-
responseHeaders: r.getAllResponseHeaders()
|
|
80
|
-
};
|
|
81
|
-
f(null, s, typeof s.response != "string" ? [s.response] : void 0);
|
|
82
|
-
}
|
|
83
|
-
function d(s) {
|
|
84
|
-
const i = new FormData();
|
|
85
|
-
return b(s).forEach((l) => {
|
|
86
|
-
i.append(...l);
|
|
87
|
-
}), i;
|
|
88
|
-
}
|
|
89
|
-
const r = new XMLHttpRequest();
|
|
90
|
-
r.responseType = g, R.signal.onabort = () => {
|
|
91
|
-
r.abort();
|
|
92
|
-
};
|
|
93
|
-
const p = o || (e ? d(e) : null);
|
|
94
|
-
(p ? r.upload : r).onprogress = H, r.onload = () => {
|
|
95
|
-
r.status >= 200 && r.status < 300 ? E() : m();
|
|
96
|
-
}, r.onerror = m, r.ontimeout = m, r.onabort = w, r.open(p && (t === "GET" || t === "HEAD") ? "POST" : t, n), r.withCredentials = c, r.timeout = u, a.forEach(([s, i]) => r.setRequestHeader(s, i)), r.send(p);
|
|
97
|
-
}
|
|
98
|
-
function y(n, t = {}) {
|
|
99
|
-
const e = P(n);
|
|
100
|
-
return Object.entries(t).forEach(
|
|
101
|
-
([o, a]) => e.searchParams.append(o, `${a}`)
|
|
73
|
+
function W(t, r = {}) {
|
|
74
|
+
const e = F(t);
|
|
75
|
+
return Object.entries(r).forEach(
|
|
76
|
+
([n, s]) => e.searchParams.append(n, `${s}`)
|
|
102
77
|
), `${e}`;
|
|
103
78
|
}
|
|
104
|
-
function
|
|
79
|
+
function I(t, r, e) {
|
|
105
80
|
return new ProgressEvent("progress", {
|
|
106
|
-
lengthComputable:
|
|
107
|
-
loaded:
|
|
108
|
-
total:
|
|
81
|
+
lengthComputable: t || !1,
|
|
82
|
+
loaded: t ? r && e === 1 ? r * 100 : r : 0,
|
|
83
|
+
total: t ? e === 1 ? 100 : e : 0
|
|
109
84
|
});
|
|
110
85
|
}
|
|
111
|
-
function
|
|
112
|
-
return
|
|
113
|
-
|
|
86
|
+
function K(t) {
|
|
87
|
+
return t ? E(
|
|
88
|
+
t.getAllResponseHeaders().split(`
|
|
114
89
|
`).map((e) => {
|
|
115
|
-
const
|
|
116
|
-
if (!
|
|
90
|
+
const n = e.match(/(^.*?):/) || [], [s, o] = n;
|
|
91
|
+
if (!s)
|
|
117
92
|
return;
|
|
118
|
-
const
|
|
119
|
-
return [
|
|
93
|
+
const m = e.replace(s, "").trim();
|
|
94
|
+
return [o, m];
|
|
120
95
|
})
|
|
121
96
|
).reduce(
|
|
122
|
-
(e,
|
|
123
|
-
const [
|
|
124
|
-
return e[
|
|
97
|
+
(e, n) => {
|
|
98
|
+
const [s, o] = n;
|
|
99
|
+
return e[b(s)] = o, e;
|
|
125
100
|
},
|
|
126
101
|
{}
|
|
127
102
|
) : {};
|
|
128
103
|
}
|
|
129
|
-
function
|
|
130
|
-
const { contentDisposition:
|
|
131
|
-
return !
|
|
104
|
+
function S(t) {
|
|
105
|
+
const { contentDisposition: r } = t;
|
|
106
|
+
return !r || !r.length ? null : $(r);
|
|
132
107
|
}
|
|
133
|
-
function
|
|
134
|
-
if (!
|
|
108
|
+
function $(t) {
|
|
109
|
+
if (!t.toLowerCase().startsWith("attachment"))
|
|
135
110
|
return null;
|
|
136
|
-
const
|
|
137
|
-
return
|
|
111
|
+
const r = t.split(/filename=|filename\*=.+''/i).splice(1).map((e) => e.trim().replace(/^["']|[;"']{0,2}$/g, "")).filter((e) => e.length);
|
|
112
|
+
return r.length ? decodeURI(r[r.length - 1]) : null;
|
|
138
113
|
}
|
|
139
|
-
function
|
|
140
|
-
const e =
|
|
141
|
-
`).find((
|
|
114
|
+
function V(t, r) {
|
|
115
|
+
const e = r.toLowerCase().split(`
|
|
116
|
+
`).find((n) => n.includes(t));
|
|
142
117
|
return e ? e.split(":")[1].trim() : void 0;
|
|
143
118
|
}
|
|
144
119
|
export {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
120
|
+
I as createProgressEvent,
|
|
121
|
+
$ as getFilenameFromContentDispositionHeader,
|
|
122
|
+
S as getFilenameFromResponseHeaders,
|
|
123
|
+
V as getResponseHeaderValue,
|
|
124
|
+
K as getResponseHeaders,
|
|
125
|
+
j as xhr
|
|
151
126
|
};
|