Ext.define("Ext.data.proxy.Sql",{alias:"proxy.sql",extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.proxy.SQL",isSQLProxy:true,config:{reader:null,writer:null,table:null,database:"Sencha"},_createOptions:{silent:true,dirty:false},updateModel:function(c){var g=this,b,a,e,d,f;if(c){g.uniqueIdStrategy=c.identifier.isUnique;if(!g.getTable()){b=c.entityName;g.setTable(b.slice(b.lastIndexOf(".")+1))}g.columns=d=g.getPersistedModelColumns(c);g.quotedColumns=f=[];for(e=0,a=d.length;e0)?JSON.parse(a):null},doSend:function(a){var c=new XMLHttpRequest();c.open("GET",this.SERVER_URL+"?"+Ext.Object.toQueryString(a)+"&_dc="+new Date().getTime(),false);try{c.send(null);return c.responseText}catch(b){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:true,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:true,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:true,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(d,b,a){try{navigator.camera.getPicture(d,b,a)}catch(c){alert(c)}},cleanup:function(c,a){try{navigator.camera.cleanup(c,a)}catch(b){alert(b)}},capture:function(h){var f=h.success,d=h.failure,j=h.scope,b=this.source,e=this.destination,g=this.encoding,a=h.source,i=h.destination,c=h.encoding,k={};if(j){f=Ext.Function.bind(f,j);d=Ext.Function.bind(d,j)}if(a!==undefined){k.sourceType=b.hasOwnProperty(a)?b[a]:a}if(i!==undefined){k.destinationType=e.hasOwnProperty(i)?e[i]:i}if(c!==undefined){k.encodingType=g.hasOwnProperty(c)?g[c]:c}if("quality" in h){k.quality=h.quality}if("width" in h){k.targetWidth=h.width}if("height" in h){k.targetHeight=h.height}this.getPicture(f,d,k)}});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(d){var c=this.sampleIndex,b=this.getSamples(),g=b.length,f=b[c],e=d.scope,h=d.success,a=d.failure;if("success" in f){if(h){h.call(e,f.success)}}else{if(a){a.call(e,f.failure)}}if(++c>g-1){c=0}this.sampleIndex=c}});Ext.define("Ext.device.Camera",{singleton:true,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(b){var a={limit:b.limit,duration:b.maximumDuration};navigator.device.capture.captureAudio(b.success,b.failure,a)},captureVideo:function(b){var a={limit:b.limit,duration:b.maximumDuration};navigator.device.capture.captureVideo(b.success,b.failure,a)}});Ext.define("Ext.device.capture.Abstract",{alternateClassName:"Ext.device.capture.Simulator",captureAudio:Ext.emptyFn,captureVideo:Ext.emptyFn});Ext.define("Ext.device.Capture",{singleton:true,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(b){var a=Ext.device.compass.Abstract.prototype.config;b=Ext.applyIf(b,{frequency:a.frequency});return b},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(c){if(c.hasOwnProperty("code")){a.callback.call(a.scope||this,false)}else{a.callback.call(a.scope||this,true)}};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:true,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:false,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:true,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:false},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 false}if(!a.success){Ext.Logger.warn("Ext.device.Contacts#getContacts: You must specify a `success` method.");return false}if(!a.fields){a.fields=["*"]}if(!Ext.isArray(a.fields)){a.fields=[a.fields]}if(Ext.isEmpty(a.multiple)){a.multiple=true}navigator.contacts.find(a.fields,a.success,a.failure,a)}});Ext.define("Ext.device.Contacts",{singleton:true,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:false,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:true})}},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(a){var b=this;if(!b.addedListeners){b.addedListeners=[]}if(b.availableListeners.indexOf(a)!=-1&&b.addedListeners.indexOf(a)==-1){b.addedListeners.push(a);document.addEventListener(a,function(){b.fireEvent(a,b)})}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:true,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(b){var a=Ext.device.filesystem.Abstract.prototype.config;b=Ext.applyIf(b,{type:a.fileSystemType,size:a.fileSystemSize,success:Ext.emptyFn,failure:Ext.emptyFn});return b}});Ext.define("Ext.device.filesystem.HTML5",{extend:"Ext.device.filesystem.Abstract",requestFileSystem:function(b){if(!b.success){Ext.Logger.error("Ext.device.filesystem#requestFileSystem: You must specify a `success` callback.");return null}var c=this;var a=function(d){var e=Ext.create("Ext.device.filesystem.FileSystem",d);b.success.call(b.scope||c,e)};window.requestFileSystem(b.type,b.size,a,b.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:false,path:0,fileSystem:null,entry:null,constructor:function(a,c,b){this.directory=a;this.path=c;this.fileSystem=b},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:true}))},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([true,b,a])},getEntry:function(b){var d=this;var e=b.success;if((b.options&&b.options.create)&&this.path){var c=this.path.split("/");if(c[0]=="."||c[0]==""){c=c.slice(1)}var a=function(f){if(c.length){f.getDirectory(c.shift(),b.options,a,b.failure)}else{e(f)}};a(this.fileSystem.fs.root)}else{this.fileSystem.fs.root.getDirectory(this.path,b.options,function(f){b.success.call(b.scope||d,f)},b.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(h){var f=[],g=0,e=h.length;for(;g1&&!b.recursive===true){f.pop();var g=Ext.create("Ext.device.filesystem.DirectoryEntry",f.join("/"),c.fileSystem);g.getEntry({options:b.options,success:function(){d.recursive=true;c.getEntry(d)},failure:b.failure})}else{if(b.failure){b.failure.call(b.scope||c,e)}}}else{if(b.failure){b.failure.call(b.scope||c,e)}}};this.fileSystem.fs.root.getFile(this.path,b.options||null,function(e){e.file(function(f){c.length=f.size;d.success.call(b.scope||c,e)},function(f){a.call(b.scope||c,f)})},function(e){a.call(b.scope||c,e)})}else{b.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(f){a.success.call(a.scope||b,f.target.result)};d.onerror=function(f){a.failure.call(a.scope||b,f)};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(b,a){b.write(new Blob([a]))},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(b,a){b.write(a.toString())},upload:function(c){var b=new FileUploadOptions();b.fileKey=c.fileKey||"file";b.fileName=this.path.substr(this.path.lastIndexOf("/")+1);b.mimeType=c.mimeType||"image/jpeg";b.params=c.params||{};b.headers=c.headers||{};b.chunkMode=c.chunkMode||true;var a=new FileTransfer();a.upload(this.path,encodeURI(c.url),c.success,c.failure,b,c.trustAllHosts||false);return a},download:function(b){var a=new FileTransfer();a.download(encodeURI(b.source),this.path,b.success,b.failure,b.trustAllHosts||false,b.options||{});return a}})}});Ext.define("Ext.device.filesystem.Chrome",{extend:"Ext.device.filesystem.HTML5",requestFileSystem:function(b){var c=this;b=Ext.device.filesystem.Abstract.prototype.requestFileSystem(b);var a=function(d){var e=Ext.create("Ext.device.filesystem.FileSystem",d);b.success.call(b.scope||c,e)};if(b.type==window.PERSISTENT){if(navigator.webkitPersistentStorage){navigator.webkitPersistentStorage.requestQuota(b.size,function(d){window.webkitRequestFileSystem(b.type,d,a,b.failure)})}else{window.webkitStorageInfo.requestQuota(window.PERSISTENT,b.size,function(d){window.webkitRequestFileSystem(b.type,d,a,b.failure)})}}else{window.webkitRequestFileSystem(b.type,b.size,a,b.failure)}}});Ext.define("Ext.device.filesystem.Simulator",{extend:"Ext.device.filesystem.HTML5"});Ext.define("Ext.device.FileSystem",{singleton:true,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:false,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:false,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:true,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(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{date:new Date(),formatLength:a.formatLength,selector:a.selector});return b},stringToDate:function(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{dateString:Ext.util.Format.date(new Date(),"m/d/Y"),formatLength:a.formatLength,selector:a.selector});return b},getDatePattern:function(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{formatLength:a.formatLength,selector:a.selector});return b},getDateNames:function(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{type:a.dateType,items:a.items});return b},isDayLightSavingsTime:function(a){a=Ext.applyIf(a,{date:new Date()});return a},getFirstDayOfWeek:function(a){return a},numberToString:function(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{number:a.number,type:a.numberType});return b},stringToNumber:function(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{type:a.numberType});return b},getNumberPattern:function(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{type:a.numberType});if(!b.success){Ext.Logger.warn("You need to specify a `success` function for #getNumberPattern")}return b},getCurrencyPattern:function(b){var a=Ext.device.globalization.Abstract.prototype.config;b=Ext.applyIf(b,{currencyCode:a.currencyCode});if(!b.success){Ext.Logger.warn("You need to specify a `success` function for #getCurrency")}return b}});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:true,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(b,a){this.setMedia(new Media(b))},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(a){var b=this.getMedia();if(b){b.seekTo(a)}},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:true,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(b){b=this.callParent(arguments);var e=b.buttons,d=b.buttons.length;if(d&&typeof e[0]!="string"){var a=[],c;for(c=0;c