2a93828718713d40ec51eb165fb851cf.json 48.7 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.getVersion=getVersion;exports.isAvailable=isAvailable;exports.getUnavailabilityReason=getUnavailabilityReason;exports.onFrameDidUpdate=onFrameDidUpdate;exports.onDidFailWithError=onDidFailWithError;exports.onAnchorsDidUpdate=onAnchorsDidUpdate;exports.onCameraDidChangeTrackingState=onCameraDidChangeTrackingState;exports.onSessionWasInterrupted=onSessionWasInterrupted;exports.onSessionInterruptionEnded=onSessionInterruptionEnded;exports.removeAllListeners=removeAllListeners;exports.performHitTest=performHitTest;exports.setDetectionImagesAsync=setDetectionImagesAsync;exports.getCurrentFrame=getCurrentFrame;exports.getARMatrices=getARMatrices;exports.stopAsync=stopAsync;exports.startAsync=startAsync;exports.reset=reset;exports.resume=resume;exports.pause=pause;exports.setConfigurationAsync=setConfigurationAsync;exports.getProvidesAudioData=getProvidesAudioData;exports.setProvidesAudioData=setProvidesAudioData;exports.setPlaneDetection=setPlaneDetection;exports.getPlaneDetection=getPlaneDetection;exports.getCameraTexture=getCameraTexture;exports.setWorldOriginAsync=setWorldOriginAsync;exports.setLightEstimationEnabled=setLightEstimationEnabled;exports.getLightEstimationEnabled=getLightEstimationEnabled;exports.setAutoFocusEnabled=setAutoFocusEnabled;exports.getAutoFocusEnabled=getAutoFocusEnabled;exports.setWorldAlignment=setWorldAlignment;exports.getWorldAlignment=getWorldAlignment;exports.isConfigurationAvailable=isConfigurationAvailable;exports.getSupportedVideoFormats=getSupportedVideoFormats;exports.isFrontCameraAvailable=isFrontCameraAvailable;exports.isRearCameraAvailable=isRearCameraAvailable;exports.TrackingConfigurations=exports.TrackingStateReasons=exports.TrackingStates=exports.FrameAttributes=exports.AnchorEventTypes=exports.AnchorTypes=exports.EventTypes=exports.WorldAlignmentTypes=exports.PlaneDetectionTypes=exports.TrackingStateReason=exports.TrackingState=exports.FrameAttribute=exports.AnchorEventType=exports.AnchorType=exports.EventType=exports.WorldAlignment=exports.HitTestResultTypes=exports.PlaneDetection=exports.FaceAnchorProp=exports.BlendShape=exports.DepthDataAccuracy=exports.DepthDataQuality=exports.TrackingConfiguration=void 0;var _defineProperty2=_interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));var _regenerator=_interopRequireDefault(require(\"@babel/runtime/regenerator\"));var _expoConstants=_interopRequireDefault(require(\"expo-constants\"));var _Dimensions=_interopRequireDefault(require(\"react-native-web/dist/exports/Dimensions\"));var _NativeEventEmitter=_interopRequireDefault(require(\"react-native-web/dist/exports/NativeEventEmitter\"));var _NativeModules=_interopRequireDefault(require(\"react-native-web/dist/exports/NativeModules\"));var _Platform=_interopRequireDefault(require(\"react-native-web/dist/exports/Platform\"));var _findNodeHandle=_interopRequireDefault(require(\"react-native-web/dist/exports/findNodeHandle\"));var ExponentAR=_NativeModules.default.ExponentAR||{};var emitter=new _NativeEventEmitter.default(ExponentAR);var TrackingConfiguration;exports.TrackingConfiguration=TrackingConfiguration;(function(TrackingConfiguration){TrackingConfiguration[\"World\"]=\"ARWorldTrackingConfiguration\";TrackingConfiguration[\"Orientation\"]=\"AROrientationTrackingConfiguration\";TrackingConfiguration[\"Face\"]=\"ARFaceTrackingConfiguration\";})(TrackingConfiguration||(exports.TrackingConfiguration=TrackingConfiguration={}));var DepthDataQuality;exports.DepthDataQuality=DepthDataQuality;(function(DepthDataQuality){DepthDataQuality[\"Low\"]=\"AVDepthDataQualityLow\";DepthDataQuality[\"High\"]=\"AVDepthDataQualityHigh\";})(DepthDataQuality||(exports.DepthDataQuality=DepthDataQuality={}));var DepthDataAccuracy;exports.DepthDataAccuracy=DepthDataAccuracy;(function(DepthDataAccuracy){DepthDataAccuracy[\"Absolute\"]=\"AVDepthDataAccuracyAbsolute\";DepthDataAccuracy[\"Relative\"]=\"AVDepthDataAccuracyRelative\";})(DepthDataAccuracy||(exports.DepthDataAccuracy=DepthDataAccuracy={}));var BlendShape;exports.BlendShape=BlendShape;(function(BlendShape){BlendShape[\"BrowDownL\"]=\"browDown_L\";BlendShape[\"BrowDownR\"]=\"browDown_R\";BlendShape[\"BrowInnerUp\"]=\"browInnerUp\";BlendShape[\"BrowOuterUpL\"]=\"browOuterUp_L\";BlendShape[\"BrowOuterUpR\"]=\"browOuterUp_R\";BlendShape[\"CheekPuff\"]=\"cheekPuff\";BlendShape[\"CheekSquintL\"]=\"cheekSquint_L\";BlendShape[\"CheekSquintR\"]=\"cheekSquint_R\";BlendShape[\"EyeBlinkL\"]=\"eyeBlink_L\";BlendShape[\"EyeBlinkR\"]=\"eyeBlink_R\";BlendShape[\"EyeLookDownL\"]=\"eyeLookDown_L\";BlendShape[\"EyeLookDownR\"]=\"eyeLookDown_R\";BlendShape[\"EyeLookInL\"]=\"eyeLookIn_L\";BlendShape[\"EyeLookInR\"]=\"eyeLookIn_R\";BlendShape[\"EyeLookOutL\"]=\"eyeLookOut_L\";BlendShape[\"EyeLookOutR\"]=\"eyeLookOut_R\";BlendShape[\"EyeLookUpL\"]=\"eyeLookUp_L\";BlendShape[\"EyeLookUpR\"]=\"eyeLookUp_R\";BlendShape[\"EyeSquintL\"]=\"eyeSquint_L\";BlendShape[\"EyeSquintR\"]=\"eyeSquint_R\";BlendShape[\"EyeWideL\"]=\"eyeWide_L\";BlendShape[\"EyeWideR\"]=\"eyeWide_R\";BlendShape[\"JawForward\"]=\"jawForward\";BlendShape[\"JawLeft\"]=\"jawLeft\";BlendShape[\"JawOpen\"]=\"jawOpen\";BlendShape[\"JawRight\"]=\"jawRight\";BlendShape[\"MouthClose\"]=\"mouthClose\";BlendShape[\"MouthDimpleL\"]=\"mouthDimple_L\";BlendShape[\"MouthDimpleR\"]=\"mouthDimple_R\";BlendShape[\"MouthFrownL\"]=\"mouthFrown_L\";BlendShape[\"MouthFrownR\"]=\"mouthFrown_R\";BlendShape[\"MouthFunnel\"]=\"mouthFunnel\";BlendShape[\"MouthLeft\"]=\"mouthLeft\";BlendShape[\"MouthLowerDownL\"]=\"mouthLowerDown_L\";BlendShape[\"MouthLowerDownR\"]=\"mouthLowerDown_R\";BlendShape[\"MouthPressL\"]=\"mouthPress_L\";BlendShape[\"MouthPressR\"]=\"mouthPress_R\";BlendShape[\"MouthPucker\"]=\"mouthPucker\";BlendShape[\"MouthRight\"]=\"mouthRight\";BlendShape[\"MouthRollLower\"]=\"mouthRollLower\";BlendShape[\"MouthRollUpper\"]=\"mouthRollUpper\";BlendShape[\"MouthShrugLower\"]=\"mouthShrugLower\";BlendShape[\"MouthShrugUpper\"]=\"mouthShrugUpper\";BlendShape[\"MouthSmileL\"]=\"mouthSmile_L\";BlendShape[\"MouthSmileR\"]=\"mouthSmile_R\";BlendShape[\"MouthStretchL\"]=\"mouthStretch_L\";BlendShape[\"MouthStretchR\"]=\"mouthStretch_R\";BlendShape[\"MouthUpperUpL\"]=\"mouthUpperUp_L\";BlendShape[\"MouthUpperUpR\"]=\"mouthUpperUp_R\";BlendShape[\"NoseSneerL\"]=\"noseSneer_L\";BlendShape[\"NoseSneerR\"]=\"noseSneer_R\";})(BlendShape||(exports.BlendShape=BlendShape={}));var FaceAnchorProp;exports.FaceAnchorProp=FaceAnchorProp;(function(FaceAnchorProp){FaceAnchorProp[\"Geometry\"]=\"geometry\";FaceAnchorProp[\"BlendShapes\"]=\"blendShapes\";})(FaceAnchorProp||(exports.FaceAnchorProp=FaceAnchorProp={}));var PlaneDetection;exports.PlaneDetection=PlaneDetection;(function(PlaneDetection){PlaneDetection[\"None\"]=\"none\";PlaneDetection[\"Horizontal\"]=\"horizontal\";PlaneDetection[\"Vertical\"]=\"vertical\";})(PlaneDetection||(exports.PlaneDetection=PlaneDetection={}));var HitTestResultTypes;exports.HitTestResultTypes=HitTestResultTypes;(function(HitTestResultTypes){HitTestResultTypes[\"FeaturePoint\"]=\"featurePoint\";HitTestResultTypes[\"HorizontalPlane\"]=\"horizontalPlane\";HitTestResultTypes[\"VerticalPlane\"]=\"verticalPlane\";HitTestResultTypes[\"ExistingPlane\"]=\"existingPlane\";HitTestResultTypes[\"ExistingPlaneUsingExtent\"]=\"existingPlaneUsingExtent\";HitTestResultTypes[\"ExistingPlaneUsingGeometry\"]=\"existingPlaneUsingGeometry\";})(HitTestResultTypes||(exports.HitTestResultTypes=HitTestResultTypes={}));var WorldAlignment;exports.WorldAlignment=WorldAlignment;(function(WorldAlignment){WorldAlignment[\"Gravity\"]=\"gravity\";WorldAlignment[\"GravityAndHeading\"]=\"gravityAndHeading\";WorldAlignment[\"AlignmentCamera\"]=\"alignmentCamera\";})(WorldAlignment||(exports.WorldAlignment=WorldAlignment={}));var EventType;exports.EventType=EventType;(function(EventType){EventType[EventType[\"FrameDidUpdate\"]=ExponentAR.frameDidUpdate]=\"FrameDidUpdate\";EventType[EventType[\"DidFailWithError\"]=ExponentAR.didFailWithError]=\"DidFailWithError\";EventType[EventType[\"AnchorsDidUpdate\"]=ExponentAR.anchorsDidUpdate]=\"AnchorsDidUpdate\";EventType[EventType[\"CameraDidChangeTrackingState\"]=ExponentAR.cameraDidChangeTrackingState]=\"CameraDidChangeTrackingState\";EventType[EventType[\"SessionWasInterrupted\"]=ExponentAR.sessionWasInterrupted]=\"SessionWasInterrupted\";EventType[EventType[\"SessionInterruptionEnded\"]=ExponentAR.sessionInterruptionEnded]=\"SessionInterruptionEnded\";})(EventType||(exports.EventType=EventType={}));var AnchorType;exports.AnchorType=AnchorType;(function(AnchorType){AnchorType[\"Face\"]=\"ARFaceAnchor\";AnchorType[\"Image\"]=\"ARImageAnchor\";AnchorType[\"Plane\"]=\"ARPlaneAnchor\";AnchorType[\"Anchor\"]=\"ARAnchor\";})(AnchorType||(exports.AnchorType=AnchorType={}));var AnchorEventType;exports.AnchorEventType=AnchorEventType;(function(AnchorEventType){AnchorEventType[\"Add\"]=\"add\";AnchorEventType[\"Update\"]=\"update\";AnchorEventType[\"Remove\"]=\"remove\";})(AnchorEventType||(exports.AnchorEventType=AnchorEventType={}));var FrameAttribute;exports.FrameAttribute=FrameAttribute;(function(FrameAttribute){FrameAttribute[\"Anchors\"]=\"anchors\";FrameAttribute[\"RawFeaturePoints\"]=\"rawFeaturePoints\";FrameAttribute[\"LightEstimation\"]=\"lightEstimation\";FrameAttribute[\"CapturedDepthData\"]=\"capturedDepthData\";})(FrameAttribute||(exports.FrameAttribute=FrameAttribute={}));var TrackingState;exports.TrackingState=TrackingState;(function(TrackingState){TrackingState[\"NotAvailable\"]=\"ARTrackingStateNotAvailable\";TrackingState[\"Limited\"]=\"ARTrackingStateLimited\";TrackingState[\"Normal\"]=\"ARTrackingStateNormal\";})(TrackingState||(exports.TrackingState=TrackingState={}));var TrackingStateReason;exports.TrackingStateReason=TrackingStateReason;(function(TrackingStateReason){TrackingStateReason[\"None\"]=\"ARTrackingStateReasonNone\";TrackingStateReason[\"Initializing\"]=\"ARTrackingStateReasonInitializing\";TrackingStateReason[\"ExcessiveMotion\"]=\"ARTrackingStateReasonExcessiveMotion\";TrackingStateReason[\"InsufficientFeatures\"]=\"ARTrackingStateReasonInsufficientFeatures\";TrackingStateReason[\"Relocalizing\"]=\"ARTrackingStateReasonRelocalizing\";})(TrackingStateReason||(exports.TrackingStateReason=TrackingStateReason={}));function getVersion(){return ExponentAR.ARKitVersion;}var AvailabilityErrorMessages={Simulator:\"Cannot run EXGL in a simulator\",ANineChip:\"ARKit can only run on iOS devices with A9 (2015) or greater chips! This is a\",ARKitOnlyOnIOS:\"ARKit can only run on an iOS device! This is a\"};function isAvailable(){var hasA9Chip=_expoConstants.default.deviceYearClass&&_expoConstants.default.deviceYearClass>2014;if(!_expoConstants.default.isDevice||_Platform.default.isTVOS||_Platform.default.OS!=='ios'||!hasA9Chip||!ExponentAR.isSupported||!ExponentAR.startAsync){return false;}return true;}function getUnavailabilityReason(){if(!_expoConstants.default.isDevice){return AvailabilityErrorMessages.Simulator;}else if(_Platform.default.OS!=='ios'){return AvailabilityErrorMessages.ARKitOnlyOnIOS+\" \"+_Platform.default.OS+\" device\";}else if(_expoConstants.default.deviceYearClass==null||_expoConstants.default.deviceYearClass<2015){return AvailabilityErrorMessages.ANineChip+\" \"+_expoConstants.default.deviceYearClass+\" device\";}return'Unknown Reason';}function onFrameDidUpdate(listener){return _addListener(EventType.FrameDidUpdate,listener);}function onDidFailWithError(listener){return _addListener(EventType.DidFailWithError,listener);}function onAnchorsDidUpdate(listener){return _addListener(EventType.AnchorsDidUpdate,listener);}function onCameraDidChangeTrackingState(listener){return _addListener(EventType.CameraDidChangeTrackingState,listener);}function onSessionWasInterrupted(listener){return _addListener(EventType.SessionWasInterrupted,listener);}function onSessionInterruptionEnded(listener){return _addListener(EventType.SessionInterruptionEnded,listener);}function _addListener(eventType,event){return emitter.addListener(eventType,event);}function removeAllListeners(eventType){emitter.removeAllListeners(eventType);}function performHitTest(point,types){if(ExponentAR.performHitTest){return ExponentAR.performHitTest(point,types);}throw new Error(\"AR hit testing is not supported on this device\");}function setDetectionImagesAsync(images){return _regenerator.default.async(function setDetectionImagesAsync$(_context){while(1){switch(_context.prev=_context.next){case 0:if(!ExponentAR.setDetectionImagesAsync){_context.next=3;break;}_context.next=3;return _regenerator.default.awrap(ExponentAR.setDetectionImagesAsync(images));case 3:case\"end\":return _context.stop();}}});}function getCurrentFrame(attributes){if(ExponentAR.getCurrentFrame){return ExponentAR.getCurrentFrame(attributes);}throw new Error(\"AR is not supported on this device\");}function getARMatrices(near,far){if(ExponentAR.getARMatrices){return ExponentAR.getARMatrices(near,far);}throw new Error(\"AR is not supported on this device\");}function stopAsync(){return _regenerator.default.async(function stopAsync$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:if(!ExponentAR.stopAsync){_context2.next=3;break;}_context2.next=3;return _regenerator.default.awrap(ExponentAR.stopAsync());case 3:case\"end\":return _context2.stop();}}});}function startAsync(node,configuration){var handle;return _regenerator.default.async(function startAsync$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:handle=typeof node==='number'?node:_getNodeHandle(node);if(!ExponentAR.startAsync){_context3.next=5;break;}_context3.next=4;return _regenerator.default.awrap(ExponentAR.startAsync(handle,configuration));case 4:return _context3.abrupt(\"return\",_context3.sent);case 5:throw new Error(\"AR is not supported on this device\");case 6:case\"end\":return _context3.stop();}}});}function _getNodeHandle(component){var handle=(0,_findNodeHandle.default)(component);if(handle===null){throw new Error(\"Could not find the React node handle for the AR component: \"+component);}return handle;}function reset(){if(ExponentAR.reset){ExponentAR.reset();}}function resume(){if(ExponentAR.resume){ExponentAR.resume();}}function pause(){if(ExponentAR.pause){ExponentAR.pause();}}function setConfigurationAsync(configuration){return _regenerator.default.async(function setConfigurationAsync$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:if(!ExponentAR.setConfigurationAsync){_context4.next=3;break;}_context4.next=3;return _regenerator.default.awrap(ExponentAR.setConfigurationAsync(configuration));case 3:case\"end\":return _context4.stop();}}});}function getProvidesAudioData(){if(ExponentAR.getProvidesAudioData){return ExponentAR.getProvidesAudioData();}return false;}function setProvidesAudioData(providesAudioData){if(ExponentAR.setProvidesAudioData){ExponentAR.setProvidesAudioData(providesAudioData);}}function setPlaneDetection(planeDetection){if(ExponentAR.setPlaneDetection){ExponentAR.setPlaneDetection(planeDetection);}}function getPlaneDetection(){if(ExponentAR.getPlaneDetection){return ExponentAR.getPlaneDetection();}throw new Error(\"AR plane detection is not supported on this device\");}function getCameraTexture(){if(ExponentAR.getCameraTexture){return ExponentAR.getCameraTexture();}throw new Error(\"AR camera textures are not supported on this device\");}function setWorldOriginAsync(matrix_float4x4){return _regenerator.default.async(function setWorldOriginAsync$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:if(!ExponentAR.setWorldOriginAsync){_context5.next=3;break;}_context5.next=3;return _regenerator.default.awrap(ExponentAR.setWorldOriginAsync(matrix_float4x4));case 3:case\"end\":return _context5.stop();}}});}function setLightEstimationEnabled(isLightEstimationEnabled){if(ExponentAR.setLightEstimationEnabled){ExponentAR.setLightEstimationEnabled(isLightEstimationEnabled);}}function getLightEstimationEnabled(){if(ExponentAR.getLightEstimationEnabled){return ExponentAR.getLightEstimationEnabled();}return false;}function setAutoFocusEnabled(isAutoFocusEnabled){if(ExponentAR.setAutoFocusEnabled){ExponentAR.setAutoFocusEnabled(isAutoFocusEnabled);}}function getAutoFocusEnabled(){if(ExponentAR.getAutoFocusEnabled){return ExponentAR.getAutoFocusEnabled();}return false;}function setWorldAlignment(worldAlignment){if(ExponentAR.setWorldAlignment){ExponentAR.setWorldAlignment(worldAlignment);}}function getWorldAlignment(){if(ExponentAR.getWorldAlignment){return ExponentAR.getWorldAlignment();}throw new Error(\"AR world alignment is not supported on this device\");}function isConfigurationAvailable(configuration){var _Dimensions$get=_Dimensions.default.get('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;var isX=(width===812||height===812)&&!_Platform.default.isTVOS&&!_Platform.default.isPad;if(configuration===TrackingConfiguration.Face&&isX&&isAvailable()){return true;}return!!ExponentAR[configuration];}function getSupportedVideoFormats(configuration){var _videoFormats;var videoFormats=(_videoFormats={},(0,_defineProperty2.default)(_videoFormats,TrackingConfiguration.World,'WorldTrackingVideoFormats'),(0,_defineProperty2.default)(_videoFormats,TrackingConfiguration.Orientation,'OrientationTrackingVideoFormats'),(0,_defineProperty2.default)(_videoFormats,TrackingConfiguration.Face,'FaceTrackingVideoFormats'),_videoFormats);var videoFormat=videoFormats[configuration];return ExponentAR[videoFormat]||[];}function isFrontCameraAvailable(){return isConfigurationAvailable(TrackingConfiguration.Face);}function isRearCameraAvailable(){return isConfigurationAvailable(TrackingConfiguration.World);}var PlaneDetectionTypes=PlaneDetection;exports.PlaneDetectionTypes=PlaneDetectionTypes;var WorldAlignmentTypes=WorldAlignment;exports.WorldAlignmentTypes=WorldAlignmentTypes;var EventTypes=EventType;exports.EventTypes=EventTypes;var AnchorTypes=AnchorType;exports.AnchorTypes=AnchorTypes;var AnchorEventTypes=AnchorEventType;exports.AnchorEventTypes=AnchorEventTypes;var FrameAttributes=FrameAttribute;exports.FrameAttributes=FrameAttributes;var TrackingStates=TrackingState;exports.TrackingStates=TrackingStates;var TrackingStateReasons=TrackingStateReason;exports.TrackingStateReasons=TrackingStateReasons;var TrackingConfigurations=TrackingConfiguration;exports.TrackingConfigurations=TrackingConfigurations;","map":{"version":3,"sources":["../src/AR.ts"],"names":[],"mappings":"68EAAA,qE,seAWA,GAAM,CAAA,UAAU,CAAG,uBAAc,UAAd,EAA4B,EAA/C,CAEA,GAAM,CAAA,OAAO,CAAG,GAAI,4BAAJ,CAAuB,UAAvB,CAAhB,CAOA,GAAY,CAAA,qBAAZ,C,oDAAA,CAAA,SAAY,qBAAZ,CAAiC,CAK/B,qBAAA,CAAA,OAAA,CAAA,CAAA,8BAAA,CAKA,qBAAA,CAAA,aAAA,CAAA,CAAA,oCAAA,CAKA,qBAAA,CAAA,MAAA,CAAA,CAAA,6BAAA,CACD,CAhBD,EAAY,qBAAqB,iCAArB,qBAAqB,CAAA,EAAA,CAAjC,EAkBA,GAAY,CAAA,gBAAZ,C,0CAAA,CAAA,SAAY,gBAAZ,CAA4B,CAC1B,gBAAA,CAAA,KAAA,CAAA,CAAA,uBAAA,CACA,gBAAA,CAAA,MAAA,CAAA,CAAA,wBAAA,CACD,CAHD,EAAY,gBAAgB,4BAAhB,gBAAgB,CAAA,EAAA,CAA5B,EAKA,GAAY,CAAA,iBAAZ,C,4CAAA,CAAA,SAAY,iBAAZ,CAA6B,CAC3B,iBAAA,CAAA,UAAA,CAAA,CAAA,6BAAA,CACA,iBAAA,CAAA,UAAA,CAAA,CAAA,6BAAA,CACD,CAHD,EAAY,iBAAiB,6BAAjB,iBAAiB,CAAA,EAAA,CAA7B,EA4JA,GAAY,CAAA,UAAZ,C,8BAAA,CAAA,SAAY,UAAZ,CAAsB,CACpB,UAAA,CAAA,WAAA,CAAA,CAAA,YAAA,CACA,UAAA,CAAA,WAAA,CAAA,CAAA,YAAA,CACA,UAAA,CAAA,aAAA,CAAA,CAAA,aAAA,CACA,UAAA,CAAA,cAAA,CAAA,CAAA,eAAA,CACA,UAAA,CAA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,CAAhC,CACA,MAAO,CAAA,UAAU,CAAC,WAAD,CAAV,EAA2B,EAAlC,CACD,CAEK,QAAU,CAAA,sBAAV,EAAgC,CACpC,MAAO,CAAA,wBAAwB,CAAC,qBAAqB,CAAC,IAAvB,CAA/B,CACD,CAEK,QAAU,CAAA,qBAAV,EAA+B,CACnC,MAAO,CAAA,wBAAwB,CAAC,qBAAqB,CAAC,KAAvB,CAA/B,CACD,CAQM,GAAM,CAAA,mBAAmB,CAAG,cAA5B,C,gDAKA,GAAM,CAAA,mBAAmB,CAAG,cAA5B,C,gDAKA,GAAM,CAAA,UAAU,CAAG,SAAnB,C,8BAKA,GAAM,CAAA,WAAW,CAAG,UAApB,C,gCAKA,GAAM,CAAA,gBAAgB,CAAG,eAAzB,C,0CAKA,GAAM,CAAA,eAAe,CAAG,cAAxB,C,wCAKA,GAAM,CAAA,cAAc,CAAG,aAAvB,C,sCAKA,GAAM,CAAA,oBAAoB,CAAG,mBAA7B,C,kDAKA,GAAM,CAAA,sBAAsB,CAAG,qBAA/B,C","sourcesContent":["import Constants from 'expo-constants';\nimport * as React from 'react';\nimport {\n  Dimensions,\n  NativeEventEmitter,\n  NativeModules,\n  Platform,\n  EmitterSubscription,\n  findNodeHandle,\n} from 'react-native';\n\nconst ExponentAR = NativeModules.ExponentAR || {};\n\nconst emitter = new NativeEventEmitter(ExponentAR);\n\n/**\n * Tracking Configuration\n * Options for how ARKit constructs a scene coordinate system based on real-world device motion.\n * https://developer.apple.com/documentation/arkit/arconfiguration\n */\nexport enum TrackingConfiguration {\n  /**\n   * Provides high-quality AR experiences that use the rear-facing camera precisely track a device's\n   * position and orientation and allow plane detection and hit testing.\n   */\n  World = 'ARWorldTrackingConfiguration',\n  /**\n   * Provides basic AR experiences that use the rear-facing camera and track only a device's\n   * orientation.\n   */\n  Orientation = 'AROrientationTrackingConfiguration',\n  /**\n   * Provides AR experiences that use the front-facing camera and track the movement and expressions\n   * of the user's face.\n   */\n  Face = 'ARFaceTrackingConfiguration',\n}\n\nexport enum DepthDataQuality {\n  Low = 'AVDepthDataQualityLow',\n  High = 'AVDepthDataQualityHigh',\n}\n\nexport enum DepthDataAccuracy {\n  Absolute = 'AVDepthDataAccuracyAbsolute',\n  Relative = 'AVDepthDataAccuracyRelative',\n}\n\nexport type Size = {\n  width: number;\n  height: number;\n};\n\nexport type Vector3 = {\n  x: number;\n  y: number;\n  z: number;\n};\n\nexport type Vector2 = {\n  x: number;\n  y: number;\n};\n\nexport type TextureCoordinate = {\n  u: number;\n  v: number;\n};\n\nexport type Matrix = number[];\n\nexport type FaceGeometry = {\n  vertexCount: number;\n  textureCoordinateCount: number;\n  triangleCount: number;\n  vertices: Vector3[];\n  textureCoordinates: TextureCoordinate[];\n  triangleIndices: number[];\n};\n\nexport type BaseAnchor = {\n  type: AnchorType;\n  transform: Matrix;\n  id: string;\n};\n\nexport type PlaneAnchor = BaseAnchor & {\n  type: AnchorType.Plane;\n  center: Vector3;\n  extent: { width: number; length: number };\n};\n\nexport type ImageAnchor = BaseAnchor & {\n  type: AnchorType.Image;\n  image?: {\n    name: string | null;\n    size: Size;\n  };\n};\n\nexport type FaceAnchor = BaseAnchor & {\n  type: AnchorType.Face;\n  isTracked: boolean;\n  geometry?: FaceGeometry;\n  blendShapes?: { [shape in BlendShape]?: number };\n};\n\nexport type Anchor = BaseAnchor | PlaneAnchor | ImageAnchor | FaceAnchor;\n\nexport type HitTest = {\n  type: number;\n  distance: number;\n  localTransform: number[];\n  worldTransform: number[];\n  anchor: Anchor;\n};\n\nexport type HitTestResults = {\n  hitTest: HitTest[];\n};\n\nexport type DetectionImage = {\n  uri: string;\n  width: number;\n  name?: string;\n};\n\nexport type ARFrameAnchorRequest = {\n  ARFaceTrackingConfiguration?: {\n    geometry?: boolean;\n    blendShapes?: boolean | BlendShape[];\n  };\n};\n\nexport type ARFrameRequest = {\n  anchors?: ARFrameAnchorRequest;\n  rawFeaturePoints?: boolean;\n  lightEstimation?: boolean;\n  capturedDepthData?: boolean;\n};\n\nexport type LightEstimation = {\n  ambientIntensity: number;\n  ambientColorTemperature: number;\n  primaryLightDirection?: Vector3;\n  primaryLightIntensity?: number;\n};\n\nexport type RawFeaturePoint = { x: number; y: number; z: number; id: string };\n\nexport type CameraCalibrationData = {\n  intrinsicMatrix: Matrix;\n  intrinsicMatrixReferenceDimensions: Size;\n  extrinsicMatrix: Matrix;\n  pixelSize: number;\n  lensDistortionLookupTable: any;\n  inverseLensDistortionLookupTable: any;\n  lensDistortionCenter: Vector3;\n};\n\nexport type CapturedDepthData = {\n  timestamp: number;\n  depthDataQuality: DepthDataQuality;\n  depthDataAccuracy: DepthDataAccuracy;\n  depthDataFiltered: boolean;\n  cameraCalibrationData: CameraCalibrationData;\n};\n\nexport type ARFrame = {\n  timestamp: number;\n  anchors?: Anchor[] | null;\n  rawFeaturePoints?: RawFeaturePoint[] | null;\n  lightEstimation?: LightEstimation | null;\n  capturedDepthData?: CapturedDepthData | null;\n};\n\nexport type ARMatrices = {\n  transform: Matrix;\n  viewMatrix: Matrix;\n  projectionMatrix: Matrix;\n};\n\ntype ARStartResult = {\n  capturedImageTexture: number;\n};\n\ntype ReactNativeNodeHandle = number;\n\nexport type ImageResolution = {\n  width: number;\n  height: number;\n};\n\nexport type VideoFormat = {\n  type: string;\n  imageResolution: ImageResolution;\n  framesPerSecond: number;\n};\n\nexport enum BlendShape {\n  BrowDownL = 'browDown_L',\n  BrowDownR = 'browDown_R',\n  BrowInnerUp = 'browInnerUp',\n  BrowOuterUpL = 'browOuterUp_L',\n  BrowOuterUpR = 'browOuterUp_R',\n  CheekPuff = 'cheekPuff',\n  CheekSquintL = 'cheekSquint_L',\n  CheekSquintR = 'cheekSquint_R',\n  EyeBlinkL = 'eyeBlink_L',\n  EyeBlinkR = 'eyeBlink_R',\n  EyeLookDownL = 'eyeLookDown_L',\n  EyeLookDownR = 'eyeLookDown_R',\n  EyeLookInL = 'eyeLookIn_L',\n  EyeLookInR = 'eyeLookIn_R',\n  EyeLookOutL = 'eyeLookOut_L',\n  EyeLookOutR = 'eyeLookOut_R',\n  EyeLookUpL = 'eyeLookUp_L',\n  EyeLookUpR = 'eyeLookUp_R',\n  EyeSquintL = 'eyeSquint_L',\n  EyeSquintR = 'eyeSquint_R',\n  EyeWideL = 'eyeWide_L',\n  EyeWideR = 'eyeWide_R',\n  JawForward = 'jawForward',\n  JawLeft = 'jawLeft',\n  JawOpen = 'jawOpen',\n  JawRight = 'jawRight',\n  MouthClose = 'mouthClose',\n  MouthDimpleL = 'mouthDimple_L',\n  MouthDimpleR = 'mouthDimple_R',\n  MouthFrownL = 'mouthFrown_L',\n  MouthFrownR = 'mouthFrown_R',\n  MouthFunnel = 'mouthFunnel',\n  MouthLeft = 'mouthLeft',\n  MouthLowerDownL = 'mouthLowerDown_L',\n  MouthLowerDownR = 'mouthLowerDown_R',\n  MouthPressL = 'mouthPress_L',\n  MouthPressR = 'mouthPress_R',\n  MouthPucker = 'mouthPucker',\n  MouthRight = 'mouthRight',\n  MouthRollLower = 'mouthRollLower',\n  MouthRollUpper = 'mouthRollUpper',\n  MouthShrugLower = 'mouthShrugLower',\n  MouthShrugUpper = 'mouthShrugUpper',\n  MouthSmileL = 'mouthSmile_L',\n  MouthSmileR = 'mouthSmile_R',\n  MouthStretchL = 'mouthStretch_L',\n  MouthStretchR = 'mouthStretch_R',\n  MouthUpperUpL = 'mouthUpperUp_L',\n  MouthUpperUpR = 'mouthUpperUp_R',\n  NoseSneerL = 'noseSneer_L',\n  NoseSneerR = 'noseSneer_R',\n}\n\nexport enum FaceAnchorProp {\n  Geometry = 'geometry',\n  BlendShapes = 'blendShapes',\n}\n\n/**\n * Plane Detection\n * Options for whether and how ARKit detects flat surfaces in captured images.\n * https://developer.apple.com/documentation/arkit/arplanedetection\n */\nexport enum PlaneDetection {\n  /**\n   * No plane detection is run\n   */\n  None = 'none',\n  /**\n   * Plane detection determines horizontal planes in the scene\n   */\n  Horizontal = 'horizontal',\n  /**\n   * Plane detection determines vertical planes in the scene\n   */\n  Vertical = 'vertical',\n}\n\n/**\n * Hit-Test Result Types\n * Possible types for specifying a hit-test search, or for the result of a hit-test search.\n * https://developer.apple.com/documentation/arkit/arhittestresulttype\n */\nexport enum HitTestResultTypes {\n  /**\n   * Result type from intersecting the nearest feature point.\n   */\n  FeaturePoint = 'featurePoint',\n  /**\n   * Result type from intersecting a horizontal plane estimate, determined for the current frame.\n   */\n  HorizontalPlane = 'horizontalPlane',\n  /**\n   * Result type from intersecting a vertical plane estimate, determined for the current frame.\n   */\n  VerticalPlane = 'verticalPlane',\n  /**\n   * Result type from intersecting with an existing plane anchor.\n   */\n  ExistingPlane = 'existingPlane',\n  /**\n   * Result type from intersecting with an existing plane anchor, taking into account the plane’s\n   * extent.\n   */\n  ExistingPlaneUsingExtent = 'existingPlaneUsingExtent',\n  /**\n   * Result type from intersecting with an existing plane anchor, taking into account the plane’s\n   * geometry.\n   */\n  ExistingPlaneUsingGeometry = 'existingPlaneUsingGeometry',\n}\n\n/**\n * World Alignment\n * Options for how ARKit constructs a scene coordinate system based on real-world device motion.\n * https://developer.apple.com/documentation/arkit/arworldalignment\n */\nexport enum WorldAlignment {\n  /**\n   * Aligns the world with gravity that is defined by vector (0, -1, 0).\n   */\n  Gravity = 'gravity',\n  /**\n   * Aligns the world with gravity that is defined by the vector (0, -1, 0) and heading (w.r.t. true\n   * north) that is given by the vector (0, 0, -1).\n   */\n  GravityAndHeading = 'gravityAndHeading',\n  /**\n   * Aligns the world with the camera’s orientation.\n   */\n  AlignmentCamera = 'alignmentCamera',\n}\n\nexport enum EventType {\n  FrameDidUpdate = ExponentAR.frameDidUpdate,\n  DidFailWithError = ExponentAR.didFailWithError,\n  AnchorsDidUpdate = ExponentAR.anchorsDidUpdate,\n  CameraDidChangeTrackingState = ExponentAR.cameraDidChangeTrackingState,\n  SessionWasInterrupted = ExponentAR.sessionWasInterrupted,\n  SessionInterruptionEnded = ExponentAR.sessionInterruptionEnded,\n}\n\nexport enum AnchorType {\n  Face = 'ARFaceAnchor',\n  Image = 'ARImageAnchor',\n  Plane = 'ARPlaneAnchor',\n  Anchor = 'ARAnchor',\n}\n\nexport enum AnchorEventType {\n  Add = 'add',\n  Update = 'update',\n  Remove = 'remove',\n}\n\nexport enum FrameAttribute {\n  Anchors = 'anchors',\n  RawFeaturePoints = 'rawFeaturePoints',\n  LightEstimation = 'lightEstimation',\n  CapturedDepthData = 'capturedDepthData',\n}\n\nexport enum TrackingState {\n  /** Tracking is not available. */\n  NotAvailable = 'ARTrackingStateNotAvailable',\n  /** Tracking is limited. See tracking reason for details. */\n  Limited = 'ARTrackingStateLimited',\n  /** Tracking is Normal. */\n  Normal = 'ARTrackingStateNormal',\n}\n\nexport enum TrackingStateReason {\n  /** Tracking is not limited. */\n  None = 'ARTrackingStateReasonNone',\n\n  /** Tracking is limited due to initialization in progress. */\n  Initializing = 'ARTrackingStateReasonInitializing',\n\n  /** Tracking is limited due to a excessive motion of the camera. */\n  ExcessiveMotion = 'ARTrackingStateReasonExcessiveMotion',\n\n  /** Tracking is limited due to a lack of features visible to the camera. */\n  InsufficientFeatures = 'ARTrackingStateReasonInsufficientFeatures',\n\n  /** Tracking is limited due to a relocalization in progress. */\n  Relocalizing = 'ARTrackingStateReasonRelocalizing',\n}\n\ntype FrameDidUpdateEvent = {};\n\ntype DidFailWithErrorEvent = { error: Error };\n\ntype AnchorsDidUpdateEvent = {\n  eventType: AnchorEventType;\n  anchors: Anchor[];\n};\n\ntype CameraDidChangeTrackingStateEvent = {\n  trackingState: TrackingState;\n  trackingStateReason: TrackingStateReason;\n};\n\ntype SessionWasInterruptedEvent = {};\n\ntype SessionInterruptionEndedEvent = {};\n\nexport function getVersion(): string {\n  return ExponentAR.ARKitVersion;\n}\n\nconst AvailabilityErrorMessages = {\n  Simulator: `Cannot run EXGL in a simulator`,\n  ANineChip: `ARKit can only run on iOS devices with A9 (2015) or greater chips! This is a`,\n  ARKitOnlyOnIOS: `ARKit can only run on an iOS device! This is a`,\n};\n\nexport function isAvailable(): boolean {\n  // Device has A9 chip\n  const hasA9Chip = Constants.deviceYearClass && Constants.deviceYearClass > 2014;\n\n  if (\n    !Constants.isDevice || // Prevent Simulators\n    // @ts-ignore\n    Platform.isTVOS ||\n    Platform.OS !== 'ios' || // Device is iOS\n    !hasA9Chip ||\n    !ExponentAR.isSupported || // ARKit is included in the build\n    !ExponentAR.startAsync // Older SDK versions (27 and lower) that are fully compatible\n  ) {\n    return false;\n  }\n\n  return true;\n}\n\nexport function getUnavailabilityReason(): string {\n  if (!Constants.isDevice) {\n    return AvailabilityErrorMessages.Simulator;\n  } else if (Platform.OS !== 'ios') {\n    return `${AvailabilityErrorMessages.ARKitOnlyOnIOS} ${Platform.OS} device`;\n  } else if (Constants.deviceYearClass == null || Constants.deviceYearClass < 2015) {\n    return `${AvailabilityErrorMessages.ANineChip} ${Constants.deviceYearClass} device`;\n  }\n  return 'Unknown Reason';\n}\n\nexport function onFrameDidUpdate(\n  listener: (event: FrameDidUpdateEvent) => void\n): EmitterSubscription {\n  return _addListener(EventType.FrameDidUpdate, listener);\n}\n\nexport function onDidFailWithError(\n  listener: (event: DidFailWithErrorEvent) => void\n): EmitterSubscription {\n  return _addListener(EventType.DidFailWithError, listener);\n}\n\nexport function onAnchorsDidUpdate(\n  listener: (event: AnchorsDidUpdateEvent) => void\n): EmitterSubscription {\n  return _addListener(EventType.AnchorsDidUpdate, listener);\n}\n\nexport function onCameraDidChangeTrackingState(\n  listener: (event: CameraDidChangeTrackingStateEvent) => void\n): EmitterSubscription {\n  return _addListener(EventType.CameraDidChangeTrackingState, listener);\n}\n\nexport function onSessionWasInterrupted(\n  listener: (event: SessionWasInterruptedEvent) => void\n): EmitterSubscription {\n  return _addListener(EventType.SessionWasInterrupted, listener);\n}\n\nexport function onSessionInterruptionEnded(\n  listener: (event: SessionInterruptionEndedEvent) => void\n): EmitterSubscription {\n  return _addListener(EventType.SessionInterruptionEnded, listener);\n}\n\nfunction _addListener(eventType: EventType, event: (...args: any[]) => void): EmitterSubscription {\n  return emitter.addListener(eventType as any, event);\n}\n\nexport function removeAllListeners(eventType?: EventType): void {\n  emitter.removeAllListeners(eventType as any);\n}\n\n// TODO: support multiple types (take an array or bit flags)\nexport function performHitTest(point: Vector2, types: HitTestResultTypes): HitTestResults {\n  if (ExponentAR.performHitTest) {\n    return ExponentAR.performHitTest(point, types);\n  }\n  throw new Error(`AR hit testing is not supported on this device`);\n}\n\nexport async function setDetectionImagesAsync(images: {\n  [name: string]: DetectionImage;\n}): Promise<void> {\n  if (ExponentAR.setDetectionImagesAsync) {\n    await ExponentAR.setDetectionImagesAsync(images);\n  }\n}\n\nexport function getCurrentFrame(attributes?: ARFrameRequest): ARFrame {\n  if (ExponentAR.getCurrentFrame) {\n    return ExponentAR.getCurrentFrame(attributes);\n  }\n  throw new Error(`AR is not supported on this device`);\n}\n\nexport function getARMatrices(near: number, far: number): ARMatrices {\n  if (ExponentAR.getARMatrices) {\n    return ExponentAR.getARMatrices(near, far);\n  }\n  throw new Error(`AR is not supported on this device`);\n}\n\nexport async function stopAsync(): Promise<void> {\n  if (ExponentAR.stopAsync) {\n    await ExponentAR.stopAsync();\n  }\n}\n\nexport async function startAsync(\n  node: ReactNativeNodeHandle | React.Component,\n  configuration: TrackingConfiguration\n): Promise<ARStartResult> {\n  let handle = typeof node === 'number' ? node : _getNodeHandle(node);\n  if (ExponentAR.startAsync) {\n    return await ExponentAR.startAsync(handle, configuration);\n  }\n  throw new Error(`AR is not supported on this device`);\n}\n\nfunction _getNodeHandle(component: React.Component): ReactNativeNodeHandle {\n  let handle = findNodeHandle(component);\n  if (handle === null) {\n    throw new Error(`Could not find the React node handle for the AR component: ${component}`);\n  }\n  return handle;\n}\n\nexport function reset() {\n  if (ExponentAR.reset) {\n    ExponentAR.reset();\n  }\n}\n\nexport function resume() {\n  if (ExponentAR.resume) {\n    ExponentAR.resume();\n  }\n}\n\nexport function pause() {\n  if (ExponentAR.pause) {\n    ExponentAR.pause();\n  }\n}\n\nexport async function setConfigurationAsync(configuration: TrackingConfiguration): Promise<void> {\n  if (ExponentAR.setConfigurationAsync) {\n    await ExponentAR.setConfigurationAsync(configuration);\n  }\n}\n\nexport function getProvidesAudioData(): boolean {\n  if (ExponentAR.getProvidesAudioData) {\n    return ExponentAR.getProvidesAudioData();\n  }\n  return false;\n}\n\nexport function setProvidesAudioData(providesAudioData: boolean): void {\n  if (ExponentAR.setProvidesAudioData) {\n    ExponentAR.setProvidesAudioData(providesAudioData);\n  }\n}\n\nexport function setPlaneDetection(planeDetection: PlaneDetection): void {\n  if (ExponentAR.setPlaneDetection) {\n    ExponentAR.setPlaneDetection(planeDetection);\n  }\n}\n\nexport function getPlaneDetection(): PlaneDetection {\n  if (ExponentAR.getPlaneDetection) {\n    return ExponentAR.getPlaneDetection();\n  }\n  throw new Error(`AR plane detection is not supported on this device`);\n}\n\nexport function getCameraTexture(): number {\n  if (ExponentAR.getCameraTexture) {\n    return ExponentAR.getCameraTexture();\n  }\n  throw new Error(`AR camera textures are not supported on this device`);\n}\n\nexport async function setWorldOriginAsync(matrix_float4x4: Matrix): Promise<void> {\n  if (ExponentAR.setWorldOriginAsync) {\n    await ExponentAR.setWorldOriginAsync(matrix_float4x4);\n  }\n}\n\nexport function setLightEstimationEnabled(isLightEstimationEnabled: boolean) {\n  if (ExponentAR.setLightEstimationEnabled) {\n    ExponentAR.setLightEstimationEnabled(isLightEstimationEnabled);\n  }\n}\n\nexport function getLightEstimationEnabled(): boolean {\n  if (ExponentAR.getLightEstimationEnabled) {\n    return ExponentAR.getLightEstimationEnabled();\n  }\n  return false;\n}\n\nexport function setAutoFocusEnabled(isAutoFocusEnabled: boolean): void {\n  if (ExponentAR.setAutoFocusEnabled) {\n    ExponentAR.setAutoFocusEnabled(isAutoFocusEnabled);\n  }\n}\n\nexport function getAutoFocusEnabled(): boolean {\n  if (ExponentAR.getAutoFocusEnabled) {\n    return ExponentAR.getAutoFocusEnabled();\n  }\n  return false;\n}\n\nexport function setWorldAlignment(worldAlignment: WorldAlignment): void {\n  if (ExponentAR.setWorldAlignment) {\n    ExponentAR.setWorldAlignment(worldAlignment);\n  }\n}\n\nexport function getWorldAlignment(): WorldAlignment {\n  if (ExponentAR.getWorldAlignment) {\n    return ExponentAR.getWorldAlignment();\n  }\n  throw new Error(`AR world alignment is not supported on this device`);\n}\n\nexport function isConfigurationAvailable(configuration: TrackingConfiguration): boolean {\n  const { width, height } = Dimensions.get('window');\n  // @ts-ignore: re-evaluate this for the new iPhones (2018)\n  const isX = (width === 812 || height === 812) && !Platform.isTVOS && !Platform.isPad;\n  if (configuration === TrackingConfiguration.Face && isX && isAvailable()) {\n    return true;\n  }\n  return !!ExponentAR[configuration];\n}\n\nexport function getSupportedVideoFormats(configuration: TrackingConfiguration): VideoFormat[] {\n  const videoFormats = {\n    [TrackingConfiguration.World]: 'WorldTrackingVideoFormats',\n    [TrackingConfiguration.Orientation]: 'OrientationTrackingVideoFormats',\n    [TrackingConfiguration.Face]: 'FaceTrackingVideoFormats',\n  };\n  const videoFormat = videoFormats[configuration];\n  return ExponentAR[videoFormat] || [];\n}\n\nexport function isFrontCameraAvailable(): boolean {\n  return isConfigurationAvailable(TrackingConfiguration.Face);\n}\n\nexport function isRearCameraAvailable(): boolean {\n  return isConfigurationAvailable(TrackingConfiguration.World);\n}\n\n/* Legacy constants */\n\n/**\n * A deprecated alias for `PlaneDetection`\n * July 8, 2019\n */\nexport const PlaneDetectionTypes = PlaneDetection;\n/**\n * A deprecated alias for `WorldAlignment`\n * July 8, 2019\n */\nexport const WorldAlignmentTypes = WorldAlignment;\n/**\n * A deprecated alias for `EventType`\n * July 8, 2019\n */\nexport const EventTypes = EventType;\n/**\n * A deprecated alias for `AnchorType`\n * July 8, 2019\n */\nexport const AnchorTypes = AnchorType;\n/**\n * A deprecated alias for `AnchorEventType`\n * July 8, 2019\n */\nexport const AnchorEventTypes = AnchorEventType;\n/**\n * A deprecated alias for `FrameAttribute`\n * July 8, 2019\n */\nexport const FrameAttributes = FrameAttribute;\n/**\n * A deprecated alias for `TrackingState`\n * July 8, 2019\n */\nexport const TrackingStates = TrackingState;\n/**\n * A deprecated alias for `TrackingStateReason`\n * July 8, 2019\n */\nexport const TrackingStateReasons = TrackingStateReason;\n/**\n * A deprecated alias for `TrackingConfiguration`\n * July 8, 2019\n */\nexport const TrackingConfigurations = TrackingConfiguration;\n"],"sourceRoot":""},"metadata":{},"sourceType":"script"}