@capacitor/camera 8.1.0-test.250320251731 → 8.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.
@@ -52,10 +52,138 @@ exports.EncodingType = void 0;
52
52
  EncodingType[EncodingType["JPEG"] = 0] = "JPEG";
53
53
  EncodingType[EncodingType["PNG"] = 1] = "PNG";
54
54
  })(exports.EncodingType || (exports.EncodingType = {}));
55
+ /**
56
+ * Error codes returned by the Camera plugin.
57
+ * These values match the `code` field on rejected promises.
58
+ *
59
+ * @since 8.2.0
60
+ */
61
+ exports.CameraErrorCode = void 0;
62
+ (function (CameraErrorCode) {
63
+ // Permissions
64
+ /**
65
+ * Camera access was denied by the user.
66
+ */
67
+ CameraErrorCode["CameraPermissionDenied"] = "OS-PLUG-CAMR-0003";
68
+ /**
69
+ * Photo library / gallery access was denied by the user.
70
+ */
71
+ CameraErrorCode["GalleryPermissionDenied"] = "OS-PLUG-CAMR-0005";
72
+ /**
73
+ * No camera hardware is available on the device.
74
+ */
75
+ CameraErrorCode["NoCameraAvailable"] = "OS-PLUG-CAMR-0007";
76
+ // Take Photo
77
+ /**
78
+ * The user cancelled the take photo action.
79
+ */
80
+ CameraErrorCode["TakePhotoCancelled"] = "OS-PLUG-CAMR-0006";
81
+ /**
82
+ * Failed to take photo.
83
+ */
84
+ CameraErrorCode["TakePhotoFailed"] = "OS-PLUG-CAMR-0010";
85
+ /**
86
+ * The take photo action received invalid arguments.
87
+ * @platform ios
88
+ */
89
+ CameraErrorCode["TakePhotoInvalidArguments"] = "OS-PLUG-CAMR-0014";
90
+ // Edit Photo
91
+ /**
92
+ * The selected file contains invalid image data.
93
+ * @platform ios
94
+ */
95
+ CameraErrorCode["InvalidImageData"] = "OS-PLUG-CAMR-0008";
96
+ /**
97
+ * Failed to edit image.
98
+ */
99
+ CameraErrorCode["EditPhotoFailed"] = "OS-PLUG-CAMR-0009";
100
+ /**
101
+ * The user cancelled the edit photo action.
102
+ */
103
+ CameraErrorCode["EditPhotoCancelled"] = "OS-PLUG-CAMR-0013";
104
+ /**
105
+ * The URI parameter for editing is empty.
106
+ * @platform android
107
+ */
108
+ CameraErrorCode["EditPhotoEmptyUri"] = "OS-PLUG-CAMR-0024";
109
+ // Choose from Gallery
110
+ /**
111
+ * Failed to retrieve an image from the gallery.
112
+ */
113
+ CameraErrorCode["ImageNotFound"] = "OS-PLUG-CAMR-0011";
114
+ /**
115
+ * Failed to process the selected image.
116
+ */
117
+ CameraErrorCode["ProcessImageFailed"] = "OS-PLUG-CAMR-0012";
118
+ /**
119
+ * Failed to choose media from the gallery.
120
+ */
121
+ CameraErrorCode["ChooseMediaFailed"] = "OS-PLUG-CAMR-0018";
122
+ /**
123
+ * The user cancelled choosing media from the gallery.
124
+ */
125
+ CameraErrorCode["ChooseMediaCancelled"] = "OS-PLUG-CAMR-0020";
126
+ /**
127
+ * Failed to retrieve the media file path.
128
+ * @platform android
129
+ */
130
+ CameraErrorCode["MediaPathError"] = "OS-PLUG-CAMR-0021";
131
+ /**
132
+ * Failed to retrieve an image from the provided URI.
133
+ */
134
+ CameraErrorCode["FetchImageFromUriFailed"] = "OS-PLUG-CAMR-0028";
135
+ // Record Video
136
+ /**
137
+ * Failed to record video.
138
+ */
139
+ CameraErrorCode["RecordVideoFailed"] = "OS-PLUG-CAMR-0016";
140
+ /**
141
+ * The user cancelled the video recording.
142
+ */
143
+ CameraErrorCode["RecordVideoCancelled"] = "OS-PLUG-CAMR-0017";
144
+ /**
145
+ * Failed to retrieve a video from the gallery.
146
+ * @platform ios
147
+ */
148
+ CameraErrorCode["VideoNotFound"] = "OS-PLUG-CAMR-0025";
149
+ // Play Video
150
+ /**
151
+ * Failed to play video.
152
+ */
153
+ CameraErrorCode["PlayVideoFailed"] = "OS-PLUG-CAMR-0023";
154
+ // General
155
+ /**
156
+ * Failed to encode the media result.
157
+ * @platform ios
158
+ */
159
+ CameraErrorCode["EncodeResultFailed"] = "OS-PLUG-CAMR-0019";
160
+ /**
161
+ * The selected file does not exist.
162
+ */
163
+ CameraErrorCode["FileNotFound"] = "OS-PLUG-CAMR-0027";
164
+ /**
165
+ * Invalid argument provided to a plugin method.
166
+ * @platform android
167
+ */
168
+ CameraErrorCode["InvalidArgument"] = "OS-PLUG-CAMR-0031";
169
+ /**
170
+ * A general plugin error occurred.
171
+ * @platform ios
172
+ */
173
+ CameraErrorCode["GeneralError"] = "OS-PLUG-CAMR-0026";
174
+ })(exports.CameraErrorCode || (exports.CameraErrorCode = {}));
55
175
 
56
176
  class CameraWeb extends core.WebPlugin {
57
- async takePhoto(_options) {
58
- throw this.unimplemented('takePhoto is not implemented on Web.');
177
+ async takePhoto(options) {
178
+ // eslint-disable-next-line no-async-promise-executor
179
+ return new Promise(async (resolve, reject) => {
180
+ if (options.webUseInput) {
181
+ this.takePhotoCameraInputExperience(options, resolve, reject);
182
+ }
183
+ else {
184
+ this.takePhotoCameraExperience(options, resolve, reject);
185
+ }
186
+ });
59
187
  }
60
188
  async recordVideo(_options) {
61
189
  throw this.unimplemented('recordVideo is not implemented on Web.');
@@ -63,8 +191,11 @@ class CameraWeb extends core.WebPlugin {
63
191
  async playVideo(_options) {
64
192
  throw this.unimplemented('playVideo is not implemented on Web.');
65
193
  }
66
- async chooseFromGallery(_options) {
67
- throw this.unimplemented('chooseFromGallery is not implemented on web.');
194
+ async chooseFromGallery(options) {
195
+ // eslint-disable-next-line no-async-promise-executor
196
+ return new Promise(async (resolve, reject) => {
197
+ this.galleryInputExperience(options, resolve, reject);
198
+ });
68
199
  }
69
200
  async editPhoto(_options) {
70
201
  throw this.unimplemented('editPhoto is not implemented on Web.');
@@ -112,36 +243,7 @@ class CameraWeb extends core.WebPlugin {
112
243
  });
113
244
  }
114
245
  async cameraExperience(options, resolve, reject) {
115
- if (customElements.get('pwa-camera-modal')) {
116
- const cameraModal = document.createElement('pwa-camera-modal');
117
- cameraModal.facingMode = options.direction === exports.CameraDirection.Front ? 'user' : 'environment';
118
- document.body.appendChild(cameraModal);
119
- try {
120
- await cameraModal.componentOnReady();
121
- cameraModal.addEventListener('onPhoto', async (e) => {
122
- const photo = e.detail;
123
- if (photo === null) {
124
- reject(new core.CapacitorException('User cancelled photos app'));
125
- }
126
- else if (photo instanceof Error) {
127
- reject(photo);
128
- }
129
- else {
130
- resolve(await this._getCameraPhoto(photo, options));
131
- }
132
- cameraModal.dismiss();
133
- document.body.removeChild(cameraModal);
134
- });
135
- cameraModal.present();
136
- }
137
- catch (e) {
138
- this.fileInputExperience(options, resolve, reject);
139
- }
140
- }
141
- else {
142
- console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);
143
- this.fileInputExperience(options, resolve, reject);
144
- }
246
+ await this._setupPWACameraModal(options.direction, (photo) => this._getCameraPhoto(photo, options), () => this.fileInputExperience(options, resolve, reject), resolve, reject);
145
247
  }
146
248
  fileInputExperience(options, resolve, reject) {
147
249
  let input = document.querySelector('#_capacitor-camera-input');
@@ -254,11 +356,11 @@ class CameraWeb extends core.WebPlugin {
254
356
  _getCameraPhoto(photo, options) {
255
357
  return new Promise((resolve, reject) => {
256
358
  const reader = new FileReader();
257
- const format = photo.type.split('/')[1];
359
+ const format = this._getFileFormat(photo);
258
360
  if (options.resultType === 'uri') {
259
361
  resolve({
260
362
  webPath: URL.createObjectURL(photo),
261
- format: format,
363
+ format,
262
364
  saved: false,
263
365
  });
264
366
  }
@@ -269,14 +371,14 @@ class CameraWeb extends core.WebPlugin {
269
371
  if (options.resultType === 'dataUrl') {
270
372
  resolve({
271
373
  dataUrl: r,
272
- format: format,
374
+ format,
273
375
  saved: false,
274
376
  });
275
377
  }
276
378
  else {
277
379
  resolve({
278
380
  base64String: r.split(',')[1],
279
- format: format,
381
+ format,
280
382
  saved: false,
281
383
  });
282
384
  }
@@ -287,6 +389,265 @@ class CameraWeb extends core.WebPlugin {
287
389
  }
288
390
  });
289
391
  }
392
+ async takePhotoCameraExperience(options, resolve, reject) {
393
+ await this._setupPWACameraModal(options.cameraDirection, (photo) => { var _a; return this._buildPhotoMediaResult(photo, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false); }, () => this.takePhotoCameraInputExperience(options, resolve, reject), resolve, reject);
394
+ }
395
+ takePhotoCameraInputExperience(options, resolve, reject) {
396
+ const input = this._createFileInput('_capacitor-camera-input-takephoto');
397
+ const cleanup = () => {
398
+ var _a;
399
+ (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);
400
+ };
401
+ input.onchange = async (_e) => {
402
+ var _a;
403
+ if (!this._validateFileInput(input, reject, cleanup)) {
404
+ return;
405
+ }
406
+ const file = input.files[0];
407
+ resolve(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));
408
+ cleanup();
409
+ };
410
+ input.oncancel = () => {
411
+ reject(new core.CapacitorException('User cancelled photos app'));
412
+ cleanup();
413
+ };
414
+ input.accept = 'image/*';
415
+ if (options.cameraDirection === exports.CameraDirection.Front) {
416
+ input.capture = 'user';
417
+ }
418
+ else {
419
+ // CameraDirection.Rear
420
+ input.capture = 'environment';
421
+ }
422
+ input.click();
423
+ }
424
+ galleryInputExperience(options, resolve, reject) {
425
+ var _a, _b;
426
+ const input = this._createFileInput('_capacitor-camera-input-gallery');
427
+ input.multiple = (_a = options.allowMultipleSelection) !== null && _a !== void 0 ? _a : false;
428
+ const cleanup = () => {
429
+ var _a;
430
+ (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);
431
+ };
432
+ input.onchange = async (_e) => {
433
+ var _a;
434
+ if (!this._validateFileInput(input, reject, cleanup)) {
435
+ return;
436
+ }
437
+ const results = [];
438
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
439
+ for (let i = 0; i < input.files.length; i++) {
440
+ const file = input.files[i];
441
+ if (file.type.startsWith('image/')) {
442
+ results.push(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));
443
+ }
444
+ else if (file.type.startsWith('video/')) {
445
+ const format = this._getFileFormat(file);
446
+ let thumbnail;
447
+ let resolution;
448
+ let duration;
449
+ try {
450
+ const videoInfo = await this._getVideoMetadata(file);
451
+ thumbnail = videoInfo.thumbnail;
452
+ if (options.includeMetadata) {
453
+ resolution = videoInfo.resolution;
454
+ duration = videoInfo.duration;
455
+ }
456
+ }
457
+ catch (e) {
458
+ console.warn('Failed to get video metadata:', e);
459
+ }
460
+ const result = {
461
+ type: exports.MediaType.Video,
462
+ thumbnail,
463
+ webPath: URL.createObjectURL(file),
464
+ saved: false,
465
+ };
466
+ if (options.includeMetadata) {
467
+ result.metadata = {
468
+ format,
469
+ resolution,
470
+ size: file.size,
471
+ creationDate: new Date(file.lastModified).toISOString(),
472
+ duration,
473
+ };
474
+ }
475
+ results.push(result);
476
+ }
477
+ }
478
+ resolve({ results });
479
+ cleanup();
480
+ };
481
+ input.oncancel = () => {
482
+ reject(new core.CapacitorException('User cancelled photos app'));
483
+ cleanup();
484
+ };
485
+ // Set accept attribute based on mediaType
486
+ const mediaType = (_b = options.mediaType) !== null && _b !== void 0 ? _b : exports.MediaTypeSelection.Photo;
487
+ if (mediaType === exports.MediaTypeSelection.Photo) {
488
+ input.accept = 'image/*';
489
+ }
490
+ else if (mediaType === exports.MediaTypeSelection.Video) {
491
+ input.accept = 'video/*';
492
+ }
493
+ else {
494
+ // MediaTypeSelection.All
495
+ input.accept = 'image/*,video/*';
496
+ }
497
+ input.click();
498
+ }
499
+ _getFileFormat(file) {
500
+ if (file.type === 'image/png') {
501
+ return 'png';
502
+ }
503
+ else if (file.type === 'image/gif') {
504
+ return 'gif';
505
+ }
506
+ else if (file.type.startsWith('video/')) {
507
+ return file.type.split('/')[1];
508
+ }
509
+ else if (file.type.startsWith('image/')) {
510
+ return 'jpeg';
511
+ }
512
+ return file.type.split('/')[1] || 'jpeg';
513
+ }
514
+ async _buildPhotoMediaResult(file, includeMetadata) {
515
+ const format = this._getFileFormat(file);
516
+ const thumbnail = await this._getBase64FromFile(file);
517
+ const result = {
518
+ type: exports.MediaType.Photo,
519
+ thumbnail,
520
+ webPath: URL.createObjectURL(file),
521
+ saved: false,
522
+ };
523
+ if (includeMetadata) {
524
+ const resolution = await this._getImageResolution(file);
525
+ result.metadata = {
526
+ format,
527
+ resolution,
528
+ size: file.size,
529
+ creationDate: 'lastModified' in file ? new Date(file.lastModified).toISOString() : new Date().toISOString(),
530
+ };
531
+ }
532
+ return result;
533
+ }
534
+ _validateFileInput(input, reject, cleanup) {
535
+ if (!input.files || input.files.length === 0) {
536
+ const message = input.multiple ? 'No files selected' : 'No file selected';
537
+ reject(new core.CapacitorException(message));
538
+ cleanup();
539
+ return false;
540
+ }
541
+ return true;
542
+ }
543
+ async _setupPWACameraModal(cameraDirection, onPhotoCallback, fallbackCallback, resolve, reject) {
544
+ if (customElements.get('pwa-camera-modal')) {
545
+ const cameraModal = document.createElement('pwa-camera-modal');
546
+ cameraModal.facingMode = cameraDirection === exports.CameraDirection.Front ? 'user' : 'environment';
547
+ document.body.appendChild(cameraModal);
548
+ try {
549
+ await cameraModal.componentOnReady();
550
+ cameraModal.addEventListener('onPhoto', async (e) => {
551
+ const photo = e.detail;
552
+ if (photo === null) {
553
+ reject(new core.CapacitorException('User cancelled photos app'));
554
+ }
555
+ else if (photo instanceof Error) {
556
+ reject(photo);
557
+ }
558
+ else {
559
+ resolve(await onPhotoCallback(photo));
560
+ }
561
+ cameraModal.dismiss();
562
+ document.body.removeChild(cameraModal);
563
+ });
564
+ cameraModal.present();
565
+ }
566
+ catch (e) {
567
+ fallbackCallback();
568
+ }
569
+ }
570
+ else {
571
+ console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);
572
+ fallbackCallback();
573
+ }
574
+ }
575
+ _createFileInput(id) {
576
+ let input = document.querySelector(`#${id}`);
577
+ if (!input) {
578
+ input = document.createElement('input');
579
+ input.id = id;
580
+ input.type = 'file';
581
+ input.hidden = true;
582
+ document.body.appendChild(input);
583
+ }
584
+ return input;
585
+ }
586
+ async _getImageResolution(image) {
587
+ try {
588
+ const bitmap = await createImageBitmap(image);
589
+ const resolution = `${bitmap.width}x${bitmap.height}`;
590
+ bitmap.close();
591
+ return resolution;
592
+ }
593
+ catch (e) {
594
+ console.warn('Failed to get image resolution:', e);
595
+ return undefined;
596
+ }
597
+ }
598
+ _getBase64FromFile(file) {
599
+ return new Promise((resolve, reject) => {
600
+ const reader = new FileReader();
601
+ reader.onloadend = () => {
602
+ const dataUrl = reader.result;
603
+ const base64 = dataUrl.split(',')[1];
604
+ resolve(base64);
605
+ };
606
+ reader.onerror = (e) => {
607
+ reject(e);
608
+ };
609
+ reader.readAsDataURL(file);
610
+ });
611
+ }
612
+ _getVideoMetadata(videoFile) {
613
+ return new Promise((resolve) => {
614
+ const video = document.createElement('video');
615
+ video.preload = 'metadata';
616
+ video.muted = true;
617
+ video.onloadedmetadata = () => {
618
+ // Seek to 1 second or 10% of duration to capture thumbnail
619
+ const seekTime = Math.min(1, video.duration * 0.1);
620
+ video.currentTime = seekTime;
621
+ };
622
+ video.onseeked = () => {
623
+ const result = {
624
+ resolution: `${video.videoWidth}x${video.videoHeight}`,
625
+ duration: video.duration,
626
+ };
627
+ try {
628
+ const canvas = document.createElement('canvas');
629
+ canvas.width = video.videoWidth;
630
+ canvas.height = video.videoHeight;
631
+ const ctx = canvas.getContext('2d');
632
+ if (ctx) {
633
+ ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
634
+ result.thumbnail = canvas.toDataURL('image/jpeg', 0.8).split(',')[1];
635
+ }
636
+ }
637
+ catch (e) {
638
+ console.warn('Failed to generate video thumbnail:', e);
639
+ }
640
+ URL.revokeObjectURL(video.src);
641
+ resolve(result);
642
+ };
643
+ video.onerror = () => {
644
+ // Clean up and return defaults
645
+ URL.revokeObjectURL(video.src);
646
+ resolve({});
647
+ };
648
+ video.src = URL.createObjectURL(videoFile);
649
+ });
650
+ }
290
651
  async checkPermissions() {
291
652
  if (typeof navigator === 'undefined' || !navigator.permissions) {
292
653
  throw this.unavailable('Permissions API not available in this browser');
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["/**\n * @deprecated This enum is only meant to be used for deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraSource;\n(function (CameraSource) {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n CameraSource[\"Prompt\"] = \"PROMPT\";\n /**\n * Take a new photo using the camera.\n */\n CameraSource[\"Camera\"] = \"CAMERA\";\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n CameraSource[\"Photos\"] = \"PHOTOS\";\n})(CameraSource || (CameraSource = {}));\nexport var CameraDirection;\n(function (CameraDirection) {\n CameraDirection[\"Rear\"] = \"REAR\";\n CameraDirection[\"Front\"] = \"FRONT\";\n})(CameraDirection || (CameraDirection = {}));\n/**\n * @deprecated This enum is only meant to be used for `ImageOptions` in deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraResultType;\n(function (CameraResultType) {\n CameraResultType[\"Uri\"] = \"uri\";\n CameraResultType[\"Base64\"] = \"base64\";\n CameraResultType[\"DataUrl\"] = \"dataUrl\";\n})(CameraResultType || (CameraResultType = {}));\nexport var MediaType;\n(function (MediaType) {\n MediaType[MediaType[\"Photo\"] = 0] = \"Photo\";\n MediaType[MediaType[\"Video\"] = 1] = \"Video\";\n})(MediaType || (MediaType = {}));\nexport var MediaTypeSelection;\n(function (MediaTypeSelection) {\n MediaTypeSelection[MediaTypeSelection[\"Photo\"] = 0] = \"Photo\";\n MediaTypeSelection[MediaTypeSelection[\"Video\"] = 1] = \"Video\";\n MediaTypeSelection[MediaTypeSelection[\"All\"] = 2] = \"All\";\n})(MediaTypeSelection || (MediaTypeSelection = {}));\nexport var EncodingType;\n(function (EncodingType) {\n EncodingType[EncodingType[\"JPEG\"] = 0] = \"JPEG\";\n EncodingType[EncodingType[\"PNG\"] = 1] = \"PNG\";\n})(EncodingType || (EncodingType = {}));\n//# sourceMappingURL=definitions.js.map","import { WebPlugin, CapacitorException } from '@capacitor/core';\nimport { CameraSource, CameraDirection } from './definitions';\nexport class CameraWeb extends WebPlugin {\n async takePhoto(_options) {\n throw this.unimplemented('takePhoto is not implemented on Web.');\n }\n async recordVideo(_options) {\n throw this.unimplemented('recordVideo is not implemented on Web.');\n }\n async playVideo(_options) {\n throw this.unimplemented('playVideo is not implemented on Web.');\n }\n async chooseFromGallery(_options) {\n throw this.unimplemented('chooseFromGallery is not implemented on web.');\n }\n async editPhoto(_options) {\n throw this.unimplemented('editPhoto is not implemented on Web.');\n }\n async editURIPhoto(_options) {\n throw this.unimplemented('editURIPhoto is not implemented on Web.');\n }\n async getPhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput || options.source === CameraSource.Photos) {\n this.fileInputExperience(options, resolve, reject);\n }\n else if (options.source === CameraSource.Prompt) {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.promptLabelHeader || 'Photo';\n actionSheet.cancelable = false;\n actionSheet.options = [\n { title: options.promptLabelPhoto || 'From Photos' },\n { title: options.promptLabelPicture || 'Take Picture' },\n ];\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n if (selection === 0) {\n this.fileInputExperience(options, resolve, reject);\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n async pickImages(_options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.multipleFileInputExperience(resolve, reject);\n });\n }\n async cameraExperience(options, resolve, reject) {\n if (customElements.get('pwa-camera-modal')) {\n const cameraModal = document.createElement('pwa-camera-modal');\n cameraModal.facingMode = options.direction === CameraDirection.Front ? 'user' : 'environment';\n document.body.appendChild(cameraModal);\n try {\n await cameraModal.componentOnReady();\n cameraModal.addEventListener('onPhoto', async (e) => {\n const photo = e.detail;\n if (photo === null) {\n reject(new CapacitorException('User cancelled photos app'));\n }\n else if (photo instanceof Error) {\n reject(photo);\n }\n else {\n resolve(await this._getCameraPhoto(photo, options));\n }\n cameraModal.dismiss();\n document.body.removeChild(cameraModal);\n });\n cameraModal.present();\n }\n catch (e) {\n this.fileInputExperience(options, resolve, reject);\n }\n }\n else {\n console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);\n this.fileInputExperience(options, resolve, reject);\n }\n }\n fileInputExperience(options, resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input';\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const file = input.files[0];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n if (options.resultType === 'dataUrl' || options.resultType === 'base64') {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: reader.result,\n format,\n });\n }\n else if (options.resultType === 'base64') {\n const b64 = reader.result.split(',')[1];\n resolve({\n base64String: b64,\n format,\n });\n }\n cleanup();\n });\n reader.readAsDataURL(file);\n }\n else {\n resolve({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n cleanup();\n }\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.capture = true;\n if (options.source === CameraSource.Photos || options.source === CameraSource.Prompt) {\n input.removeAttribute('capture');\n }\n else if (options.direction === CameraDirection.Front) {\n input.capture = 'user';\n }\n else if (options.direction === CameraDirection.Rear) {\n input.capture = 'environment';\n }\n input.click();\n }\n multipleFileInputExperience(resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input-multiple');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input-multiple';\n input.type = 'file';\n input.hidden = true;\n input.multiple = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const photos = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n photos.push({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n }\n resolve({ photos });\n cleanup();\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.click();\n }\n _getCameraPhoto(photo, options) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n const format = photo.type.split('/')[1];\n if (options.resultType === 'uri') {\n resolve({\n webPath: URL.createObjectURL(photo),\n format: format,\n saved: false,\n });\n }\n else {\n reader.readAsDataURL(photo);\n reader.onloadend = () => {\n const r = reader.result;\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: r,\n format: format,\n saved: false,\n });\n }\n else {\n resolve({\n base64String: r.split(',')[1],\n format: format,\n saved: false,\n });\n }\n };\n reader.onerror = (e) => {\n reject(e);\n };\n }\n });\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query\n // the specific permissions that are supported varies among browsers that implement the\n // permissions API, so we need a try/catch in case 'camera' is invalid\n const permission = await window.navigator.permissions.query({\n name: 'camera',\n });\n return {\n camera: permission.state,\n photos: 'granted',\n };\n }\n catch (_a) {\n throw this.unavailable('Camera permissions are not available in this browser');\n }\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async pickLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n async getLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n}\nconst Camera = new CameraWeb();\nexport { Camera };\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CameraWeb } from './web';\nconst Camera = registerPlugin('Camera', {\n web: () => new CameraWeb(),\n});\nexport * from './definitions';\nexport { Camera };\n//# sourceMappingURL=index.js.map"],"names":["CameraSource","CameraDirection","CameraResultType","MediaType","MediaTypeSelection","EncodingType","WebPlugin","CapacitorException","registerPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;AACX,CAAC,UAAU,eAAe,EAAE;AAC5B,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,MAAM;AACpC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,OAAO;AACtC,CAAC,EAAEA,uBAAe,KAAKA,uBAAe,GAAG,EAAE,CAAC,CAAC;AAC7C;AACA;AACA;AACA;AACWC;AACX,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,GAAG,KAAK;AACnC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACzC,IAAI,gBAAgB,CAAC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C,gBAAgB,MAAM,EAAE,SAAS;AACjC,aAAa;AACb,QAAQ;AACR,QAAQ,OAAO,EAAE,EAAE;AACnB,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,sDAAsD,CAAC;AAC1F,QAAQ;AACR,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,uBAAuB,GAAG;AACpC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC;AACzD,IAAI;AACJ;AACe,IAAI,SAAS;;ACxQvB,MAAC,MAAM,GAAGC,mBAAc,CAAC,QAAQ,EAAE;AACxC,IAAI,GAAG,EAAE,MAAM,IAAI,SAAS,EAAE;AAC9B,CAAC;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["/**\n * @deprecated This enum is only meant to be used for deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraSource;\n(function (CameraSource) {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n CameraSource[\"Prompt\"] = \"PROMPT\";\n /**\n * Take a new photo using the camera.\n */\n CameraSource[\"Camera\"] = \"CAMERA\";\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n CameraSource[\"Photos\"] = \"PHOTOS\";\n})(CameraSource || (CameraSource = {}));\nexport var CameraDirection;\n(function (CameraDirection) {\n CameraDirection[\"Rear\"] = \"REAR\";\n CameraDirection[\"Front\"] = \"FRONT\";\n})(CameraDirection || (CameraDirection = {}));\n/**\n * @deprecated This enum is only meant to be used for `ImageOptions` in deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraResultType;\n(function (CameraResultType) {\n CameraResultType[\"Uri\"] = \"uri\";\n CameraResultType[\"Base64\"] = \"base64\";\n CameraResultType[\"DataUrl\"] = \"dataUrl\";\n})(CameraResultType || (CameraResultType = {}));\nexport var MediaType;\n(function (MediaType) {\n MediaType[MediaType[\"Photo\"] = 0] = \"Photo\";\n MediaType[MediaType[\"Video\"] = 1] = \"Video\";\n})(MediaType || (MediaType = {}));\nexport var MediaTypeSelection;\n(function (MediaTypeSelection) {\n MediaTypeSelection[MediaTypeSelection[\"Photo\"] = 0] = \"Photo\";\n MediaTypeSelection[MediaTypeSelection[\"Video\"] = 1] = \"Video\";\n MediaTypeSelection[MediaTypeSelection[\"All\"] = 2] = \"All\";\n})(MediaTypeSelection || (MediaTypeSelection = {}));\nexport var EncodingType;\n(function (EncodingType) {\n EncodingType[EncodingType[\"JPEG\"] = 0] = \"JPEG\";\n EncodingType[EncodingType[\"PNG\"] = 1] = \"PNG\";\n})(EncodingType || (EncodingType = {}));\n/**\n * Error codes returned by the Camera plugin.\n * These values match the `code` field on rejected promises.\n *\n * @since 8.2.0\n */\nexport var CameraErrorCode;\n(function (CameraErrorCode) {\n // Permissions\n /**\n * Camera access was denied by the user.\n */\n CameraErrorCode[\"CameraPermissionDenied\"] = \"OS-PLUG-CAMR-0003\";\n /**\n * Photo library / gallery access was denied by the user.\n */\n CameraErrorCode[\"GalleryPermissionDenied\"] = \"OS-PLUG-CAMR-0005\";\n /**\n * No camera hardware is available on the device.\n */\n CameraErrorCode[\"NoCameraAvailable\"] = \"OS-PLUG-CAMR-0007\";\n // Take Photo\n /**\n * The user cancelled the take photo action.\n */\n CameraErrorCode[\"TakePhotoCancelled\"] = \"OS-PLUG-CAMR-0006\";\n /**\n * Failed to take photo.\n */\n CameraErrorCode[\"TakePhotoFailed\"] = \"OS-PLUG-CAMR-0010\";\n /**\n * The take photo action received invalid arguments.\n * @platform ios\n */\n CameraErrorCode[\"TakePhotoInvalidArguments\"] = \"OS-PLUG-CAMR-0014\";\n // Edit Photo\n /**\n * The selected file contains invalid image data.\n * @platform ios\n */\n CameraErrorCode[\"InvalidImageData\"] = \"OS-PLUG-CAMR-0008\";\n /**\n * Failed to edit image.\n */\n CameraErrorCode[\"EditPhotoFailed\"] = \"OS-PLUG-CAMR-0009\";\n /**\n * The user cancelled the edit photo action.\n */\n CameraErrorCode[\"EditPhotoCancelled\"] = \"OS-PLUG-CAMR-0013\";\n /**\n * The URI parameter for editing is empty.\n * @platform android\n */\n CameraErrorCode[\"EditPhotoEmptyUri\"] = \"OS-PLUG-CAMR-0024\";\n // Choose from Gallery\n /**\n * Failed to retrieve an image from the gallery.\n */\n CameraErrorCode[\"ImageNotFound\"] = \"OS-PLUG-CAMR-0011\";\n /**\n * Failed to process the selected image.\n */\n CameraErrorCode[\"ProcessImageFailed\"] = \"OS-PLUG-CAMR-0012\";\n /**\n * Failed to choose media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaFailed\"] = \"OS-PLUG-CAMR-0018\";\n /**\n * The user cancelled choosing media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaCancelled\"] = \"OS-PLUG-CAMR-0020\";\n /**\n * Failed to retrieve the media file path.\n * @platform android\n */\n CameraErrorCode[\"MediaPathError\"] = \"OS-PLUG-CAMR-0021\";\n /**\n * Failed to retrieve an image from the provided URI.\n */\n CameraErrorCode[\"FetchImageFromUriFailed\"] = \"OS-PLUG-CAMR-0028\";\n // Record Video\n /**\n * Failed to record video.\n */\n CameraErrorCode[\"RecordVideoFailed\"] = \"OS-PLUG-CAMR-0016\";\n /**\n * The user cancelled the video recording.\n */\n CameraErrorCode[\"RecordVideoCancelled\"] = \"OS-PLUG-CAMR-0017\";\n /**\n * Failed to retrieve a video from the gallery.\n * @platform ios\n */\n CameraErrorCode[\"VideoNotFound\"] = \"OS-PLUG-CAMR-0025\";\n // Play Video\n /**\n * Failed to play video.\n */\n CameraErrorCode[\"PlayVideoFailed\"] = \"OS-PLUG-CAMR-0023\";\n // General\n /**\n * Failed to encode the media result.\n * @platform ios\n */\n CameraErrorCode[\"EncodeResultFailed\"] = \"OS-PLUG-CAMR-0019\";\n /**\n * The selected file does not exist.\n */\n CameraErrorCode[\"FileNotFound\"] = \"OS-PLUG-CAMR-0027\";\n /**\n * Invalid argument provided to a plugin method.\n * @platform android\n */\n CameraErrorCode[\"InvalidArgument\"] = \"OS-PLUG-CAMR-0031\";\n /**\n * A general plugin error occurred.\n * @platform ios\n */\n CameraErrorCode[\"GeneralError\"] = \"OS-PLUG-CAMR-0026\";\n})(CameraErrorCode || (CameraErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { WebPlugin, CapacitorException } from '@capacitor/core';\nimport { CameraSource, CameraDirection, MediaType, MediaTypeSelection } from './definitions';\nexport class CameraWeb extends WebPlugin {\n async takePhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput) {\n this.takePhotoCameraInputExperience(options, resolve, reject);\n }\n else {\n this.takePhotoCameraExperience(options, resolve, reject);\n }\n });\n }\n async recordVideo(_options) {\n throw this.unimplemented('recordVideo is not implemented on Web.');\n }\n async playVideo(_options) {\n throw this.unimplemented('playVideo is not implemented on Web.');\n }\n async chooseFromGallery(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.galleryInputExperience(options, resolve, reject);\n });\n }\n async editPhoto(_options) {\n throw this.unimplemented('editPhoto is not implemented on Web.');\n }\n async editURIPhoto(_options) {\n throw this.unimplemented('editURIPhoto is not implemented on Web.');\n }\n async getPhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput || options.source === CameraSource.Photos) {\n this.fileInputExperience(options, resolve, reject);\n }\n else if (options.source === CameraSource.Prompt) {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.promptLabelHeader || 'Photo';\n actionSheet.cancelable = false;\n actionSheet.options = [\n { title: options.promptLabelPhoto || 'From Photos' },\n { title: options.promptLabelPicture || 'Take Picture' },\n ];\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n if (selection === 0) {\n this.fileInputExperience(options, resolve, reject);\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n async pickImages(_options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.multipleFileInputExperience(resolve, reject);\n });\n }\n async cameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.direction, (photo) => this._getCameraPhoto(photo, options), () => this.fileInputExperience(options, resolve, reject), resolve, reject);\n }\n fileInputExperience(options, resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input';\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const file = input.files[0];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n if (options.resultType === 'dataUrl' || options.resultType === 'base64') {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: reader.result,\n format,\n });\n }\n else if (options.resultType === 'base64') {\n const b64 = reader.result.split(',')[1];\n resolve({\n base64String: b64,\n format,\n });\n }\n cleanup();\n });\n reader.readAsDataURL(file);\n }\n else {\n resolve({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n cleanup();\n }\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.capture = true;\n if (options.source === CameraSource.Photos || options.source === CameraSource.Prompt) {\n input.removeAttribute('capture');\n }\n else if (options.direction === CameraDirection.Front) {\n input.capture = 'user';\n }\n else if (options.direction === CameraDirection.Rear) {\n input.capture = 'environment';\n }\n input.click();\n }\n multipleFileInputExperience(resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input-multiple');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input-multiple';\n input.type = 'file';\n input.hidden = true;\n input.multiple = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const photos = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n photos.push({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n }\n resolve({ photos });\n cleanup();\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.click();\n }\n _getCameraPhoto(photo, options) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n const format = this._getFileFormat(photo);\n if (options.resultType === 'uri') {\n resolve({\n webPath: URL.createObjectURL(photo),\n format,\n saved: false,\n });\n }\n else {\n reader.readAsDataURL(photo);\n reader.onloadend = () => {\n const r = reader.result;\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: r,\n format,\n saved: false,\n });\n }\n else {\n resolve({\n base64String: r.split(',')[1],\n format,\n saved: false,\n });\n }\n };\n reader.onerror = (e) => {\n reject(e);\n };\n }\n });\n }\n async takePhotoCameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.cameraDirection, (photo) => { var _a; return this._buildPhotoMediaResult(photo, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false); }, () => this.takePhotoCameraInputExperience(options, resolve, reject), resolve, reject);\n }\n takePhotoCameraInputExperience(options, resolve, reject) {\n const input = this._createFileInput('_capacitor-camera-input-takephoto');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const file = input.files[0];\n resolve(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n input.accept = 'image/*';\n if (options.cameraDirection === CameraDirection.Front) {\n input.capture = 'user';\n }\n else {\n // CameraDirection.Rear\n input.capture = 'environment';\n }\n input.click();\n }\n galleryInputExperience(options, resolve, reject) {\n var _a, _b;\n const input = this._createFileInput('_capacitor-camera-input-gallery');\n input.multiple = (_a = options.allowMultipleSelection) !== null && _a !== void 0 ? _a : false;\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const results = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n if (file.type.startsWith('image/')) {\n results.push(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n }\n else if (file.type.startsWith('video/')) {\n const format = this._getFileFormat(file);\n let thumbnail;\n let resolution;\n let duration;\n try {\n const videoInfo = await this._getVideoMetadata(file);\n thumbnail = videoInfo.thumbnail;\n if (options.includeMetadata) {\n resolution = videoInfo.resolution;\n duration = videoInfo.duration;\n }\n }\n catch (e) {\n console.warn('Failed to get video metadata:', e);\n }\n const result = {\n type: MediaType.Video,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (options.includeMetadata) {\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: new Date(file.lastModified).toISOString(),\n duration,\n };\n }\n results.push(result);\n }\n }\n resolve({ results });\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n // Set accept attribute based on mediaType\n const mediaType = (_b = options.mediaType) !== null && _b !== void 0 ? _b : MediaTypeSelection.Photo;\n if (mediaType === MediaTypeSelection.Photo) {\n input.accept = 'image/*';\n }\n else if (mediaType === MediaTypeSelection.Video) {\n input.accept = 'video/*';\n }\n else {\n // MediaTypeSelection.All\n input.accept = 'image/*,video/*';\n }\n input.click();\n }\n _getFileFormat(file) {\n if (file.type === 'image/png') {\n return 'png';\n }\n else if (file.type === 'image/gif') {\n return 'gif';\n }\n else if (file.type.startsWith('video/')) {\n return file.type.split('/')[1];\n }\n else if (file.type.startsWith('image/')) {\n return 'jpeg';\n }\n return file.type.split('/')[1] || 'jpeg';\n }\n async _buildPhotoMediaResult(file, includeMetadata) {\n const format = this._getFileFormat(file);\n const thumbnail = await this._getBase64FromFile(file);\n const result = {\n type: MediaType.Photo,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (includeMetadata) {\n const resolution = await this._getImageResolution(file);\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: 'lastModified' in file ? new Date(file.lastModified).toISOString() : new Date().toISOString(),\n };\n }\n return result;\n }\n _validateFileInput(input, reject, cleanup) {\n if (!input.files || input.files.length === 0) {\n const message = input.multiple ? 'No files selected' : 'No file selected';\n reject(new CapacitorException(message));\n cleanup();\n return false;\n }\n return true;\n }\n async _setupPWACameraModal(cameraDirection, onPhotoCallback, fallbackCallback, resolve, reject) {\n if (customElements.get('pwa-camera-modal')) {\n const cameraModal = document.createElement('pwa-camera-modal');\n cameraModal.facingMode = cameraDirection === CameraDirection.Front ? 'user' : 'environment';\n document.body.appendChild(cameraModal);\n try {\n await cameraModal.componentOnReady();\n cameraModal.addEventListener('onPhoto', async (e) => {\n const photo = e.detail;\n if (photo === null) {\n reject(new CapacitorException('User cancelled photos app'));\n }\n else if (photo instanceof Error) {\n reject(photo);\n }\n else {\n resolve(await onPhotoCallback(photo));\n }\n cameraModal.dismiss();\n document.body.removeChild(cameraModal);\n });\n cameraModal.present();\n }\n catch (e) {\n fallbackCallback();\n }\n }\n else {\n console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);\n fallbackCallback();\n }\n }\n _createFileInput(id) {\n let input = document.querySelector(`#${id}`);\n if (!input) {\n input = document.createElement('input');\n input.id = id;\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n }\n return input;\n }\n async _getImageResolution(image) {\n try {\n const bitmap = await createImageBitmap(image);\n const resolution = `${bitmap.width}x${bitmap.height}`;\n bitmap.close();\n return resolution;\n }\n catch (e) {\n console.warn('Failed to get image resolution:', e);\n return undefined;\n }\n }\n _getBase64FromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const dataUrl = reader.result;\n const base64 = dataUrl.split(',')[1];\n resolve(base64);\n };\n reader.onerror = (e) => {\n reject(e);\n };\n reader.readAsDataURL(file);\n });\n }\n _getVideoMetadata(videoFile) {\n return new Promise((resolve) => {\n const video = document.createElement('video');\n video.preload = 'metadata';\n video.muted = true;\n video.onloadedmetadata = () => {\n // Seek to 1 second or 10% of duration to capture thumbnail\n const seekTime = Math.min(1, video.duration * 0.1);\n video.currentTime = seekTime;\n };\n video.onseeked = () => {\n const result = {\n resolution: `${video.videoWidth}x${video.videoHeight}`,\n duration: video.duration,\n };\n try {\n const canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n const ctx = canvas.getContext('2d');\n if (ctx) {\n ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n result.thumbnail = canvas.toDataURL('image/jpeg', 0.8).split(',')[1];\n }\n }\n catch (e) {\n console.warn('Failed to generate video thumbnail:', e);\n }\n URL.revokeObjectURL(video.src);\n resolve(result);\n };\n video.onerror = () => {\n // Clean up and return defaults\n URL.revokeObjectURL(video.src);\n resolve({});\n };\n video.src = URL.createObjectURL(videoFile);\n });\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query\n // the specific permissions that are supported varies among browsers that implement the\n // permissions API, so we need a try/catch in case 'camera' is invalid\n const permission = await window.navigator.permissions.query({\n name: 'camera',\n });\n return {\n camera: permission.state,\n photos: 'granted',\n };\n }\n catch (_a) {\n throw this.unavailable('Camera permissions are not available in this browser');\n }\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async pickLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n async getLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n}\nconst Camera = new CameraWeb();\nexport { Camera };\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CameraWeb } from './web';\nconst Camera = registerPlugin('Camera', {\n web: () => new CameraWeb(),\n});\nexport * from './definitions';\nexport { Camera };\n//# sourceMappingURL=index.js.map"],"names":["CameraSource","CameraDirection","CameraResultType","MediaType","MediaTypeSelection","EncodingType","CameraErrorCode","WebPlugin","CapacitorException","registerPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;AACX,CAAC,UAAU,eAAe,EAAE;AAC5B,IAAI,eAAe,CAAC,MAAM,CA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