wonder-image 1.2.0

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.
Files changed (223) hide show
  1. package/DOCS.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1 -0
  4. package/babel.config.json +3 -0
  5. package/demo/backend/body-end.php +10 -0
  6. package/demo/backend/head.php +93 -0
  7. package/demo/frontend/body-end.php +19 -0
  8. package/demo/frontend/head.php +244 -0
  9. package/demo/wonder-image.php +41 -0
  10. package/dist/0d01fa889dc2b0202b98.png +0 -0
  11. package/dist/203d1199e7aef04c0a34.gif +0 -0
  12. package/dist/26d6ed3fa1c815e4c78f.png +0 -0
  13. package/dist/39795c0b4513de014cf8.woff +0 -0
  14. package/dist/40b30ca122107c2852be.png +0 -0
  15. package/dist/4a7b4107b62ef059ba65.png +0 -0
  16. package/dist/4dce7f71b08755f19759.png +0 -0
  17. package/dist/60af14fddca897f348bb.png +0 -0
  18. package/dist/67172a36bcdeaca8592a.png +0 -0
  19. package/dist/a85c6dc53638f894de38.png +0 -0
  20. package/dist/b7bcc075b395c14ce8c2.woff2 +0 -0
  21. package/dist/backend/body-end.js +3 -0
  22. package/dist/backend/body-end.js.LICENSE.txt +44 -0
  23. package/dist/backend/body-end.js.map +1 -0
  24. package/dist/backend/head.css +2 -0
  25. package/dist/backend/head.css.map +1 -0
  26. package/dist/backend/head.js +3 -0
  27. package/dist/backend/head.js.LICENSE.txt +46 -0
  28. package/dist/backend/head.js.map +1 -0
  29. package/dist/backend/lib.js +2 -0
  30. package/dist/backend/lib.js.LICENSE.txt +1 -0
  31. package/dist/frontend/body-end.js +3 -0
  32. package/dist/frontend/body-end.js.LICENSE.txt +46 -0
  33. package/dist/frontend/body-end.js.map +1 -0
  34. package/dist/frontend/head.css +2 -0
  35. package/dist/frontend/head.css.map +1 -0
  36. package/dist/frontend/head.js +3 -0
  37. package/dist/frontend/head.js.LICENSE.txt +46 -0
  38. package/dist/frontend/head.js.map +1 -0
  39. package/dist/frontend/lib.css +2 -0
  40. package/dist/frontend/lib.css.map +1 -0
  41. package/dist/frontend/lib.js +3 -0
  42. package/dist/frontend/lib.js.LICENSE.txt +151 -0
  43. package/dist/frontend/lib.js.map +1 -0
  44. package/dist/lib/autonumeric/autonumeric.js +3 -0
  45. package/dist/lib/autonumeric/autonumeric.js.LICENSE.txt +47 -0
  46. package/dist/lib/autonumeric/autonumeric.js.map +1 -0
  47. package/dist/lib/bootstrap/bootstrap-datepicker.css +2 -0
  48. package/dist/lib/bootstrap/bootstrap-datepicker.css.map +1 -0
  49. package/dist/lib/bootstrap/bootstrap-datepicker.js +3 -0
  50. package/dist/lib/bootstrap/bootstrap-datepicker.js.LICENSE.txt +42 -0
  51. package/dist/lib/bootstrap/bootstrap-datepicker.js.map +1 -0
  52. package/dist/lib/bootstrap/bootstrap-icons.css +2 -0
  53. package/dist/lib/bootstrap/bootstrap-icons.css.map +1 -0
  54. package/dist/lib/bootstrap/bootstrap-icons.js +3 -0
  55. package/dist/lib/bootstrap/bootstrap-icons.js.LICENSE.txt +13 -0
  56. package/dist/lib/bootstrap/bootstrap-icons.js.map +1 -0
  57. package/dist/lib/bootstrap/bootstrap.css +2 -0
  58. package/dist/lib/bootstrap/bootstrap.css.map +1 -0
  59. package/dist/lib/bootstrap/bootstrap.js +3 -0
  60. package/dist/lib/bootstrap/bootstrap.js.LICENSE.txt +44 -0
  61. package/dist/lib/bootstrap/bootstrap.js.map +1 -0
  62. package/dist/lib/chartjs/chart.js +3 -0
  63. package/dist/lib/chartjs/chart.js.LICENSE.txt +1467 -0
  64. package/dist/lib/chartjs/chart.js.map +1 -0
  65. package/dist/lib/datatables/datatables.css +2 -0
  66. package/dist/lib/datatables/datatables.css.map +1 -0
  67. package/dist/lib/datatables/datatables.js +3 -0
  68. package/dist/lib/datatables/datatables.js.LICENSE.txt +8988 -0
  69. package/dist/lib/datatables/datatables.js.map +1 -0
  70. package/dist/lib/editorjs/editor.js +3 -0
  71. package/dist/lib/editorjs/editor.js.LICENSE.txt +5812 -0
  72. package/dist/lib/editorjs/editor.js.map +1 -0
  73. package/dist/lib/fancyapps/fancyapps.css +2 -0
  74. package/dist/lib/fancyapps/fancyapps.css.map +1 -0
  75. package/dist/lib/fancyapps/fancyapps.js +3 -0
  76. package/dist/lib/fancyapps/fancyapps.js.LICENSE.txt +19 -0
  77. package/dist/lib/fancyapps/fancyapps.js.map +1 -0
  78. package/dist/lib/filepond/filepond.css +2 -0
  79. package/dist/lib/filepond/filepond.css.map +1 -0
  80. package/dist/lib/filepond/filepond.js +3 -0
  81. package/dist/lib/filepond/filepond.js.LICENSE.txt +2797 -0
  82. package/dist/lib/filepond/filepond.js.map +1 -0
  83. package/dist/lib/fullcalendar/fullcalendar.js +3 -0
  84. package/dist/lib/fullcalendar/fullcalendar.js.LICENSE.txt +3787 -0
  85. package/dist/lib/fullcalendar/fullcalendar.js.map +1 -0
  86. package/dist/lib/jquery/jquery-plugin.css +2 -0
  87. package/dist/lib/jquery/jquery-plugin.css.map +1 -0
  88. package/dist/lib/jquery/jquery-plugin.js +3 -0
  89. package/dist/lib/jquery/jquery-plugin.js.LICENSE.txt +60 -0
  90. package/dist/lib/jquery/jquery-plugin.js.map +1 -0
  91. package/dist/lib/jquery/jquery.js +3 -0
  92. package/dist/lib/jquery/jquery.js.LICENSE.txt +3240 -0
  93. package/dist/lib/jquery/jquery.js.map +1 -0
  94. package/dist/lib/jstree/jstree.css +2 -0
  95. package/dist/lib/jstree/jstree.css.map +1 -0
  96. package/dist/lib/jstree/jstree.js +3 -0
  97. package/dist/lib/jstree/jstree.js.LICENSE.txt +42 -0
  98. package/dist/lib/jstree/jstree.js.map +1 -0
  99. package/dist/lib/moment/moment.js +3 -0
  100. package/dist/lib/moment/moment.js.LICENSE.txt +772 -0
  101. package/dist/lib/moment/moment.js.map +1 -0
  102. package/dist/lib/quilljs/quill.css +2 -0
  103. package/dist/lib/quilljs/quill.css.map +1 -0
  104. package/dist/lib/quilljs/quill.js +3 -0
  105. package/dist/lib/quilljs/quill.js.LICENSE.txt +3038 -0
  106. package/dist/lib/quilljs/quill.js.map +1 -0
  107. package/dist/lib/swiperjs/swiper-plugin.css +2 -0
  108. package/dist/lib/swiperjs/swiper-plugin.css.map +1 -0
  109. package/dist/lib/swiperjs/swiper-plugin.js +3 -0
  110. package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +1113 -0
  111. package/dist/lib/swiperjs/swiper-plugin.js.map +1 -0
  112. package/dist/lib/swiperjs/swiper.css +2 -0
  113. package/dist/lib/swiperjs/swiper.css.map +1 -0
  114. package/dist/lib/swiperjs/swiper.js +3 -0
  115. package/dist/lib/swiperjs/swiper.js.LICENSE.txt +651 -0
  116. package/dist/lib/swiperjs/swiper.js.map +1 -0
  117. package/dist/lib/videojs/video.css +2 -0
  118. package/dist/lib/videojs/video.css.map +1 -0
  119. package/dist/lib/videojs/video.js +3 -0
  120. package/dist/lib/videojs/video.js.LICENSE.txt +23391 -0
  121. package/dist/lib/videojs/video.js.map +1 -0
  122. package/package.json +95 -0
  123. package/src/build/backend/css/header.css +252 -0
  124. package/src/build/backend/css/input.css +295 -0
  125. package/src/build/backend/css/list.css +57 -0
  126. package/src/build/backend/css/order.css +99 -0
  127. package/src/build/backend/js/ajax.js +96 -0
  128. package/src/build/backend/js/alert.js +78 -0
  129. package/src/build/backend/js/bootstrap.js +52 -0
  130. package/src/build/backend/js/form/editor.js +293 -0
  131. package/src/build/backend/js/form/file.js +142 -0
  132. package/src/build/backend/js/form/filepond.js +11 -0
  133. package/src/build/backend/js/form/input.js +313 -0
  134. package/src/build/backend/js/form/inputRow.js +164 -0
  135. package/src/build/backend/js/form/send.js +14 -0
  136. package/src/build/backend/js/form/set.js +314 -0
  137. package/src/build/backend/js/jquery.js +15 -0
  138. package/src/build/backend/js/list.js +19 -0
  139. package/src/build/backend/js/modal.js +31 -0
  140. package/src/build/backend/js/pageSetUp.js +125 -0
  141. package/src/build/backend/js/utility.js +38 -0
  142. package/src/build/frontend/css/class/dimension.css +3376 -0
  143. package/src/build/frontend/css/class/function.css +316 -0
  144. package/src/build/frontend/css/class/grid.css +240 -0
  145. package/src/build/frontend/css/class/margin.css +823 -0
  146. package/src/build/frontend/css/class/padding.css +760 -0
  147. package/src/build/frontend/css/class/position.css +351 -0
  148. package/src/build/frontend/css/class/resize.css +24 -0
  149. package/src/build/frontend/css/class/section.css +41 -0
  150. package/src/build/frontend/css/class/text.css +244 -0
  151. package/src/build/frontend/css/components/alert.css +42 -0
  152. package/src/build/frontend/css/components/button.css +107 -0
  153. package/src/build/frontend/css/components/dropdown.css +118 -0
  154. package/src/build/frontend/css/components/form/address.css +26 -0
  155. package/src/build/frontend/css/components/form/checkbox.css +65 -0
  156. package/src/build/frontend/css/components/form/date.css +133 -0
  157. package/src/build/frontend/css/components/form/input.css +176 -0
  158. package/src/build/frontend/css/components/form/select.css +69 -0
  159. package/src/build/frontend/css/components/header/hamburger/hamburger-1.css +56 -0
  160. package/src/build/frontend/css/components/header/hamburger/hamburger.css +58 -0
  161. package/src/build/frontend/css/components/header/header.css +57 -0
  162. package/src/build/frontend/css/components/header/mobile-nav.css +79 -0
  163. package/src/build/frontend/css/components/modal.css +76 -0
  164. package/src/build/frontend/css/components/spinner.css +37 -0
  165. package/src/build/frontend/css/generator/dimension.php +93 -0
  166. package/src/build/frontend/css/generator/margin.php +48 -0
  167. package/src/build/frontend/css/generator/padding.php +48 -0
  168. package/src/build/frontend/css/lib.css +3 -0
  169. package/src/build/frontend/css/main.css +37 -0
  170. package/src/build/frontend/js/alert.js +64 -0
  171. package/src/build/frontend/js/aos.js +9 -0
  172. package/src/build/frontend/js/dropdown.js +73 -0
  173. package/src/build/frontend/js/form/input.js +211 -0
  174. package/src/build/frontend/js/form/list.js +155 -0
  175. package/src/build/frontend/js/form/select.js +108 -0
  176. package/src/build/frontend/js/form/send.js +137 -0
  177. package/src/build/frontend/js/header.js +12 -0
  178. package/src/build/frontend/js/modal.js +26 -0
  179. package/src/build/frontend/js/pageSetUp.js +35 -0
  180. package/src/build/frontend/js/scroll.js +70 -0
  181. package/src/build/frontend/js/utility.js +21 -0
  182. package/src/build/global/js/canvas.js +82 -0
  183. package/src/build/global/js/fetch.js +47 -0
  184. package/src/build/global/js/form/autonumeric.js +136 -0
  185. package/src/build/global/js/form/phone.js +19 -0
  186. package/src/build/global/js/utility.js +88 -0
  187. package/src/build/global/js/video.js +7 -0
  188. package/src/build/lib/editorjs/gallery.js +39 -0
  189. package/src/build/lib/editorjs/hyperlink.js +170 -0
  190. package/src/build/lib/editorjs/video.js +61 -0
  191. package/src/build/lib/swiperjs/effect-carousel.css +24 -0
  192. package/src/build/lib/swiperjs/effect-carousel.esm.js +102 -0
  193. package/src/build/lib/swiperjs/effect-shutters.css +33 -0
  194. package/src/build/lib/swiperjs/effect-shutters.esm.js +114 -0
  195. package/src/build/lib/swiperjs/effect-slicer.css +39 -0
  196. package/src/build/lib/swiperjs/effect-slicer.esm.js +198 -0
  197. package/src/build/lib/swiperjs/swiper-gl.css +44 -0
  198. package/src/build/lib/swiperjs/swiper-gl.esm.js +6063 -0
  199. package/src/export/backend/body-end.js +4 -0
  200. package/src/export/backend/head.js +25 -0
  201. package/src/export/backend/lib.js +0 -0
  202. package/src/export/frontend/body-end.js +9 -0
  203. package/src/export/frontend/head.js +42 -0
  204. package/src/export/frontend/lib.js +17 -0
  205. package/src/export/lib/autonumeric/autonumeric.js +3 -0
  206. package/src/export/lib/bootstrap/bootstrap-datepicker.js +4 -0
  207. package/src/export/lib/bootstrap/bootstrap-icons.js +2 -0
  208. package/src/export/lib/bootstrap/bootstrap.js +3 -0
  209. package/src/export/lib/chartjs/chart.js +4 -0
  210. package/src/export/lib/datatables/datatables.js +6 -0
  211. package/src/export/lib/editorjs/editor.js +48 -0
  212. package/src/export/lib/fancyapps/fancyapps.js +7 -0
  213. package/src/export/lib/filepond/filepond.js +51 -0
  214. package/src/export/lib/fullcalendar/fullcalendar.js +29 -0
  215. package/src/export/lib/jquery/jquery-plugin.js +14 -0
  216. package/src/export/lib/jquery/jquery.js +4 -0
  217. package/src/export/lib/jstree/jstree.js +2 -0
  218. package/src/export/lib/moment/moment.js +12 -0
  219. package/src/export/lib/quilljs/quill.js +4 -0
  220. package/src/export/lib/swiperjs/swiper-plugin.js +20 -0
  221. package/src/export/lib/swiperjs/swiper.js +4 -0
  222. package/src/export/lib/videojs/video.js +3 -0
  223. package/webpack.config.js +79 -0
@@ -0,0 +1,2797 @@
1
+ /* eslint-disable */
2
+
3
+ /* harmony import */
4
+
5
+ /* webpack/runtime/compat get default export */
6
+
7
+ /*!
8
+ * FilePond 4.31.1
9
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
10
+ * Please visit https://pqina.nl/filepond/ for details.
11
+ */
12
+
13
+ /*!
14
+ * FilePondPluginFileMetadata 1.0.8
15
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
16
+ * Please visit https://pqina.nl/filepond/ for details.
17
+ */
18
+
19
+ /*!
20
+ * FilePondPluginFileValidateSize 2.2.8
21
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
22
+ * Please visit https://pqina.nl/filepond/ for details.
23
+ */
24
+
25
+ /*!
26
+ * FilePondPluginFileValidateType 1.2.9
27
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
28
+ * Please visit https://pqina.nl/filepond/ for details.
29
+ */
30
+
31
+ /*!
32
+ * FilePondPluginGetFile 1.1.0
33
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
34
+ * Please visit undefined for details.
35
+ */
36
+
37
+ /*!
38
+ * FilePondPluginImageCrop 2.0.6
39
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
40
+ * Please visit https://pqina.nl/filepond/ for details.
41
+ */
42
+
43
+ /*!
44
+ * FilePondPluginImageEdit 1.6.3
45
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
46
+ * Please visit https://pqina.nl/filepond/ for details.
47
+ */
48
+
49
+ /*!
50
+ * FilePondPluginImageExifOrientation 1.0.11
51
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
52
+ * Please visit https://pqina.nl/filepond/ for details.
53
+ */
54
+
55
+ /*!
56
+ * FilePondPluginImagePreview 4.6.12
57
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
58
+ * Please visit https://pqina.nl/filepond/ for details.
59
+ */
60
+
61
+ /*!
62
+ * FilePondPluginImageResize 2.0.10
63
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
64
+ * Please visit https://pqina.nl/filepond/ for details.
65
+ */
66
+
67
+ /*!
68
+ * FilePondPluginImageTransform 3.8.7
69
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
70
+ * Please visit https://pqina.nl/filepond/ for details.
71
+ */
72
+
73
+ /*!
74
+ * FilePondPluginImageValidateSize 1.2.7
75
+ * Licensed under MIT, https://opensource.org/licenses/MIT/
76
+ * Please visit https://pqina.nl/filepond/ for details.
77
+ */
78
+
79
+ /*#__PURE__*/
80
+
81
+ /**
82
+ * Appends the plugin to the target element
83
+ */
84
+
85
+ /**
86
+ * Browse the file system for a file
87
+ */
88
+
89
+ /**
90
+ * Clears all files from the files list
91
+ */
92
+
93
+ /**
94
+ * Destroys the app
95
+ */
96
+
97
+ /**
98
+ * Inserts the plugin after the target element
99
+ */
100
+
101
+ /**
102
+ * Inserts the plugin before the target element
103
+ */
104
+
105
+ /**
106
+ * Load the given file
107
+ * @param source - the source of the file (either a File, base64 data uri or url)
108
+ * @param options - object, { index: 0 }
109
+ */
110
+
111
+ /**
112
+ * Load the given files
113
+ * @param sources - the sources of the files to load
114
+ * @param options - object, { index: 0 }
115
+ */
116
+
117
+ /**
118
+ * Moves a file to a new location in the files list
119
+ */
120
+
121
+ /**
122
+ * Override options defined in options object
123
+ * @param options
124
+ */
125
+
126
+ /**
127
+ * Removes a file by its name
128
+ * @param query { string, number, null }
129
+ */
130
+
131
+ /**
132
+ * Replaces an element with the app
133
+ */
134
+
135
+ /**
136
+ * Request prepare output for file with given name
137
+ * @param query { string, number, null }
138
+ */
139
+
140
+ /**
141
+ * Restores the original element
142
+ */
143
+
144
+ /**
145
+ * Returns all files (wrapped in public api)
146
+ */
147
+
148
+ /**
149
+ * Returns the current pond status
150
+ */
151
+
152
+ /**
153
+ * Returns the file objects matching the given query
154
+ * @param query { string, number, null }
155
+ */
156
+
157
+ /**
158
+ * Returns the root element
159
+ */
160
+
161
+ /**
162
+ * Returns true if the app root is attached to given element
163
+ * @param element
164
+ */
165
+
166
+ /**
167
+ * Sort list of files
168
+ */
169
+
170
+ /**
171
+ * Starts preparing output of all files
172
+ */
173
+
174
+ /**
175
+ * Starts uploading all files
176
+ */
177
+
178
+ /**
179
+ * Upload file with given name
180
+ * @param query { string, number, null }
181
+ */
182
+
183
+ /**
184
+ * @param source
185
+ * @param index
186
+ * @param interactionMethod
187
+ */
188
+
189
+ /**
190
+ * Aborts all ongoing processes
191
+ */
192
+
193
+ /**
194
+ * Reads from dom (never call manually)
195
+ * @private
196
+ */
197
+
198
+ /**
199
+ * Sets initial files
200
+ */
201
+
202
+ /**
203
+ * Writes to dom (never call manually)
204
+ * @private
205
+ */
206
+
207
+ /**
208
+ * Filters
209
+ */
210
+
211
+ /**
212
+ * Image Preview related
213
+ */
214
+
215
+ /**
216
+ * Polyfill Edge and IE when in Browser
217
+ */
218
+
219
+ /**
220
+ * Generates the download icon
221
+ */
222
+
223
+ /**
224
+ * Image Auto Crop Plugin
225
+ */
226
+
227
+ /**
228
+ * Image Edit Proxy Plugin
229
+ */
230
+
231
+ /**
232
+ * Read Image Orientation Plugin
233
+ */
234
+
235
+ /**
236
+ * Register the download component by inserting the download icon
237
+ */
238
+
239
+ /************************************************************************/
240
+
241
+ /******/
242
+
243
+ /***/
244
+
245
+ //
246
+
247
+ // 'always'
248
+
249
+ // 'mismatch' (future feature, only applied if quality differs from input)
250
+
251
+ // 'optional'
252
+
253
+ // (message, cb) => {}
254
+
255
+ // - "camera", "microphone" or "camcorder",
256
+
257
+ // - Does not work with multiple on apple devices
258
+
259
+ // - If set, acceptedFileTypes must be made to match with media wildcard "image/*", "audio/*" or "video/*"
260
+
261
+ // - add metadata
262
+
263
+ // - contain => pick smaller dimension
264
+
265
+ // - cover => pick biggest dimension
266
+
267
+ // - extensions: .png, .jpg, .jpeg ( not enabled yet )
268
+
269
+ // - force => force set size
270
+
271
+ // - mime types: image/png, image/jpeg, image/gif
272
+
273
+ // - must be comma separated
274
+
275
+ // - read data (quickly)
276
+
277
+ // - wildcards: image/*
278
+
279
+ // -1, don't move items to accomodate (either add to top or bottom)
280
+
281
+ // 0. perspective
282
+
283
+ // 1. translate
284
+
285
+ // 2. scale
286
+
287
+ // 3. rotate
288
+
289
+ // A metadata object to add to all files
290
+
291
+ // Add className
292
+
293
+ // Add id
294
+
295
+ // Added for browsers that do not return the thousands separator (happend on native browser Android 4.4.4)
296
+
297
+ // All items processed? No errors?
298
+
299
+ // Allow browsing the file system
300
+
301
+ // Allow dropping a file on other file to replace it (only works when multiple is set to false)
302
+
303
+ // Allow dropping of files
304
+
305
+ // Allow dropping of files anywhere on page (prevents browser from opening file if dropped outside of Up)
306
+
307
+ // Allow media capture when value is set
308
+
309
+ // Allow multiple files (disabled by default, as multiple attribute is also required on input to allow multiple)
310
+
311
+ // Allow only selecting directories with browse (no support for filtering dnd at this point)
312
+
313
+ // Allow pasting files
314
+
315
+ // Allow reordering of files
316
+
317
+ // Allow user to remove a file
318
+
319
+ // Allows filtering of markup to only show certain shapes
320
+
321
+ // Allows user to process a file, when set to false, this removes the file upload button
322
+
323
+ // Allows user to revert file upload
324
+
325
+ // Amount of times to retry upload of a chunk when it fails
326
+
327
+ // Assign the DataTransfer files list to the file input
328
+
329
+ // Assistant notifies assistive tech when content changes
330
+
331
+ // Background panel
332
+
333
+ // Can't run on Opera Mini due to lack of everything
334
+
335
+ // Check if module is in cache
336
+
337
+ // Chunks
338
+
339
+ // Create a DataTransfer instance and add a newly created file
340
+
341
+ // Create a new module (and put it into the cache)
342
+
343
+ // Custom function to detect type of file
344
+
345
+ // Custom function to use as image measure
346
+
347
+ // DOCTYPE needs to be set for this to work
348
+
349
+ // Data
350
+
351
+ // Deal as if is external URL, let's load it!
352
+
353
+ // Default index in list to add items that have been dropped at the top of the list
354
+
355
+ // Default is locale separator
356
+
357
+ // Done!
358
+
359
+ // Drag 'n Drop related
360
+
361
+ // Drop needs to happen on element (set to false to also load drops outside of Up)
362
+
363
+ // Enable chunked uploads
364
+
365
+ // Enable or disable file renaming
366
+
367
+ // Enable or disable file type validation
368
+
369
+ // Enable or disable image orientation reading
370
+
371
+ // Enable or disable image preview
372
+
373
+ // Enable or disable image resizing
374
+
375
+ // Enable or disable validating files on drop
376
+
377
+ // Enables custom validity messages
378
+
379
+ // Enables or disables reading average image color
380
+
381
+ // Enables or disables the previewing of markup
382
+
383
+ // Error thrown when image can not be loaded
384
+
385
+ // Every JPEG file starts from binary value '0xFFD8'
386
+
387
+ // Execute the module function
388
+
389
+ // Expose plugin options
390
+
391
+ // Feature toggles
392
+
393
+ // Field label
394
+
395
+ // File size calculations, can set to 1024, this is only used for display, properties use file size base 1000
396
+
397
+ // FilePond
398
+
399
+ // Filter the files that need to be validated for size
400
+
401
+ // Firefox versions before 58 will freeze when running createImageBitmap
402
+
403
+ // First 2bytes defines byte align of TIFF data.
404
+
405
+ // Fixed preview height
406
+
407
+ // Force use of chunk uploads even for files smaller than chunk size
408
+
409
+ // Get TIFF Header
410
+
411
+ // Has to be a browser
412
+
413
+ // If is not async should prepare now
414
+
415
+ // If it is 0x4949="I I", it means "Intel" type byte align
416
+
417
+ // If it's not present, exit here
418
+
419
+ // Input requirements
420
+
421
+ // Invalid
422
+
423
+ // Label to show when an image is too small or image is too big
424
+
425
+ // Labels and status messages
426
+
427
+ // List of items
428
+
429
+ // Load Files
430
+
431
+ // Load base 64, set default name to current date
432
+
433
+ // Load blobs, set default name to current date
434
+
435
+ // Max image height
436
+
437
+ // Max individual file size in bytes
438
+
439
+ // Max number of files
440
+
441
+ // Max size of preview file for when createImageBitmap is not supported
442
+
443
+ // Max size of preview file that we allow to try to instant preview if createImageBitmap is not supported, else image is queued for loading
444
+
445
+ // Max total file size in bytes
446
+
447
+ // Maximum files to upload in parallel
448
+
449
+ // Measure (tests if fixed height was set)
450
+
451
+ // Min image height
452
+
453
+ // Min individual file size in bytes
454
+
455
+ // Missing 0x45786966 Marker? No Exif Header, stop here
456
+
457
+ // Nothing found
458
+
459
+ // PRIVATE API -------------------------------------------------------------------------------------
460
+
461
+ // Require these APIs to feature detect a modern browser
462
+
463
+ // Required amount of pixels in the image
464
+
465
+ // Required dimensions
466
+
467
+ // Return the exports of the module
468
+
469
+ // Revert mode
470
+
471
+ // Set to 'force' to require the file to be reverted before removal
472
+
473
+ // Set to false to always add items to begin or end of list
474
+
475
+ // Should upload files immediately on drop
476
+
477
+ // Should we upscale small images to fit the max bounding box of the preview area
478
+
479
+ // Size of chunks (5MB default)
480
+
481
+ // Start at 2 as we skipped two bytes (FFD8)
482
+
483
+ // Style of the transparancy indicator used behind images
484
+
485
+ // TODO: Fix, should not be needed to kick the internal loop in case no processes are running
486
+
487
+ // TODO: if we can, throw error to indicate the items cannot by dropped
488
+
489
+ // TODO: see if we can optimize this by measuring root rect
490
+
491
+ // TODO: test for directories (should not be allowed)
492
+
493
+ // The amount of extra pixels added to the image preview to allow comfortable zooming
494
+
495
+ // The module cache
496
+
497
+ // The require function
498
+
499
+ // The server api end points to use for uploading (see docs)
500
+
501
+ // There's our APP1 Marker
502
+
503
+ // This aint no JPEG
504
+
505
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
506
+
507
+ // Try store file if `server` not set
508
+
509
+ // Turn into an array of objects so no matter what the input, we can handle it the same way
510
+
511
+ // Upload related
512
+
513
+ // Use FileReader, problem is that the files property gets lost in the process
514
+
515
+ // We check against the normal toString output and if they're the same return a comma when decimal separator is a dot
516
+
517
+ // What file types to accept
518
+
519
+ // Where to put file
520
+
521
+ // [ https://github.com/nielsboogaard/filepond-plugin-get-file ]
522
+
523
+ // [ https://pqina.nl/filepond/docs/api/plugins/file-metadata/ ]
524
+
525
+ // [ https://pqina.nl/filepond/docs/api/plugins/file-validate-size/ ]
526
+
527
+ // [ https://pqina.nl/filepond/docs/api/plugins/file-validate-type/ ]
528
+
529
+ // [ https://pqina.nl/filepond/docs/api/plugins/image-crop/ ]
530
+
531
+ // [ https://pqina.nl/filepond/docs/api/plugins/image-edit/ ]
532
+
533
+ // [ https://pqina.nl/filepond/docs/api/plugins/image-exif-orientation/ ]
534
+
535
+ // [ https://pqina.nl/filepond/docs/api/plugins/image-preview/ ]
536
+
537
+ // [ https://pqina.nl/filepond/docs/api/plugins/image-resize/ ]
538
+
539
+ // [ https://pqina.nl/filepond/docs/api/plugins/image-transform/ ]
540
+
541
+ // [ https://pqina.nl/filepond/docs/api/plugins/image-validate-size/ ]
542
+
543
+ // [-1, 0, 0, 1, width, 0]
544
+
545
+ // [1, 0, 0, -1, 0, height]
546
+
547
+ // _not_ getting the style value is faster
548
+
549
+ // a completed upload will have a serverFileReference, a failed chunked upload where
550
+
551
+ // a file is in error state
552
+
553
+ // a new action happened, let's get the matching styles
554
+
555
+ // abort
556
+
557
+ // abort active process request
558
+
559
+ // abort actual request
560
+
561
+ // abort does not expect a value
562
+
563
+ // abort file load
564
+
565
+ // accepted is wildcard mime type
566
+
567
+ // access to custom children references
568
+
569
+ // access to data store
570
+
571
+ // action handlers
572
+
573
+ // actions in next write operation
574
+
575
+ // active app instances, used to redraw the apps and to find the later
576
+
577
+ // active processes
578
+
579
+ // actual load is done let's share results
580
+
581
+ // actual processing progress
582
+
583
+ // add
584
+
585
+ // add additional option translators
586
+
587
+ // add already selected files
588
+
589
+ // add as client
590
+
591
+ // add class
592
+
593
+ // add credits
594
+
595
+ // add default output version if output default set to true or if no variants defined
596
+
597
+ // add edit button to preview
598
+
599
+ // add filters
600
+
601
+ // add getters and setters
602
+
603
+ // add headers
604
+
605
+ // add height
606
+
607
+ // add index no longer needed till possibly next draw
608
+
609
+ // add initial listener
610
+
611
+ // add it to the list for easy updating from the _write method
612
+
613
+ // add item to array
614
+
615
+ // add item to list
616
+
617
+ // add items!
618
+
619
+ // add metadata under same name
620
+
621
+ // add mixin functionality
622
+
623
+ // add name attribute
624
+
625
+ // add new files
626
+
627
+ // add one pixel leeway, when using percentages for item width total items can be 1.99 per row
628
+
629
+ // add opacity
630
+
631
+ // add original file
632
+
633
+ // add plugin options to default options
634
+
635
+ // add position attribute
636
+
637
+ // add progress indicators
638
+
639
+ // add resize transforms if set
640
+
641
+ // add rest to sources
642
+
643
+ // add transforms
644
+
645
+ // add width
646
+
647
+ // add!
648
+
649
+ // adds a plugin extension
650
+
651
+ // adjust for parent offset
652
+
653
+ // adjust index if is not allowed to pick location
654
+
655
+ // align next frame
656
+
657
+ // all chunks
658
+
659
+ // all done?
660
+
661
+ // all is well
662
+
663
+ // all items should be validated by all filters as valid
664
+
665
+ // allow all other actions
666
+
667
+ // allow editing
668
+
669
+ // allow parsing of formdata
670
+
671
+ // allow plugins to alter the file data
672
+
673
+ // allow quick validation of dropped items
674
+
675
+ // allow transfer of these items
676
+
677
+ // already at target
678
+
679
+ // already contained?
680
+
681
+ // already has crop metadata set?
682
+
683
+ // already queued for processing
684
+
685
+ // already registered
686
+
687
+ // also 0 is not a valid width or height
688
+
689
+ // always remove the required attribute when more than zero items
690
+
691
+ // always use jpg extension
692
+
693
+ // an error was thrown while loading the file, we need to switch to error state
694
+
695
+ // an input file never has a server file reference
696
+
697
+ // and we've not yet called the complete method
698
+
699
+ // animate view out of view
700
+
701
+ // append additional margin (top and left margins are included in top and left automatically)
702
+
703
+ // append created child views to root node
704
+
705
+ // append crop data
706
+
707
+ // append image presenter
708
+
709
+ // append new elements to DOM and update those
710
+
711
+ // append other props
712
+
713
+ // append size data
714
+
715
+ // append to DOM
716
+
717
+ // applies all image transforms to the image data array
718
+
719
+ // apply active styles to element
720
+
721
+ // apply filtered colors
722
+
723
+ // apply initial style properties
724
+
725
+ // apply style properties
726
+
727
+ // apply styles
728
+
729
+ // apply view props
730
+
731
+ // archive the item, this does not remove it from the list
732
+
733
+ // as image load could take a while and fire when draw loop is resting we need to give it a kick
734
+
735
+ // as revert will remove file from list
736
+
737
+ // as we're now processing, fire the progress event
738
+
739
+ // as we've now loaded the file the loader is no longer required
740
+
741
+ // assign new value
742
+
743
+ // assistive only
744
+
745
+ // attach events
746
+
747
+ // available height for list
748
+
749
+ // available space on horizontal axis
750
+
751
+ // background image of the output canvas
752
+
753
+ // bool to indicate if we're full or not
754
+
755
+ // build action object
756
+
757
+ // build plugin
758
+
759
+ // busy processing or loading
760
+
761
+ // by default not marked for removal
762
+
763
+ // by default we can drop
764
+
765
+ // calculate available space round image center position
766
+
767
+ // calculate average image color, disabled for now
768
+
769
+ // calculate height based on width
770
+
771
+ // calculate inner width and height
772
+
773
+ // calculate new heights and widths
774
+
775
+ // calculate outer width and height
776
+
777
+ // calculate progress values
778
+
779
+ // calculate scalar required to fit image
780
+
781
+ // calculate scaled preview image size
782
+
783
+ // calculate size of ring
784
+
785
+ // calculate spring force
786
+
787
+ // calculate total progress fraction
788
+
789
+ // call
790
+
791
+ // call did create
792
+
793
+ // call initial filter, will return a promise
794
+
795
+ // call read (need to know the size of these elements)
796
+
797
+ // callbacks (load, error, progress, abort, transfer)
798
+
799
+ // called before creating the blob, receives canvas, expects promise resolve with canvas
800
+
801
+ // called for each file that is loaded
802
+
803
+ // called for each view that is created right after the 'create' method
804
+
805
+ // called when file has loaded succesfully
806
+
807
+ // called when the file is about to be processed so it can be piped through the transform filters
808
+
809
+ // called when the file is loaded so it can be piped through the filters
810
+
811
+ // can always assign default value
812
+
813
+ // can now safely remove from view
814
+
815
+ // can update progress indicator
816
+
817
+ // can't add twice
818
+
819
+ // can't compute progress
820
+
821
+ // can't draw on half pixels
822
+
823
+ // can't upscale image, so if already at correct scale, exit
824
+
825
+ // cancel updater
826
+
827
+ // cannot revert without a server id for this process
828
+
829
+ // canvas memory limit
830
+
831
+ // chain filters
832
+
833
+ // check if file should be filtered
834
+
835
+ // checkmark
836
+
837
+ // classname to put on wrapper
838
+
839
+ // clean up
840
+
841
+ // clean up event
842
+
843
+ // clear
844
+
845
+ // clear actions queue (we don't want no double actions)
846
+
847
+ // clear field value
848
+
849
+ // clear group after set amount of time so the status is not read twice
850
+
851
+ // clear history if aspect ratio has changed
852
+
853
+ // click link (will then in turn activate file input)
854
+
855
+ // collected some meta data already
856
+
857
+ // compare old value against new value, if they're the same, we're not updating
858
+
859
+ // const children = view.childViews;
860
+
861
+ // construct private api
862
+
863
+ // continue processing
864
+
865
+ // continue with the unaltered dataset
866
+
867
+ // copy Buttons object
868
+
869
+ // copy relative path
870
+
871
+ // copy relevant props
872
+
873
+ // correct image orientation
874
+
875
+ // correctly removed
876
+
877
+ // covering target size
878
+
879
+ // create
880
+
881
+ // create a dnd client
882
+
883
+ // create a new blank item
884
+
885
+ // create a temporary hyperlink to force the browser to download the file
886
+
887
+ // create actual api object
888
+
889
+ // create button
890
+
891
+ // create copy of actions queue
892
+
893
+ // create default event
894
+
895
+ // create element with svg and get size
896
+
897
+ // create event object to be dispatched
898
+
899
+ // create fallback preview
900
+
901
+ // create file info view
902
+
903
+ // create file status view
904
+
905
+ // create final options object by setting options object and then overriding options supplied on element
906
+
907
+ // create method, creates apps and adds them to the app array
908
+
909
+ // create new instance for each hook
910
+
911
+ // create new observer, does not yet exist for this element
912
+
913
+ // create new svg file
914
+
915
+ // create overlay view
916
+
917
+ // create perceived performance progress indicator
918
+
919
+ // create regexp shortcut
920
+
921
+ // create request
922
+
923
+ // create response
924
+
925
+ // create the button views
926
+
927
+ // create the first image
928
+
929
+ // create the get file plugin
930
+
931
+ // create the image edit plugin, but only do so if the item is an image
932
+
933
+ // create the image preview plugin, but only do so if the item is an image
934
+
935
+ // create the label and link it to the file browser
936
+
937
+ // create the view
938
+
939
+ // created the item, let plugins add methods
940
+
941
+ // crop data to pass to editor
942
+
943
+ // current active styles
944
+
945
+ // current drag position
946
+
947
+ // current item status
948
+
949
+ // custom handler (should also handle file, load, error, progress and abort)
950
+
951
+ // custom initial files array
952
+
953
+ // custom type detector method
954
+
955
+ // data has been transferred to canvas ( if was ImageBitmap )
956
+
957
+ // data has moved to data.js
958
+
959
+ // default is single definition
960
+
961
+ // default options
962
+
963
+ // default start height
964
+
965
+ // default values
966
+
967
+ // default view definition
968
+
969
+ // define __esModule on exports
970
+
971
+ // define getter functions for harmony exports
972
+
973
+ // define new active styles
974
+
975
+ // delete root.element.dataset.disabled; <= this does not work on iOS 10
976
+
977
+ // destroy client
978
+
979
+ // destroy measure element
980
+
981
+ // destroy view
982
+
983
+ // destroy worker
984
+
985
+ // destroys apps and removes them from the app array
986
+
987
+ // determine clip width and height
988
+
989
+ // determine if file type will change
990
+
991
+ // determine if width changed
992
+
993
+ // determine image size of this item
994
+
995
+ // determine the format of the blob that we will output
996
+
997
+ // determines if a file may be dropped
998
+
999
+ // different amount of keys
1000
+
1001
+ // directories are returned in batches, we need to process all batches before we're done
1002
+
1003
+ // disable the field
1004
+
1005
+ // dispatch destroy
1006
+
1007
+ // dispatch set event for each option
1008
+
1009
+ // do local or remote request based on if the url is external
1010
+
1011
+ // do mapping of object properties
1012
+
1013
+ // do submapping
1014
+
1015
+ // doesn't need CSSSupports but is a good way to detect Safari 9+ (we do want to support IE11 though)
1016
+
1017
+ // dom modifiers
1018
+
1019
+ // don't do anything
1020
+
1021
+ // don't do anything while hidden
1022
+
1023
+ // don't handle archived items, an item could have been archived (load aborted) while being prepared
1024
+
1025
+ // don't handle archived items, an item could have been archived (load aborted) while waiting to be prepared
1026
+
1027
+ // don't include in object
1028
+
1029
+ // don't re-render if optimizing or hidden (width will be zero resulting in weird animations)
1030
+
1031
+ // don't set error state when reverting is optional, it will always resolve
1032
+
1033
+ // don't update clip layout
1034
+
1035
+ // don't want to click twice
1036
+
1037
+ // done
1038
+
1039
+ // done (filter out empty files)!
1040
+
1041
+ // done loading
1042
+
1043
+ // done!
1044
+
1045
+ // dont adjust height
1046
+
1047
+ // dragging
1048
+
1049
+ // draw image
1050
+
1051
+ // draw new
1052
+
1053
+ // draw the image
1054
+
1055
+ // draw the image but first fix orientation and set correct flip
1056
+
1057
+ // draw the scaled down version here and use that as source so bitmapdata can be closed
1058
+
1059
+ // draw to canvas and start transform chain
1060
+
1061
+ // each view requires reference to store
1062
+
1063
+ // edit item classname
1064
+
1065
+ // editor object
1066
+
1067
+ // enable or disable image cropping
1068
+
1069
+ // enable or disable image editing
1070
+
1071
+ // encode url
1072
+
1073
+ // error during load
1074
+
1075
+ // error is expected to be an object with type, code, body
1076
+
1077
+ // error labels
1078
+
1079
+ // error response if item archived
1080
+
1081
+ // eslint-disable-next-line no-restricted-globals
1082
+
1083
+ // event behaviour
1084
+
1085
+ // event handlers
1086
+
1087
+ // event info
1088
+
1089
+ // event object to params used for `on()` event handlers and callbacks `oninit()`
1090
+
1091
+ // exit
1092
+
1093
+ // exit if image size is too high and no createImageBitmap support
1094
+
1095
+ // exit if this is not an image
1096
+
1097
+ // expand rect to fit all child rectangles
1098
+
1099
+ // expects promise resolved with blob
1100
+
1101
+ // expose
1102
+
1103
+ // expose api
1104
+
1105
+ // expose internal write api
1106
+
1107
+ // expose plugin
1108
+
1109
+ // expose public api
1110
+
1111
+ // extend item methods
1112
+
1113
+ // extract files and move value of webkitRelativePath path to _relativePath
1114
+
1115
+ // fallback
1116
+
1117
+ // file appended
1118
+
1119
+ // file is always section
1120
+
1121
+ // file is fine, let's pass it back
1122
+
1123
+ // file load progress
1124
+
1125
+ // file mock data, if defined
1126
+
1127
+ // file model reference
1128
+
1129
+ // file panel
1130
+
1131
+ // file received
1132
+
1133
+ // file states
1134
+
1135
+ // file stub is already there
1136
+
1137
+ // file to open
1138
+
1139
+ // file view
1140
+
1141
+ // filename
1142
+
1143
+ // files uploading at the exact same speed
1144
+
1145
+ // filesize
1146
+
1147
+ // filter images to transform
1148
+
1149
+ // filter out invalid file items, used to filter dropped directory contents
1150
+
1151
+ // filtering if an item is allowed in hopper
1152
+
1153
+ // filters file items to determine which are shown as preview
1154
+
1155
+ // find Orientation tag
1156
+
1157
+ // find matching filters for this key
1158
+
1159
+ // find resize
1160
+
1161
+ // finish up
1162
+
1163
+ // fire enter event
1164
+
1165
+ // fire event
1166
+
1167
+ // fire loaded event so we know when FilePond is available
1168
+
1169
+ // fire pluginloaded event if running in browser, this allows registering the plugin when using async script tags
1170
+
1171
+ // fire the abort event so we can switch visuals
1172
+
1173
+ // fire update
1174
+
1175
+ // first filter to kick things of
1176
+
1177
+ // fix height of panel
1178
+
1179
+ // fix height of panel so it adheres to aspect ratio
1180
+
1181
+ // fixed aspect ratio
1182
+
1183
+ // fixed height
1184
+
1185
+ // flatten groups
1186
+
1187
+ // flexible height
1188
+
1189
+ // flip horizontal
1190
+
1191
+ // flip vertical
1192
+
1193
+ // for IE10
1194
+
1195
+ // for async scenarios
1196
+
1197
+ // for example: if distance is 10 ms and interval is 16 ms,
1198
+
1199
+ // for modern browsers
1200
+
1201
+ // for now, update existing image when filtering
1202
+
1203
+ // force progress to 1 as we're now done
1204
+
1205
+ // force release of canvas memory
1206
+
1207
+ // found the orientation tag
1208
+
1209
+ // full path to remote server is stored in metadata with key 'url'
1210
+
1211
+ // get a quick reference to the item id
1212
+
1213
+ // get all actions from store
1214
+
1215
+ // get all keys passed
1216
+
1217
+ // get arc path
1218
+
1219
+ // get base transformation matrix
1220
+
1221
+ // get box bounds, we do this only once
1222
+
1223
+ // get child rects
1224
+
1225
+ // get crop
1226
+
1227
+ // get data from canvas
1228
+
1229
+ // get default object and add as metadata
1230
+
1231
+ // get drag area dimensions
1232
+
1233
+ // get element at position
1234
+
1235
+ // get exif orientation
1236
+
1237
+ // get file reference
1238
+
1239
+ // get file url
1240
+
1241
+ // get filename
1242
+
1243
+ // get filename parts
1244
+
1245
+ // get filter
1246
+
1247
+ // get headers
1248
+
1249
+ // get height min and max
1250
+
1251
+ // get id reference
1252
+
1253
+ // get image data reference
1254
+
1255
+ // get image transform variants
1256
+
1257
+ // get interaction type
1258
+
1259
+ // get item
1260
+
1261
+ // get item children elements and sort based on list sort
1262
+
1263
+ // get item reference
1264
+
1265
+ // get last added image
1266
+
1267
+ // get new index
1268
+
1269
+ // get new index of dragged item
1270
+
1271
+ // get next chunk to process
1272
+
1273
+ // get optional custom measure function
1274
+
1275
+ // get orientation from exif data
1276
+
1277
+ // get other variants
1278
+
1279
+ // get quick reference
1280
+
1281
+ // get quick reference to Type utils
1282
+
1283
+ // get quick references to various high level parts of the upload tool
1284
+
1285
+ // get reference to control
1286
+
1287
+ // get reference to created view
1288
+
1289
+ // get required dimensions
1290
+
1291
+ // get root
1292
+
1293
+ // get separate options for easier use
1294
+
1295
+ // get subtype
1296
+
1297
+ // get svg text
1298
+
1299
+ // get the file object
1300
+
1301
+ // get the required aspect ratio and exit if it's not set
1302
+
1303
+ // get the transfer items as promises
1304
+
1305
+ // get the type of the new value
1306
+
1307
+ // get title
1308
+
1309
+ // get url to file (we'll revoke it later on when done)
1310
+
1311
+ // get variants
1312
+
1313
+ // get width and height from action, and swap of orientation is incorrect
1314
+
1315
+ // get width of stroke
1316
+
1317
+ // getDefaultExport function for compatibility with non-harmony modules
1318
+
1319
+ // gets the item type
1320
+
1321
+ // getting a serverId succeeded but >=0 chunks have been uploaded will have transferId set
1322
+
1323
+ // go
1324
+
1325
+ // go!
1326
+
1327
+ // grid
1328
+
1329
+ // grid pattern
1330
+
1331
+ // group under single property
1332
+
1333
+ // had no previous state, means we are entering this client
1334
+
1335
+ // handle changes to the input field
1336
+
1337
+ // handle interactions
1338
+
1339
+ // handle item
1340
+
1341
+ // handle keys
1342
+
1343
+ // handle next item!
1344
+
1345
+ // handle transform origin
1346
+
1347
+ // has returned new filename immidiately
1348
+
1349
+ // has timeout so doesn't interfere with remove action
1350
+
1351
+ // hide for screenreaders
1352
+
1353
+ // hide label
1354
+
1355
+ // hide the label for screenreaders, the input element will read the contents of the label when it's focussed. If we don't set aria-hidden the screenreader will also navigate the contents of the label separately from the input.
1356
+
1357
+ // hide while contains 0 value
1358
+
1359
+ // history of updates
1360
+
1361
+ // hooks
1362
+
1363
+ // how attributes of the input element are mapped to the options for the plugin
1364
+
1365
+ // https://github.com/pqina/filepond-plugin-image-preview/issues/57
1366
+
1367
+ // id of file on server
1368
+
1369
+ // id of file transfer on server
1370
+
1371
+ // id of first item we're about to remove
1372
+
1373
+ // id we are allowed to upload the file immediately, lets do it
1374
+
1375
+ // if action has an id, filter out actions that don't have this child id
1376
+
1377
+ // if allows multiple items, we check if a max item count has been set, if not, there's no limit
1378
+
1379
+ // if already at target, we done!
1380
+
1381
+ // if already done processing or tried to revert but didn't work, try again
1382
+
1383
+ // if aspect ratio has changed, we need to create a new image
1384
+
1385
+ // if blob has name property, use as filename if no filename supplied
1386
+
1387
+ // if cannot have multiple items, to add one item it should currently not contain items
1388
+
1389
+ // if chunked uploads are enabled and we're uploading in chunks for this specific file
1390
+
1391
+ // if client want to download file from remote server
1392
+
1393
+ // if currently has no position, set target and position to this value
1394
+
1395
+ // if currently overflowing but no longer received overflow
1396
+
1397
+ // if currently uploading, cancel upload
1398
+
1399
+ // if does not allow multiple items and dragging more than one item
1400
+
1401
+ // if fake progress is done, and a response has been received,
1402
+
1403
+ // if file is already in list
1404
+
1405
+ // if file was uploaded but processing was cancelled during perceived processor time store file reference
1406
+
1407
+ // if filename supplied but no extension and filename has extension
1408
+
1409
+ // if has been processed remove it from the server as well
1410
+
1411
+ // if has filter and has resize, move filter to resize operation
1412
+
1413
+ // if has received blob, we go with blob, if no response, we return null
1414
+
1415
+ // if has received source, we done
1416
+
1417
+ // if has response object, we've completed the request
1418
+
1419
+ // if image is too small, exit here with original image
1420
+
1421
+ // if index is undefined, append
1422
+
1423
+ // if is a temp server file we prevent async upload call here (as the file is already on the server)
1424
+
1425
+ // if is base64 data uri we need to determine the average size and type
1426
+
1427
+ // if is bool withCredentials
1428
+
1429
+ // if is called multiple times in close succession we combined all calls together to save resources
1430
+
1431
+ // if is cross origin image add cross origin attribute
1432
+
1433
+ // if is custom function, done! Dev handles everything.
1434
+
1435
+ // if is empty, see if we can extract some info from the files property as a fallback
1436
+
1437
+ // if is fixed height or panel has aspect ratio, exit here, height has already been defined
1438
+
1439
+ // if is frozen, no longer fires events
1440
+
1441
+ // if is hidden we need to know so we exit rest mode when revealed
1442
+
1443
+ // if is local item we need to enable upload button so change can be propagated to server
1444
+
1445
+ // if is not overflowing currently but does receive overflow value
1446
+
1447
+ // if is pasting in input or textarea and the target is outside of a filepond scope, ignore
1448
+
1449
+ // if is possible error event, make it the first param
1450
+
1451
+ // if is requesting revert and can revert need to call revert handler (not calling request_ because that would also trigger beforeRemoveHook)
1452
+
1453
+ // if is rotated incorrectly swap width and height
1454
+
1455
+ // if is temp or local file
1456
+
1457
+ // if is valid subtype
1458
+
1459
+ // if is value in kilobytes
1460
+
1461
+ // if is value in megabytes
1462
+
1463
+ // if item not is in new value, remove
1464
+
1465
+ // if item was archived while in queue, jump to next
1466
+
1467
+ // if method is GET, add any received data to url
1468
+
1469
+ // if multiple allowed, we can't replace
1470
+
1471
+ // if new styles does not match current styles, lets update!
1472
+
1473
+ // if no actions, we assume that the view is resting
1474
+
1475
+ // if no extension supplied, exit here
1476
+
1477
+ // if no file loaded we'll wait for the load event
1478
+
1479
+ // if no more clients, clean up observer
1480
+
1481
+ // if no source supplied
1482
+
1483
+ // if no view found, exit
1484
+
1485
+ // if no width or height, just return early.
1486
+
1487
+ // if not allowed to reorder file items, exit here
1488
+
1489
+ // if not allowed, all fine, exit
1490
+
1491
+ // if not in list, remove from object, the instruction will be handled by the server
1492
+
1493
+ // if not supported, no API
1494
+
1495
+ // if not, we can update the current image
1496
+
1497
+ // if one of edges is smaller than target size, exit
1498
+
1499
+ // if only passed options
1500
+
1501
+ // if origin is local, and we're instant uploading, trigger remove of original
1502
+
1503
+ // if parent is a fieldset, get files from parent by selecting all input fields that are not file upload fields
1504
+
1505
+ // if perceived progress is 1 ( wait for perceived progress to complete )
1506
+
1507
+ // if query is item, get the id
1508
+
1509
+ // if reached max capacity and we've just reached it
1510
+
1511
+ // if resting, no need to read as numbers will still all be correct
1512
+
1513
+ // if root is not actual shadow DOM and does not have elementFromPoint method, use the one on document
1514
+
1515
+ // if single file object in array, return the single file object else, return array of
1516
+
1517
+ // if size can't be read this browser doesn't support image
1518
+
1519
+ // if size is available don't fallback to unknown size message
1520
+
1521
+ // if state.progress is null, the server does not allow computing progress and we show the spinner instead
1522
+
1523
+ // if the file cannot be edited it should be removed on revert
1524
+
1525
+ // if the file is not an image we do not have any business transforming it
1526
+
1527
+ // if the index of the item changed, dispatch reorder action
1528
+
1529
+ // if the item is a url we guess the mime type by the extension
1530
+
1531
+ // if there's a mapping, the original property is always removed
1532
+
1533
+ // if this action has a handler, handle the action
1534
+
1535
+ // if this file is editable it shouldn't be removed immidiately even when instant uploading
1536
+
1537
+ // if this is a local file and the `server.remove` function has been configured,
1538
+
1539
+ // if this is a local server file we need to show a different state
1540
+
1541
+ // if this is a progress event add the progress amount
1542
+
1543
+ // if this is an svg and we want it to stay an svg
1544
+
1545
+ // if this is not a jpeg image we are not interested
1546
+
1547
+ // if this is not an image we do not have any business cropping it
1548
+
1549
+ // if this is not an image we do not have any business cropping it and we'll continue with the unaltered dataset
1550
+
1551
+ // if true uploads take at least 750 ms, this ensures the user sees the upload progress giving trust the upload actually happened
1552
+
1553
+ // if was archived in the mean time, don't process
1554
+
1555
+ // if was idling and no actions stop here
1556
+
1557
+ // if was not queued or is already processing exit here
1558
+
1559
+ // if was passed a file, and we can chunk it, exit here
1560
+
1561
+ // if we already have a server file reference, we don't need to call the onload method
1562
+
1563
+ // if we are not doing file type validation exit
1564
+
1565
+ // if we can't compute progress, we're not going to fire progress events
1566
+
1567
+ // if we reach zero, we make the element inaccessible
1568
+
1569
+ // if we should re-upload the file immediately
1570
+
1571
+ // if we support scaling using createImageBitmap we use a worker
1572
+
1573
+ // if we're below 100% opacity this element can't be clicked
1574
+
1575
+ // if we're filtering on element we need to be over the element to drop
1576
+
1577
+ // if we're full we need to leave some room between the top of the panel and the list
1578
+
1579
+ // if we're instant uploading the file will also be removed if we revert,
1580
+
1581
+ // if we're not modifying the image data then we don't have to modify the output
1582
+
1583
+ // image aspect ratio
1584
+
1585
+ // image bin
1586
+
1587
+ // image is already perfect size, no transformations required
1588
+
1589
+ // image overlays
1590
+
1591
+ // image preview stated
1592
+
1593
+ // image view
1594
+
1595
+ // image/* -> image
1596
+
1597
+ // in a Web Worker so we detect those versions and return false for support
1598
+
1599
+ // in rest, don't animate
1600
+
1601
+ // information on the root height or fixed height status
1602
+
1603
+ // initial properties
1604
+
1605
+ // initial props
1606
+
1607
+ // initial state (should be serializable)
1608
+
1609
+ // input field name to use
1610
+
1611
+ // input, if is remote, see if should use custom fetch, else use default fetchBlob
1612
+
1613
+ // insert the app before the element
1614
+
1615
+ // internal handler
1616
+
1617
+ // internal implementation
1618
+
1619
+ // invalid queries
1620
+
1621
+ // is a single url
1622
+
1623
+ // is aborted
1624
+
1625
+ // is archived
1626
+
1627
+ // is blob or base64, then we need to set the name
1628
+
1629
+ // is blocking action (should never block if document is hidden)
1630
+
1631
+ // is classified as valid response
1632
+
1633
+ // is client error, no way to recover
1634
+
1635
+ // is custom implementation
1636
+
1637
+ // is explicitely set to null so disable
1638
+
1639
+ // is in bytes
1640
+
1641
+ // is in try catch as IE11 will throw error if not
1642
+
1643
+ // is initial value
1644
+
1645
+ // is natural file size
1646
+
1647
+ // is normal mime type
1648
+
1649
+ // is now hopper scope
1650
+
1651
+ // is possible server error, so might be possible to retry
1652
+
1653
+ // is promise
1654
+
1655
+ // is remote url and no fetch method supplied
1656
+
1657
+ // is string input, let's attempt to convert
1658
+
1659
+ // is svg subtype
1660
+
1661
+ // is the field required
1662
+
1663
+ // is valid type?
1664
+
1665
+ // it outside of this method
1666
+
1667
+ // item could theoretically have been removed in the mean time
1668
+
1669
+ // item has been successfully loaded and added to the
1670
+
1671
+ // item loaded, allow plugins to
1672
+
1673
+ // just bytes
1674
+
1675
+ // just return first index
1676
+
1677
+ // key does not exist, so this option cannot be set
1678
+
1679
+ // kick thread if visibility changes
1680
+
1681
+ // kilobytes
1682
+
1683
+ // label to show when a type is not allowed
1684
+
1685
+ // let element
1686
+
1687
+ // let interface know the item has loaded
1688
+
1689
+ // let others know we have area ready
1690
+
1691
+ // let parent know if we are resting
1692
+
1693
+ // let plugins decide if the output data should be prepared at this point
1694
+
1695
+ // let start moving to target
1696
+
1697
+ // let view know the item has been inserted
1698
+
1699
+ // let's get the item width
1700
+
1701
+ // let's go!
1702
+
1703
+ // let's process the file
1704
+
1705
+ // let's replace the item
1706
+
1707
+ // let's scale the image in a worker
1708
+
1709
+ // let's scale the image in the main thread :(
1710
+
1711
+ // let's send our data
1712
+
1713
+ // let's start processing
1714
+
1715
+ // lets analyze the individual props
1716
+
1717
+ // limbo or local
1718
+
1719
+ // limit fps
1720
+
1721
+ // limit max items to one if not allowed to drop multiple items
1722
+
1723
+ // limit the index to the size of the items array
1724
+
1725
+ // link list to label bottom position
1726
+
1727
+ // list of items so can now be safely returned for use
1728
+
1729
+ // load blob contents and wrap in crop svg
1730
+
1731
+ // load expects the body to be a server id if
1732
+
1733
+ // load file
1734
+
1735
+ // load files
1736
+
1737
+ // load successful
1738
+
1739
+ // load the source data
1740
+
1741
+ // location of processing button
1742
+
1743
+ // look in meta data property
1744
+
1745
+ // loop over all styles for this control
1746
+
1747
+ // loop over items and depending on states call abort for ongoing processes
1748
+
1749
+ // loop over promises passing value to next promise
1750
+
1751
+ // main status
1752
+
1753
+ // make sure all bounds are set
1754
+
1755
+ // make sure is default scale every frame
1756
+
1757
+ // make sure width and height plus viewpox are even numbers so icons are nicely centered
1758
+
1759
+ // map all items in a possible items array
1760
+
1761
+ // map mime types to extensions
1762
+
1763
+ // map values to file objects
1764
+
1765
+ // maps transform types to transform functions
1766
+
1767
+ // margins will be added after we've recalculated the size
1768
+
1769
+ // mark chunks with lower offset as complete
1770
+
1771
+ // mark for removal
1772
+
1773
+ // markup
1774
+
1775
+ // max-height
1776
+
1777
+ // maximum size of JPEG, fine for now I guess
1778
+
1779
+ // means we'll do this and wait for idle state
1780
+
1781
+ // megabytes
1782
+
1783
+ // merge with options object
1784
+
1785
+ // might have just left this client?
1786
+
1787
+ // model
1788
+
1789
+ // move credits to bottom
1790
+
1791
+ // move remove button to right
1792
+
1793
+ // move styles to the back of the mixin list (so adjustments of other mixins are applied to the props correctly)
1794
+
1795
+ // move to back of execution queue, FilePond should have been exported by then
1796
+
1797
+ // move to draw offset
1798
+
1799
+ // move to group
1800
+
1801
+ // move value to new property
1802
+
1803
+ // moves element to correct position on screen
1804
+
1805
+ // necessary for update loop
1806
+
1807
+ // need at least a target or position to do springy things
1808
+
1809
+ // need at least a width or a height
1810
+
1811
+ // need this id to be able to rever the upload
1812
+
1813
+ // need this id to be able to revert the upload
1814
+
1815
+ // need to know the current child count so appending happens in correct order
1816
+
1817
+ // need to set role to list as otherwise it won't be read as a list by VoiceOver
1818
+
1819
+ // needs to allow transfer
1820
+
1821
+ // needs to be at least one pixel
1822
+
1823
+ // needs to be trigger directly as user action needs to be traceable (is not traceable in requestAnimationFrame)
1824
+
1825
+ // new retry
1826
+
1827
+ // next byte!
1828
+
1829
+ // next target value will not be animated to
1830
+
1831
+ // nicer label
1832
+
1833
+ // no EXIF info defined
1834
+
1835
+ // no action supplied
1836
+
1837
+ // no action supplied, return stub function, interface will work, but file won't be removed
1838
+
1839
+ // no bitmap returned, must be something wrong,
1840
+
1841
+ // no children, done!
1842
+
1843
+ // no chunk to handle
1844
+
1845
+ // no custom measure method supplied, exit here
1846
+
1847
+ // no data to add
1848
+
1849
+ // no data!
1850
+
1851
+ // no editor defined, then exit
1852
+
1853
+ // no file received
1854
+
1855
+ // no files received
1856
+
1857
+ // no height, can't set
1858
+
1859
+ // no images to update, exit
1860
+
1861
+ // no item found, exit
1862
+
1863
+ // no items left
1864
+
1865
+ // no longer busy
1866
+
1867
+ // no longer required
1868
+
1869
+ // no match, skip
1870
+
1871
+ // no module.id needed
1872
+
1873
+ // no module.loaded needed
1874
+
1875
+ // no more chunks to process
1876
+
1877
+ // no more retries left
1878
+
1879
+ // no need to handle this catch state for now
1880
+
1881
+ // no need to read it twice
1882
+
1883
+ // no need to set container bounds as these are handles by CSS fixed height
1884
+
1885
+ // no need to set same state twice
1886
+
1887
+ // no need to transform, exit
1888
+
1889
+ // no negative byte sizes
1890
+
1891
+ // no orientation supplied
1892
+
1893
+ // no preview view attached
1894
+
1895
+ // no process controls available
1896
+
1897
+ // no progress event when aborted ( onprogress is called once after abort() )
1898
+
1899
+ // no request running, can't abort
1900
+
1901
+ // no resizing to be done
1902
+
1903
+ // no server id, let's give this file the full treatment
1904
+
1905
+ // no server response
1906
+
1907
+ // no should not add this file
1908
+
1909
+ // no transfer for this client
1910
+
1911
+ // no transforms necessary, we done!
1912
+
1913
+ // no type detector, test now
1914
+
1915
+ // no types defined, everything is allowed \o/
1916
+
1917
+ // no valid conversions found
1918
+
1919
+ // no value, no need to reset
1920
+
1921
+ // nope nope nope (probably IE trouble)
1922
+
1923
+ // nope, failed
1924
+
1925
+ // not a fixed height panel
1926
+
1927
+ // not busy
1928
+
1929
+ // not in list, add
1930
+
1931
+ // not instant uploading, revert immediately
1932
+
1933
+ // not interesting in these states ('unsent' and 'openend' as they don't give us any additional info)
1934
+
1935
+ // not ready to be processed
1936
+
1937
+ // not tweening to a smaller value
1938
+
1939
+ // notify listeners of received files
1940
+
1941
+ // now add action
1942
+
1943
+ // now dispatch these actions
1944
+
1945
+ // now idling
1946
+
1947
+ // now in busy mode
1948
+
1949
+ // now interested in metadata updates
1950
+
1951
+ // now over element (no matter if it allows the drop or not)
1952
+
1953
+ // now processing
1954
+
1955
+ // now processing this chunk
1956
+
1957
+ // now ready
1958
+
1959
+ // now resting as target is current position, stop moving
1960
+
1961
+ // now the list has been modified
1962
+
1963
+ // null 'integrated', 'compact', 'circle'
1964
+
1965
+ // null or '3:2' or 1
1966
+
1967
+ // null, 'image/jpeg', 'image/png'
1968
+
1969
+ // null, 0 - 100
1970
+
1971
+ // observe item events
1972
+
1973
+ // offset
1974
+
1975
+ // offset bottom part
1976
+
1977
+ // offset center part
1978
+
1979
+ // oh no errors
1980
+
1981
+ // on(type, () => { })
1982
+
1983
+ // oninit = () => {}
1984
+
1985
+ // only apply output quality when a transform is required
1986
+
1987
+ // only apply transforms in this list
1988
+
1989
+ // only filter and crop trigger redraw
1990
+
1991
+ // only hook up to item view
1992
+
1993
+ // only hook up to item view and only if is enabled for this cropper
1994
+
1995
+ // only remove process button
1996
+
1997
+ // only remove revert button
1998
+
1999
+ // only revert and attempt to upload when we're uploading to a server
2000
+
2001
+ // only run for either the file or the file info panel
2002
+
2003
+ // only source is available, else add item if possible
2004
+
2005
+ // only used when can be dropped on page
2006
+
2007
+ // open editor when image is dropped
2008
+
2009
+ // open editor when loading a new item
2010
+
2011
+ // open up open up!
2012
+
2013
+ // opens the editor, if it does not already exist, it creates the editor
2014
+
2015
+ // options
2016
+
2017
+ // or if only a single item is allowed but we're not allowed to replace it we exit
2018
+
2019
+ // or if server does not support progress ( null )
2020
+
2021
+ // or if the file isn't big enough for chunked uploads but chunkForce is set then call
2022
+
2023
+ // orientation info
2024
+
2025
+ // original source
2026
+
2027
+ // output format (quality 0 => 100)
2028
+
2029
+ // override defaults
2030
+
2031
+ // override rect on internal and external rect getter so it takes in account transforms
2032
+
2033
+ // overwrite
2034
+
2035
+ // parses the given context for plugins (does not include the context element itself)
2036
+
2037
+ // pass back to item so we can use it if something goes wrong
2038
+
2039
+ // plugins determined the output data should be prepared (or not), can be adjusted with beforePrepareOutput hook
2040
+
2041
+ // prevent scrolling and zooming on iOS (only if supports pointer events, for then we can enable reorder)
2042
+
2043
+ // process file!
2044
+
2045
+ // process queued item
2046
+
2047
+ // process queueud items
2048
+
2049
+ // processing is paused, wait here
2050
+
2051
+ // processing was aborted
2052
+
2053
+ // processing went wrong earlier
2054
+
2055
+ // progress of load
2056
+
2057
+ // progress update
2058
+
2059
+ // props
2060
+
2061
+ // quality set
2062
+
2063
+ // queries
2064
+
2065
+ // query is index
2066
+
2067
+ // queue and wait till queue is freed up
2068
+
2069
+ // queue for later processing
2070
+
2071
+ // queue next tick
2072
+
2073
+ // queue of items waiting to be processed
2074
+
2075
+ // queue till next frame so we're sure the height has been applied this forces the draw image call inside the wrapper view to use the correct height
2076
+
2077
+ // quickly append input to temp form and reset form
2078
+
2079
+ // random delay as in a list of files you start noticing
2080
+
2081
+ // re-call write
2082
+
2083
+ // re-inject image head in case of JPEG, as the image head is removed by canvas export
2084
+
2085
+ // re-inject input where it originally was
2086
+
2087
+ // re-render on window resize start and finish
2088
+
2089
+ // read as file
2090
+
2091
+ // read child views
2092
+
2093
+ // read first batch of files
2094
+
2095
+ // read view data
2096
+
2097
+ // readers
2098
+
2099
+ // recursively read more directories
2100
+
2101
+ // register plugins
2102
+
2103
+ // register the id for this transfer
2104
+
2105
+ // register transfer id
2106
+
2107
+ // reject or resolve based on file size
2108
+
2109
+ // reject the file so can be dealt with through API
2110
+
2111
+ // release canvas
2112
+
2113
+ // remember dimensions
2114
+
2115
+ // remember original element
2116
+
2117
+ // remember request so we can abort it later
2118
+
2119
+ // remember the original item source
2120
+
2121
+ // remember this plugin
2122
+
2123
+ // remember this width
2124
+
2125
+ // remove all process buttons
2126
+
2127
+ // remove any whitespace as that causes InvalidCharacterError in IE
2128
+
2129
+ // remove client
2130
+
2131
+ // remove filter
2132
+
2133
+ // remove first item as it will be replaced by this item
2134
+
2135
+ // remove from child views
2136
+
2137
+ // remove generic headers from api object
2138
+
2139
+ // remove image head (default)
2140
+
2141
+ // remove item
2142
+
2143
+ // remove last button (revert) if not allowed
2144
+
2145
+ // remove our element
2146
+
2147
+ // remove process if no url or process on outline
2148
+
2149
+ // remove reference
2150
+
2151
+ // remove request reference
2152
+
2153
+ // remove the element
2154
+
2155
+ // remove the original element
2156
+
2157
+ // remove these views
2158
+
2159
+ // remove unwanted
2160
+
2161
+ // removed from view
2162
+
2163
+ // rename the original filename to match the mime type of the output image
2164
+
2165
+ // render initial view
2166
+
2167
+ // replace source and file object
2168
+
2169
+ // replace the target element
2170
+
2171
+ // request aborted
2172
+
2173
+ // request bounding box dimensions
2174
+
2175
+ // request destruction
2176
+
2177
+ // request item removal
2178
+
2179
+ // request timeout
2180
+
2181
+ // request update to panel height
2182
+
2183
+ // reset abort callback
2184
+
2185
+ // reset file server id and transfer id as now it's not available on the server
2186
+
2187
+ // reset input, it's just for exposing a method to drop files, should not retain any state
2188
+
2189
+ // reset overflow state
2190
+
2191
+ // resize the item panel
2192
+
2193
+ // resolve now
2194
+
2195
+ // resolves with supplied blob
2196
+
2197
+ // restore original dom element
2198
+
2199
+ // restore original element
2200
+
2201
+ // return an array of files { name:'name', file:File }
2202
+
2203
+ // return data
2204
+
2205
+ // return new options
2206
+
2207
+ // return removeListener function
2208
+
2209
+ // return the File object
2210
+
2211
+ // return the plugin instance
2212
+
2213
+ // returns an app based on the given element hook
2214
+
2215
+ // returns the current option value
2216
+
2217
+ // returns true if the app was destroyed successfully
2218
+
2219
+ // reveal element
2220
+
2221
+ // reveal the preview image
2222
+
2223
+ // revert before removing from the view...
2224
+
2225
+ // revert the upload (fire and forget)
2226
+
2227
+ // right before it is set to the item state
2228
+
2229
+ // root element should not be changed
2230
+
2231
+ // rotate
2232
+
2233
+ // route actions
2234
+
2235
+ // rows are used to find when we have left the preview area bounding box
2236
+
2237
+ // run mixins
2238
+
2239
+ // scale
2240
+
2241
+ // scale canvas based on pixel density
2242
+
2243
+ // scale center part
2244
+
2245
+ // scale up width and height when we're dealing with an SVG
2246
+
2247
+ // see if already exists, if so, return
2248
+
2249
+ // see if item has been removed
2250
+
2251
+ // see if props have changed
2252
+
2253
+ // see if should reformat headers;
2254
+
2255
+ // select
2256
+
2257
+ // select last state change action
2258
+
2259
+ // send request object
2260
+
2261
+ // send source there so dev can remove file from server
2262
+
2263
+ // send to the transform worker to transform the blob on a separate thread
2264
+
2265
+ // set (possibly) transformed file
2266
+
2267
+ // set a stub file object while loading the actual data
2268
+
2269
+ // set animator target
2270
+
2271
+ // set as active loader
2272
+
2273
+ // set as active processor
2274
+
2275
+ // set configurable props
2276
+
2277
+ // set container bounds (so pushes siblings downwards)
2278
+
2279
+ // set credentials
2280
+
2281
+ // set current state
2282
+
2283
+ // set default FilePond options and add bridge once
2284
+
2285
+ // set default crop rectangle
2286
+
2287
+ // set default options
2288
+
2289
+ // set field value
2290
+
2291
+ // set file object
2292
+
2293
+ // set filters and colors so we can restore them when re-editing the image
2294
+
2295
+ // set global painter
2296
+
2297
+ // set handlers
2298
+
2299
+ // set id
2300
+
2301
+ // set id so can be referenced from outside labels
2302
+
2303
+ // set initial meta data
2304
+
2305
+ // set initial options
2306
+
2307
+ // set initial values
2308
+
2309
+ // set label, we use labelled by as otherwise the screenreader does not read the "browse" text in the label (as it has tabindex: 0)
2310
+
2311
+ // set list height
2312
+
2313
+ // set list height (if is overflowing)
2314
+
2315
+ // set loader source data
2316
+
2317
+ // set merged color matrix to use in preview plugin
2318
+
2319
+ // set name of element (is removed when a value is set)
2320
+
2321
+ // set name of file stub
2322
+
2323
+ // set onload hanlder
2324
+
2325
+ // set original file
2326
+
2327
+ // set preview view
2328
+
2329
+ // set reference
2330
+
2331
+ // set request start
2332
+
2333
+ // set size of file stub
2334
+
2335
+ // set state
2336
+
2337
+ // set timeout if defined (do it after open so IE11 plays ball)
2338
+
2339
+ // set to false to copy image exif data to output
2340
+
2341
+ // set to false to disable upscaling of image smaller than the target width / height
2342
+
2343
+ // set to idle so shows grab cursor
2344
+
2345
+ // set to null to remove animation while dragging
2346
+
2347
+ // set type of response
2348
+
2349
+ // set up transparency grid
2350
+
2351
+ // sets correct state to hopper scope
2352
+
2353
+ // setup animators
2354
+
2355
+ // setup attribute mapping for accept
2356
+
2357
+ // setup paste listener for entire page
2358
+
2359
+ // setup processor
2360
+
2361
+ // setup!
2362
+
2363
+ // shortcuts
2364
+
2365
+ // should align center
2366
+
2367
+ // should be appended?
2368
+
2369
+ // should be over an element to drop
2370
+
2371
+ // should return a promise
2372
+
2373
+ // should return request
2374
+
2375
+ // should we post the default transformed file
2376
+
2377
+ // should we post the original file
2378
+
2379
+ // should we update the output data
2380
+
2381
+ // show support by displaying credits
2382
+
2383
+ // show the overlay
2384
+
2385
+ // show/hide RemoveItem button
2386
+
2387
+ // size has been updated
2388
+
2389
+ // skip
2390
+
2391
+ // slow down based on amount of damping
2392
+
2393
+ // so if a before remove file hook is defined we need to run it now
2394
+
2395
+ // so when zooming in it doesn't get too blurry
2396
+
2397
+ // some actions might trigger events
2398
+
2399
+ // something went wrong
2400
+
2401
+ // something went wrong during transform phase
2402
+
2403
+ // sort items in list
2404
+
2405
+ // source is known
2406
+
2407
+ // special treatment for remove
2408
+
2409
+ // stack
2410
+
2411
+ // start at 0
2412
+
2413
+ // start creating variants
2414
+
2415
+ // start drawing
2416
+
2417
+ // start file processing
2418
+
2419
+ // start listening to clicks again
2420
+
2421
+ // start loading the source
2422
+
2423
+ // start painter and fire load event
2424
+
2425
+ // start processing file
2426
+
2427
+ // start processing more chunks
2428
+
2429
+ // start processing the file
2430
+
2431
+ // start testing size
2432
+
2433
+ // start writing
2434
+
2435
+ // starts loading
2436
+
2437
+ // stop active processes (file uploads, fetches, stuff like that)
2438
+
2439
+ // stop here if aborted, might have happened in between request and callback
2440
+
2441
+ // stop listening to resize
2442
+
2443
+ // stop listening to the visiblitychange event
2444
+
2445
+ // stop updater
2446
+
2447
+ // stop worker
2448
+
2449
+ // stops from triggering the element a second time
2450
+
2451
+ // store current styles so we can compare them to new styles later on
2452
+
2453
+ // store file item in file input
2454
+
2455
+ // store internally
2456
+
2457
+ // store new transforms
2458
+
2459
+ // store server ref in hidden input
2460
+
2461
+ // styles
2462
+
2463
+ // sub status
2464
+
2465
+ // subscribe to file load and append required info
2466
+
2467
+ // subscribe to file load and append required transformations
2468
+
2469
+ // subscribe to file transformations
2470
+
2471
+ // svg
2472
+
2473
+ // swap width and height if orientation needs correcting
2474
+
2475
+ // sync `acceptedFileTypes` property with `accept` attribute
2476
+
2477
+ // sync panel height with item height
2478
+
2479
+ // target height
2480
+
2481
+ // target width
2482
+
2483
+ // targetting this client
2484
+
2485
+ // tell the view the item has been removed
2486
+
2487
+ // test if file is of type image
2488
+
2489
+ // test if file is of type image and can be viewed in canvas
2490
+
2491
+ // test if is already processed
2492
+
2493
+ // test if is content disposition header, if not exit
2494
+
2495
+ // test if is filtered
2496
+
2497
+ // test if is identity matrix
2498
+
2499
+ // test if is no longer hidden
2500
+
2501
+ // test if target is the element or if one of its children is
2502
+
2503
+ // test if there's still room in the list of files
2504
+
2505
+ // test if we're resizing horizontally
2506
+
2507
+ // test textarea or input is contained in filepond root
2508
+
2509
+ // tests if
2510
+
2511
+ // the aspect ratio of the crop ('1:1', '16:9', etc)
2512
+
2513
+ // the file is contained in a fieldset with legend that contains the filename
2514
+
2515
+ // the file is now loading we need to update the progress indicators
2516
+
2517
+ // the file to process
2518
+
2519
+ // the file url is no longer needed
2520
+
2521
+ // the function that is used to apply the file transformations
2522
+
2523
+ // the height of the panel minus the label height
2524
+
2525
+ // the icon to use for the edit button
2526
+
2527
+ // the id to add to the root element
2528
+
2529
+ // the image needs to be resized
2530
+
2531
+ // the metadata to send along
2532
+
2533
+ // the method of rescaling
2534
+
2535
+ // the preview image data (we need this to filter the image)
2536
+
2537
+ // the preview is now ready to be drawn
2538
+
2539
+ // the rectangle of the element expanded to contain its children including own margin and child margins
2540
+
2541
+ // the rectangle of the element expanded to contain its children, does not include any margins
2542
+
2543
+ // the rectangle of the element itself
2544
+
2545
+ // the request might not go through, for instance, there might be some server trouble
2546
+
2547
+ // the room we leave open between the end of the list and the panel bottom
2548
+
2549
+ // the total entries to read
2550
+
2551
+ // these files don't fit so stop here
2552
+
2553
+ // these will then be automatically set to the initial files
2554
+
2555
+ // this creates a function that loads the file based on the type of file (string, base64, blob, file) and location of file (local, remote, limbo)
2556
+
2557
+ // this isn't fantastic, but because of the stacking of settimeouts plugins can handle the did_load before the did_init
2558
+
2559
+ // this multiplies the minimum image resolution,
2560
+
2561
+ // this requestAnimationFrame nesting is horrible but it fixes an issue with 100hz displays on Chrome
2562
+
2563
+ // this timeout pushes the handler after 'load'
2564
+
2565
+ // this would simply bring the browser to its knees and that is not what we want
2566
+
2567
+ // timeout identifier, only used when timeout is defined
2568
+
2569
+ // timeout used for calling update items
2570
+
2571
+ // timeout used for stacking metadata updates
2572
+
2573
+ // toggle
2574
+
2575
+ // transfer to image tag so no canvas memory wasted on iOS
2576
+
2577
+ // transform order is relevant
2578
+
2579
+ // translate to other name
2580
+
2581
+ // tries to get header info to the app as fast as possible
2582
+
2583
+ // try fallback if defined by user, else reject
2584
+
2585
+ // try loading the source one more time
2586
+
2587
+ // try the oldschool way
2588
+
2589
+ // try to access item
2590
+
2591
+ // try to add now
2592
+
2593
+ // try to copy image head from original file to generated blob
2594
+
2595
+ // try to get files from the transfer
2596
+
2597
+ // try to get links from transfer, if found we'll exit immediately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)
2598
+
2599
+ // try to get next batch of files
2600
+
2601
+ // turn attributes into object
2602
+
2603
+ // turn blob response into a file
2604
+
2605
+ // turn the file into an image
2606
+
2607
+ // type set
2608
+
2609
+ // undefined or null
2610
+
2611
+ // update
2612
+
2613
+ // update OptionTypes, each plugin might have extended the default options
2614
+
2615
+ // update actual duration
2616
+
2617
+ // update actual progress
2618
+
2619
+ // update crop metadata
2620
+
2621
+ // update duration
2622
+
2623
+ // update editor props that could have changed
2624
+
2625
+ // update existing plugins
2626
+
2627
+ // update height if is fixed
2628
+
2629
+ // update icon and label for revert button when instant uploading
2630
+
2631
+ // update image view
2632
+
2633
+ // update markup view
2634
+
2635
+ // update others about this error
2636
+
2637
+ // update position by adding velocity
2638
+
2639
+ // update progress bar
2640
+
2641
+ // update progress percentage
2642
+
2643
+ // update resize operation
2644
+
2645
+ // update resting state
2646
+
2647
+ // update scalable state
2648
+
2649
+ // update text
2650
+
2651
+ // update the view
2652
+
2653
+ // update transform metadata object
2654
+
2655
+ // update value
2656
+
2657
+ // update velocity by adding force based on mass
2658
+
2659
+ // update view
2660
+
2661
+ // updates child views that are currently attached to the DOM
2662
+
2663
+ // updates the OptionTypes object based on the current options
2664
+
2665
+ // updates the legend of the fieldset so screenreaders can better group buttons
2666
+
2667
+ // url
2668
+
2669
+ // url is no longer needed
2670
+
2671
+ // use for labeling file input (aria-labelledby on file input)
2672
+
2673
+ // use math ceil to prevent transparent lines because of rounding errors
2674
+
2675
+ // use type detector
2676
+
2677
+ // used in instant edit mode
2678
+
2679
+ // user or another process aborted the file load (cannot retry)
2680
+
2681
+ // user passed a sources array
2682
+
2683
+ // user passed sources as arguments, last one might be options object
2684
+
2685
+ // validation result
2686
+
2687
+ // view is file
2688
+
2689
+ // view is file info
2690
+
2691
+ // view type
2692
+
2693
+ // views on death row
2694
+
2695
+ // views to retain
2696
+
2697
+ // wait for idle state and then run PREPARE_OUTPUT
2698
+
2699
+ // wait for results
2700
+
2701
+ // waiting
2702
+
2703
+ // waiting for something
2704
+
2705
+ // want to remove required, always possible
2706
+
2707
+ // want to tween to a smaller value and have a current value
2708
+
2709
+ // we add a little delay so the OS file select window can move out of the way before we add our file
2710
+
2711
+ // we are really done
2712
+
2713
+ // we can drop these items on this client
2714
+
2715
+ // we can now scale the panel to the final size
2716
+
2717
+ // we check if the current count is smaller than the max count, if so, another file can still be added
2718
+
2719
+ // we check if transform is set, if so, we check if property is set
2720
+
2721
+ // we don't need to read the entire file to get the orientation
2722
+
2723
+ // we done
2724
+
2725
+ // we done function
2726
+
2727
+ // we done!
2728
+
2729
+ // we error function
2730
+
2731
+ // we have to link this element to the status element
2732
+
2733
+ // we just added somthing to the dom, no rest
2734
+
2735
+ // we multiply by .75 as that creates smaller but still clear images on screens with high res displays
2736
+
2737
+ // we need the item to get to the crop size
2738
+
2739
+ // we need to delay by the difference between interval and dist
2740
+
2741
+ // we need to wait an additional 6ms before calling the function)
2742
+
2743
+ // we only add required if the field has been deemed required
2744
+
2745
+ // we push this forward a bit so the interface is updated correctly
2746
+
2747
+ // we put the response in state so we can access
2748
+
2749
+ // we resize the image so memory on iOS 12 is released more quickly (it seems)
2750
+
2751
+ // we successfully set the value of this option
2752
+
2753
+ // we validate the file against the accepted file types
2754
+
2755
+ // we want as much pixels to work with as possible,
2756
+
2757
+ // we will add those properties to the external API and link them to the viewState
2758
+
2759
+ // we'eve received a size indication, let's update the stub
2760
+
2761
+ // we've arrived if we're near target and our velocity is near zero
2762
+
2763
+ // we've not yet started the real download, stop here
2764
+
2765
+ // we've probably received some useful data in response headers
2766
+
2767
+ // webpackBootstrap
2768
+
2769
+ // what is the type now
2770
+
2771
+ // when removing by index the indexes shift after each file removal so we need to convert indexes to ids
2772
+
2773
+ // when successfully transformed
2774
+
2775
+ // when the animator updates, update the view state value
2776
+
2777
+ // where did the file originate
2778
+
2779
+ // where did this file come from
2780
+
2781
+ // where to insert new items
2782
+
2783
+ // which name to prefix the default transformed file with
2784
+
2785
+ // which name to prefix the original file with
2786
+
2787
+ // will also notify the user when FilePond is not being used, as the user might be occupied with other activities while uploading a file
2788
+
2789
+ // will clean up all archived items
2790
+
2791
+ // will store image data for future filter updates
2792
+
2793
+ // writers
2794
+
2795
+ // yay we got our bitmap, let's continue showing the preview
2796
+
2797
+ // you want to make use of revert