filepond
Version:
FilePond, where files go to stretch their bits.
214 lines (213 loc) • 6.91 kB
JavaScript
/*!
* FilePond v5.0.2
* Copyright (c) 2017-2026 Pqina B.V.
* Released under the MIT License
* https://filepond.com
*/
const i = {
// default
abort: "Abort",
remove: "Remove",
reset: "Reset",
undo: "Undo",
cancel: "Cancel",
import: "Import",
store: "Store",
revert: "Revert",
busy: "Busy",
loading: "Loading",
close: "Close",
// units
unitB: {
1: "byte",
else: "bytes"
},
unitKB: "KB",
unitMB: "MB",
unitGB: "GB",
unitTB: "TB",
unitPB: "PB",
unitKiB: "KiB",
unitMiB: "MiB",
unitGiB: "GiB",
unitTiB: "TiB",
unitPiB: "PiB",
unitPixels: {
1: "pixel",
else: "pixels"
},
unitFiles: {
1: "file",
else: "files"
},
// extension status
error: "Error",
warning: "Warning",
success: "Success",
info: "Info",
system: "System",
// capabilities labels
descriptionBrowse: "[Select {{maxFilesUnit}}]",
descriptionBrowseDrop: "Drop {{maxFilesUnit}} here, or [browse]",
descriptionBrowseDropSelect: "Drop {{maxFilesUnit}} here, [browse], or select from:",
descriptionBrowseSelect: "[Browse], or select {{maxFilesUnit}} from:",
descriptionSelect: "Select {{maxFilesUnit}} from:",
// file types (these also match with image/*, video/*, and audio/*)
fileMainTypeImage: "image",
fileMainTypeVideo: "video",
fileMainTypeAudio: "audio",
fileMainTypeApplication: "file",
// assist
assistAbort: "Tap to cancel",
assistUndo: "Tap to undo",
// file status
loadError: "Failed to load file.",
// data transfer status
loadDataTransferProgress: "Loading files",
loadDataTransferInfo: "Processed {{processedFiles}} of {{totalFiles}} files",
// validation fallback if no subcode set
validationInvalid: "Invalid file.",
validationFileNameMissing: "File name missing.",
// file list status
validationInvalidEntries: "The file list contains invalid items.",
validationInvalidState: "The file list is in an invalid state.",
validationInvalidBusy: "The file list is busy.",
validationInvalidEmpty: {
template: "Please select {{files}}.",
variables: {
files: {
context: "multiple",
map: {
false: "a file",
true: "one or more files"
}
}
}
},
// screenreader accessibility
ariaRequired: "required",
ariaNoEntries: "No {{maxFilesUnit}} selected",
ariaSingleEntry: "Selected {{name}}",
ariaMultipleEntries: "{{count}} files selected",
ariaItemRoleDescription: "Sortable",
ariaDragDescription: "Press space to pick up and drop an item. Use the up and down arrow keys to move it to a new position.",
ariaDragStateDrop: "Dropped {{name}} at position {{position}}",
ariaDragStateGrab: "Picked up {{name}} at position {{position}}",
ariaDragStateSort: "Moved {{name}} to position {{position}} of {{total}}"
}, e = {
mediaEdit: "Edit",
mediaPlay: "Play",
mediaPause: "Pause",
mediaSilent: "No audio",
mediaUnmute: "Unmute",
mediaMute: "Mute",
mediaFullscreen: "Fullscreen",
mediaLoadError: "Failed to load {{fileMainType}}.",
mediaPlayError: "Failed to play video."
}, t = {
storeError: "Failed to store file.",
storeRestoreError: "Failed to load file.",
storeRestoreProgress: "Loading {{progress}}%",
storeStorageQueued: "Awaiting upload",
storeStorageProgress: "Uploading {{progress}}%",
storeStorageComplete: "Upload complete",
storeAwaitingCompletion: "Not all files have been stored."
}, a = {
transformEditBusy: "Editing file data",
transformError: "Failed to edit file data, please try again."
}, o = {
validationFileMimeTypeMismatch: {
template: "This file type is not allowed. {{accepted}}.",
variables: {
accepted: {
context: "count",
map: {
1: "File must be of type {{accept}}",
else: "Accepted file types are: {{accept}}"
}
}
}
}
}, n = {
validationFileExtensionMismatch: {
template: "This file extension is not allowed. {{accepted}}.",
variables: {
accepted: {
context: "count",
map: {
1: "File must have the {{accept}} extension",
else: "Accepted extensions are: {{accept}}"
}
}
}
}
}, s = {
validationFileNameMissing: "File name missing.",
validationFileNameMismatch: "This file name is invalid."
}, l = {
validationFileSizeUnderflow: "This file is too small. Minimum size is {{minSize}} {{minSizeUnit}}.",
validationFileSizeOverflow: "This file is too large. Maximum size is {{maxSize}} {{maxSizeUnit}}."
}, r = {
validationListSizeUnderflow: "Total file size is too small. Minimum total size is {{minSize}} {{minSizeUnit}}.",
validationListSizeOverflow: "Total file size is too large. Maximum total size is {{maxSize}} {{maxSizeUnit}}."
}, d = {
validationMediaSizeUnavailable: "Failed to read media size.",
validationMediaWidthRangeMismatch: "The {{fileMainType}} width is invalid. Width must be between {{minWidth}} and {{maxWidth}} {{maxWidthUnit}}.",
validationMediaWidthUnderflow: "The {{fileMainType}} is too small. Minimum width is {{minWidth}} {{minWidthUnit}}.",
validationMediaWidthOverflow: "The {{fileMainType}} is too large. Maximum width is {{maxWidth}} {{maxWidthUnit}}.",
validationMediaHeightRangeMismatch: "The {{fileMainType}} height is invalid. Height must be between {{minHeight}} and {{maxHeight}} {{maxHeightUnit}}.",
validationMediaHeightUnderflow: "The {{fileMainType}} is too small. Minimum height is {{minHeight}} {{minHeightUnit}}.",
validationMediaHeightOverflow: "The {{fileMainType}} is too large. Maximum height is {{maxHeight}} {{maxHeightUnit}}.",
validationMediaResolutionRangeMismatch: "The {{fileMainType}} resolution is invalid. Resolution must be between {{minResolution}}MP and {{maxResolution}}MP.",
validationMediaResolutionUnderflow: "The {{fileMainType}} resolution is invalid. Minimum resolution is {{minResolution}}MP.",
validationMediaResolutionOverflow: "The {{fileMainType}} resolution is invalid. Maximum resolution is {{maxResolution}}MP."
}, m = {
validationListEntryCountUnderflow: "Too few files in the list. Minimum amount is {{minFiles}} {{minFilesUnit}}.",
validationListEntryCountOverflow: "Too many files in the list. Maximum amount is {{maxFiles}} {{maxFilesUnit}}."
}, c = {
...l,
...o,
...n,
...s,
...d,
...r,
...m
}, u = {
device: "Device"
}, p = {
link: "Link"
}, f = {
camera: "Camera",
capture: "Capture",
record: "Record"
}, v = {
...u,
...p,
...f
}, h = {
...i,
...t,
...e,
...c,
...a,
...v
};
export {
i as core,
h as locale,
e as media,
v as source,
f as sourceCamera,
u as sourceDevice,
p as sourceLink,
t as store,
a as transform,
c as validation,
n as validationFileExtension,
o as validationFileMimeType,
s as validationFileName,
l as validationFileSize,
m as validationListCount,
r as validationListSize,
d as validationMediaResolution
};