Ext.define('Ext.data.proxy.Sql',{alias:'proxy.sql',extend:'Ext.data.proxy.Client',alternateClassName:'Ext.data.proxy.SQL',isSQLProxy:!0,config:{reader:null,writer:null,table:null,database:'Sencha'},_createOptions:{silent:!0,dirty:!1},updateModel:function(b){var a=this,d,g,c,e,f;if(b){a.uniqueIdStrategy=b.identifier.isUnique;if(!a.getTable()){d=b.entityName;a.setTable(d.slice(d.lastIndexOf('.')+1))}a.columns=e=a.getPersistedModelColumns(b);a.quotedColumns=f=[];for(c=0,g=e.length;c0)?JSON.parse(e):null},doSend:function(a){var b=new XMLHttpRequest();b.open('GET',this.SERVER_URL+'?'+Ext.Object.toQueryString(a)+'&_dc='+new Date().getTime(),!1);try{b.send(null);return b.responseText}catch(c){if(a.failure){this.invoke(a.failure)}else if(a.callback){this.invoke(a.callback)}}}});Ext.define('Ext.device.communicator.Android',{extend:'Ext.device.communicator.Default',doSend:function(a){return window.Sencha.action(JSON.stringify(a))}});Ext.define('Ext.device.Communicator',{requires:['Ext.device.communicator.Default','Ext.device.communicator.Android'],singleton:!0,constructor:function(){if(Ext.os.is.Android){return new Ext.device.communicator.Android()}return new Ext.device.communicator.Default()}});Ext.define('Ext.device.analytics.Abstract',{config:{accountID:null},updateAccountID:function(a){if(a){window.plugins.googleAnalyticsPlugin.startTrackerWithAccountID(a)}},registerAccount:function(a){this.setAccountID(a)},trackEvent:Ext.emptyFn,trackPageview:Ext.emptyFn});Ext.define('Ext.device.analytics.Cordova',{extend:'Ext.device.analytics.Abstract',trackEvent:function(a){if(!this.getAccountID()){return}window.plugins.googleAnalyticsPlugin.trackEvent(a.category,a.action,a.label,a.value,a.nonInteraction)},trackPageview:function(a){if(!this.getAccountID()){return}window.plugins.googleAnalyticsPlugin.trackPageview(a)}});Ext.define('Ext.device.Analytics',{alternateClassName:'Ext.ux.device.Analytics',singleton:!0,requires:['Ext.device.Communicator','Ext.device.analytics.*'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.analytics.Cordova')}else {return Ext.create('Ext.device.analytics.Abstract')}}});Ext.define('Ext.device.browser.Abstract',{open:Ext.emptyFn,close:Ext.emptyFn});Ext.define('Ext.device.browser.Cordova',{extend:'Ext.device.browser.Abstract',open:function(a){if(!this._window){this._window=Ext.create('Ext.device.browser.Window')}this._window.open(a);return this._window},close:function(){if(!this._window){return}this._window.close()}});Ext.define('Ext.device.browser.Simulator',{open:function(a){window.open(a.url,'_blank')},close:Ext.emptyFn});Ext.define('Ext.device.Browser',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.browser.Cordova','Ext.device.browser.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.browser.Cordova')}return Ext.create('Ext.device.browser.Simulator')}});Ext.define('Ext.device.camera.Abstract',{source:{library:0,camera:1,album:2},destination:{data:0,file:1,'native':2},encoding:{jpeg:0,jpg:0,png:1},media:{picture:0,video:1,all:2},direction:{back:0,front:1},capture:Ext.emptyFn,getPicture:Ext.emptyFn,cleanup:Ext.emptyFn});Ext.define('Ext.device.camera.Cordova',{alternateClassName:'Ext.device.camera.PhoneGap',extend:'Ext.device.camera.Abstract',getPicture:function(a,b,c){try{navigator.camera.getPicture(a,b,c)}catch(d){alert(d)}},cleanup:function(a,b){try{navigator.camera.cleanup(a,b)}catch(c){alert(c)}},capture:function(a){var f=a.success,g=a.failure,h=a.scope,k=this.source,i=this.destination,j=this.encoding,e=a.source,c=a.destination,d=a.encoding,b={};if(h){f=Ext.Function.bind(f,h);g=Ext.Function.bind(g,h)}if(e!==undefined){b.sourceType=k.hasOwnProperty(e)?k[e]:e}if(c!==undefined){b.destinationType=i.hasOwnProperty(c)?i[c]:c}if(d!==undefined){b.encodingType=j.hasOwnProperty(d)?j[d]:d}if('quality' in a){b.quality=a.quality}if('width' in a){b.targetWidth=a.width}if('height' in a){b.targetHeight=a.height}this.getPicture(f,g,b)}});Ext.define('Ext.device.camera.Simulator',{extend:'Ext.device.camera.Abstract',config:{samples:[{success:'http://www.sencha.com/img/sencha-large.png'}]},constructor:function(a){this.initConfig(a)},updateSamples:function(a){this.sampleIndex=0},capture:function(b){var a=this.sampleIndex,e=this.getSamples(),h=e.length,c=e[a],g=b.scope,f=b.success,d=b.failure;if('success' in c){if(f){f.call(g,c.success)}}else {if(d){d.call(g,c.failure)}}if(++a>h-1){a=0}this.sampleIndex=a}});Ext.define('Ext.device.Camera',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.camera.Cordova','Ext.device.camera.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.camera.Cordova')}}return Ext.create('Ext.device.camera.Simulator')}});Ext.define('Ext.device.capture.Cordova',{captureAudio:function(a){var b={limit:a.limit,duration:a.maximumDuration};navigator.device.capture.captureAudio(a.success,a.failure,b)},captureVideo:function(a){var b={limit:a.limit,duration:a.maximumDuration};navigator.device.capture.captureVideo(a.success,a.failure,b)}});Ext.define('Ext.device.capture.Abstract',{alternateClassName:'Ext.device.capture.Simulator',captureAudio:Ext.emptyFn,captureVideo:Ext.emptyFn});Ext.define('Ext.device.Capture',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.capture.Cordova','Ext.device.capture.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.capture.Cordova')}return Ext.create('Ext.device.capture.Simulator')}});Ext.define('Ext.device.compass.Abstract',{config:{frequency:100},getHeadingAvailable:function(a){return a},getCurrentHeading:function(a){return a},watchHeading:function(a){var b=Ext.device.compass.Abstract.prototype.config;a=Ext.applyIf(a,{frequency:b.frequency});return a},clearWatch:Ext.emptyFn});Ext.define('Ext.device.compass.Cordova',{alternateClassName:'Ext.device.compass.PhoneGap',extend:'Ext.device.compass.Abstract',activeWatchID:null,getHeadingAvailable:function(a){var b=function(b){if(b.hasOwnProperty("code")){a.callback.call(a.scope||this,!1)}else {a.callback.call(a.scope||this,!0)}};this.getCurrentHeading({success:b,failure:b})},getCurrentHeading:function(a){a=this.callParent(arguments);navigator.compass.getCurrentHeading(a.success,a.failure);return a},watchHeading:function(a){a=this.callParent(arguments);if(this.activeWatchID){this.clearWatch()}this.activeWatchID=navigator.compass.watchHeading(a.callback,a.failure,a);return a},clearWatch:function(){if(this.activeWatchID){navigator.compass.clearWatch(this.activeWatchID);this.activeWatchID=null}}});Ext.define('Ext.device.compass.Simulator',{extend:'Ext.device.compass.Abstract'});Ext.define('Ext.device.Compass',{singleton:!0,requires:['Ext.device.compass.Cordova','Ext.device.compass.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.compass.Cordova')}return Ext.create('Ext.device.compass.Simulator')}});Ext.define('Ext.device.connection.Abstract',{extend:'Ext.Evented',mixins:['Ext.mixin.Observable'],config:{online:!1,type:null},UNKNOWN:'Unknown connection',ETHERNET:'Ethernet connection',WIFI:'WiFi connection',CELL_2G:'Cell 2G connection',CELL_3G:'Cell 3G connection',CELL_4G:'Cell 4G connection',NONE:'No network connection',isOnline:function(){return this.getOnline()}});Ext.define('Ext.device.connection.Cordova',{alternateClassName:'Ext.device.connection.PhoneGap',extend:'Ext.device.connection.Abstract',constructor:function(){var a=this;document.addEventListener('online',function(){a.fireEvent('online',a)});document.addEventListener('offline',function(){a.fireEvent('offline',a)})},syncOnline:function(){var a=navigator.connection.type;this._type=a;this._online=a!=Connection.NONE},getOnline:function(){this.syncOnline();return this._online},getType:function(){this.syncOnline();return this._type}});Ext.define('Ext.device.connection.Simulator',{extend:'Ext.device.connection.Abstract',getOnline:function(){this._online=navigator.onLine;this._type=Ext.device.Connection.UNKNOWN;return this._online}});Ext.define('Ext.device.Connection',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.connection.Cordova','Ext.device.connection.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.connection.Cordova')}}return Ext.create('Ext.device.connection.Simulator')}});Ext.define('Ext.device.contacts.Abstract',{mixins:['Ext.mixin.Observable'],config:{includeImages:!1},getContacts:function(a){if(!this._store){this._store=[{first:'Peter',last:'Venkman',emails:{work:'peter.venkman@gb.com'}},{first:'Egon',last:'Spengler',emails:{work:'egon.spengler@gb.com'}}]}a.success.call(a.scope||this,this._store)},getThumbnail:function(a){a.callback.call(a.scope||this,"")},getLocalizedLabel:function(a){a.callback.call(a.scope||this,a.label.toUpperCase(),a.label)}});Ext.define('Ext.device.contacts.Cordova',{alternateClassName:'Ext.device.contacts.PhoneGap',extend:'Ext.device.contacts.Abstract',getContacts:function(a){if(!a){Ext.Logger.warn('Ext.device.Contacts#getContacts: You must specify a `config` object.');return !1}if(!a.success){Ext.Logger.warn('Ext.device.Contacts#getContacts: You must specify a `success` method.');return !1}if(!a.fields){a.fields=["*"]}if(!Ext.isArray(a.fields)){a.fields=[a.fields]}if(Ext.isEmpty(a.multiple)){a.multiple=!0}navigator.contacts.find(a.fields,a.success,a.failure,a)}});Ext.define('Ext.device.Contacts',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.contacts.Cordova'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.contacts.Cordova')}}return Ext.create('Ext.device.contacts.Abstract')}});Ext.define('Ext.device.device.Abstract',{mixins:['Ext.mixin.Observable'],name:'not available',uuid:'anonymous',platform:Ext.os.name,scheme:!1,openURL:function(a){window.location=a}});Ext.define('Ext.device.device.Cordova',{alternateClassName:'Ext.device.device.PhoneGap',extend:'Ext.device.device.Abstract',availableListeners:['pause','resume','backbutton','batterycritical','batterylow','batterystatus','menubutton','searchbutton','startcallbutton','endcallbutton','volumeupbutton','volumedownbutton'],constructor:function(){if(Ext.isReady){this.onReady()}else {Ext.onReady(this.onReady,this,{single:!0})}},onReady:function(){var b=this,a=window.device;b.name=a.name||a.model;b.cordova=a.cordova;b.platform=a.platform||Ext.os.name;b.uuid=a.uuid;b.version=a.version;b.model=a.model},privates:{doAddListener:function(b){var a=this;if(!a.addedListeners){a.addedListeners=[]}if(a.availableListeners.indexOf(b)!=-1&&a.addedListeners.indexOf(b)==-1){a.addedListeners.push(b);document.addEventListener(b,function(){a.fireEvent(b,a)})}Ext.device.Device.mixins.observable.doAddListener.apply(Ext.device.Device.mixins.observable,arguments)}}});Ext.define('Ext.device.device.Simulator',{extend:'Ext.device.device.Abstract'});Ext.define('Ext.device.Device',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.device.Cordova','Ext.device.device.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.device.Cordova')}}return Ext.create('Ext.device.device.Simulator')}});Ext.define('Ext.device.filesystem.Abstract',{config:{fileSystemType:1,fileSystemSize:0,readerType:"text",stringEncoding:"UTF8"},requestFileSystem:function(a){var b=Ext.device.filesystem.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.fileSystemType,size:b.fileSystemSize,success:Ext.emptyFn,failure:Ext.emptyFn});return a}});Ext.define('Ext.device.filesystem.HTML5',{extend:'Ext.device.filesystem.Abstract',requestFileSystem:function(a){if(!a.success){Ext.Logger.error('Ext.device.filesystem#requestFileSystem: You must specify a `success` callback.');return null}var c=this;var b=function(d){var b=Ext.create('Ext.device.filesystem.FileSystem',d);a.success.call(a.scope||c,b)};window.requestFileSystem(a.type,a.size,b,a.failure||Ext.emptyFn)}},function(){Ext.define('Ext.device.filesystem.FileSystem',{fs:null,root:null,constructor:function(a){this.fs=a;this.root=Ext.create('Ext.device.filesystem.DirectoryEntry','/',this)},getRoot:function(){return this.root}},function(){Ext.define('Ext.device.filesystem.Entry',{directory:!1,path:0,fileSystem:null,entry:null,constructor:function(b,c,a){this.directory=b;this.path=c;this.fileSystem=a},isFile:function(){return !this.directory},isDirectory:function(){return this.directory},getName:function(){var b=this.path.split('/');for(var a=b.length-1;a>=0;--a){if(b[a].length>0){return b[a]}}return '/'},getFullPath:function(){return this.path},getFileSystem:function(){return this.fileSystem},getEntry:function(){return null},moveTo:function(a){if(a.parent==null){Ext.Logger.error('Ext.device.filesystem.Entry#moveTo: You must specify a new `parent` of the entry.');return null}var b=this;this.getEntry({options:a.options||{},success:function(c){a.parent.getEntry({options:a.options||{},success:function(d){if(a.copy){c.copyTo(d,a.newName,function(e){a.success.call(a.scope||b,e.isDirectory?Ext.create('Ext.device.filesystem.DirectoryEntry',e.fullPath,b.fileSystem):Ext.create('Ext.device.filesystem.FileEntry',e.fullPath,b.fileSystem))},a.failure)}else {c.moveTo(d,a.newName,function(e){a.success.call(a.scope||b,e.isDirectory?Ext.create('Ext.device.filesystem.DirectoryEntry',e.fullPath,b.fileSystem):Ext.create('Ext.device.filesystem.FileEntry',e.fullPath,b.fileSystem))},a.failure)}},failure:a.failure})},failure:a.failure})},copyTo:function(a){this.moveTo(Ext.apply(a,{copy:!0}))},remove:function(a){this.getEntry({success:function(b){if(a.recursively&&this.directory){b.removeRecursively(a.success,a.failure)}else {b.remove(a.success,a.failure)}},failure:a.failure})},getParent:function(a){if(!a.success){Ext.Logger.error('Ext.device.filesystem.Entry#getParent: You must specify a `success` callback.');return null}var b=this;this.getEntry({options:a.options||{},success:function(c){c.getParent(function(d){a.success.call(a.scope||b,d.isDirectory?Ext.create('Ext.device.filesystem.DirectoryEntry',d.fullPath,b.fileSystem):Ext.create('Ext.device.filesystem.FileEntry',d.fullPath,b.fileSystem))},a.failure)},failure:a.failure})}});Ext.define('Ext.device.filesystem.DirectoryEntry',{extend:'Ext.device.filesystem.Entry',cachedDirectory:null,constructor:function(b,a){this.callParent([!0,b,a])},getEntry:function(a){var e=this;var d=a.success;if((a.options&&a.options.create)&&this.path){var b=this.path.split("/");if(b[0]=='.'||b[0]==''){b=b.slice(1)}var c=function(e){if(b.length){e.getDirectory(b.shift(),a.options,c,a.failure)}else {d(e)}};c(this.fileSystem.fs.root)}else {this.fileSystem.fs.root.getDirectory(this.path,a.options,function(b){a.success.call(a.scope||e,b)},a.failure)}},readEntries:function(a){if(!a.success){Ext.Logger.error('Ext.device.filesystem.DirectoryEntry#readEntries: You must specify a `success` callback.');return null}var b=this;this.getEntry({success:function(d){var c=d.createReader();c.readEntries(function(e){var f=[],c=0,g=e.length;for(;c1&&!a.recursive===!0){d.pop();var f=Ext.create('Ext.device.filesystem.DirectoryEntry',d.join("/"),b.fileSystem);f.getEntry({options:a.options,success:function(){c.recursive=!0;b.getEntry(c)},failure:a.failure})}else {if(a.failure){a.failure.call(a.scope||b,e)}}}else {if(a.failure){a.failure.call(a.scope||b,e)}}};this.fileSystem.fs.root.getFile(this.path,a.options||null,function(e){e.file(function(d){b.length=d.size;c.success.call(a.scope||b,e)},function(c){d.call(a.scope||b,c)})},function(c){d.call(a.scope||b,c)})}else {a.failure({code:-1,message:"FileSystem not Initialized"})}},getOffset:function(){return this.offset},seek:function(a){if(a.offset==null){Ext.Logger.error('Ext.device.filesystem.FileEntry#seek: You must specify an `offset` in the file.');return null}this.offset=a.offset||0;if(a.success){a.success.call(a.scope||this)}},read:function(a){var b=this;this.getEntry({success:function(c){c.file(function(e){if(Ext.isNumber(a.length)){if(Ext.isFunction(e.slice)){e=e.slice(b.offset,a.length)}else {if(a.failure){a.failure.call(a.scope||b,{code:-2,message:"File missing slice functionality"})}return}}var d=new FileReader();d.onloadend=function(d){a.success.call(a.scope||b,d.target.result)};d.onerror=function(d){a.failure.call(a.scope||b,d)};if(a.reader){d=Ext.applyIf(d,a.reader)}a.encoding=a.encoding||"UTF8";switch(a.type){default:case "text":d.readAsText(e,a.encoding);break;case "dataURL":d.readAsDataURL(e);break;case "binaryString":d.readAsBinaryString(e);break;case "arrayBuffer":d.readAsArrayBuffer(e);break;}},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})},write:function(a){if(a.data==null){Ext.Logger.error('Ext.device.filesystem.FileEntry#write: You must specify `data` to write into the file.');return null}var b=this;this.getEntry({options:a.options||{},success:function(c){c.createWriter(function(d){d.onwriteend=function(e){b.length=e.target.length;a.success.call(a.scope||b,e.result)};d.onerror=function(e){a.failure.call(a.scope||b,e)};if(a.writer){d=Ext.applyIf(d,a.writer)}if(b.offset){d.seek(b.offset)}else if(a.append){d.seek(b.length)}b.writeData(d,a.data)},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})},writeData:function(a,b){a.write(new Blob([b]))},truncate:function(a){if(a.size==null){Ext.Logger.error('Ext.device.filesystem.FileEntry#write: You must specify a `size` of the file.');return null}var b=this;this.getEntry({success:function(c){c.createWriter(function(d){d.truncate(a.size);a.success.call(a.scope||b,b)},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})}})})});Ext.define('Ext.device.filesystem.Cordova',{alternateClassName:'Ext.device.filesystem.PhoneGap',extend:'Ext.device.filesystem.HTML5',constructor:function(){Ext.override(Ext.device.filesystem.Entry,{writeMetadata:function(a){var b=this;this.getEntry({options:a.options,success:function(c){c.setMetadata(function(){a.success.call(a.scope||b)},function(d){a.failure.call(a.scope||b,d)},a.metadata)},failure:function(c){a.failure.call(a.scope||b,c)}})},readMetadata:function(a){var b=this;this.getEntry({options:a.options,success:function(c){c.getMetadata(function(d){a.success.call(a.scope||b,d)},function(d){a.failure.call(a.scope||b,d)})},failure:function(c){a.failure.call(a.scope||b,c)}})}});Ext.override(Ext.device.filesystem.FileEntry,{writeData:function(a,b){a.write(b.toString())},upload:function(a){var b=new FileUploadOptions();b.fileKey=a.fileKey||"file";b.fileName=this.path.substr(this.path.lastIndexOf('/')+1);b.mimeType=a.mimeType||"image/jpeg";b.params=a.params||{};b.headers=a.headers||{};b.chunkMode=a.chunkMode||!0;var c=new FileTransfer();c.upload(this.path,encodeURI(a.url),a.success,a.failure,b,a.trustAllHosts||!1);return c},download:function(a){var b=new FileTransfer();b.download(encodeURI(a.source),this.path,a.success,a.failure,a.trustAllHosts||!1,a.options||{});return b}})}});Ext.define('Ext.device.filesystem.Chrome',{extend:'Ext.device.filesystem.HTML5',requestFileSystem:function(a){var c=this;a=Ext.device.filesystem.Abstract.prototype.requestFileSystem(a);var b=function(d){var b=Ext.create('Ext.device.filesystem.FileSystem',d);a.success.call(a.scope||c,b)};if(a.type==window.PERSISTENT){if(navigator.webkitPersistentStorage){navigator.webkitPersistentStorage.requestQuota(a.size,function(c){window.webkitRequestFileSystem(a.type,c,b,a.failure)})}else {window.webkitStorageInfo.requestQuota(window.PERSISTENT,a.size,function(c){window.webkitRequestFileSystem(a.type,c,b,a.failure)})}}else {window.webkitRequestFileSystem(a.type,a.size,b,a.failure)}}});Ext.define('Ext.device.filesystem.Simulator',{extend:'Ext.device.filesystem.HTML5'});Ext.define('Ext.device.FileSystem',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.filesystem.Cordova','Ext.device.filesystem.Chrome','Ext.device.filesystem.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.filesystem.Cordova')}}else if(a.Chrome){return Ext.create('Ext.device.filesystem.Chrome')}return Ext.create('Ext.device.filesystem.Simulator')}});Ext.define('Ext.device.geolocation.Abstract',{config:{maximumAge:0,frequency:10000,allowHighAccuracy:!1,timeout:Infinity},getCurrentPosition:function(b){var a=Ext.device.geolocation.Abstract.prototype.config;b=Ext.applyIf(b,{maximumAge:a.maximumAge,frequency:a.frequency,allowHighAccuracy:a.allowHighAccuracy,timeout:a.timeout});return b},watchPosition:function(b){var a=Ext.device.geolocation.Abstract.prototype.config;b=Ext.applyIf(b,{maximumAge:a.maximumAge,frequency:a.frequency,allowHighAccuracy:a.allowHighAccuracy,timeout:a.timeout});return b},clearWatch:function(){}});Ext.define('Ext.device.geolocation.Cordova',{alternateClassName:'Ext.device.geolocation.PhoneGap',extend:'Ext.device.geolocation.Abstract',activeWatchID:null,getCurrentPosition:function(a){a=this.callParent(arguments);navigator.geolocation.getCurrentPosition(a.success,a.failure,a);return a},watchPosition:function(a){a=this.callParent(arguments);if(this.activeWatchID){this.clearWatch()}this.activeWatchID=navigator.geolocation.watchPosition(a.callback,a.failure,a);return a},clearWatch:function(){if(this.activeWatchID){navigator.geolocation.clearWatch(this.activeWatchID);this.activeWatchID=null}}});Ext.define('Ext.device.geolocation.Simulator',{extend:'Ext.device.geolocation.Abstract',requires:['Ext.util.Geolocation'],getCurrentPosition:function(a){a=this.callParent([a]);Ext.apply(a,{autoUpdate:!1,listeners:{scope:this,locationupdate:function(b){if(a.success){a.success.call(a.scope||this,b.position)}},locationerror:function(){if(a.failure){a.failure.call(a.scope||this)}}}});this.geolocation=Ext.create('Ext.util.Geolocation',a);this.geolocation.updateLocation();return a},watchPosition:function(a){a=this.callParent([a]);Ext.apply(a,{listeners:{scope:this,locationupdate:function(b){if(a.callback){a.callback.call(a.scope||this,b.position)}},locationerror:function(){if(a.failure){a.failure.call(a.scope||this)}}}});this.geolocation=Ext.create('Ext.util.Geolocation',a);return a},clearWatch:function(){if(this.geolocation){this.geolocation.destroy()}this.geolocation=null}});Ext.define('Ext.device.Geolocation',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.geolocation.Cordova','Ext.device.geolocation.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.geolocation.Cordova')}}return Ext.create('Ext.device.geolocation.Simulator')}});Ext.define('Ext.device.globalization.Abstract',{mixins:['Ext.mixin.Observable'],config:{formatLength:'full',selector:'date and time',dateType:'wide',items:'months',numberType:'decimal',currencyCode:"USD"},getPreferredLanguage:function(a){return a},getLocaleName:function(a){return a},dateToString:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{date:new Date(),formatLength:b.formatLength,selector:b.selector});return a},stringToDate:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{dateString:Ext.util.Format.date(new Date(),'m/d/Y'),formatLength:b.formatLength,selector:b.selector});return a},getDatePattern:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{formatLength:b.formatLength,selector:b.selector});return a},getDateNames:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.dateType,items:b.items});return a},isDayLightSavingsTime:function(a){a=Ext.applyIf(a,{date:new Date()});return a},getFirstDayOfWeek:function(a){return a},numberToString:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{number:b.number,type:b.numberType});return a},stringToNumber:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.numberType});return a},getNumberPattern:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{type:b.numberType});if(!a.success){Ext.Logger.warn('You need to specify a `success` function for #getNumberPattern')}return a},getCurrencyPattern:function(a){var b=Ext.device.globalization.Abstract.prototype.config;a=Ext.applyIf(a,{currencyCode:b.currencyCode});if(!a.success){Ext.Logger.warn('You need to specify a `success` function for #getCurrency')}return a}});Ext.define('Ext.device.globalization.Cordova',{alternateClassName:'Ext.device.globalization.PhoneGap',extend:'Ext.device.globalization.Abstract',getPreferredLanguage:function(a){a=this.callParent(arguments);navigator.globalization.getPreferredLanguage(a.success,a.error)},getLocaleName:function(a){a=this.callParent(arguments);navigator.globalization.getLocaleName(a.success,a.error)},dateToString:function(a){a=this.callParent(arguments);navigator.globalization.dateToString(a.date,a.success,a.error,a)},stringToDate:function(a){a=this.callParent(arguments);navigator.globalization.stringToDate(a.dateString,a.success,a.error,a)},getDatePattern:function(a){a=this.callParent(arguments);navigator.globalization.getDatePattern(a.success,a.error,a)},getDateNames:function(a){a=this.callParent(arguments);navigator.globalization.getDateNames(a.success,a.error,a)},isDayLightSavingsTime:function(a){a=this.callParent(arguments);navigator.globalization.isDayLightSavingsTime(a.date,a.success,a.error,a)},getFirstDayOfWeek:function(a){a=this.callParent(arguments);navigator.globalization.getFirstDayOfWeek(a.success,a.error)},numberToString:function(a){a=this.callParent(arguments);navigator.globalization.numberToString(a.number,a.success,a.error,a)},stringToNumber:function(a){a=this.callParent(arguments);navigator.globalization.stringToNumber(a.string,a.success,a.error,a)},getNumberPattern:function(a){a=this.callParent(arguments);navigator.globalization.getNumberPattern(a.success,a.error,a)},getCurrencyPattern:function(a){a=this.callParent(arguments);navigator.globalization.getCurrencyPattern(a.currencyCode,a.success,a.error)}});Ext.define('Ext.device.globalization.Simulator',{extend:'Ext.device.globalization.Abstract'});Ext.define('Ext.device.Globalization',{singleton:!0,requires:['Ext.device.globalization.Cordova','Ext.device.globalization.Simulator'],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.Cordova){return Ext.create('Ext.device.globalization.Cordova')}}return Ext.create('Ext.device.globalization.Simulator')}});Ext.define('Ext.device.media.Abstract',{mixins:['Ext.mixin.Observable'],config:{src:null},play:Ext.emptyFn,pause:Ext.emptyFn,stop:Ext.emptyFn,release:Ext.emptyFn,seekTo:Ext.emptyFn,getCurrentPosition:Ext.emptyFn,getDuration:Ext.emptyFn,startRecord:Ext.emptyFn,stopRecord:Ext.emptyFn});Ext.define('Ext.device.media.Cordova',{alternateClassName:'Ext.device.media.PhoneGap',extend:'Ext.device.media.Abstract',config:{src:null,media:null},updateSrc:function(a,b){this.setMedia(new Media(a))},play:function(){var a=this.getMedia();if(a){a.play()}},pause:function(){var a=this.getMedia();if(a){a.pause()}},stop:function(){var a=this.getMedia();if(a){a.stop()}},release:function(){var a=this.getMedia();if(a){a.release()}},seekTo:function(b){var a=this.getMedia();if(a){a.seekTo(b)}},getDuration:function(){var a=this.getMedia();if(a){a.getDuration()}},startRecord:function(){var a=this.getMedia();if(!a){this.setSrc(null)}a.startRecord()},stopRecord:function(){var a=this.getMedia();if(a){a.stopRecord()}}});Ext.define('Ext.device.Media',{singleton:!0,requires:['Ext.device.Communicator','Ext.device.media.Cordova'],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Cordova){return Ext.create('Ext.device.media.Cordova')}return Ext.create('Ext.device.media.Abstract')}});Ext.define('Ext.device.notification.Abstract',{show:function(a){if(!a.message){throw ('[Ext.device.Notification#show] You passed no message')}if(!a.buttons){a.buttons=["OK","Cancel"]}if(!Ext.isArray(a.buttons)){a.buttons=[a.buttons]}if(!a.scope){a.scope=this}return a},alert:function(a){if(!a.message){throw ('[Ext.device.Notification#alert] You passed no message')}if(!a.scope){a.scope=this}return a},confirm:function(a){if(!a.message){throw ('[Ext.device.Notification#confirm] You passed no message')}if(!a.buttons){a.buttons=["OK","Cancel"]}if(!Ext.isArray(a.buttons)){a.buttons=[a.buttons]}if(!a.scope){a.scope=this}return a},prompt:function(a){if(!a.message){throw ('[Ext.device.Notification#prompt] You passed no message')}if(!a.buttons){a.buttons=["OK","Cancel"]}if(!Ext.isArray(a.buttons)){a.buttons=[a.buttons]}if(!a.scope){a.scope=this}return a},vibrate:Ext.emptyFn,beep:Ext.emptyFn});Ext.define('Ext.device.notification.Cordova',{alternateClassName:'Ext.device.notification.PhoneGap',extend:'Ext.device.notification.Abstract',requires:['Ext.device.Communicator'],show:function(a){a=this.callParent(arguments);this.confirm(a)},confirm:function(a){a=this.callParent(arguments);var b=a.buttons,e=a.buttons.length;if(e&&typeof b[0]!="string"){var d=[],c;for(c=0;c