PageSourceSearch

https://kinsula.expo.app/_expo/static/js/web/ImagePicker-e4415d3a1a90c934e4cb0b0f8d606c86.js

js kinsula.expo.app collected 2026-10-03 14:04:45 UTC 8,596 bytes, 4 lines download raw bytes

1__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getCameraPermissionsAsync=y,_e.getMediaLibraryPermissionsAsync=f,_e.requestCameraPermissionsAsync=b,_e.requestMediaLibraryPermissionsAsync=P,Object.defineProperty(_e,"useMediaLibraryPermissions",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"useCameraPermissions",{enumerable:!0,get:function(){return A}}),_e.getPendingResultAsync=async function(){if(o.default.getPendingResultAsync)return o.default.getPendingResultAsync();return null},_e.launchCameraAsync=async function(e={}){if(!o.default.launchCameraAsync)throw new t.UnavailabilityError('ImagePicker','launchCameraAsync');const n=(0,u.mapDeprecatedOptions)(e);return await o.default.launchCameraAsync(l(n))},_e.launchImageLibraryAsync=async function(e={}){const n=(0,u.mapDeprecatedOptions)(e);if(!o.default.launchImageLibraryAsync)throw new t.UnavailabilityError('ImagePicker','launchImageLibraryAsync');n?.allowsEditing&&n.allowsMultipleSelection&&console.warn("[exp
1o-image-picker] `allowsEditing` is not supported when `allowsMultipleSelection` is enabled and will be ignored.Disable either 'allowsEditing' or 'allowsMultipleSelection' in 'launchImageLibraryAsync' to fix this warning.");return await o.default.launchImageLibraryAsync(n)},Object.defineProperty(_e,"PermissionStatus",{enumerable:!0,get:function(){return n.PermissionStatus}});var e,n=r(d[0]),t=r(d[1]),s=r(d[2]),o=(e=s)&&e.__esModule?e:{default:e},u=r(d[3]),c=r(d[4]);function l(e){const{aspect:n,quality:s,videoMaxDuration:o}=e;if(null!=n){const[e,s]=n;if(e<=0||s<=0)throw new t.CodedError('ERR_INVALID_ARGUMENT',`Invalid aspect ratio values ${e}:${s}. Provide positive numbers.`)}if(s&&(s<0||s>1))throw new t.CodedError('ERR_INVALID_ARGUMENT',`Invalid 'quality' value ${s}. Provide a value between 0 and 1.`);if(o&&o<0)throw new t.CodedError('ERR_INVALID_ARGUMENT',`Invalid 'videoMaxDuration' value ${o}. Provide a non-negative number.`);return e}async function y(){return o.default.getCameraPermissionsAsync()}async function f(e=!1){return o.default.getMediaLibraryPermissionsAsync(e)}async function b(){return o.default.requestCameraPermissionsAsync()}async function P(e=!1){return(0,o.default.requestMediaLibraryPermissionsAsync)(e)}Object.keys(c).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return c[e]}})});const w=(0,n.createPermissionHook)({getMethod:e=>f(e?.writeOnly),requestMethod:e=>P(e?.writeOnly)}),A=(0,n.createPermissionHook)({getMethod:y,requestMethod:b})},1011,[480,8,1012,1014,1013]);
2__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]),s=r(d[2]);const o={images:'image/*',videos:'video/mp4,video/quicktime,video/x-m4v,video/*',livePhotos:''};var c={launchImageLibraryAsync:async({mediaTypes:t=['images'],allowsMultipleSelection:n=!1,base64:s=!1})=>'undefined'==typeof window||'undefined'==typeof document?{canceled:!0,assets:null}:await u({mediaTypes:t,allowsMultipleSelection:n,base64:s}),launchCameraAsync:async({mediaTypes:t=['images'],allowsMultipleSelection:n=!1,base64:s=!1,cameraType:o})=>'undefined'==typeof window||'undefined'==typeof document?{canceled:!0,assets:null}:await u({mediaTypes:t,allowsMultipleSelection:n,capture:o??!0,base64:s}),getCameraPermissionsAsync:async()=>l(),requestCameraPermissionsAsync:async()=>l(),getMediaLibraryPermissionsAsync:async t=>l(),requestMediaLibraryPermissionsAsync:async t=>l()};function l(){return{status:t.PermissionStatus.GRANTED,expires:'never',granted:!0,canAskAgain:!0}}function u({mediaTypes:t,capture:o=!1,allowsMultipleSelection:c=!1,base64:l}){const u=w((0,s.parseMediaTypes)(t)),p=document.createElement('input');if(p.style.display='none',p.setAttribute('type','file'),p.setAttribute('accept',u),p.setAttribute('id',String(Math.random())),p.setAttribute('data-testid','file-input'),c&&p.setAttribute('multiple','multiple'),o)switch(o){case!0:p.setAttribute('capture','camera');break;case n.CameraType.front:p.setAttribute('capture','user');break;case n.CameraType.back:p.setAttribute('capture','environment')}return document.body.appendChild(p),new Promise(t=>{p.addEventListener('change',async()=>{if(p.files?.length){const n=c?p.files:[p.files[0]];try{const s=await Promise.all(Array.from(n).filter(t=>null!=t).map(t=>f(t,{base64:l})));t({canceled:!1,assets:s})}catch(n){t(Promise.reject(n))}}else t({canceled:!0,assets:null});document.body.removeChild(p)}),p.addEventListener('cancel',()=>{p.dispatchEvent(new Event('change'))});const n=new MouseEvent('click');p.dispatchEvent(n)})}async function p(t){return new Promise(n=>{const s=new Image;s.onload=()=>{n({width:s.naturalWidth??s.width,height:s.naturalHeight??s.height})},s.onerror=()=>n({width:0,height:0}),s.src=t})}async function y(t){return new Promise(n=>{const s=document.createElement('video');s.preload='metadata',s.onloadedmetadata=()=>{n({width:s.videoWidth,height:s.videoHeight,duration:s.duration})},s.onerror=()=>n({width:0,height:0,duration:0}),s.src=t})}async function h(t){return new Promise((n,s)=>{const o=new FileReader;o.onerror=()=>{s(new Error('Failed to read the selected media because the operation failed.'))},o.onload=t=>{const o=t.target?.result;'string'==typeof o?n(o.split(',')?.[1]??''):s(new Error('Failed to read file as base64'))},o.readAsDataURL(t)})}async function f(t,n){const s=t.type,o=URL.createObjectURL(t);try{let c,l;if(s.startsWith('image/'))c=await p(o);else{if(!s.startsWith('video/'))throw new Error(`Unsupported file type: ${s}. Only images and videos are supported.`);c=await y(o)}return n.base64&&(l=await h(t)),{uri:o,width:c.width,height:c.height,type:s.startsWith('image/')?'image':'video',mimeType:s,fileName:t.name,fileSize:t.size,file:t,...void 0!==c.duration&&{duration:c.duration},...l&&{base64:l}}}catch(t){throw t}}function w(t){const n=t.filter(t=>'livePhotos'!==t);if(0===n.length)return'image/*';let s='';for(const t of n)s.includes(o[t])||(s=s.concat(',',o[t]));return s}},1012,[480,1013,1014]);
3__d(function(g,r,i,a,m,e,d){"use strict";
3Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MediaTypeOptions",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"VideoExportPreset",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UIImagePickerControllerQualityType",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"UIImagePickerPresentationStyle",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"UIImagePickerPreferredAssetRepresentationMode",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"CameraType",{enumerable:!0,get:function(){return l}});let t=(function(t){return t.All="All",t.Videos="Videos",t.Images="Images",t})({}),n=(function(t){return t[t.Passthrough=0]="Passthrough",t[t.LowQuality=1]="LowQuality",t[t.MediumQuality=2]="MediumQuality",t[t.HighestQuality=3]="HighestQuality",t[t.H264_640x480=4]="H264_640x480",t[t.H264_960x540=5]="H264_960x540",t[t.H264_1280x720=6]="H264_1280x720",t[t.H264_1920x1080=7]="H264_1920x1080",t[t.H264_3840x2160=8]="H264_3840x2160",t[t.HEVC_1920x1080=9]="HEVC_1920x1080",t[t.HEVC_3840x2160=10]="HEVC_3840x2160",t})({}),u=(function(t){return t[t.High=0]="High",t[t.Medium=1]="Medium",t[t.Low=2]="Low",t[t.VGA640x480=3]="VGA640x480",t[t.IFrame1280x720=4]="IFrame1280x720",t[t.IFrame960x540=5]="IFrame960x540",t})({}),o=(function(t){return t.FULL_SCREEN="fullScreen",t.PAGE_SHEET="pageSheet",t.FORM_SHEET="formSheet",t.CURRENT_CONTEXT="currentContext",t.OVER_FULL_SCREEN="overFullScreen",t.OVER_CURRENT_CONTEXT="overCurrentContext",t.POPOVER="popover",t.AUTOMATIC="automatic",t})({}),c=(function(t){return t.Automatic="automatic",t.Compatible="compatible",t.Current="current",t})({}),l=(function(t){return t.back="back",t.front="front",t})({})},1013,[]);
4__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseMediaTypes=p,e.mapDeprecatedOptions=function(s){if(!s.mediaTypes)return s;return{...s,mediaTypes:p(s.mediaTypes??[])}};var s=r(d[0]);function p(p){const n={Images:['images'],Videos:['videos'],All:['images','videos']};return p===s.MediaTypeOptions.Images||p===s.MediaTypeOptions.Videos||p===s.MediaTypeOptions.All?(console.warn('[expo-image-picker] `ImagePicker.MediaTypeOptions` have been deprecated. Use `ImagePicker.MediaType` or an array of `ImagePicker.MediaType` instead.'),n[p]):'string'==typeof p?[p]:p}},1014,[1013]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.