text: /**
  * SoundJS
  * Visit http://createjs.com/ for documentation, updates and examples.
  *
  * Copyright (c) 2011 gskinner.com, inc.
  * 
  * Distributed under the terms of the MIT license.
  * http://www.opensource.org/licenses/mit-license.html
  *
  * This notice shall be included in all copies or substantial portions of the Software.
  **/
  this.createjs=this.createjs||{};
  (function(){var a=function(){this.initialize()},d=a.prototype;a.initialize=function(a){a.addEventListener=d.addEventListener;a.removeEventListener=d.removeEventListener;a.removeAllEventListeners=d.removeAllEventListeners;a.hasEventListener=d.hasEventListener;a.dispatchEvent=d.dispatchEvent};d._listeners=null;d.initialize=function(){};d.addEventListener=function(a,c){var b=this._listeners;b?this.removeEventListener(a,c):b=this._listeners={};var f=b[a];f||(f=b[a]=[]);f.push(c);return c};d.removeEventListener=
  function(a,c){var b=this._listeners;if(b){var f=b[a];if(f)for(var h=0,e=f.length;h<e;h++)if(f[h]==c){1==e?delete b[a]:f.splice(h,1);break}}};d.removeAllEventListeners=function(a){a?this._listeners&&delete this._listeners[a]:this._listeners=null};d.dispatchEvent=function(a,c){var b=!1,f=this._listeners;if(a&&f){"string"==typeof a&&(a={type:a});f=f[a.type];if(!f)return b;a.target=c||this;for(var f=f.slice(),h=0,e=f.length;h<e;h++)var g=f[h],b=g.handleEvent?b||g.handleEvent(a):b||g(a)}return!!b};d.hasEventListener=
  function(a){var c=this._listeners;return!(!c||!c[a])};d.toString=function(){return"[EventDispatcher]"};createjs.EventDispatcher=a})();this.createjs=this.createjs||{};
  (function(){function a(){throw"Sound cannot be instantiated";}function d(b,a){this.init(b,a)}function l(){}a.DELIMITER="|";a.AUDIO_TIMEOUT=8E3;a.INTERRUPT_ANY="any";a.INTERRUPT_EARLY="early";a.INTERRUPT_LATE="late";a.INTERRUPT_NONE="none";a.PLAY_INITED="playInited";a.PLAY_SUCCEEDED="playSucceeded";a.PLAY_INTERRUPTED="playInterrupted";a.PLAY_FINISHED="playFinished";a.PLAY_FAILED="playFailed";a.SUPPORTED_EXTENSIONS="mp3 ogg mpeg wav m4a mp4 aiff wma mid".split(" ");a.EXTENSION_MAP={m4a:"mp4"};a.FILE_PATTERN=
  /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/;a.defaultInterruptBehavior=a.INTERRUPT_NONE;a.lastId=0;a.activePlugin=null;a.pluginsRegistered=!1;a.masterVolume=1;a.masterMute=!1;a.instances=[];a.idHash={};a.preloadHash={};a.defaultSoundInstance=null;a.addEventListener=null;a.removeEventListener=null;a.removeAllEventListeners=null;a.dispatchEvent=null;a.hasEventListener=null;a._listeners=null;createjs.EventDispatcher.initialize(a);a.onLoadComplete=null;
  a.sendFileLoadEvent=function(b){if(a.preloadHash[b])for(var f=0,c=a.preloadHash[b].length;f<c;f++){var e=a.preloadHash[b][f],g={target:this,type:"fileload",src:e.src,id:e.id,data:e.data};a.preloadHash[b][f]=!0;a.dispatchEvent(g);a.onLoadComplete&&a.onLoadComplete(g);g={target:this,type:"loadComplete",src:e.src,id:e.id,data:e.data};a.dispatchEvent(g)}};a.getPreloadHandlers=function(){return{callback:createjs.proxy(a.initLoad,a),types:["sound"],extensions:a.SUPPORTED_EXTENSIONS}};a.registerPlugin=function(b){a.pluginsRegistered=
  !0;return null==b?!1:b.isSupported()?(a.activePlugin=new b,!0):!1};a.registerPlugins=function(b){for(var f=0,c=b.length;f<c;f++)if(a.registerPlugin(b[f]))return!0;return!1};a.initializeDefaultPlugins=function(){return null!=a.activePlugin?!0:a.pluginsRegistered?!1:a.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])?!0:!1};a.isReady=function(){return null!=a.activePlugin};a.getCapabilities=function(){return null==a.activePlugin?null:a.activePlugin.capabilities};a.getCapability=function(b){return null==
  a.activePlugin?null:a.activePlugin.capabilities[b]};a.initLoad=function(b,f,c,e){b=a.registerSound(b,c,e,!1);return null==b?!1:b};a.registerSound=function(b,f,c,e){if(!a.initializeDefaultPlugins())return!1;b instanceof Object&&(f=b.id,c=b.data,b=b.src);var g=a.parsePath(b,"sound",f,c);if(null==g)return!1;null!=f&&(a.idHash[f]=g.src);var j=null;null!=c&&(isNaN(c.channels)?isNaN(c)||(j=parseInt(c)):j=parseInt(c.channels));var k=a.activePlugin.register(g.src,j);null!=k&&(null!=k.numChannels&&(j=k.numChannels),
  d.create(g.src,j),null==c||!isNaN(c)?c=g.data=j||d.maxPerChannel():c.channels=g.data.channels=j||d.maxPerChannel(),null!=k.tag?g.tag=k.tag:k.src&&(g.src=k.src),null!=k.completeHandler&&(g.completeHandler=k.completeHandler),k.type&&(g.type=k.type));!1!=e&&(a.preloadHash[g.src]||(a.preloadHash[g.src]=[]),a.preloadHash[g.src].push({src:b,id:f,data:c}),1==a.preloadHash[g.src].length&&a.activePlugin.preload(g.src,k));return g};a.registerManifest=function(b){for(var a=[],c=0,e=b.length;c<e;c++)a[c]=createjs.Sound.registerSound(b[c].src,
  b[c].id,b[c].data,b[c].preload);return a};a.removeSound=function(b){if(null==a.activePlugin)return!1;b instanceof Object&&(b=b.src);b=a.getSrcById(b);b=a.parsePath(b);if(null==b)return!1;b=b.src;for(var f in a.idHash)a.idHash[f]==b&&delete a.idHash[f];d.remove(b);delete a.preloadHash[b];a.activePlugin.removeSound(b);return!0};a.removeManifest=function(b){for(var a=[],c=0,e=b.length;c<e;c++)a[c]=createjs.Sound.removeSound(b[c].src);return a};a.removeAllSounds=function(){a.idHash={};a.preloadHash={};
  d.removeAll();a.activePlugin.removeAllSounds()};a.loadComplete=function(b){var c=a.parsePath(b,"sound");b=c?a.getSrcById(c.src):a.getSrcById(b);return!0==a.preloadHash[b][0]};a.parsePath=function(b,c,h,e){"string"!=typeof b&&(b=b.toString());b=b.split(a.DELIMITER);c={type:c||"sound",id:h,data:e};h=a.getCapabilities();e=0;for(var g=b.length;e<g;e++){var d=b[e],k=d.match(a.FILE_PATTERN);if(null==k)return!1;var l=k[4],k=k[5];if(h[k]&&-1<a.SUPPORTED_EXTENSIONS.indexOf(k))return c.name=l,c.src=d,c.extension=
  k,c}return null};a.play=function(b,c,h,e,d,j,k){b=a.createInstance(b);a.playInstance(b,c,h,e,d,j,k)||b.playFailed();return b};a.createInstance=function(b){if(!a.initializeDefaultPlugins())return a.defaultSoundInstance;b=a.getSrcById(b);b=a.parsePath(b,"sound");var c=null;null!=b&&null!=b.src?(d.create(b.src),c=a.activePlugin.create(b.src)):c=a.defaultSoundInstance;c.uniqueId=a.lastId++;return c};a.setVolume=function(b){if(null==Number(b))return!1;b=Math.max(0,Math.min(1,b));a.masterVolume=b;if(!this.activePlugin||
  !this.activePlugin.setVolume||!this.activePlugin.setVolume(b))for(var c=this.instances,h=0,e=c.length;h<e;h++)c[h].setMasterVolume(b)};a.getVolume=function(){return a.masterVolume};a.mute=function(b){this.masterMute=b;if(!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(b))for(var a=this.instances,c=0,e=a.length;c<e;c++)a[c].setMasterMute(b)};a.setMute=function(b){if(null==b||void 0==b)return!1;this.masterMute=b;if(!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(b))for(var a=
  this.instances,c=0,e=a.length;c<e;c++)a[c].setMasterMute(b);return!0};a.getMute=function(){return this.masterMute};a.stop=function(){for(var b=this.instances,a=b.length;a--;)b[a].stop()};a.playInstance=function(b,c,h,e,d,j,k){c=c||a.defaultInterruptBehavior;null==h&&(h=0);null==e&&(e=b.getPosition());null==d&&(d=0);null==j&&(j=b.getVolume());null==k&&(k=b.getPan());if(0==h){if(!a.beginPlaying(b,c,e,d,j,k))return!1}else h=setTimeout(function(){a.beginPlaying(b,c,e,d,j,k)},h),b.delayTimeoutId=h;this.instances.push(b);
  return!0};a.beginPlaying=function(b,a,c,e,g,j){return!d.add(b,a)?!1:!b.beginPlaying(c,e,g,j)?(b=this.instances.indexOf(b),-1<b&&this.instances.splice(b,1),!1):!0};a.getSrcById=function(b){return null==a.idHash||null==a.idHash[b]?b:a.idHash[b]};a.playFinished=function(b){d.remove(b);b=this.instances.indexOf(b);-1<b&&this.instances.splice(b,1)};a.proxy=function(b,a){return function(){return b.apply(a,arguments)}};createjs.Sound=a;createjs.proxy=function(b,a){var c=Array.prototype.slice.call(arguments,
  2);return function(){return b.apply(a,Array.prototype.slice.call(arguments,0).concat(c))}};d.channels={};d.create=function(b,a){return null==d.get(b)?(d.channels[b]=new d(b,a),!0):!1};d.remove=function(b){var a=d.get(b);if(null==a)return!1;a.removeAll();delete d.channels[b];return!0};d.removeAll=function(){for(var b in d.channels)d.channels[b].removeAll();d.channels={}};d.add=function(b,a){var c=d.get(b.src);return null==c?!1:c.add(b,a)};d.remove=function(b){var a=d.get(b.src);if(null==a)return!1;
  a.remove(b);return!0};d.maxPerChannel=function(){return c.maxDefault};d.get=function(b){return d.channels[b]};var c=d.prototype={src:null,max:null,maxDefault:100,length:0,init:function(b,a){this.src=b;this.max=a||this.maxDefault;-1==this.max&&this.max==this.maxDefault;this.instances=[]},get:function(b){return this.instances[b]},add:function(b,a){if(!this.getSlot(a,b))return!1;this.instances.push(b);this.length++;return!0},remove:function(b){b=this.instances.indexOf(b);if(-1==b)return!1;this.instances.splice(b,
  1);this.length--;return!0},removeAll:function(){for(var b=this.length-1;0<=b;b--)this.instances[b].stop()},getSlot:function(b){for(var c,d,e=0,g=this.max;e<g;e++){c=this.get(e);if(null==c)return!0;if(!(b==a.INTERRUPT_NONE&&c.playState!=a.PLAY_FINISHED))if(0==e)d=c;else if(c.playState==a.PLAY_FINISHED||c.playState==a.PLAY_INTERRUPTED||c.playState==a.PLAY_FAILED)d=c;else if(b==a.INTERRUPT_EARLY&&c.getPosition()<d.getPosition()||b==a.INTERRUPT_LATE&&c.getPosition()>d.getPosition())d=c}return null!=d?
  (d.interrupt(),this.remove(d),!0):!1},toString:function(){return"[Sound SoundChannel]"}};a.defaultSoundInstance=new function(){this.isDefault=!0;this.addEventListener=this.removeEventListener=this.removeAllEventListener=this.dispatchEvent=this.hasEventListener=this._listeners=this.interrupt=this.playFailed=this.pause=this.resume=this.play=this.beginPlaying=this.cleanUp=this.stop=this.setMasterVolume=this.setVolume=this.mute=this.setMute=this.getMute=this.setPan=this.getPosition=this.setPosition=function(){return!1};
  this.getVolume=this.getPan=this.getDuration=function(){return 0};this.playState=a.PLAY_FAILED;this.toString=function(){return"[Sound Default Sound Instance]"}};l.init=function(){var b=navigator.userAgent;l.isFirefox=-1<b.indexOf("Firefox");l.isOpera=null!=window.opera;l.isChrome=-1<b.indexOf("Chrome");l.isIOS=-1<b.indexOf("iPod")||-1<b.indexOf("iPhone")||-1<b.indexOf("iPad");l.isAndroid=-1<b.indexOf("Android");l.isBlackberry=-1<b.indexOf("Blackberry")};l.init();createjs.Sound.BrowserDetect=l})();this.createjs=this.createjs||{};
  (function(){function a(){this.init()}function d(a,b){this.init(a,b)}function l(a,b){this.init(a,b)}a.capabilities=null;a.isSupported=function(){var c=createjs.Sound.BrowserDetect.isIOS||createjs.Sound.BrowserDetect.isAndroid||createjs.Sound.BrowserDetect.isBlackberry;if("file:"==location.protocol&&!c)return!1;a.generateCapabilities();return null==a.context?!1:!0};a.generateCapabilities=function(){if(null==a.capabilities){var c=document.createElement("audio");if(null==c.canPlayType)return null;if(window.webkitAudioContext)a.context=
  new webkitAudioContext;else if(window.AudioContext)a.context=new AudioContext;else return null;a.playEmptySound();a.capabilities={panning:!0,volume:!0,tracks:-1};for(var b=createjs.Sound.SUPPORTED_EXTENSIONS,f=createjs.Sound.EXTENSION_MAP,d=0,e=b.length;d<e;d++){var g=b[d],j=f[g]||g;a.capabilities[g]="no"!=c.canPlayType("audio/"+g)&&""!=c.canPlayType("audio/"+g)||"no"!=c.canPlayType("audio/"+j)&&""!=c.canPlayType("audio/"+j)}2>a.context.destination.numberOfChannels&&(a.capabilities.panning=!1);a.dynamicsCompressorNode=
  a.context.createDynamicsCompressor();a.dynamicsCompressorNode.connect(a.context.destination);a.gainNode=a.context.createGainNode();a.gainNode.connect(a.dynamicsCompressorNode)}};a.playEmptySound=function(){var a=this.context.createBuffer(1,1,22050),b=this.context.createBufferSource();b.buffer=a;b.connect(this.context.destination);b.noteOn(0)};a.prototype={capabilities:null,volume:1,context:null,dynamicsCompressorNode:null,gainNode:null,arrayBuffers:null,init:function(){this.capabilities=a.capabilities;
  this.arrayBuffers={};this.context=a.context;this.gainNode=a.gainNode;this.dynamicsCompressorNode=a.dynamicsCompressorNode},register:function(a){this.arrayBuffers[a]=!0;return{tag:new l(a,this)}},isPreloadStarted:function(a){return null!=this.arrayBuffers[a]},isPreloadComplete:function(a){return!(null==this.arrayBuffers[a]||!0==this.arrayBuffers[a])},removeFromPreload:function(a){delete this.arrayBuffers[a]},removeSound:function(a){delete this.arrayBuffers[a]},removeAllSounds:function(){this.arrayBuffers=
  {}},addPreloadResults:function(a,b){this.arrayBuffers[a]=b},handlePreloadComplete:function(){createjs.Sound.sendFileLoadEvent(this.src)},preload:function(a){this.arrayBuffers[a]=!0;a=new l(a,this);a.onload=this.handlePreloadComplete;a.load()},create:function(a){this.isPreloadStarted(a)||this.preload(a);return new d(a,this)},setVolume:function(a){this.volume=a;this.updateVolume();return!0},updateVolume:function(){var a=createjs.Sound.masterMute?0:this.volume;a!=this.gainNode.gain.value&&(this.gainNode.gain.value=
  a)},getVolume:function(){return this.volume},setMute:function(){this.updateVolume();return!0},toString:function(){return"[WebAudioPlugin]"}};createjs.WebAudioPlugin=a;d.prototype={src:null,uniqueId:-1,playState:null,owner:null,offset:0,delay:0,volume:1,pan:0,duration:0,remainingLoops:0,delayTimeoutId:null,soundCompleteTimeout:null,panNode:null,gainNode:null,sourceNode:null,sourceNodeNext:null,muted:!1,paused:!1,startTime:0,addEventListener:null,removeEventListener:null,removeAllEventListeners:null,
  dispatchEvent:null,hasEventListener:null,_listeners:null,endedHandler:null,readyHandler:null,stalledHandler:null,onReady:null,onPlaySucceeded:null,onPlayInterrupted:null,onPlayFailed:null,onComplete:null,onLoop:null,sendEvent:function(a){this.dispatchEvent({target:this,type:a})},init:function(a,b){this.owner=b;this.src=a;this.panNode=this.owner.context.createPanner();this.panNode.panningModel=0;this.gainNode=this.owner.context.createGainNode();this.gainNode.connect(this.panNode);this.owner.isPreloadComplete(this.src)&&
  (this.duration=1E3*this.owner.arrayBuffers[this.src].duration);this.endedHandler=createjs.proxy(this.handleSoundComplete,this);this.readyHandler=createjs.proxy(this.handleSoundReady,this);this.stalledHandler=createjs.proxy(this.handleSoundStalled,this)},cleanUp:function(){this.sourceNode&&this.sourceNode.playbackState!=this.sourceNode.UNSCHEDULED_STATE&&(this.cleanUpAudioNode(this.sourceNode),this.sourceNodeNext&&this.cleanUpAudioNode(this.sourceNodeNext));0!=this.panNode.numberOfOutputs&&this.panNode.disconnect(0);
  clearTimeout(this.delayTimeoutId);clearTimeout(this.soundCompleteTimeout);null!=window.createjs&&createjs.Sound.playFinished(this)},cleanUpAudioNode:function(a){a.noteOff(0);a.disconnect(this.gainNode);return null},interrupt:function(){this.playState=createjs.Sound.PLAY_INTERRUPTED;if(this.onPlayInterrupted)this.onPlayInterrupted(this);this.cleanUp();this.paused=!1;this.sendEvent("interrupted")},handleSoundStalled:function(){if(null!=this.onPlayFailed)this.onPlayFailed(this);this.sendEvent("failed")},
  handleSoundReady:function(){if(null!=window.createjs)if(1E3*this.offset>this.getDuration())this.playFailed();else{0>this.offset&&(this.offset=0);this.playState=createjs.Sound.PLAY_SUCCEEDED;this.paused=!1;this.panNode.connect(this.owner.gainNode);var a=this.owner.arrayBuffers[this.src].duration;this.sourceNode=this.createAndPlayAudioNode(this.owner.context.currentTime-a,this.offset);this.duration=1E3*a;this.startTime=this.sourceNode.startTime-this.offset;this.soundCompleteTimeout=setTimeout(this.endedHandler,
  1E3*(a-this.offset));0!=this.remainingLoops&&(this.sourceNodeNext=this.createAndPlayAudioNode(this.startTime,0))}},createAndPlayAudioNode:function(a,b){var f=this.owner.context.createBufferSource();f.buffer=this.owner.arrayBuffers[this.src];f.connect(this.gainNode);f.startTime=a+f.buffer.duration;f.noteGrainOn(f.startTime,b,f.buffer.duration-b);return f},play:function(a,b,f,d,e,g){this.cleanUp();createjs.Sound.playInstance(this,a,b,f,d,e,g)},beginPlaying:function(a,b,f,d){if(null!=window.createjs&&
  this.src){this.offset=a/1E3;this.remainingLoops=b;this.setVolume(f);this.setPan(d);if(this.owner.isPreloadComplete(this.src))return this.handleSoundReady(null),this.onPlaySucceeded&&this.onPlaySucceeded(this),this.sendEvent("succeeded"),1;this.playFailed()}},pause:function(){return!this.paused&&this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.paused=!0,this.offset=this.owner.context.currentTime-this.startTime,this.cleanUpAudioNode(this.sourceNode),this.cleanUpAudioNode(this.sourceNodeNext),0!=
  this.panNode.numberOfOutputs&&this.panNode.disconnect(),clearTimeout(this.delayTimeoutId),clearTimeout(this.soundCompleteTimeout),!0):!1},resume:function(){if(!this.paused)return!1;this.handleSoundReady(null);return!0},stop:function(){this.playState=createjs.Sound.PLAY_FINISHED;this.cleanUp();this.offset=0;return!0},setVolume:function(a){if(null==Number(a))return!1;this.volume=a=Math.max(0,Math.min(1,a));this.updateVolume();return!0},updateVolume:function(){var a=this.muted?0:this.volume;return a!=
  this.gainNode.gain.value?(this.gainNode.gain.value=a,!0):!1},getVolume:function(){return this.volume},mute:function(a){this.muted=a;this.updateVolume();return!0},setMute:function(a){if(null==a||void 0==a)return!1;this.muted=a;this.updateVolume();return!0},getMute:function(){return this.muted},setPan:function(a){if(this.owner.capabilities.panning)this.panNode.setPosition(a,0,-0.5),this.pan=a;else return!1},getPan:function(){return this.pan},getPosition:function(){return 1E3*(this.paused||null==this.sourceNode?
  this.offset:this.owner.context.currentTime-this.startTime)},setPosition:function(a){this.offset=a/1E3;this.sourceNode&&this.sourceNode.playbackState!=this.sourceNode.UNSCHEDULED_STATE&&(this.cleanUpAudioNode(this.sourceNode),this.cleanUpAudioNode(this.sourceNodeNext),clearTimeout(this.soundCompleteTimeout));!this.paused&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&this.handleSoundReady(null);return!0},getDuration:function(){return this.duration},handleSoundComplete:function(){this.offset=0;if(0!=
  this.remainingLoops){this.remainingLoops--;this.sourceNodeNext?(this.cleanUpAudioNode(this.sourceNode),this.sourceNode=this.sourceNodeNext,this.startTime=this.sourceNode.startTime,this.sourceNodeNext=this.createAndPlayAudioNode(this.startTime,0),this.soundCompleteTimeout=setTimeout(this.endedHandler,this.duration)):this.handleSoundReady(null);if(null!=this.onLoop)this.onLoop(this);this.sendEvent("loop")}else if(null!=window.createjs){this.playState=createjs.Sound.PLAY_FINISHED;this.cleanUp();if(null!=
  this.onComplete)this.onComplete(this);this.sendEvent("complete")}},playFailed:function(){if(null!=window.createjs){this.playState=createjs.Sound.PLAY_FAILED;if(null!=this.onPlayFailed)this.onPlayFailed(this);this.cleanUp();this.sendEvent("failed")}},toString:function(){return"[WebAudioPlugin SoundInstance]"}};createjs.EventDispatcher.initialize(d.prototype);l.prototype={request:null,owner:null,progress:-1,src:null,result:null,onload:null,onprogress:null,onError:null,init:function(a,b){this.src=a;
  this.owner=b},load:function(a){null!=a&&(this.src=a);this.request=new XMLHttpRequest;this.request.open("GET",this.src,!0);this.request.responseType="arraybuffer";this.request.onload=createjs.proxy(this.handleLoad,this);this.request.onError=createjs.proxy(this.handleError,this);this.request.onprogress=createjs.proxy(this.handleProgress,this);this.request.send()},handleProgress:function(a,b){this.progress=a/b;if(null!=this.onprogress)this.onprogress({loaded:a,total:b,progress:this.progress})},handleLoad:function(){a.context.decodeAudioData(this.request.response,
  createjs.proxy(this.handleAudioDecoded,this),createjs.proxy(this.handleError,this))},handleAudioDecoded:function(a){this.progress=1;this.result=a;this.owner.addPreloadResults(this.src,this.result);this.onload&&this.onload()},handleError:function(a){this.owner.removeSound(this.src);this.onerror&&this.onerror(a)},toString:function(){return"[WebAudioPlugin WebAudioLoader]"}}})();this.createjs=this.createjs||{};
  (function(){function a(){this.init()}function d(a,c){this.init(a,c)}function l(a,c){this.init(a,c)}function c(a){this.init(a)}a.MAX_INSTANCES=30;a.capabilities=null;a.AUDIO_READY="canplaythrough";a.AUDIO_ENDED="ended";a.AUDIO_SEEKED="seeked";a.AUDIO_ERROR="error";a.AUDIO_STALLED="stalled";a.isSupported=function(){if(createjs.Sound.BrowserDetect.isIOS)return!1;a.generateCapabilities();return null==a.tag||null==a.capabilities?!1:!0};a.generateCapabilities=function(){if(null==a.capabilities){var b=a.tag=
  document.createElement("audio");if(null==b.canPlayType)return null;a.capabilities={panning:!0,volume:!0,tracks:-1};for(var c=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,g=c.length;e<g;e++){var j=c[e],k=d[j]||j;a.capabilities[j]="no"!=b.canPlayType("audio/"+j)&&""!=b.canPlayType("audio/"+j)||"no"!=b.canPlayType("audio/"+k)&&""!=b.canPlayType("audio/"+k)}}};a.prototype={capabilities:null,audioSources:null,defaultNumChannels:2,init:function(){this.capabilities=a.capabilities;
  this.audioSources={}},register:function(a,f){this.audioSources[a]=!0;for(var d=c.get(a),e=null,g=f||this.defaultNumChannels,j=0;j<g;j++)e=this.createTag(a),d.add(e);return{tag:e,numChannels:g}},createTag:function(a){var c=document.createElement("audio");c.autoplay=!1;c.preload="none";c.src=a;return c},removeSound:function(a){delete this.audioSources[a];c.remove(a)},removeAllSounds:function(){this.audioSources={};c.removeAll()},create:function(a){if(!this.isPreloadStarted(a)){var f=c.get(a),h=this.createTag(a);
  f.add(h);this.preload(a,{tag:h})}return new d(a,this)},isPreloadStarted:function(a){return null!=this.audioSources[a]},preload:function(a,c){this.audioSources[a]=!0;new l(a,c.tag)},toString:function(){return"[HTMLAudioPlugin]"}};createjs.HTMLAudioPlugin=a;d.prototype={src:null,uniqueId:-1,playState:null,owner:null,loaded:!1,offset:0,delay:0,volume:1,pan:0,duration:0,remainingLoops:0,delayTimeoutId:null,tag:null,muted:!1,paused:!1,addEventListener:null,removeEventListener:null,removeAllEventListeners:null,
  dispatchEvent:null,hasEventListener:null,_listeners:null,onComplete:null,onLoop:null,onReady:null,onPlayFailed:null,onPlayInterrupted:null,onPlaySucceeded:null,endedHandler:null,readyHandler:null,stalledHandler:null,loopHandler:null,init:function(a,c){this.src=a;this.owner=c;this.endedHandler=createjs.proxy(this.handleSoundComplete,this);this.readyHandler=createjs.proxy(this.handleSoundReady,this);this.stalledHandler=createjs.proxy(this.handleSoundStalled,this);this.loopHandler=createjs.proxy(this.handleSoundLoop,
  this)},sendEvent:function(a){this.dispatchEvent({target:this,type:a})},cleanUp:function(){var a=this.tag;if(null!=a){a.pause();a.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_ENDED,this.endedHandler,!1);a.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_READY,this.readyHandler,!1);a.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED,this.loopHandler,!1);try{a.currentTime=0}catch(d){}c.setInstance(this.src,a);this.tag=null}clearTimeout(this.delayTimeoutId);null!=window.createjs&&createjs.Sound.playFinished(this)},
  interrupt:function(){if(null!=this.tag){this.playState=createjs.Sound.PLAY_INTERRUPTED;if(this.onPlayInterrupted)this.onPlayInterrupted(this);this.cleanUp();this.paused=!1;this.sendEvent("interrupted")}},play:function(a,c,d,e,g,j){this.cleanUp();createjs.Sound.playInstance(this,a,c,d,e,g,j)},beginPlaying:function(a,d,h){if(null==window.createjs)return-1;var e=this.tag=c.getInstance(this.src);if(null==e)return this.playFailed(),-1;e.addEventListener(createjs.HTMLAudioPlugin.AUDIO_ENDED,this.endedHandler,
  !1);this.offset=a;this.volume=h;this.updateVolume();this.remainingLoops=d;4!==e.readyState?(e.addEventListener(createjs.HTMLAudioPlugin.AUDIO_READY,this.readyHandler,!1),e.addEventListener(createjs.HTMLAudioPlugin.AUDIO_STALLED,this.stalledHandler,!1),e.preload="auto",e.load()):this.handleSoundReady(null);this.onPlaySucceeded&&this.onPlaySucceeded(this);this.sendEvent("succeeded");return 1},handleSoundStalled:function(){if(null!=this.onPlayFailed)this.onPlayFailed(this);this.cleanUp();this.sendEvent("failed")},
  handleSoundReady:function(){null!=window.createjs&&(this.duration=1E3*this.tag.duration,this.playState=createjs.Sound.PLAY_SUCCEEDED,this.paused=!1,this.tag.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_READY,this.readyHandler,!1),this.offset>=this.getDuration()?this.playFailed():(0<this.offset&&(this.tag.currentTime=0.001*this.offset),-1==this.remainingLoops&&(this.tag.loop=!0),0!=this.remainingLoops&&(this.tag.addEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED,this.loopHandler,!1),this.tag.loop=
  !0),this.tag.play()))},pause:function(){return!this.paused&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&null!=this.tag?(this.paused=!0,this.tag.pause(),clearTimeout(this.delayTimeoutId),!0):!1},resume:function(){if(!this.paused||null==this.tag)return!1;this.paused=!1;this.tag.play();return!0},stop:function(){this.offset=0;this.pause();this.playState=createjs.Sound.PLAY_FINISHED;this.cleanUp();return!0},setMasterVolume:function(){this.updateVolume();return!0},setVolume:function(a){if(null==Number(a))return!1;
  this.volume=a=Math.max(0,Math.min(1,a));this.updateVolume();return!0},updateVolume:function(){if(null!=this.tag){var a=this.muted||createjs.Sound.masterMute?0:this.volume*createjs.Sound.masterVolume;a!=this.tag.volume&&(this.tag.volume=a);return!0}return!1},getVolume:function(){return this.volume},mute:function(a){this.muted=a;this.updateVolume();return!0},setMasterMute:function(){this.updateVolume();return!0},setMute:function(a){if(null==a||void 0==a)return!1;this.muted=a;this.updateVolume();return!0},
  getMute:function(){return this.muted},setPan:function(){return!1},getPan:function(){return 0},getPosition:function(){return null==this.tag?this.offset:1E3*this.tag.currentTime},setPosition:function(a){if(null==this.tag)this.offset=a;else{this.tag.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED,this.loopHandler,!1);try{this.tag.currentTime=0.001*a}catch(c){return!1}this.tag.addEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED,this.loopHandler,!1)}return!0},getDuration:function(){return this.duration},
  handleSoundComplete:function(){this.offset=0;if(null!=window.createjs){this.playState=createjs.Sound.PLAY_FINISHED;this.cleanUp();if(null!=this.onComplete)this.onComplete(this);this.sendEvent("complete")}},handleSoundLoop:function(){this.offset=0;this.remainingLoops--;0==this.remainingLoops&&(this.tag.loop=!1,this.tag.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED,this.loopHandler,!1));if(null!=this.onLoop)this.onLoop(this);this.sendEvent("loop")},playFailed:function(){if(null!=window.createjs){this.playState=
  createjs.Sound.PLAY_FAILED;if(null!=this.onPlayFailed)this.onPlayFailed(this);this.cleanUp();this.sendEvent("failed")}},toString:function(){return"[HTMLAudioPlugin SoundInstance]"}};createjs.EventDispatcher.initialize(d.prototype);l.prototype={src:null,tag:null,preloadTimer:null,loadedHandler:null,init:function(a,c){this.src=a;this.tag=c;this.preloadTimer=setInterval(createjs.proxy(this.preloadTick,this),200);this.loadedHandler=createjs.proxy(this.sendLoadedEvent,this);this.tag.addEventListener&&
  this.tag.addEventListener("canplaythrough",this.loadedHandler);this.tag.onreadystatechange=createjs.proxy(this.sendLoadedEvent,this);this.tag.preload="auto";this.tag.src=a;this.tag.load()},preloadTick:function(){var a=this.tag.buffered,c=this.tag.duration;0<a.length&&a.end(0)>=c-1&&this.handleTagLoaded()},handleTagLoaded:function(){clearInterval(this.preloadTimer)},sendLoadedEvent:function(){this.tag.removeEventListener&&this.tag.removeEventListener("canplaythrough",this.loadedHandler);this.tag.onreadystatechange=
  null;createjs.Sound.sendFileLoadEvent(this.src)},toString:function(){return"[HTMLAudioPlugin HTMLAudioLoader]"}};c.tags={};c.get=function(a){var d=c.tags[a];null==d&&(d=c.tags[a]=new c(a));return d};c.remove=function(a){var d=c.tags[a];if(null==d)return!1;d.removeAll();delete c.tags[a];return!0};c.removeAll=function(){for(var a in c.tags)c.tags[a].removeAll();c.tags={}};c.getInstance=function(a){a=c.tags[a];return null==a?null:a.get()};c.setInstance=function(a,d){var h=c.tags[a];return null==h?null:
  h.set(d)};c.prototype={src:null,length:0,available:0,tags:null,init:function(a){this.src=a;this.tags=[]},add:function(a){this.tags.push(a);this.length++;this.available++},removeAll:function(){for(;this.length--;)delete this.tags[this.length];this.src=null;this.tags.length=0},get:function(){if(0==this.tags.length)return null;this.available=this.tags.length;var a=this.tags.pop();null==a.parentNode&&document.body.appendChild(a);return a},set:function(a){-1==this.tags.indexOf(a)&&this.tags.push(a);this.available=
  this.tags.length},toString:function(){return"[HTMLAudioPlugin TagPool]"}}})();(function(){var a=this.createjs=this.createjs||{},a=a.SoundJS=a.SoundJS||{};a.version="NEXT";a.buildDate="Thu, 11 Apr 2013 21:19:09 GMT"})();
  