1function RecordRTC(e,t){if(!e)throw"First parameter is required.";t=new RecordRTCConfiguration(e,t=t||{type:"video"});var n=this;function o(n){n&&(t.initCallback=function(){n(),n=t.initCallback=null});var o=new GetRecorderType(e,t);(l=new o(e,t)).record(),c("recording"),t.disableLogs||console.log("Initialized recorderType:",l.constructor.name,"for output-type:",t.type)}function r(e){if(e=e||function(){},l){if("paused"===n.state)return n.resumeRecording(),void setTimeout(function(){r(e)},1);"recording"===n.state||t.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',n.state),t.disableLogs||console.log("Stopped recording "+t.type+" stream."),"gif"!==t.type?l.stop(o):(l.stop(),o()),c("stopped")}else d();function o(o){if(l){Object.keys(l).forEach(function(e){"function"!=typeof l[e]&&(n[e]=l[e])});var r=l.blob;if(!r){if(!o)throw"Recording failed.";l.blob=r=o}if(r&&!t.disableLogs&&console.log(r.type,"->",bytesToSize(r.size)),e){var i;try{i=URL.createObjectURL(r)}catch(s){}"function"==typeof e.call?e.call(n,i):e(i)}t.autoWriteToDisk&&a(function(e){var n={};n[t.type+"Blob"]=e,DiskStorage.Store(n)})}else"function"==typeof e.call?e.call(n,""):e("")}}function i(e){postMessage((new FileReaderSync).readAsDataURL(e))}function a(e,n){if(!e)throw"Pass a callback function over getDataURL.";var o=n?n.blob:(l||{}).blob;if(!o)return t.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout(function(){a(e,n)},1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var r=new FileReader;
vendor: 4,762 bytes, line 1
1r.readAsDataURL(o),r.onload=function(t){e(t.target.result)}}else{var s=function(e){try{var t=URL.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),n=new Worker(t);return URL.revokeObjectURL(t),n}catch(o){}}(i);s.onmessage=function(t){e(t.data)},s.postMessage(o)}}function s(e){e=e||0,"paused"!==n.state?"stopped"!==n.state&&(e>=n.recordingDuration?r(n.onRecordingStopped):(e+=1e3,setTimeout(function(){s(e)},1e3))):setTimeout(function(){s(e)},1e3)}function c(e){n&&(n.state=e,"function"==typeof n.onStateChanged.call?n.onStateChanged.call(n,e):n.onStateChanged(e))}var l,u='It seems that recorder is destroyed or "startRecording" is not invoked for '+t.type+" recorder.";function d(){!0!==t.disableLogs&&console.warn(u)}var h={startRecording:function(r){return t.disableLogs||console.log("RecordRTC version: ",n.version),r&&(t=new RecordRTCConfiguration(e,r)),t.disableLogs||console.log("started recording "+t.type+" stream."),l?(l.clearRecordedData(),l.record(),c("recording"),n.recordingDuration&&s(),n):(o(function(){n.recordingDuration&&s()}),n)},stopRecording:r,pauseRecording:function(){l?"recording"===n.state?(c("paused"),l.pause(),t.disableLogs||console.log("Paused recording.")):t.disableLogs||console.warn("Unable to pause the recording. Recording state: ",n.state):d()},resumeRecording:function(){l?"paused"===n.state?(c("recording"),l.resume(),t.disableLogs||console.log("Resumed recording.")):t.disableLogs||console.warn("Unable to resume the recording. Recording state: ",n.state):d()},initRecorder:o,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return n.recordingDuration=e,n.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){n.onRecordingStopped=e}}},clearRecordedData:function(){l?(l.clearRecordedData(),t.disableLogs||console.log("Cleared old recorded data.")):d()},getBlob:function(){if(l)return l.blob;d()},getDataURL:a,toURL:function(){if(l)return URL.createObjectURL(l.blob);d()},getInternalRecorder:function(){return l},save:function(e){l?invokeSaveAsDialog(l.blob,e):d()},getFromDisk:function(e){l?RecordRTC.getFromDisk(t.type,e):d()},setAdvertisementArray:function(e){t.advertisement=[];for(var n=e.length,o=0;o<n;o++)t.advertisement.push({duration:o,image:e[o]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"!==n.state||t.disableLogs||console.warn("Stop an active recorder."),l&&"function"==typeof l.clearRecordedData&&l.clearRecordedData(),l=null,c("inactive"),n.blob=null},onStateChanged:function(e){t.disableLogs||console.log("Recorder state changed:",e)},state:"inactive",getState:function(){return n.state},destroy:function(){var e=t.disableLogs;t={disableLogs:!0},n.reset(),c("destroyed"),h=n=null,Storage.AudioContextConstructor&&(Storage.AudioContextConstructor.close(),Storage.AudioContextConstructor=null),t.disableLogs=e,t.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.5.9"};if(!this)return n=h,h;for(var f in h)this[f]=h[f];return n=this,h}function RecordRTCConfiguration(e,t){return t.recorderType||t.type||(t.audio&&t.video?t.type="video":t.audio&&!t.video&&(t.type="audio")),t.recorderType&&!t.type&&(t.recorderType===WhammyRecorder||t.recorderType===CanvasRecorder||void 0!==WebAssemblyRecorder&&t.recorderType===WebAssemblyRecorder?t.type="video":t.recorderType===GifRecorder?t.type="gif":t.recorderType===StereoAudioRecorder?t.type="audio":t.recorderType===MediaStreamRecorder&&(getTracks(e,"audio").length&&getTracks(e,"video").length?t.type="video":!getTracks(e,"audio").length&&getTracks(e,"video").length?t.type="video":getTracks(e,"audio").length&&!getTracks(e,"video").length&&(t.type="audio"))),void 0!==MediaStreamRecorder&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(t.mimeType||(t.mimeType="video/webm"),t.type||(t.type=t.mimeType.split("/")[0])),t.type||(t.mimeType&&(t.type=t.mimeType.split("/")[0]),t.type||(t.type="audio")),t}function GetRecorderType(e,t){var n;return(isChrome||isEdge||isOpera)&&(n=StereoAudioRecorder),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&!isChrome&&(n=MediaStreamRecorder),"video"===t.type&&(isChrome||isOpera)&&(n=WhammyRecorder,void 0!==WebAssemblyRecorder&&"undefined"!=typeof ReadableStream&&(n=WebAssemblyRecorder)),"gif"===t.type&&(n=GifRecorder),"canvas"===t.type&&(n=CanvasRecorder),isMediaRecorderCompatible()&&n!==CanvasRecorder&&n!==GifRecorder&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(getTracks(e,"video").length||getTracks(e,"audio").length)&&("audio"===t.type?"function"==typeof MediaRecorder.isTypeSupp
1orted&&MediaRecorder.isTypeSupported("audio/webm")&&(n=MediaStreamRecorder):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(n=MediaStreamRecorder)),e instanceof Array&&e.length&&(n=MultiStreamRecorder),t.recorderType&&(n=t.recorderType),!t.disableLogs&&n&&n.name&&console.log("Using recorderType:",n.name||n.constructor.name),!n&&isSafari&&(n=MediaStreamRecorder),n}function MRecordRTC(e){this.addStream=function(t){t&&(e=t)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var t,n=this.mediaType,o=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof n.audio&&isMediaRecorderCompatible()&&!getTracks(e,"audio").length&&(n.audio=!1),"function"!=typeof n.video&&isMediaRecorderCompatible()&&!getTracks(e,"video").length&&(n.video=!1),"function"!=typeof n.gif&&isMediaRecorderCompatible()&&!getTracks(e,"video").length&&(n.gif=!1),!n.audio&&!n.video&&!n.gif)throw"MediaStream must have either audio or video tracks.";if(n.audio&&(t=null,"function"==typeof n.audio&&(t=n.audio),this.audioRecorder=new RecordRTC(e,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:t,mimeType:o.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),n.video||this.audioRecorder.startRecording()),n.video){t=null,"function"==typeof n.video&&(t=n.video);var r=e;if(isMediaRecorderCompatible()&&n.audio&&"function"==typeof n.audio){var i=getTracks(e,"video")[0];isFirefox?((r=new MediaStream).addTrack(i),t&&t===WhammyRecorder&&(t=MediaStreamRecorder)):(r=new MediaStream).addTrack(i)}this.videoRecorder=new RecordRTC(r,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:t,mimeType:o.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),n.audio||this.videoRecorder.startRecording()}if(n.audio&&n.video){var a=this,s=!0===isMediaRecorderCompatible();n.audio instanceof StereoAudioRecorder&&n.video?s=!1:!0!==n.audio&&!0!==n.video&&n.audio!==n.video&&(s=!1),!0===s?(a.audioRecorder=null,a.videoRecorder.startRecording()):a.videoRecorder.initRecorder(function(){a.audioRecorder.initRecorder(function(){a.videoRecorder.startRecording(),a.audioRecorder.startRecording()})})}n.gif&&(t=null,"function"==typeof n.gif&&(t=n.gif),this.gifRecorder=new RecordRTC(e,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:t,mimeType:o.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(e){e=e||function(){},this.audioRecorder&&this.audioRecorder.stopRecording(function(t){e(t,"audio")}),this.videoRecorder&&this.videoRecorder.stopRecording(function(t){e(t,"video")}),this.gifRecorder&&this.gifRecorder.stopRecording(function(t){e(t,"gif")})},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(e){var t={};return this.audioRecorder&&(t.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(t.video=this.videoRecorder.getBlob()),this.gifRecorder&&(t.gif=this.gifRecorder.getBlob()),e&&e(t),t},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(e){function t(e,t){if("undefined"!=typeof Worker){var n=function(e){var t,n=URL.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),o=new Worker(n);if(void 0!==URL)t=URL;else{if("undefined"==typeof webkitURL)throw"Neither URL nor webkitURL detected.";t=webkitURL}return t.revokeObjectURL(n),o}(function(e){postMessage((new FileReaderSync).readAsDataURL(e))});n.onmessage=function(e){t(e.data)},n.postMessage(e)}else{var o=new FileReader;o.readAsDataURL(e),o.onload=function(e){t(e.target.result)}}}this.getBlob(function(n){n.audio&&n.video?t(n.audio,function(o){t(n.video,function(t){e({audio:o,video:t})})}):n.audio?t(n.audio,function(t){e({audio:t})}):n.video&&t(n.video,function(t){e({video:t})})})},this.writeToDisk=function(){RecordRTC.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(e){(e=e||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof e.audio?e.audio:""),e.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof e.video?e.video:""),e.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof e.gif?e.gif:"")}}!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],t):t(e.bootstrap={},e.jQuery,e.Popper)}(this,function(e,t,n){"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var a,s,c,l,u,d,h,f,p,g,m,v,y,w,b,_,C,T,x=function(e){var t=!1,n={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(t){var n,o=t.getAttribute("data-target");o&&"#"!==o||(o=t.getAttribute("href")||""),"#"===o.charAt(0)&&(n=o,o=n="function"==typeof e.escapeSelector?e.escapeSelector(n).substr(1):n.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1"));try{return e(document).find(o).length>0?o:null}catch(e){return null}},reflow:function(e){return e.offsetHeight}
1,triggerTransitionEnd:function(n){e(n).trigger(t.end)},supportsTransitionEnd:function(){return Boolean(t)},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,o){for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)){var i=o[r],a=t[r],s=a&&n.isElement(a)?"element":{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase();if(!new RegExp(i).test(s))throw new Error(e.toUpperCase()+': Option "'+r+'" provided type "'+s+'" but expected type "'+i+'".')}}};return t=("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"},e.fn.emulateTransitionEnd=function(t){var o=this,r=!1;return e(this).one(n.TRANSITION_END,function(){r=!0}),setTimeout(function(){r||n.triggerTransitionEnd(o)},t),this},n.supportsTransitionEnd()&&(e.event.special[n.TRANSITION_END]={bindType:t.end,delegateType:t.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}),n}(t),S=(l="."+(c="bs.alert"),u=(a=t).fn[s="alert"],d={CLOSE:"close"+l,CLOSED:"closed"+l,CLICK_DATA_API:"click"+l+".data-api"},h=function(){function e(e){this._element=e}var t=e.prototype;return t.close=function(e){var t=this._getRootElement(e=e||this._element);this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},t.dispose=function(){a.removeData(this._element,c),this._element=null},t._getRootElement=function(e){var t=x.getSelectorFromElement(e),n=!1;return t&&(n=a(t)[0]),n||(n=a(e).closest(".alert")[0]),n},t._triggerCloseEvent=function(e){var t=a.Event(d.CLOSE);return a(e).trigger(t),t},t._removeElement=function(e){var t=this;a(e).removeClass("show"),x.supportsTransitionEnd()&&a(e).hasClass("fade")?a(e).one(x.TRANSITION_END,function(n){return t._destroyElement(e,n)}).emulateTransitionEnd(150):this._destroyElement(e)},t._destroyElement=function(e){a(e).detach().trigger(d.CLOSED).remove()},e._jQueryInterface=function(t){return this.each(function(){var n=a(this),o=n.data(c);o||(o=new e(this),n.data(c,o)),"close"===t&&o[t](this)})},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},r(e,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),e}(),a(document).on(d.CLICK_DATA_API,'[data-dismiss="alert"]',h._handleDismiss(new h)),a.fn[s]=h._jQueryInterface,a.fn[s].Constructor=h,a.fn[s].noConflict=function(){return a.fn[s]=u,h._jQueryInterface},h),R=(m="."+(g="bs.button"),y=(f=t).fn[p="button"],w="active",b='[data-toggle^="button"]',_=".btn",C={CLICK_DATA_API:"click"+m+(v=".data-api"),FOCUS_BLUR_DATA_API:"focus"+m+v+" blur"+m+v},T=function(){function e(e){this._element=e}var t=e.prototype;return t.toggle=function(){var e=!0,t=!0,n=f(this._element).closest('[data-toggle="buttons"]')[0];if(n){var o=f(this._element).find("input")[0];if(o){if("radio"===o.type)if(o.checked&&f(this._element).hasClass(w))e=!1;else{var r=f(n).find(".active")[0];r&&f(r).removeClass(w)}if(e){if(o.hasAttribute("disabled")||n.hasAttribute("disabled")||o.classList.contains("disabled")||n.classList.contains("disabled"))return;o.checked=!f(this._element).hasClass(w),f(o).trigger("change")}o.focus(),t=!1}}t&&this._element.setAttribute("aria-pressed",!f(this._element).hasClass(w)),e&&f(this._element).toggleClass(w)},t.dispose=function(){f.removeData(this._element,g),this._element=null},e._jQueryInterface=function(t){return this.each(function(){var n=f(this).data(g);n||(n=new e(this),f(this).data(g,n)),"toggle"===t&&n[t]()})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),e}(),f(document).on(C.CLICK_DATA_API,b,function(e){e.preventDefault();var t=e.target;f(t).hasClass("btn")||(t=f(t).closest(_)),T._jQueryInterface.call(f(t),"toggle")}).on(C.FOCUS_BLUR_DATA_API,b,function(e){var t=f(e.target).closest(_)[0];f(t).toggleClass("focus",/^focus(in)?$/.test(e.type))}),f.fn[p]=T._jQueryInterface,f.fn[p].Constructor=T,f.fn[p].noConflict=function(){return f.fn[p]=y,T._jQueryInterface},T),E=function(e){var t="carousel",n="bs.carousel",o="."+n,a=e.fn[t],s={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},c={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},l="next",u="prev",d={SLIDE:"slide"+o,SLID:"slid"+o,KEYDOWN:"keydown"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o,TOUCHEND:"touchend"+o,LOAD_DATA_API:"load"+o+".data-api",CLICK_DATA_API:"click"+o+".data-api"},h="active",f={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-sli
1de], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},p=function(){function a(t,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=e(t)[0],this._indicatorsElement=e(this._element).find(f.INDICATORS)[0],this._addEventListeners()}var p=a.prototype;return p.next=function(){this._isSliding||this._slide(l)},p.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},p.prev=function(){this._isSliding||this._slide(u)},p.pause=function(t){t||(this._isPaused=!0),e(this._element).find(f.NEXT_PREV)[0]&&x.supportsTransitionEnd()&&(x.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},p.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},p.to=function(t){var n=this;this._activeElement=e(this._element).find(f.ACTIVE_ITEM)[0];var o=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one(d.SLID,function(){return n.to(t)});else{if(o===t)return this.pause(),void this.cycle();this._slide(t>o?l:u,this._items[t])}},p.dispose=function(){e(this._element).off(o),e.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},p._getConfig=function(e){return e=i({},s,e),x.typeCheckConfig(t,e,c),e},p._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(d.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(e(this._element).on(d.MOUSEENTER,function(e){return t.pause(e)}).on(d.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&e(this._element).on(d.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval)}))},p._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next()}},p._getItemIndex=function(t){return this._items=e.makeArray(e(t).parent().find(f.ITEM)),this._items.indexOf(t)},p._getItemByDirection=function(e,t){var n=e===l,o=e===u,r=this._getItemIndex(t);if((o&&0===r||n&&r===this._items.length-1)&&!this._config.wrap)return t;var i=(r+(e===u?-1:1))%this._items.length;return-1===i?this._items[this._items.length-1]:this._items[i]},p._triggerSlideEvent=function(t,n){var o=this._getItemIndex(t),r=this._getItemIndex(e(this._element).find(f.ACTIVE_ITEM)[0]),i=e.Event(d.SLIDE,{relatedTarget:t,direction:n,from:r,to:o});return e(this._element).trigger(i),i},p._setActiveIndicatorElement=function(t){if(this._indicatorsElement){e(this._indicatorsElement).find(f.ACTIVE).removeClass(h);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&e(n).addClass(h)}},p._slide=function(t,n){var o,r,i,a=this,s=e(this._element).find(f.ACTIVE_ITEM)[0],c=this._getItemIndex(s),u=n||s&&this._getItemByDirection(t,s),p=this._getItemIndex(u),g=Boolean(this._interval);if(t===l?(o="carousel-item-left",r="carousel-item-next",i="left"):(o="carousel-item-right",r="carousel-item-prev",i="right"),u&&e(u).hasClass(h))this._isSliding=!1;else if(!this._triggerSlideEvent(u,i).isDefaultPrevented()&&s&&u){this._isSliding=!0,g&&this.pause(),this._setActiveIndicatorElement(u);var m=e.Event(d.SLID,{relatedTarget:u,direction:i,from:c,to:p});x.supportsTransitionEnd()&&e(this._element).hasClass("slide")?(e(u).addClass(r),x.reflow(u),e(s).addClass(o),e(u).addClass(o),e(s).one(x.TRANSITION_END,function(){e(u).removeClass(o+" "+r).addClass(h),e(s).removeClass(h+" "+r+" "+o),a._isSliding=!1,setTimeout(function(){return e(a._element).trigger(m)},0)}).emulateTransitionEnd(600)):(e(s).removeClass(h),e(u).addClass(h),this._isSliding=!1,e(this._element).trigger(m)),g&&this.cycle()}},a._jQueryInterface=function(t){return this.each(function(){var o=e(this).data(n),r=i({},s,e(this).data());"object"==typeof t&&(r=i({},r,t));var c="string"==typeof t?t:r.slide;if(o||(o=new a(this,r),e(this).data(n,o)),"number"==typeof t)o.to(t);else if("string"==typeof c){if(void 0===o[c])throw new TypeError('No method n
1amed "'+c+'"');o[c]()}else r.interval&&(o.pause(),o.cycle())})},a._dataApiClickHandler=function(t){var o=x.getSelectorFromElement(this);if(o){var r=e(o)[0];if(r&&e(r).hasClass("carousel")){var s=i({},e(r).data(),e(this).data()),c=this.getAttribute("data-slide-to");c&&(s.interval=!1),a._jQueryInterface.call(e(r),s),c&&e(r).data(n).to(c),t.preventDefault()}}},r(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return s}}]),a}();return e(document).on(d.CLICK_DATA_API,f.DATA_SLIDE,p._dataApiClickHandler),e(window).on(d.LOAD_DATA_API,function(){e(f.DATA_RIDE).each(function(){var t=e(this);p._jQueryInterface.call(t,t.data())})}),e.fn[t]=p._jQueryInterface,e.fn[t].Constructor=p,e.fn[t].noConflict=function(){return e.fn[t]=a,p._jQueryInterface},p}(t),A=function(e){var t="collapse",n="bs.collapse",o="."+n,a=e.fn[t],s={toggle:!0,parent:""},c={toggle:"boolean",parent:"(string|element)"},l={SHOW:"show"+o,SHOWN:"shown"+o,HIDE:"hide"+o,HIDDEN:"hidden"+o,CLICK_DATA_API:"click"+o+".data-api"},u="show",d="collapse",h="collapsing",f="collapsed",p="width",g={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function o(t,n){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(n),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var o=e(g.DATA_TOGGLE),r=0;r<o.length;r++){var i=o[r],a=x.getSelectorFromElement(i);null!==a&&e(a).filter(t).length>0&&(this._selector=a,this._triggerArray.push(i))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var a=o.prototype;return a.toggle=function(){e(this._element).hasClass(u)?this.hide():this.show()},a.show=function(){var t,r,i=this;if(!(this._isTransitioning||e(this._element).hasClass(u)||(this._parent&&0===(t=e.makeArray(e(this._parent).find(g.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(t=null),t&&(r=e(t).not(this._selector).data(n))&&r._isTransitioning))){var a=e.Event(l.SHOW);if(e(this._element).trigger(a),!a.isDefaultPrevented()){t&&(o._jQueryInterface.call(e(t).not(this._selector),"hide"),r||e(t).data(n,null));var s=this._getDimension();e(this._element).removeClass(d).addClass(h),this._element.style[s]=0,this._triggerArray.length>0&&e(this._triggerArray).removeClass(f).attr("aria-expanded",!0),this.setTransitioning(!0);var c=function(){e(i._element).removeClass(h).addClass(d).addClass(u),i._element.style[s]="",i.setTransitioning(!1),e(i._element).trigger(l.SHOWN)};if(x.supportsTransitionEnd()){var p="scroll"+(s[0].toUpperCase()+s.slice(1));e(this._element).one(x.TRANSITION_END,c).emulateTransitionEnd(600),this._element.style[s]=this._element[p]+"px"}else c()}}},a.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(u)){var n=e.Event(l.HIDE);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var o=this._getDimension();if(this._element.style[o]=this._element.getBoundingClientRect()[o]+"px",x.reflow(this._element),e(this._element).addClass(h).removeClass(d).removeClass(u),this._triggerArray.length>0)for(var r=0;r<this._triggerArray.length;r++){var i=this._triggerArray[r],a=x.getSelectorFromElement(i);null!==a&&(e(a).hasClass(u)||e(i).addClass(f).attr("aria-expanded",!1))}this.setTransitioning(!0);var s=function(){t.setTransitioning(!1),e(t._element).removeClass(h).addClass(d).trigger(l.HIDDEN)};this._element.style[o]="",x.supportsTransitionEnd()?e(this._element).one(x.TRANSITION_END,s).emulateTransitionEnd(600):s()}}},a.setTransitioning=function(e){this._isTransitioning=e},a.dispose=function(){e.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},a._getConfig=function(e){return(e=i({},s,e)).toggle=Boolean(e.toggle),x.typeCheckConfig(t,e,c),e},a._getDimension=function(){return e(this._element).hasClass(p)?p:"height"},a._getParent=function(){var t=this,n=null;x.isElement(this._config.parent)?(n=this._config.parent,void 0!==this._config.parent.jquery&&(n=this._config.parent[0])):n=e(this._config.parent)[0];var r='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return e(n).find(r).each(function(e,n){t._addAriaAndCollapsedClass(o._getTargetFromElement(n),[n])}),n},a._addAriaAndCollapsedClass=function(t,n){if(t){var o=e(t).hasClass(u);n.length>0&&e(n).toggleClass(f,!o).attr("aria-expanded",o)}},o._getTargetFromElement=function(t){var n=x.getSelectorFromElement(t);return n?e(n)[0]:null},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n),c=i({},s,r.data(),"object"==typeof t&&t);
1if(!a&&c.toggle&&/show|hide/.test(t)&&(c.toggle=!1),a||(a=new o(this,c),r.data(n,a)),"string"==typeof t){if(void 0===a[t])throw new TypeError('No method named "'+t+'"');a[t]()}})},r(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return s}}]),o}();return e(document).on(l.CLICK_DATA_API,g.DATA_TOGGLE,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var o=e(this),r=x.getSelectorFromElement(this);e(r).each(function(){var t=e(this),r=t.data(n)?"toggle":o.data();m._jQueryInterface.call(t,r)})}),e.fn[t]=m._jQueryInterface,e.fn[t].Constructor=m,e.fn[t].noConflict=function(){return e.fn[t]=a,m._jQueryInterface},m}(t),k=function(e){var t="dropdown",o="bs.dropdown",a="."+o,s=".data-api",c=e.fn[t],l=new RegExp("38|40|27"),u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+s,KEYDOWN_DATA_API:"keydown"+a+s,KEYUP_DATA_API:"keyup"+a+s},d="disabled",h="show",f="dropup",p="dropdown-menu-right",g='[data-toggle="dropdown"]',m=".dropdown-menu",v={offset:0,flip:!0,boundary:"scrollParent"},y={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},w=function(){function s(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var c=s.prototype;return c.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass(d)){var t=s._getParentFromElement(this._element),o=e(this._menu).hasClass(h);if(s._clearMenus(),!o){var r={relatedTarget:this._element},i=e.Event(u.SHOW,r);if(e(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if(void 0===n)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var a=this._element;e(t).hasClass(f)&&(e(this._menu).hasClass("dropdown-menu-left")||e(this._menu).hasClass(p))&&(a=t),"scrollParent"!==this._config.boundary&&e(t).addClass("position-static"),this._popper=new n(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===e(t).closest(".navbar-nav").length&&e("body").children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass(h),e(t).toggleClass(h).trigger(e.Event(u.SHOWN,r))}}}},c.dispose=function(){e.removeData(this._element,o),e(this._element).off(a),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},c.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},c._addEventListeners=function(){var t=this;e(this._element).on(u.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},c._getConfig=function(n){return n=i({},this.constructor.Default,e(this._element).data(),n),x.typeCheckConfig(t,n,this.constructor.DefaultType),n},c._getMenuElement=function(){if(!this._menu){var t=s._getParentFromElement(this._element);this._menu=e(t).find(m)[0]}return this._menu},c._getPlacement=function(){var t=e(this._element).parent(),n="bottom-start";return t.hasClass(f)?(n="top-start",e(this._menu).hasClass(p)&&(n="top-end")):t.hasClass("dropright")?n="right-start":t.hasClass("dropleft")?n="left-start":e(this._menu).hasClass(p)&&(n="bottom-end"),n},c._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},c._getPopperConfig=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=i({},t.offsets,e._config.offset(t.offsets)||{}),t}:t.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:t,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},s._jQueryInterface=function(t){return this.each(function(){var n=e(this).data(o);if(n||(n=new s(this,"object"==typeof t?t:null),e(this).data(o,n)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},s._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var n=e.makeArray(e(g)),r=0;r<n.length;r++){var i=s._getParentFromElement(n[r]),a=e(n[r]).data(o),c={relatedTarget:n[r]};if(a){var l=a._menu;if(e(i).hasClass(h)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&e.contains(i,t.target))){var d=e.Event(u.HIDE,c);e(i).trigger(d),d.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),n[r].setAttribute("aria-expanded","fal
1se"),e(l).removeClass(h),e(i).removeClass(h).trigger(e.Event(u.HIDDEN,c)))}}}},s._getParentFromElement=function(t){var n,o=x.getSelectorFromElement(t);return o&&(n=e(o)[0]),n||t.parentNode},s._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||e(t.target).closest(m).length)):l.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!e(this).hasClass(d))){var n=s._getParentFromElement(this),o=e(n).hasClass(h);if((o||27===t.which&&32===t.which)&&(!o||27!==t.which&&32!==t.which)){var r=e(n).find(".dropdown-menu .dropdown-item:not(.disabled)").get();if(0!==r.length){var i=r.indexOf(t.target);38===t.which&&i>0&&i--,40===t.which&&i<r.length-1&&i++,i<0&&(i=0),r[i].focus()}}else{if(27===t.which){var a=e(n).find(g)[0];e(a).trigger("focus")}e(this).trigger("click")}}},r(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return v}},{key:"DefaultType",get:function(){return y}}]),s}();return e(document).on(u.KEYDOWN_DATA_API,g,w._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,m,w._dataApiKeydownHandler).on(u.CLICK_DATA_API+" "+u.KEYUP_DATA_API,w._clearMenus).on(u.CLICK_DATA_API,g,function(t){t.preventDefault(),t.stopPropagation(),w._jQueryInterface.call(e(this),"toggle")}).on(u.CLICK_DATA_API,".dropdown form",function(e){e.stopPropagation()}),e.fn[t]=w._jQueryInterface,e.fn[t].Constructor=w,e.fn[t].noConflict=function(){return e.fn[t]=c,w._jQueryInterface},w}(t),D=function(e){var t="bs.modal",n="."+t,o=e.fn.modal,a={backdrop:!0,keyboard:!0,focus:!0,show:!0},s={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},c={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,FOCUSIN:"focusin"+n,RESIZE:"resize"+n,CLICK_DISMISS:"click.dismiss"+n,KEYDOWN_DISMISS:"keydown.dismiss"+n,MOUSEUP_DISMISS:"mouseup.dismiss"+n,MOUSEDOWN_DISMISS:"mousedown.dismiss"+n,CLICK_DATA_API:"click"+n+".data-api"},l="modal-open",u="fade",d="show",h={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},f=function(){function o(t,n){this._config=this._getConfig(n),this._element=t,this._dialog=e(t).find(h.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var f=o.prototype;return f.toggle=function(e){return this._isShown?this.hide():this.show(e)},f.show=function(t){var n=this;if(!this._isTransitioning&&!this._isShown){x.supportsTransitionEnd()&&e(this._element).hasClass(u)&&(this._isTransitioning=!0);var o=e.Event(c.SHOW,{relatedTarget:t});e(this._element).trigger(o),this._isShown||o.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),e(document.body).addClass(l),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on(c.CLICK_DISMISS,h.DATA_DISMISS,function(e){return n.hide(e)}),e(this._dialog).on(c.MOUSEDOWN_DISMISS,function(){e(n._element).one(c.MOUSEUP_DISMISS,function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(t)}))}},f.hide=function(t){var n=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var o=e.Event(c.HIDE);if(e(this._element).trigger(o),this._isShown&&!o.isDefaultPrevented()){this._isShown=!1;var r=x.supportsTransitionEnd()&&e(this._element).hasClass(u);r&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off(c.FOCUSIN),e(this._element).removeClass(d),e(this._element).off(c.CLICK_DISMISS),e(this._dialog).off(c.MOUSEDOWN_DISMISS),r?e(this._element).one(x.TRANSITION_END,function(e){return n._hideModal(e)}).emulateTransitionEnd(300):this._hideModal()}}},f.dispose=function(){e.removeData(this._element,t),e(window,document,this._element,this._backdrop).off(n),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},f.handleUpdate=function(){this._adjustDialog()},f._getConfig=function(e){return e=i({},a,e),x.typeCheckConfig("modal",e,s),e},f._showElement=function(t){var n=this,o=x.supportsTransitionEnd()&&e(this._element).hasClass(u);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,o&&x.reflow(this._element),e(this._element).addClass(d),this._config.focus&&this._enforceFocus();var r=e.Event(c.SHOWN,{relatedTarget:t}),i=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(r)};o?e(this._dialog).one(x.TRANSITION_END,i).emulateTransitionEnd(300):i()},f._enforceFocus=function(){var t=this;e(document).off(c.FOCUSIN).on(c.FOCUSIN,function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()})},f._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?e(this._element).on(c.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||e(this._element).off(c.KEYDOWN_DISMISS)},f._setResizeEvent=function(){var t=this;this._isShown?e(window).on(c.RESIZE,function(e){return t.handleUpdate(e)}):e(window).off(c.RESIZE)},f._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){e(document.body).removeClass(l),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger(c.HIDDEN)})},f._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},f._showBackdrop=function(t){var n=this,o=e(this._element).hasClass(u)?u:"";if(this._isShown&&this._config.backdrop){var r=x.supportsTransitionEnd()&&o;if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",o&&e(this._backdrop).addClass(o),e(this._backdrop).appendTo(document.body),e(this._element).on(c.CLICK_DISMISS,function(e){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),r&&x.reflow(this._backdrop),e(this._backdrop).addClass(d),!t)return;if(!r)return void t();e(this._backdrop).one(x.TRANSITION_END,t).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass(d);var i=function(){n._removeBackdrop(),t&&t()};x.supportsTransitionEnd()&&e(this._element).hasClass(u)?e(this._backdrop).one(x.TRANSITION_END,i).emulateTransitionEnd(150):i()}else t&&t()},f._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},f._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},f._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=e.left+e.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},f._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){e(h.FIXED_CONTENT).each(function(n,o){var r=e(o)[0].style.paddingRight,i=e(o).css("padding-right");e(o).data("padding-right",r).css("padding-right",parseFloat(i)+t._scrollbarWidth+"px")}),e(h.STICKY_CONTENT).each(function(n,o){var r=e(o)[0].style.marginRight,i=e(o).css("margin-right");e(o).data("margin-right",r).css("margin-right",parseFloat(i)-t._scrollbarWidth+"px")}),e(h.NAVBAR_TOGGLER).each(function(n,o){var r=e(o)[0].style.marginRight,i=e(o).css("margin-right");e(o).data("margin-right",r).css("margin-right",parseFloat(i)+t._scrollbarWidth+"px")});var n=document.body.style.paddingRight,o=e("body").css("padding-right");e("body").data("padding-right",n).css("padding-right",parseFloat(o)+this._scrollbarWidth+"px")}},f._resetScrollbar=function(){e(h.FIXED_CONTENT).each(function(t,n){var o=e(n).data("padding-right");void 0!==o&&e(n).css("padding-right",o).removeData("padding-right")}),e(h.STICKY_CONTENT+", "+h.NAVBAR_TOGGLER).each(function(t,n){var o=e(n).data("margin-right");void 0!==o&&e(n).css("margin-right",o).removeData("margin-right")});var t=e("body").data("padding-right");void 0!==t&&e("body").css("padding-right",t).removeData("padding-right")},f._getScrollbarWidth=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},o._jQueryInterface=function(n,r){return this.each(function(){var a=e(this).data(t),s=i({},o.Default,e(this).data(),"object"==typeof n&&n);if(a||(a=new o(this,s),e(this).data(t,a)),"string"==typeof n){if(void 0===a[n])throw new TypeError('No method n
1amed "'+n+'"');a[n](r)}else s.show&&a.show(r)})},r(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return e(document).on(c.CLICK_DATA_API,h.DATA_TOGGLE,function(n){var o,r=this,a=x.getSelectorFromElement(this);a&&(o=e(a)[0]);var s=e(o).data(t)?"toggle":i({},e(o).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();var l=e(o).one(c.SHOW,function(t){t.isDefaultPrevented()||l.one(c.HIDDEN,function(){e(r).is(":visible")&&r.focus()})});f._jQueryInterface.call(e(o),s,this)}),e.fn.modal=f._jQueryInterface,e.fn.modal.Constructor=f,e.fn.modal.noConflict=function(){return e.fn.modal=o,f._jQueryInterface},f}(t),I=function(e){var t="tooltip",o="bs.tooltip",a="."+o,s=e.fn[t],c=new RegExp("(^|\\s)bs-tooltip\\S+","g"),l={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},u={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},d={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},h="show",f="out",p={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,INSERTED:"inserted"+a,CLICK:"click"+a,FOCUSIN:"focusin"+a,FOCUSOUT:"focusout"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a},g="fade",m="show",v="hover",y="focus",w=function(){function s(e,t){if(void 0===n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var w=s.prototype;return w.enable=function(){this._isEnabled=!0},w.disable=function(){this._isEnabled=!1},w.toggleEnabled=function(){this._isEnabled=!this._isEnabled},w.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,o=e(t.currentTarget).data(n);o||(o=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,o)),o._activeTrigger.click=!o._activeTrigger.click,o._isWithActiveTrigger()?o._enter(null,o):o._leave(null,o)}else{if(e(this.getTipElement()).hasClass(m))return void this._leave(null,this);this._enter(null,this)}},w.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},w.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var o=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(o);var r=e.contains(this.element.ownerDocument.documentElement,this.element);if(o.isDefaultPrevented()||!r)return;var i=this.getTipElement(),a=x.getUID(this.constructor.NAME);i.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&e(i).addClass(g);var c="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,l=this._getAttachment(c);this.addAttachmentClass(l);var u=!1===this.config.container?document.body:e(this.config.container);e(i).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(i).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,i,{placement:l,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"}
1,preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){t._handlePopperPlacementChange(e)}}),e(i).addClass(m),"ontouchstart"in document.documentElement&&e("body").children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),n===f&&t._leave(null,t)};x.supportsTransitionEnd()&&e(this.tip).hasClass(g)?e(this.tip).one(x.TRANSITION_END,d).emulateTransitionEnd(s._TRANSITION_DURATION):d()}},w.hide=function(t){var n=this,o=this.getTipElement(),r=e.Event(this.constructor.Event.HIDE),i=function(){n._hoverState!==h&&o.parentNode&&o.parentNode.removeChild(o),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};e(this.element).trigger(r),r.isDefaultPrevented()||(e(o).removeClass(m),"ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger[y]=!1,this._activeTrigger[v]=!1,x.supportsTransitionEnd()&&e(this.tip).hasClass(g)?e(o).one(x.TRANSITION_END,i).emulateTransitionEnd(150):i(),this._hoverState="")},w.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},w.isWithContent=function(){return Boolean(this.getTitle())},w.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},w.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},w.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".tooltip-inner"),this.getTitle()),t.removeClass(g+" "+m)},w.setElementContent=function(t,n){var o=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?o?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text()):t[o?"html":"text"](n)},w.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},w._getAttachment=function(e){return u[e.toUpperCase()]},w._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if("manual"!==n){var o=n===v?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,r=n===v?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(o,t.config.selector,function(e){return t._enter(e)}).on(r,t.config.selector,function(e){return t._leave(e)})}e(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})}),this.config.selector?this.config=i({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},w._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},w._enter=function(t,n){var o=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(o))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(o,n)),t&&(n._activeTrigger["focusin"===t.type?y:v]=!0),e(n.getTipElement()).hasClass(m)||n._hoverState===h?n._hoverState=h:(clearTimeout(n._timeout),n._hoverState=h,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===h&&n.show()},n.config.delay.show):n.show())},w._leave=function(t,n){var o=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(o))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(o,n)),t&&(n._activeTrigger["focusout"===t.type?y:v]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===f&&n.hide()},n.config.delay.hide):n.hide())},w._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},w._getConfig=function(n){return"number"==typeof(n=i({},this.constructor.Default,e(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),x.typeCheckConfig(t,n,this.constructor.DefaultType),n},w._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},w._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(c);null!==n&&n.length>0&&t.removeClass(n.join(""))},w._handlePopperPlacementChange=function(e){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},w._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(g),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},s._jQueryInterface=function(t){return this.each(function(){var n=e(this).data(o),r
1="object"==typeof t&&t;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,r),e(this).data(o,n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},r(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return o}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return a}},{key:"DefaultType",get:function(){return l}}]),s}();return e.fn[t]=w._jQueryInterface,e.fn[t].Constructor=w,e.fn[t].noConflict=function(){return e.fn[t]=s,w._jQueryInterface},w}(t),M=function(e){var t="popover",n="bs.popover",o="."+n,a=e.fn[t],s=new RegExp("(^|\\s)bs-popover\\S+","g"),c=i({},I.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),l=i({},I.DefaultType,{content:"(string|element|function)"}),u={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},d=function(i){var a,d;function h(){return i.apply(this,arguments)||this}d=i,(a=h).prototype=Object.create(d.prototype),a.prototype.constructor=a,a.__proto__=d;var f=h.prototype;return f.isWithContent=function(){return this.getTitle()||this._getContent()},f.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},f.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},f.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},f._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},f._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(s);null!==n&&n.length>0&&t.removeClass(n.join(""))},h._jQueryInterface=function(t){return this.each(function(){var o=e(this).data(n),r="object"==typeof t?t:null;if((o||!/destroy|hide/.test(t))&&(o||(o=new h(this,r),e(this).data(n,o)),"string"==typeof t)){if(void 0===o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},r(h,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return c}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return u}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return l}}]),h}(I);return e.fn[t]=d._jQueryInterface,e.fn[t].Constructor=d,e.fn[t].noConflict=function(){return e.fn[t]=a,d._jQueryInterface},d}(t),N=function(e){var t="scrollspy",n="bs.scrollspy",o="."+n,a=e.fn[t],s={offset:10,method:"auto",target:""},c={offset:"number",method:"string",target:"(string|element)"},l={ACTIVATE:"activate"+o,SCROLL:"scroll"+o,LOAD_DATA_API:"load"+o+".data-api"},u="active",d={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},h="position",f=function(){function a(t,n){var o=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" "+d.NAV_LINKS+","+this._config.target+" "+d.LIST_ITEMS+","+this._config.target+" "+d.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(l.SCROLL,function(e){return o._process(e)}),this.refresh(),this._process()}var f=a.prototype;return f.refresh=function(){var t=this,n="auto"===this._config.method?this._scrollElement===this._scrollElement.window?"offset":h:this._config.method,o=n===h?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),e.makeArray(e(this._selector)).map(function(t){var r,i=x.getSelectorFromElement(t);if(i&&(r=e(i)[0]),r){var a=r.getBoundingClientRect();if(a.width||a.height)return[e(r)[n]().top+o,i]}return null}).filter(function(e){return e}).sort(function(e,t){return e[0]-t[0]}
1).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},f.dispose=function(){e.removeData(this._element,n),e(this._scrollElement).off(o),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},f._getConfig=function(n){if("string"!=typeof(n=i({},s,n)).target){var o=e(n.target).attr("id");o||(o=x.getUID(t),e(n.target).attr("id",o)),n.target="#"+o}return x.typeCheckConfig(t,n,c),n},f._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},f._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},f._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},f._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=n){var o=this._targets[this._targets.length-1];this._activeTarget!==o&&this._activate(o)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&e>=this._offsets[r]&&(void 0===this._offsets[r+1]||e<this._offsets[r+1])&&this._activate(this._targets[r])}},f._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",");n=n.map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'});var o=e(n.join(","));o.hasClass("dropdown-item")?(o.closest(d.DROPDOWN).find(d.DROPDOWN_TOGGLE).addClass(u),o.addClass(u)):(o.addClass(u),o.parents(d.NAV_LIST_GROUP).prev(d.NAV_LINKS+", "+d.LIST_ITEMS).addClass(u),o.parents(d.NAV_LIST_GROUP).prev(d.NAV_ITEMS).children(d.NAV_LINKS).addClass(u)),e(this._scrollElement).trigger(l.ACTIVATE,{relatedTarget:t})},f._clear=function(){e(this._selector).filter(d.ACTIVE).removeClass(u)},a._jQueryInterface=function(t){return this.each(function(){var o=e(this).data(n);if(o||(o=new a(this,"object"==typeof t&&t),e(this).data(n,o)),"string"==typeof t){if(void 0===o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},r(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return s}}]),a}();return e(window).on(l.LOAD_DATA_API,function(){for(var t=e.makeArray(e(d.DATA_SPY)),n=t.length;n--;){var o=e(t[n]);f._jQueryInterface.call(o,o.data())}}),e.fn[t]=f._jQueryInterface,e.fn[t].Constructor=f,e.fn[t].noConflict=function(){return e.fn[t]=a,f._jQueryInterface},f}(t),O=function(e){var t="bs.tab",n="."+t,o=e.fn.tab,i={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,CLICK_DATA_API:"click.bs.tab.data-api"},a="active",s="show",c=".active",l="> li > .active",u=function(){function n(e){this._element=e}var o=n.prototype;return o.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(a)||e(this._element).hasClass("disabled"))){var n,o,r=e(this._element).closest(".nav, .list-group")[0],s=x.getSelectorFromElement(this._element);if(r){var u="UL"===r.nodeName?l:c;o=(o=e.makeArray(e(r).find(u)))[o.length-1]}var d=e.Event(i.HIDE,{relatedTarget:this._element}),h=e.Event(i.SHOW,{relatedTarget:o});if(o&&e(o).trigger(d),e(this._element).trigger(h),!h.isDefaultPrevented()&&!d.isDefaultPrevented()){s&&(n=e(s)[0]),this._activate(this._element,r);var f=function(){var n=e.Event(i.HIDDEN,{relatedTarget:t._element}),r=e.Event(i.SHOWN,{relatedTarget:o});e(o).trigger(n),e(t._element).trigger(r)};n?this._activate(n,n.parentNode,f):f()}}},o.dispose=function(){e.removeData(this._element,t),this._element=null},o._activate=function(t,n,o){var r=this,i=("UL"===n.nodeName?e(n).find(l):e(n).children(c))[0],a=o&&x.supportsTransitionEnd()&&i&&e(i).hasClass("fade"),s=function(){return r._transitionComplete(t,i,o)};i&&a?e(i).one(x.TRANSITION_END,s).emulateTransitionEnd(150):s()},o._transitionComplete=function(t,n,o){if(n){e(n).removeClass(s+" "+a);var r=e(n.parentNode).find("> .dropdown-menu .active")[0];r&&e(r).removeClass(a),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass(a),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),x.reflow(t),e(t).addClass(s),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var i=e(t).closest(".dropdown")[0];i&&e(i).find(".dropdown-toggle").addClass(a),t.setAttribute("aria-expanded",!0)}o&&o()},n._jQueryInterface=function(o){return this.each(function(){var r=e(this),i=r.data(t);
1if(i||(i=new n(this),r.data(t,i)),"string"==typeof o){if(void 0===i[o])throw new TypeError('No method named "'+o+'"');i[o]()}})},r(n,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),n}();return e(document).on(i.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(t){t.preventDefault(),u._jQueryInterface.call(e(this),"show")}),e.fn.tab=u._jQueryInterface,e.fn.tab.Constructor=u,e.fn.tab.noConflict=function(){return e.fn.tab=o,u._jQueryInterface},u}(t);!function(e){if(void 0===e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(t),e.Util=x,e.Alert=S,e.Button=R,e.Carousel=E,e.Collapse=A,e.Dropdown=k,e.Modal=D,e.Popover=M,e.Scrollspy=N,e.Tab=O,e.Tooltip=I,Object.defineProperty(e,"__esModule",{value:!0})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Popper=t()}(this,function(){"use strict";function e(e){return e&&"[object Function]"==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function n(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function o(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var r=t(e);return/(auto|scroll)/.test(r.overflow+r.overflowY+r.overflowX)?e:o(n(e))}function r(e){var n=e&&e.offsetParent,o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TD","TABLE"].indexOf(n.nodeName)&&"static"===t(n,"position")?r(n):n:window.document.documentElement}function i(e){return null===e.parentNode?e:i(e.parentNode)}function a(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,s=n?t:e,c=document.createRange();c.setStart(o,0),c.setEnd(s,0);var l=c.commonAncestorContainer;if(e!==l&&t!==l||o.contains(s))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||r(e.firstElementChild)===e)}(l)?l:r(l);var u=i(e);return u.host?a(u.host,t):a(e,i(t).host)}function s(e){var t="top"===(1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var o=window.document.documentElement;return(window.document.scrollingElement||o)[t]}return e[t]}function c(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=s(t,"top"),r=s(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function l(e,t){var n="x"===t?"Left":"Top",o="Left"==n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+o+"Width"].split("px")[0]}function u(e,t,n,o){return O(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],q()?n["offset"+e]+o["margin"+("Height"===e?"Top":"Left")]+o["margin"+("Height"===e?"Bottom":"Right")]:0)}function d(){var e=window.document.body,t=window.document.documentElement,n=q()&&window.getComputedStyle(t);return{height:u("Height",e,t,n),width:u("Width",e,t,n)}}function h(e){return V({},e,{right:e.left+e.width,bottom:e.top+e.height})}function f(e){var n={};if(q())try{n=e.getBoundingClientRect();var o=s(e,"top"),r=s(e,"left");n.top+=o,n.left+=r,n.bottom+=o,n.right+=r}catch(e){}else n=e.getBoundingClientRect();var i={left:n.left,top:n.top,width:n.right-n.left,height:n.bottom-n.top},a="HTML"===e.nodeName?d():{},c=e.offsetWidth-(a.width||e.clientWidth||i.right-i.left),u=e.offsetHeight-(a.height||e.clientHeight||i.bottom-i.top);if(c||u){var f=t(e);c-=l(f,"x"),u-=l(f,"y"),i.width-=c,i.height-=u}return h(i)}function p(e,n){var r=q(),i="HTML"===n.nodeName,a=f(e),s=f(n),l=o(e),u=t(n),d=+u.borderTopWidth.split("px")[0],p=+u.borderLeftWidth.split("px")[0],g=h({top:a.top-s.top-d,left:a.left-s.left-p,width:a.width,height:a.height});if(g.marginTop=0,g.marginLeft=0,!r&&i){var m=+u.marginTop.split("px")[0],v=+u.marginLeft.split("px")[0];g.top-=d-m,g.bottom-=d-m,g.left-=p-v,g.right-=p-v,g.marginTop=m,g.marginLeft=v}return(r?n.contains(l):n===l&&"BODY"!==l.nodeName)&&(g=c(g,n)),g}function g(e){var t=window.document.documentElement,n=p(e,t),o=O(t.clientWidth,window.innerWidth||0),r=O(t.clientHeight,window.innerHeight||0),i=s(t),a=s(t,"left");
1return h({top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:o,height:r})}function m(e){var o=e.nodeName;return"BODY"!==o&&"HTML"!==o&&("fixed"===t(e,"position")||m(n(e)))}function v(e,t,r,i){var s={top:0,left:0},c=a(e,t);if("viewport"===i)s=g(c);else{var l;"scrollParent"===i?"BODY"===(l=o(n(e))).nodeName&&(l=window.document.documentElement):l="window"===i?window.document.documentElement:i;var u=p(l,c);if("HTML"!==l.nodeName||m(c))s=u;else{var h=d(),f=h.height,v=h.width;s.top+=u.top-u.marginTop,s.bottom=f+u.top,s.left+=u.left-u.marginLeft,s.right=v+u.left}}return s.left+=r,s.top+=r,s.right-=r,s.bottom-=r,s}function y(e){return e.width*e.height}function w(e,t,n,o,r){var i=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=v(n,o,i,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map(function(e){return V({key:e},s[e],{area:y(s[e])})}).sort(function(e,t){return t.area-e.area}),l=c.filter(function(e){return e.width>=n.clientWidth&&e.height>=n.clientHeight}),u=0<l.length?l[0].key:c[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function b(e,t,n){return p(n,a(t,n))}function _(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function C(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function T(e,t,n){n=n.split("-")[0];var o=_(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",c=i?"height":"width",l=i?"width":"height";return r[a]=t[a]+t[c]/2-o[c]/2,r[s]=n===s?t[s]-o[l]:t[C(s)],r}function x(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function S(t,n,o){return(void 0===o?t:t.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var o=x(e,function(e){return e[t]===n});return e.indexOf(o)}(t,"name",o))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var o=t.function||t.fn;t.enabled&&e(o)&&(n.offsets.popper=h(n.offsets.popper),n.offsets.reference=h(n.offsets.reference),n=o(n,t))}),n}function R(e,t){return e.some(function(e){return e.enabled&&e.name===t})}function E(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length-1;o++){var r=t[o],i=r?""+r+n:e;if(void 0!==window.document.body.style[i])return i}return null}function A(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function k(e,t){Object.keys(t).forEach(function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&A(t[n])&&(o="px"),e.style[n]=t[n]+o})}function D(e,t,n){var o=x(e,function(e){return e.name===t}),r=!!o&&e.some(function(e){return e.name===n&&e.enabled&&e.order<o.order});if(!r){var i="`"+t+"`";console.warn("`"+n+"` modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}function I(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=X.indexOf(e),o=X.slice(n+1).concat(X.slice(0,n));return t?o.reverse():o}for(var M=Math.min,N=Math.floor,O=Math.max,L=["native code","[object MutationObserverConstructor]"],P="undefined"!=typeof window,F=["Edge","Trident","Firefox"],j=0,B=0;B<F.length;B+=1)if(P&&0<=navigator.userAgent.indexOf(F[B])){j=1;break}var U,H=P&&function(e){return L.some(function(t){return-1<(e||"").toString().indexOf(t)})}(window.MutationObserver)?function(e){var t=!1,n=0,o=document.createElement("span");return new MutationObserver(function(){e(),t=!1}).observe(o,{attributes:!0}),function(){t||(t=!0,o.setAttribute("x-index",n),++n)}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},j))}},q=function(){return null==U&&(U=-1!==navigator.appVersion.indexOf("MSIE 10")),U},W=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},G=function(){function e(e,t){for(var n,o=0;o<t.length;o++)(n=t[o]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),z=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},V=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}
1,Y=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],X=Y.slice(3),K=function(){function t(n,o){var r=this,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};W(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=H(this.update.bind(this)),this.options=V({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=n.jquery?n[0]:n,this.popper=o.jquery?o[0]:o,this.options.modifiers={},Object.keys(V({},t.Defaults.modifiers,i.modifiers)).forEach(function(e){r.options.modifiers[e]=V({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return V({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return G(t,[{key:"update",value:function(){return(function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=b(0,this.popper,this.reference),e.placement=w(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=T(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=S(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}).call(this)}},{key:"destroy",value:function(){return(function(){return this.state.isDestroyed=!0,R(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[E("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}).call(this)}},{key:"enableEventListeners",value:function(){return(function(){this.state.eventsEnabled||(this.state=function(e,t,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var i=o(e);return function e(t,n,r,i){var a="BODY"===t.nodeName,s=a?window:t;s.addEventListener(n,r,{passive:!0}),a||e(o(s.parentNode),n,r,i),i.push(s)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}(this.reference,0,this.state,this.scheduleUpdate))}).call(this)}},{key:"disableEventListeners",value:function(){return(function(){var e;this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.state,window.removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}).call(this)}}]),t}();return K.Utils=("undefined"==typeof window?global:window).PopperUtils,K.placements=Y,K.Defaults={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var r=e.offsets,i=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",l=s?"width":"height",u={start:z({},c,i[c]),end:z({},c,i[c]+i[l]-a[l])};e.offsets.popper=V({},a,u[o])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n,o=t.offset,r=e.offsets,i=r.popper,a=r.reference,s=e.placement.split("-")[0];return n=A(+o)?[+o,0]:function(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(x(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1===s?[a]:[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))];return(l=l.map(function(e,o){var r=(1===o?!i:i)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return e;if(0===a.indexOf("%")){var s;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}return h(s)[t]/100*i}return"vh"===a||"vw"===a?("vh"===a?O(document.documentElement.clientHeight,window.innerHeight||0):O(document.documentElement.clientWidth,window.innerWidth||0))/100*i:i}(e,r,t,n)})}
1)).forEach(function(e,t){e.forEach(function(n,o){A(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))})}),r}(o,i,a,s),"left"===s?(i.top+=n[0],i.left-=n[1]):"right"===s?(i.top+=n[0],i.left+=n[1]):"top"===s?(i.left+=n[0],i.top-=n[1]):"bottom"===s&&(i.left+=n[0],i.top+=n[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||r(e.instance.popper);e.instance.reference===n&&(n=r(n));var o=v(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=o;var i=e.offsets.popper,a={primary:function(e){var n=i[e];return i[e]<o[e]&&!t.escapeWithReference&&(n=O(i[e],o[e])),z({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=i[n];return i[e]>o[e]&&!t.escapeWithReference&&(r=M(i[n],o[e]-("right"===e?i.width:i.height))),z({},n,r)}};return t.priority.forEach(function(e){var t=-1===["left","top"].indexOf(e)?"secondary":"primary";i=V({},i,a[t](e))}),e.offsets.popper=i,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=N,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",c=a?"left":"top",l=a?"width":"height";return n[s]<i(o[c])&&(e.offsets.popper[c]=i(o[c])-n[l]),n[c]>i(o[s])&&(e.offsets.popper[c]=i(o[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,n){if(!D(e.instance.modifiers,"arrow","keepTogether"))return e;var o=n.element;if("string"==typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,c=-1!==["left","right"].indexOf(r),l=c?"height":"width",u=c?"Top":"Left",d=u.toLowerCase(),f=c?"left":"top",p=c?"bottom":"right",g=_(o)[l];s[p]-g<a[d]&&(e.offsets.popper[d]-=a[d]-(s[p]-g)),s[d]+g>a[p]&&(e.offsets.popper[d]+=s[d]+g-a[p]);var m=s[d]+s[l]/2-g/2,v=t(e.instance.popper,"margin"+u).replace("px",""),y=m-h(e.offsets.popper)[d]-v;return y=O(M(a[l]-g,y),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[d]=Math.round(y),e.offsets.arrow[f]="",e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(R(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),o=e.placement.split("-")[0],r=C(o),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case"flip":a=[o,r];break;case"clockwise":a=I(o);break;case"counterclockwise":a=I(o,!0);break;default:a=t.behavior}return a.forEach(function(s,c){if(o!==s||a.length===c+1)return e;o=e.placement.split("-")[0],r=C(o);var l=e.offsets.popper,u=e.offsets.reference,d=N,h="left"===o&&d(l.right)>d(u.left)||"right"===o&&d(l.left)<d(u.right)||"top"===o&&d(l.bottom)>d(u.top)||"bottom"===o&&d(l.top)<d(u.bottom),f=d(l.left)<d(n.left),p=d(l.right)>d(n.right),g=d(l.top)<d(n.top),m=d(l.bottom)>d(n.bottom),v="left"===o&&f||"right"===o&&p||"top"===o&&g||"bottom"===o&&m,y=-1!==["top","bottom"].indexOf(o),w=!!t.flipVariations&&(y&&"start"===i&&f||y&&"end"===i&&p||!y&&"start"===i&&g||!y&&"end"===i&&m);(h||v||w)&&(e.flipped=!0,(h||v)&&(o=a[c+1]),w&&(i="end"===i?"start":"start"===i?"end":i),e.placement=o+(i?"-"+i:""),e.offsets.popper=V({},e.offsets.popper,T(e.instance.popper,e.offsets.reference,e.placement)),e=S(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(s?r[a?"width":"height"]:0),e.placement=C(t),e.offsets.popper=h(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!D(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=x(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,o=t.y,i=e.offsets.popper,a=x(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s,c,l=void 0===a?t.gpuAcceleration:a,u=f(r(e.instance.popper)),d={position:i.position},h={left:N(i.left),top:N(i.top),bottom:N(i.bottom),right:N(i.right)},p="bottom"===n?"top":"bottom",g="right"===o?"left":"right",m=E("transform");if(c="bottom"==p?-u.height+h.bottom:h.top,s="right"==g?-u.width+h.right:h.left,l&&m)d[m]="translate3d("+s+"px, "+c+"px, 0)",d[p]=0,d[g]=0,d.willChange="transform";else{var v="right"==g?-1:1;d[p]=c*("bottom"==p?-1:1),d[g]=s*v,d.willChange=p+", "+g}return e.attributes=V({},{"x-placement":e.placement},e.attributes),e.styles=V({},d,e.styles),e.arrowStyles=V({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return k(e.instance.popper,e.styles),function(e,t){Object.keys(t).forEach(function(n){!1===t[n]?e.removeAttribute(n):e.setAttribute(n,t[n])})}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&k(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,o,r){var i=b(0,t,e),a=w(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),k(t,{position:"absolute"}),n},gpuAcceleration:void 0}}},K}),function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],o=e.document,r=Object.getPrototypeOf,i=n.slice,a=n.concat,s=n.push,c=n.indexOf,l={},u=l.toString,d=l.hasOwnProperty,h=d.toString,f=h.call(Object),p={};function g(e,t){var n=(t=t||o).createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}var m="3.2.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/
1animatedSelector",v=function(e,t){return new v.fn.init(e,t)},y=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^-ms-/,b=/-([a-z])/g,_=function(e,t){return t.toUpperCase()};function C(e){var t=!!e&&"length"in e&&e.length,n=v.type(e);return"function"!==n&&!v.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}v.fn=v.prototype={jquery:m,constructor:v,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=v.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return v.each(this,e)},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},v.extend=v.fn.extend=function(){var e,t,n,o,r,i,a=arguments[0]||{},s=1,c=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{}
vendor: 43,080 bytes, line 1
1,s++),"object"==typeof a||v.isFunction(a)||(a={}),s===c&&(a=this,s--);s<c;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(o=e[t])&&(l&&o&&(v.isPlainObject(o)||(r=Array.isArray(o)))?(r?(r=!1,i=n&&Array.isArray(n)?n:[]):i=n&&v.isPlainObject(n)?n:{},a[t]=v.extend(l,i,o)):void 0!==o&&(a[t]=o));return a},v.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===v.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=v.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==u.call(e)||(t=r(e))&&(n=d.call(t,"constructor")&&t.constructor,"function"!=typeof n||h.call(n)!==f))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[u.call(e)]||"object":typeof e},globalEval:function(e){g(e)},camelCase:function(e){return e.replace(w,"ms-").replace(b,_)},each:function(e,t){var n,o=0;if(C(e))for(n=e.length;o<n&&!1!==t.call(e[o],o,e[o]);o++);else for(o in e)if(!1===t.call(e[o],o,e[o]))break;return e},trim:function(e){return null==e?"":(e+"").replace(y,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?v.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:c.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,r=e.length;o<n;o++)e[r++]=t[o];return e.length=r,e},grep:function(e,t,n){for(var o=[],r=0,i=e.length,a=!n;r<i;r++)!t(e[r],r)!==a&&o.push(e[r]);return o},map:function(e,t,n){var o,r,i=0,s=[];if(C(e))for(o=e.length;i<o;i++)null!=(r=t(e[i],i,n))&&s.push(r);else for(i in e)null!=(r=t(e[i],i,n))&&s.push(r);return a.apply([],s)},guid:1,proxy:function(e,t){var n,o,r;if("string"==typeof t&&(n=e[t],t=e,e=n),v.isFunction(e))return o=i.call(arguments,2),(r=function(){return e.apply(t||this,o.concat(i.call(arguments)))}).guid=e.guid=e.guid||v.guid++,r},now:Date.now,support:p}),"function"==typeof Symbol&&(v.fn[Symbol.iterator]=n[Symbol.iterator]),v.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});var T=function(e){var t,n,o,r,i,a,s,c,l,u,d,h,f,p,g,m,v,y,w,b="sizzle"+1*new Date,_=e.document,C=0,T=0,x=ae(),S=ae(),R=ae(),E=function(e,t){return e===t&&(d=!0),0},A={}.hasOwnProperty,k=[],D=k.pop,I=k.push,M=k.push,N=k.slice,O=function(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",j="\\["+P+"*("+F+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+P+"*\\]",B=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",U=new RegExp(P+"+","g"),H=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),q=new RegExp("^"+P+"*,"+P+"*"),W=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),G=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),z=new RegExp(B),V=new RegExp("^"+F+"$"),Y={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),ee=function(e,t,n){var o="0x"+t-65536;return o!=o||n?t:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},re=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{M.apply(k=N.call(_.childNodes),_.childNodes)}catch(xe){M={apply:k.length?function(e,t){I.apply(e,N.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}function ie(e,t,o,r){var i,s,l,u,d,p,v,y=t&&t.ownerDocument,C=t?t.nodeType:9;if(o=o||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return o;if(!r&&((t?t.ownerDocument||t:_)!==f&&h(t),t=t||f,g)){if(11!==C&&(d=$.exec(e)))if(i=d[1]){if(9===C){if(!(l=t.getElementById(i)))return o;if(l.id===i)return o.push(l),o}else if(y&&(l=y.getElementById(i))&&w(t,l)&&l.id===i)return o.push(l),o}else{if(d[2])return M.apply(o,t.getElementsByTagName(e)),o;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return M.apply(o,t.getElementsByClassName(i)),o}if(n.qsa&&!R[e+" "]&&(!m||!m.test(e))){if(1!==C)y=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(te,ne):t.setAttribute("id",u=b),s=(p=a(e)).length;s--;)p[s]="#"+u+" "+ve(p[s]);v=p.join(","),y=J.test(e)&&ge(t.parentNode)||t}if(v)try{return M.apply(o,y.querySelectorAll(v)),o}catch(T){}finally{u===b&&t.removeAttribute("id")}}}return c(e.replace(H,"$1"),t,o,r)}function ae(){var e=[];return function t(n,r){return e.push(n+" ")>o.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function se(e){return e[b]=!0,e}function ce(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)o.attrHandle[n[r]]=t}function ue(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function fe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pe(e){return se(function(t){return t=+t,se(function(n,o){for(var r,i=e([],n.length,t),a=i.length;a--;)n[r=i[a]]&&(n[r]=!(o[r]=n[r]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ie.support={},i=ie.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},h=ie.setDocument=function(e){var t,r,a=e?e.ownerDocument||e:_;return a!==f&&9===a.nodeType&&a.documentElement?(p=(f=a).documentElement,g=!i(f),_!==f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(f.getElementsByClassName),n.getById=ce(function(e){return p.appendChild(e).id=b,!f.getElementsByName||!f.getElementsByName(b).length}),n.getById?(o.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(o.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,o,r,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(r=t.getElementsByName(e),o=0;i=r[o++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),o.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],r=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[r++];)1===n.nodeType&&o.push(n);return o}return i},o.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=Q.test(f.querySelectorAll))&&(ce(function(e){p.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Q.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",B)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(p.compareDocumentPosition),w=t||Q.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return d=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o||(1&(o=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===o?e===f||e.ownerDocument===_&&w(_,e)?-1:t===f||t.ownerDocument===_&&w(_,t)?1:u?O(u,e)-O(u,t):0:4&o?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,o=0,r=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!r||!i)return e===f?-1:t===f?1:r?-1:i?1:u?O(u,e)-O(u,t):0;if(r===i)return ue(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[o]===s[o];)o++;return o?ue(a[o],s[o]):a[o]===_?-1:s[o]===_?1:0},f):f},ie.matches=function(e,t){return ie(e,null,null,t)},ie.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&h(e),t=t.replace(G,"='$1']"),n.matchesSelector&&g&&!R[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var o=y.call(e,t);if(o||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(r){}return ie(t,f,null,[e]).length>0},ie.contains=function(e,t){return(e.ownerDocument||e)!==f&&h(e),w(e,t)},ie.attr=function(e,t){(e.ownerDocument||e)!==f&&h(e);var r=o.attrHandle[t.toLowerCase()],i=r&&A.call(o.attrHandle,t.toLowerCase())?r(e,t,!g):void 0;return void 0!==i?i:n.attributes||!g?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},ie.escape=function(e){return(e+"").replace(te,ne)},ie.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ie.uniqueSort=function(e){var t,o=[],r=0,i=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(E),d){for(;t=e[i++];)t===e[i]&&(r=o.push(i));for(;r--;)e.splice(o[r],1)}return u=null,e},r=ie.getText=function(e){var t,n="",o=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[o++];)n+=r(t);return n},(o=ie.selectors={cacheLength:50,createPseudo:se,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ie.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ie.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&z.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&x(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(o){var r=ie.attr(o,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,o,r){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===o&&0===r?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,h,f,p,g=i!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!c&&!s,w=!1;if(m){if(i){for(;g;){for(h=t;h=h[g];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(w=(f=(l=(u=(d=(h=m)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&l[1])&&l[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(w=f=0)||p.pop();)if(1===h.nodeType&&++w&&h===t){u[e]=[C,f,w];break}}else if(y&&(w=f=(l=(u=(d=(h=t)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&l[1]),!1===w)for(;(h=++f&&h&&h[g]||(w=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++w||(y&&((u=(d=h[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[C,w]),h!==t)););return(w-=r)===o||w%o==0&&w/o>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||ie.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=O(e,i[a])]=!(n[o]=i[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:se(function(e){var t=[],n=[],o=s(e.replace(H,"$1"));return o[b]?se(function(e,t,n,r){for(var i,a=o(e,null,r,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return ie(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||r(t)).indexOf(e)>-1}}),lang:se(function(e){return V.test(e||"")||ie.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return X.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var o=n<0?n+t:n;--o>=0;)e.push(o);return e}),gt:pe(function(e,t,n){for(var o=n<0?n+t:n;++o<t;)e.push(o);return e})}}).pseudos.nth=o.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})o.pseudos[t]=he(t);function me(){}function ve(e){for(var t=0,n=e.length,o="";t<n;t++)o+=e[t].value;return o}function ye(e,t,n){var o=t.dir,r=t.next,i=r||o,a=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){for(;t=t[o];)if(1===t.nodeType||a)return e(t,n,r);return!1}:function(t,n,c){var l,u,d,h=[C,s];if(c){for(;t=t[o];)if((1===t.nodeType||a)&&e(t,n,c))return!0}else for(;t=t[o];)if(1===t.nodeType||a)if(u=(d=t[b]||(t[b]={}))[t.uniqueID]||(d[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[o]||t;else{if((l=u[i])&&l[0]===C&&l[1]===s)return h[2]=l[2];if(u[i]=h,h[2]=e(t,n,c))return!0}return!1}}function we(e){return e.length>1?function(t,n,o){for(var r=e.length;r--;)if(!e[r](t,n,o))return!1;return!0}:e[0]}function be(e,t,n,o,r){for(var i,a=[],s=0,c=e.length,l=null!=t;s<c;s++)(i=e[s])&&(n&&!n(i,o,r)||(a.push(i),l&&t.push(s)));return a}function _e(e,t,n,o,r,i){return o&&!o[b]&&(o=_e(o)),r&&!r[b]&&(r=_e(r,i)),se(function(i,a,s,c){var l,u,d,h=[],f=[],p=a.length,g=i||function(e,t,n){for(var o=0,r=t.length;o<r;o++)ie(e,t[o],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!i&&t?g:be(g,h,e,s,c),v=n?r||(i?e:p||o)?[]:a:m;if(n&&n(m,v,s,c),o)for(l=be(v,f),o(l,[],s,c),u=l.length;u--;)(d=l[u])&&(v[f[u]]=!(m[f[u]]=d));if(i){if(r||e){if(r){for(l=[],u=v.length;u--;)(d=v[u])&&l.push(m[u]=d);r(null,v=[],l,c)}for(u=v.length;u--;)(d=v[u])&&(l=r?O(i,d):h[u])>-1&&(i[l]=!(a[l]=d))}}else v=be(v===a?v.splice(p,v.length):v),r?r(null,a,v,c):M.apply(a,v)})}function Ce(e){for(var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],c=a?1:0,u=ye(function(e){return e===t},s,!0),d=ye(function(e){return O(t,e)>-1},s,!0),h=[function(e,n,o){var r=!a&&(o||n!==l)||((t=n).nodeType?u(e,n,o):d(e,n,o));return t=null,r}];c<i;c++)if(n=o.relative[e[c].type])h=[ye(we(h),n)];else{if((n=o.filter[e[c].type].apply(null,e[c].matches))[b]){for(r=++c;r<i&&!o.relative[e[r].type];r++);return _e(c>1&&we(h),c>1&&ve(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(H,"$1"),n,c<r&&Ce(e.slice(c,r)),r<i&&Ce(e=e.slice(r)),r<i&&ve(e))}h.push(n)}return we(h)}function Te(e,t){var n=t.length>0,r=e.length>0,i=function(i,a,s,c,u){var d,p,m,v=0,y="0",w=i&&[],b=[],_=l,T=i||r&&o.find.TAG("*",u),x=C+=null==_?1:Math.random()||.1,S=T.length;for(u&&(l=a===f||a||u);y!==S&&null!=(d=T[y]);y++){if(r&&d){for(p=0,a||d.ownerDocument===f||(h(d),s=!g);m=e[p++];)if(m(d,a||f,s)){c.push(d);break}u&&(C=x)}n&&((d=!m&&d)&&v--,i&&w.push(d))}if(v+=y,n&&y!==v){for(p=0;m=t[p++];)m(w,b,a,s);if(i){if(v>0)for(;y--;)w[y]||b[y]||(b[y]=D.call(c));b=be(b)}M.apply(c,b),u&&!i&&b.length>0&&v+t.length>1&&ie.uniqueSort(c)}return u&&(C=x,l=_),w};return n?se(i):i}return me.prototype=o.filters=o.pseudos,o.setFilters=new me,a=ie.tokenize=function(e,t){var n,r,i,a,s,c,l,u=S[e+" "];if(u)return t?0:u.slice(0);for(s=e,c=[],l=o.preFilter;s;){for(a in n&&!(r=q.exec(s))||(r&&(s=s.slice(r[0].length)||s),c.push(i=[])),n=!1,(r=W.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(H," ")}),s=s.slice(n.length)),o.filter)!(r=Y[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?ie.error(e):S(e,c).slice(0)},s=ie.compile=function(e,t){var n,o=[],r=[],i=R[e+" "];if(!i){for(t||(t=a(e)),n=t.length;n--;)(i=Ce(t[n]))[b]?o.push(i):r.push(i);(i=R(e,Te(r,o))).selector=e}return i},c=ie.select=function(e,t,n,r){var i,c,l,u,d,h="function"==typeof e&&e,f=!r&&a(e=h.selector||e);if(n=n||[],1===f.length){if((c=f[0]=f[0].slice(0)).length>2&&"ID"===(l=c[0]).type&&9===t.nodeType&&g&&o.relative[c[1].type]){if(!(t=(o.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(c.shift().value.length)}for(i=Y.needsContext.test(e)?0:c.length;i--&&!o.relative[u=(l=c[i]).type];)if((d=o.find[u])&&(r=d(l.matches[0].replace(Z,ee),J.test(c[0].type)&&ge(t.parentNode)||t))){if(c.splice(i,1),!(e=r.length&&ve(c)))return M.apply(n,r),n;break}}return(h||s(e,f))(r,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(E).join("")===b,n.detectDuplicates=!!d,h(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||le(L,function(e,t,n){var o;if(!n)return!0===e[t]?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),ie}(e);v.find=T,v.expr=T.selectors,v.expr[":"]=v.expr.pseudos,v.uniqueSort=v.unique=T.uniqueSort,v.text=T.getText,v.isXMLDoc=T.isXML,v.contains=T.contains,v.escapeSelector=T.escape;var x=function(e,t,n){for(var o=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&v(e).is(n))break;o.push(e)}return o},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},R=v.expr.match.needsContext;function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,k=/^.[^:#\[\.,]*$/;function D(e,t,n){return v.isFunction(t)?v.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?v.grep(e,function(e){return e===t!==n}):"string"!=typeof t?v.grep(e,function(e){return c.call(t,e)>-1!==n}):k.test(t)?v.filter(t,e,n):(t=v.filter(t,e),v.grep(e,function(e){return c.call(t,e)>-1!==n&&1===e.nodeType}))}v.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?v.find.matchesSelector(o,e)?[o]:[]:v.find.matches(e,v.grep(t,function(e){return 1===e.nodeType}))},v.fn.extend({find:function(e){var t,n,o=this.length,r=this;if("string"!=typeof e)return this.pushStack(v(e).filter(function(){for(t=0;t<o;t++)if(v.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<o;t++)v.find(e,r[t],n);return o>1?v.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&R.test(e)?v(e):e||[],!1).length}});var I,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(v.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||I,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(v.merge(this,v.parseHTML(r[1],(t=t instanceof v?t[0]:t)&&t.nodeType?t.ownerDocument||t:o,!0)),A.test(r[1])&&v.isPlainObject(t))for(r in t)v.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=o.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v.isFunction(e)?void 0!==n.ready?n.ready(e):e(v):v.makeArray(e,this)}).prototype=v.fn,I=v(o);var N=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function L(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}v.fn.extend({has:function(e){var t=v(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(v.contains(this,t[e]))return!0})},closest:function(e,t){var n,o=0,r=this.length,i=[],a="string"!=typeof e&&v(e);if(!R.test(e))for(;o<r;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&v.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?v.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?c.call(v(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(v.uniqueSort(v.merge(this.get(),v(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),v.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,n){return x(e,"parentNode",n)},next:function(e){return L(e,"nextSibling")},prev:function(e){return L(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,n){return x(e,"nextSibling",n)},prevUntil:function(e,t,n){return x(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return E(e,"iframe")?e.contentDocument:(E(e,"template")&&(e=e.content||e),v.merge([],e.childNodes))}},function(e,t){v.fn[e]=function(n,o){var r=v.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(r=v.filter(o,r)),this.length>1&&(O[e]||v.uniqueSort(r),N.test(e)&&r.reverse()),this.pushStack(r)}});var P=/[^\x20\t\r\n\f]+/g;function F(e){return e}function j(e){throw e}function B(e,t,n,o){var r;try{e&&v.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&v.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(o))}catch(e){n.apply(void 0,[e])}}v.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return v.each(e.match(P)||[],function(e,n){t[n]=!0}),t}(e):v.extend({},e);var t,n,o,r,i=[],a=[],s=-1,c=function(){for(r=r||e.once,o=t=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=i.length,n=!1);e.memory||(n=!1),t=!1,r&&(i=n?[]:"")},l={add:function(){return i&&(n&&!t&&(s=i.length-1,a.push(n)),function t(n){v.each(n,function(n,o){v.isFunction(o)?e.unique&&l.has(o)||i.push(o):o&&o.length&&"string"!==v.type(o)&&t(o)})}(arguments),n&&!t&&c()),this},remove:function(){return v.each(arguments,function(e,t){for(var n;(n=v.inArray(t,i,n))>-1;)i.splice(n,1),n<=s&&s--}),this},has:function(e){return e?v.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return r=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return r=a=[],n||t||(i=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!o}};return l},v.extend({Deferred:function(t){var n=[["notify","progress",v.Callbacks("memory"),v.Callbacks("memory"),2],["resolve","done",v.Callbacks("once memory"),v.Callbacks("once memory"),0,"resolved"],["reject","fail",v.Callbacks("once memory"),v.Callbacks("once memory"),1,"rejected"]],o="pending",r={state:function(){return o},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return v.Deferred(function(t){v.each(n,function(n,o){var r=v.isFunction(e[o[4]])&&e[o[4]];i[o[1]](function(){var e=r&&r.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[o[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,o,r){var i=0;function a(t,n,o,r){return function(){var s=this,c=arguments,l=function(){var e,l;if(!(t<i)){if((e=o.apply(s,c))===n.promise())throw new TypeError("Thenable self-resolution");v.isFunction(l=e&&("object"==typeof e||"function"==typeof e)&&e.then)?r?l.call(e,a(i,n,F,r),a(i,n,j,r)):l.call(e,a(++i,n,F,r),a(i,n,j,r),a(i,n,F,n.notifyWith)):(o!==F&&(s=void 0,c=[e]),(r||n.resolveWith)(s,c))}},u=r?l:function(){try{l()}catch(e){v.Deferred.exceptionHook&&v.Deferred.exceptionHook(e,u.stackTrace),t+1>=i&&(o!==j&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?u():(v.Deferred.getStackHook&&(u.stackTrace=v.Deferred.getStackHook()),e.setTimeout(u))}}return v.Deferred(function(e){n[0][3].add(a(0,e,v.isFunction(r)?r:F,e.notifyWith)),n[1][3].add(a(0,e,v.isFunction(t)?t:F)),n[2][3].add(a(0,e,v.isFunction(o)?o:j))}).promise()},promise:function(e){return null!=e?v.extend(e,r):r}},i={};return v.each(n,function(e,t){var a=t[2],s=t[5];r[t[1]]=a.add,s&&a.add(function(){o=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),i[t[0]]=function(){return i[t[0]+"With"](this===i?void 0:this,arguments),this},i[t[0]+"With"]=a.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(e){var t=arguments.length,n=t,o=Array(n),r=i.call(arguments),a=v.Deferred(),s=function(e){return function(n){o[e]=this,r[e]=arguments.length>1?i.call(arguments):n,--t||a.resolveWith(o,r)}};if(t<=1&&(B(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||v.isFunction(r[n]&&r[n].then)))return a.then();for(;n--;)B(r[n],s(n),a.reject);return a.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;v.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&U.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},v.readyException=function(t){e.setTimeout(function(){throw t})};var H=v.Deferred();function q(){o.removeEventListener("DOMContentLoaded",q),e.removeEventListener("load",q),v.ready()}v.fn.ready=function(e){return H.then(e).catch(function(e){v.readyException(e)}),this},v.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--v.readyWait:v.isReady)||(v.isReady=!0,!0!==e&&--v.readyWait>0||H.resolveWith(o,[v]))}}),v.ready.then=H.then,"complete"===o.readyState||"loading"!==o.readyState&&!o.documentElement.doScroll?e.setTimeout(v.ready):(o.addEventListener("DOMContentLoaded",q),e.addEventListener("load",q));var W=function(e,t,n,o,r,i,a){var s=0,c=e.length,l=null==n;if("object"===v.type(n))for(s in r=!0,n)W(e,t,s,n[s],!0,i,a);else if(void 0!==o&&(r=!0,v.isFunction(o)||(a=!0),l&&(a?(t.call(e,o),t=null):(l=t,t=function(e,t,n){return l.call(v(e),n)})),t))for(;s<c;s++)t(e[s],n,a?o:o.call(e[s],s,t(e[s],n)));return r?e:l?t.call(e):c?t(e[0],n):i},G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function z(){this.expando=v.expando+z.uid++}z.uid=1,z.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var o,r=this.cache(e);if("string"==typeof t)r[v.camelCase(t)]=n;else for(o in t)r[v.camelCase(o)]=t[o];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][v.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o=e[this.expando];if(void 0!==o){if(void 0!==t){n=(t=Array.isArray(t)?t.map(v.camelCase):(t=v.camelCase(t))in o?[t]:t.match(P)||[]).length;for(;n--;)delete o[t[n]]}(void 0===t||v.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!v.isEmptyObject(t)}};var V=new z,Y=new z,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Q(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(o))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:X.test(e)?JSON.parse(e):e)}(n)}catch(r){}Y.set(e,t,n)}else n=void 0;return n}v.extend({hasData:function(e){return Y.hasData(e)||V.hasData(e)},data:function(e,t,n){return Y.access(e,t,n)},removeData:function(e,t){Y.remove(e,t)},_data:function(e,t,n){return V.access(e,t,n)},_removeData:function(e,t){V.remove(e,t)}}),v.fn.extend({data:function(e,t){var n,o,r,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(r=Y.get(i),1===i.nodeType&&!V.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(o=a[n].name).indexOf("data-")&&(o=v.camelCase(o.slice(5)),Q(i,o,r[o]));V.set(i,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){Y.set(this,e)}):W(this,function(t){var n;if(i&&void 0===t){if(void 0!==(n=Y.get(i,e)))return n;if(void 0!==(n=Q(i,e)))return n}else this.each(function(){Y.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Y.remove(this,e)})}}),v.extend({queue:function(e,t,n){var o;if(e)return o=V.get(e,t=(t||"fx")+"queue"),n&&(!o||Array.isArray(n)?o=V.access(e,t,v.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){var n=v.queue(e,t=t||"fx"),o=n.length,r=n.shift(),i=v._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),o--),r&&("fx"===t&&n.unshift("inprogress"),delete i.stop,r.call(e,function(){v.dequeue(e,t)},i)),!o&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return V.get(e,n)||V.access(e,n,{empty:v.Callbacks("once memory").add(function(){V.remove(e,[t+"queue",n])})})}}),v.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?v.queue(this[0],e):void 0===t?this:this.each(function(){var n=v.queue(this,e,t);v._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,o=1,r=v.Deferred(),i=this,a=this.length,s=function(){--o||r.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=V.get(i[a],e+"queueHooks"))&&n.empty&&(o++,n.empty.add(s));return s(),r.promise(t)}});var $=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,J=new RegExp("^(?:([+-])=|)("+$+")([a-z%]*)$","i"),Z=["Top","Right","Bottom","Left"],ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&v.contains(e.ownerDocument,e)&&"none"===v.css(e,"display")},te=function(e,t,n,o){var r,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in r=n.apply(e,o||[]),t)e.style[i]=a[i];return r},ne={};function oe(e){var t,n=e.ownerDocument,o=e.nodeName,r=ne[o];return r||(t=n.body.appendChild(n.createElement(o)),r=v.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),ne[o]=r,r)}function re(e,t){for(var n,o,r=[],i=0,a=e.length;i<a;i++)(o=e[i]).style&&(n=o.style.display,t?("none"===n&&(r[i]=V.get(o,"display")||null,r[i]||(o.style.display="")),""===o.style.display&&ee(o)&&(r[i]=oe(o))):"none"!==n&&(r[i]="none",V.set(o,"display",n)));for(i=0;i<a;i++)null!=r[i]&&(e[i].style.display=r[i]);return e}v.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?v(this).show():v(this).hide()})}});var ie=/^(?:checkbox|radio)$/i,ae=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,se=/^$|\/(?:java|ecma)script/i,ce={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function le(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?v.merge([e],n):n}function ue(e,t){for(var n=0,o=e.length;n<o;n++)V.set(e[n],"globalEval",!t||V.get(t[n],"globalEval"))}ce.optgroup=ce.option,ce.tbody=ce.tfoot=ce.colgroup=ce.caption=ce.thead,ce.th=ce.td;var de=/<|&#?\w+;/;function he(e,t,n,o,r){for(var i,a,s,c,l,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((i=e[f])||0===i)if("object"===v.type(i))v.merge(h,i.nodeType?[i]:i);else if(de.test(i)){for(a=a||d.appendChild(t.createElement("div")),s=(ae.exec(i)||["",""])[1].toLowerCase(),a.innerHTML=(c=ce[s]||ce._default)[1]+v.htmlPrefilter(i)+c[2],u=c[0];u--;)a=a.lastChild;v.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(i));for(d.textContent="",f=0;i=h[f++];)if(o&&v.inArray(i,o)>-1)r&&r.push(i);else if(l=v.contains(i.ownerDocument,i),a=le(d.appendChild(i),"script"),l&&ue(a),n)for(u=0;i=a[u++];)se.test(i.type||"")&&n.push(i);return d}!function(){var e=o.createDocumentFragment().appendChild(o.createElement("div")),t=o.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),p.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var fe=o.documentElement,pe=/^key/,ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,me=/^([^.]*)(?:\.(.+)|)/;function ve(){return!0}function ye(){return!1}function we(){try{return o.activeElement}catch(e){}}function be(e,t,n,o,r,i){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(o=o||n,n=void 0),t)be(e,s,n,o,t[s],i);return e}if(null==o&&null==r?(r=n,o=n=void 0):null==r&&("string"==typeof n?(r=o,o=void 0):(r=o,o=n,n=void 0)),!1===r)r=ye;else if(!r)return e;return 1===i&&(a=r,(r=function(e){return v().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=v.guid++)),e.each(function(){v.event.add(this,t,r,o,n)})}v.event={global:{},add:function(e,t,n,o,r){var i,a,s,c,l,u,d,h,f,p,g,m=V.get(e);if(m)for(n.handler&&(n=(i=n).handler,r=i.selector),r&&v.find.matchesSelector(fe,r),n.guid||(n.guid=v.guid++),(c=m.events)||(c=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==v&&v.event.triggered!==t.type?v.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(P)||[""]).length;l--;)f=g=(s=me.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=v.event.special[f]||{},d=v.event.special[f=(r?d.delegateType:d.bindType)||f]||{},u=v.extend({type:f,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&v.expr.match.needsContext.test(r),namespace:p.join(".")},i),(h=c[f])||((h=c[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,o,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),v.event.global[f]=!0)},remove:function(e,t,n,o,r){var i,a,s,c,l,u,d,h,f,p,g,m=V.hasData(e)&&V.get(e);if(m&&(c=m.events)){for(l=(t=(t||"").match(P)||[""]).length;l--;)if(f=g=(s=me.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=v.event.special[f]||{},h=c[f=(o?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=h.length;i--;)u=h[i],!r&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||o&&o!==u.selector&&("**"!==o||!u.selector)||(h.splice(i,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||v.removeEvent(e,f,m.handle),delete c[f])}else for(f in c)v.event.remove(e,f+t[l],n,o,!0);v.isEmptyObject(c)&&V.remove(e,"handle events")}},dispatch:function(e){var t,n,o,r,i,a,s=v.event.fix(e),c=new Array(arguments.length),l=(V.get(this,"events")||{})[s.type]||[],u=v.event.special[s.type]||{};for(c[0]=s,t=1;t<arguments.length;t++)c[t]=arguments[t];if(s.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,s)){for(a=v.event.handlers.call(this,s,l),t=0;(r=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(i=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,void 0!==(o=((v.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,c))&&!1===(s.result=o)&&(s.preventDefault(),s.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,o,r,i,a,s=[],c=t.delegateCount,l=e.target;if(c&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],a={},n=0;n<c;n++)void 0===a[r=(o=t[n]).selector+" "]&&(a[r]=o.needsContext?v(r,this).index(l)>-1:v.find(r,this,null,[l]).length),a[r]&&i.push(o);i.length&&s.push({elem:l,handlers:i})}return l=this,c<t.length&&s.push({elem:l,handlers:t.slice(c)}),s},addProp:function(e,t){Object.defineProperty(v.Event.prototype,e,{enumerable:!0,configurable:!0,get:v.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[v.expando]?e:new v.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==we()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===we()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&E(this,"input"))return this.click(),!1},_default:function(e){return E(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},v.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},v.Event=function(e,t){return this instanceof v.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ve:ye,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),void(this[v.expando]=!0)):new v.Event(e,t)},v.Event.prototype={constructor:v.Event,isDefaultPrevented:ye,isPropagationStopped:ye,isImmediatePropagationStopped:ye,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ve,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ve,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ve,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},v.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&pe.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&ge.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},v.event.addProp),v.each({mouseenter:"mouseover",mouseleave:"mou
1seout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,o=e.relatedTarget,r=e.handleObj;return o&&(o===this||v.contains(this,o))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),v.fn.extend({on:function(e,t,n,o){return be(this,e,t,n,o)},one:function(e,t,n,o){return be(this,e,t,n,o,1)},off:function(e,t,n){var o,r;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,v(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ye),this.each(function(){v.event.remove(this,e,n,t)})}});var _e=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ce=/<script|<style|<link/i,Te=/checked\s*(?:[^=]|=\s*.checked.)/i,xe=/^true\/(.*)/,Se=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Re(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&v(">tbody",e)[0]||e}function Ee(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ae(e){var t=xe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ke(e,t){var n,o,r,i,a,s,c,l;if(1===t.nodeType){if(V.hasData(e)&&(i=V.access(e),a=V.set(t,i),l=i.events))for(r in delete a.handle,a.events={},l)for(n=0,o=l[r].length;n<o;n++)v.event.add(t,r,l[r][n]);Y.hasData(e)&&(s=Y.access(e),c=v.extend({},s),Y.set(t,c))}}function De(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ie.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ie(e,t,n,o){t=a.apply([],t);var r,i,s,c,l,u,d=0,h=e.length,f=h-1,m=t[0],y=v.isFunction(m);if(y||h>1&&"string"==typeof m&&!p.checkClone&&Te.test(m))return e.each(function(r){var i=e.eq(r);y&&(t[0]=m.call(this,r,i.html())),Ie(i,t,n,o)});if(h&&(i=(r=he(t,e[0].ownerDocument,!1,e,o)).firstChild,1===r.childNodes.length&&(r=i),i||o)){for(c=(s=v.map(le(r,"script"),Ee)).length;d<h;d++)l=r,d!==f&&(l=v.clone(l,!0,!0),c&&v.merge(s,le(l,"script"))),n.call(e[d],l,d);if(c)for(u=s[s.length-1].ownerDocument,v.map(s,Ae),d=0;d<c;d++)se.test((l=s[d]).type||"")&&!V.access(l,"globalEval")&&v.contains(u,l)&&(l.src?v._evalUrl&&v._evalUrl(l.src):g(l.textContent.replace(Se,""),u))}return e}function Me(e,t,n){for(var o,r=t?v.filter(t,e):e,i=0;null!=(o=r[i]);i++)n||1!==o.nodeType||v.cleanData(le(o)),o.parentNode&&(n&&v.contains(o.ownerDocument,o)&&ue(le(o,"script")),o.parentNode.removeChild(o));return e}v.extend({htmlPrefilter:function(e){return e.replace(_e,"<$1></$2>")},clone:function(e,t,n){var o,r,i,a,s=e.cloneNode(!0),c=v.contains(e.ownerDocument,e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||v.isXMLDoc(e)))for(a=le(s),o=0,r=(i=le(e)).length;o<r;o++)De(i[o],a[o]);if(t)if(n)for(i=i||le(e),a=a||le(s),o=0,r=i.length;o<r;o++)ke(i[o],a[o]);else ke(e,s);return(a=le(s,"script")).length>0&&ue(a,!c&&le(e,"script")),s},cleanData:function(e){for(var t,n,o,r=v.event.special,i=0;void 0!==(n=e[i]);i++)if(G(n)){if(t=n[V.expando]){if(t.events)for(o in t.events)r[o]?v.event.remove(n,o):v.removeEvent(n,o,t.handle);n[V.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),v.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return W(this,function(e){return void 0===e?v.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(v.cleanData(le(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return W(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ce.test(e)&&!ce[(ae.exec(e)||["",""])[1].toLowerCase()]){e=v.htmlPrefilter(e);try{for(;n<o;n++)1===(t=this[n]||{}).nodeType&&(v.cleanData(le(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Ie(this,arguments,function(t){var n=this.parentNode;v.inArray(this,e)<0&&(v.cleanData(le(this)),n&&n.replaceChild(t,this))},e)}}),v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(e){for(var n,o=[],r=v(e),i=r.length-1,a=0;a<=i;
vendor: 11,790 bytes, line 1
1a++)n=a===i?this:this.clone(!0),v(r[a])[t](n),s.apply(o,n.get());return this.pushStack(o)}});var Ne=/^margin/,Oe=new RegExp("^("+$+")(?!px)[a-z%]+$","i"),Le=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};function Pe(e,t,n){var o,r,i,a,s=e.style;return(n=n||Le(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||v.contains(e.ownerDocument,e)||(a=v.style(e,t)),!p.pixelMarginRight()&&Oe.test(a)&&Ne.test(t)&&(o=s.width,r=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=o,s.minWidth=r,s.maxWidth=i)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){function t(){if(c){c.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",c.innerHTML="",fe.appendChild(s);var t=e.getComputedStyle(c);n="1%"!==t.top,a="2px"===t.marginLeft,r="4px"===t.width,c.style.marginRight="50%",i="4px"===t.marginRight,fe.removeChild(s),c=null}}var n,r,i,a,s=o.createElement("div"),c=o.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===c.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(c),v.extend(p,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),r},pixelMarginRight:function(){return t(),i},reliableMarginLeft:function(){return t(),a}}))}();var je=/^(none|table(?!-c[ea]).+)/,Be=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},He={letterSpacing:"0",fontWeight:"400"},qe=["Webkit","Moz","ms"],We=o.createElement("div").style;function Ge(e){var t=v.cssProps[e];return t||(t=v.cssProps[e]=function(e){if(e in We)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=qe.length;n--;)if((e=qe[n]+t)in We)return e}(e)||e),t}function ze(e,t,n){var o=J.exec(t);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):t}function Ve(e,t,n,o,r){var i,a=0;for(i=n===(o?"border":"content")?4:"width"===t?1:0;i<4;i+=2)"margin"===n&&(a+=v.css(e,n+Z[i],!0,r)),o?("content"===n&&(a-=v.css(e,"padding"+Z[i],!0,r)),"margin"!==n&&(a-=v.css(e,"border"+Z[i]+"Width",!0,r))):(a+=v.css(e,"padding"+Z[i],!0,r),"padding"!==n&&(a+=v.css(e,"border"+Z[i]+"Width",!0,r)));return a}function Ye(e,t,n){var o,r=Le(e),i=Pe(e,t,r),a="border-box"===v.css(e,"boxSizing",!1,r);return Oe.test(i)?i:(o=a&&(p.boxSizingReliable()||i===e.style[t]),"auto"===i&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)]),(i=parseFloat(i)||0)+Ve(e,t,n||(a?"border":"content"),o,r)+"px")}v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Pe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,i,a,s=v.camelCase(t),c=Be.test(t),l=e.style;return c||(t=Ge(s)),a=v.cssHooks[t]||v.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,o))?r:l[t]:("string"==(i=typeof n)&&(r=J.exec(n))&&r[1]&&(n=function(e,t,n,o){var r,i=1,a=20,s=function(){return v.css(e,t,"")},c=s(),l=n&&n[3]||(v.cssNumber[t]?"":"px"),u=(v.cssNumber[t]||"px"!==l&&+c)&&J.exec(v.css(e,t));if(u&&u[3]!==l){l=l||u[3],n=n||[],u=+c||1;do{v.style(e,t,(u/=i=i||".5")+l)}while(i!==(i=s()/c)&&1!==i&&--a)}return n&&(u=+u||+c||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2]),r}(e,t,r),i="number"),void(null!=n&&n==n&&("number"===i&&(n+=r&&r[3]||(v.cssNumber[s]?"":"px")),p.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,o))||(c?l.setProperty(t,n):l[t]=n))))}},css:function(e,t,n,o){var r,i,a,s=v.camelCase(t);return Be.test(t)||(t=Ge(s)),(a=v.cssHooks[t]||v.cssHooks[s])&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=Pe(e,t,o)),"normal"===r&&t in He&&(r=He[t]),""===n||n?(i=parseFloat(r),!0===n||isFinite(i)?i||0:r):r}}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,o){if(n)return!je.test(v.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ye(e,t,o):te(e,Ue,function(){return Ye(e,t,o)})},set:function(e,n,o){var r,i=o&&Le(e),a=o&&Ve(e,t,o,"border-box"===v.css(e,"boxSizing",!1,i),i);return a&&(r=J.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=v.css(e,t)),ze(0,n,a)}}}),v.cssHooks.marginLeft=Fe(p.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Pe(e,"marginLeft"))||e.getBoundingClientRect().left-te(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){for(var o=0,r={},i="string"==typeof n?n.split(" "):[n];o<4;o++)r[e+Z[o]+t]=i[o]||i[o-2]||i[0];return r}},Ne.test(e)||(v.cssHooks[e+t].set=ze)}),v.fn.extend({css:function(e,t){return W(this,function(e,t,n){var o,r,i={},a=0;if(Array.isArray(t)){for(o=Le(e),r=t.length;a<r;a++)i[t[a]]=v.css(e,t[a],!1,o);return i}return void 0!==n?v.style(e,t,n):v.css(e,t)},e,t,arguments.length>1)}}),v.fn.delay=function(t,n){return t=v.fx&&v.fx.speeds[t]||t,this.queue(n=n||"fx",function(n,o){var r=e.setTimeout(n,t);o.stop=function(){e.clearTimeout(r)}})},function(){var e=o.createElement("input"),t=o.createElement("select").appendChild(o.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=t.selected,(e=o.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var Xe,Ke=v.expr.attrHandle;v.fn.extend({attr:function(e,t){return W(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})}}),v.extend({attr:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?v.prop(e,t,n):(1===i&&v.isXMLDoc(e)||(r=v.attrHooks[t.toLowerCase()]||(v.expr.match.bool.test(t)?Xe:void 0)),void 0!==n?null===n?void v.removeAttr(e,t):r&&"set"in r&&void 0!==(o=r.set(e,n,t))?o:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(o=r.get(e,t))?o:null==(o=v.find.attr(e,t))?void 0:o)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&E(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,o=0,r=t&&t.match(P);if(r&&1===e.nodeType)for(;n=r[o++];)e.removeAttribute(n)}}),Xe={set:function(e,t,n){return!1===t?v.removeAttr(e,n):e.setAttribute(n,n),n}},v.each(v.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ke[t]||v.find.attr;Ke[t]=function(e,t,o){var r,i,a=t.toLowerCase();return o||(i=Ke[a],Ke[a]=r,r=null!=n(e,t,o)?a:null,Ke[a]=i),r}});var Qe=/^(?:input|select|textarea|button)$/i,$e=/^(?:a|area)$/i;function Je(e){return(e.match(P)||[]).join(" ")}function Ze(e){return e.getAttribute&&e.getAttribute("class")||""}v.fn.extend({prop:function(e,t){return W(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[v.propFix[e]||e]})}}),v.extend({prop:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&v.isXMLDoc(e)||(r=v.propHooks[t=v.propFix[t]||t]),void 0!==n?r&&"set"in r&&void 0!==(o=r.set(e,n,t))?o:e[t]=n:r&&"get"in r&&null!==(o=r.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=v.find.attr(e,"tabindex");return t?parseInt(t,10):Qe.test(e.nodeName)||$e.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(v.propHooks.selected={get:function(e){return null},set:function(e){}}),v.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){v.propFix[this.toLowerCase()]=this}),v.fn.extend({addClass:function(e){var t,n,o,r,i,a,s,c=0;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,Ze(this)))});if("string"==typeof e&&e)for(t=e.match(P)||[];n=this[c++];)if(r=Ze(n),o=1===n.nodeType&&" "+Je(r)+" "){for(a=0;i=t[a++];)o.indexOf(" "+i+" ")<0&&(o+=i+" ");r!==(s=Je(o))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,o,r,i,a,s,c=0;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,Ze(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(P)||[];n=this[c++];)if(r=Ze(n),o=1===n.nodeType&&" "+Je(r)+" "){for(a=0;i=t[a++];)for(;o.indexOf(" "+i+" ")>-1;)o=o.replace(" "+i+" "," ");r!==(s=Je(o))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,Ze(this),t),t)}):this.each(function(){var t,o,r,i;if("string"===n)for(o=0,r=v(this),i=e.match(P)||[];t=i[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=Ze(this))&&V.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":V.get(this,"__className__")||""))})},hasClass:function(e){var t,n,o=0;for(t=" "+e+" ";n=this[o++];)if(1===n.nodeType&&(" "+Je(Ze(n))+" ").indexOf(t)>-1)return!0;return!1}});var et=/\r/g;v.fn.extend({val:function(e){var t,n,o,r=this[0];return arguments.length?(o=v.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=o?e.call(this,n,v(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=v.map(r,function(e){return null==e?"":e+""})),(t=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=v.valHooks[r.type]||v.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(et,""):null==n?"":n:void 0}}),v.extend({valHooks:{option:{get:function(e){var t=v.find.attr(e,"value");return null!=t?t:Je(v.text(e))}},select:{get:function(e){var t,n,o,r=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],c=a?i+1:r.length;for(o=i<0?c:a?i:0;o<c;o++)if(((n=r[o]).selected||o===i)&&!n.disabled&&(!n.parentNode.disabled||!E(n.parentNode,"optgroup"))){if(t=v(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,o,r=e.options,i=v.makeArray(t),a=r.length;a--;)((o=r[a]).selected=v.inArray(v.valHooks.option.get(o),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=v.inArray(v(e).val(),t)>-1}},p.checkOn||(v.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var tt=/^(?:focusinfocus|focusoutblur)$/;v.extend(v.event,{trigger:function(t,n,r,i){var a,s,c,l,u,h,f,p=[r||o],g=d.call(t,"type")?t.type:t,m=d.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!tt.test(g+v.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),u=g.indexOf(":")<0&&"on"+g,(t=t[v.expando]?t:new v.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:v.makeArray(n,[t]),f=v.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!v.isWindow(r)){for(tt.test((l=f.delegateType||g)+g)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(r.ownerDocument||o)&&p.push(c.defaultView||c.parentWindow||e)}for(a=0;(s=p[a++])&&!t.isPropagationStopped();)t.type=a>1?l:f.bindType||g,(h=(V.get(s,"events")||{})[t.type]&&V.get(s,"handle"))&&h.apply(s,n),(h=u&&s[u])&&h.apply&&G(s)&&(t.result=h.apply(s,n),!1===t.result&&t.preventDefault());return t.type=g,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),n)||!G(r)||u&&v.
1isFunction(r[g])&&!v.isWindow(r)&&((c=r[u])&&(r[u]=null),v.event.triggered=g,r[g](),v.event.triggered=void 0,c&&(r[u]=c)),t.result}},simulate:function(e,t,n){var o=v.extend(new v.Event,n,{type:e,isSimulated:!0});v.event.trigger(o,null,t)}}),v.fn.extend({trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return v.event.trigger(e,t,n,!0)}}),v.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),v.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),p.focusin="onfocusin"in e,p.focusin||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){v.event.simulate(t,e.target,v.event.fix(e))};v.event.special[t]={setup:function(){var o=this.ownerDocument||this,r=V.access(o,t);r||o.addEventListener(e,n,!0),V.access(o,t,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this,r=V.access(o,t)-1;r?V.access(o,t,r):(o.removeEventListener(e,n,!0),V.remove(o,t))}}});var nt=/\[\]$/,ot=/\r?\n/g,rt=/^(?:submit|button|image|reset|file)$/i,it=/^(?:input|select|textarea|keygen)/i;function at(e,t,n,o){var r;if(Array.isArray(t))v.each(t,function(t,r){n||nt.test(e)?o(e,r):at(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,o)});else if(n||"object"!==v.type(t))o(e,t);else for(r in t)at(e+"["+r+"]",t[r],n,o)}v.param=function(e,t){var n,o=[],r=function(e,t){var n=v.isFunction(t)?t():t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){r(this.name,this.value)});else for(n in e)at(n,e[n],t,r);return o.join("&")},v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=v.prop(this,"elements");return e?v.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!v(this).is(":disabled")&&it.test(this.nodeName)&&!rt.test(e)&&(this.checked||!ie.test(e))}).map(function(e,t){var n=v(this).val();return null==n?null:Array.isArray(n)?v.map(n,function(e){return{name:t.name,value:e.replace(ot,"\r\n")}}):{name:t.name,value:n.replace(ot,"\r\n")}}).get()}}),v.fn.extend({wrapAll:function(e){var t;return this[0]&&(v.isFunction(e)&&(e=e.call(this[0])),t=v(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){v(this).replaceWith(this.childNodes)}),this}}),v.expr.pseudos.hidden=function(e){return!v.expr.pseudos.visible(e)},v.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},p.createHTMLDocument=function(){var e=o.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),v.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(p.createHTMLDocument?((r=(t=o.implementation.createHTMLDocument("")).createElement("base")).href=o.location.href,t.head.appendChild(r)):t=o),a=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=he([e],t,a),a&&a.length&&v(a).remove(),v.merge([],i.childNodes)));var r,i,a},v.offset={setOffset:function(e,t,n){var o,r,i,a,s,c,l=v.css(e,"position"),u=v(e),d={};"static"===l&&(e.style.position="relative"),s=u.offset(),i=v.css(e,"top"),c=v.css(e,"left"),("absolute"===l||"fixed"===l)&&(i+c).indexOf("auto")>-1?(a=(o=u.position()).top,r=o.left):(a=parseFloat(i)||0,r=parseFloat(c)||0),v.isFunction(t)&&(t=t.call(e,n,v.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+r),"using"in t?t.using.call(e,d):u.css(d)}},v.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){v.offset.setOffset(this,e,t)});var t,n,o,r,i=this[0];return i?i.getClientRects().length?{top:(o=i.getBoundingClientRect()).top+(r=(t=i.ownerDocument).defaultView).pageYOffset-(n=t.documentElement).clientTop,left:o.left+r.pageXOffset-n.clientLeft}:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],o={top:0,left:0};return"fixed"===v.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),E(e[0],"html")||(o=e.offset()),o={top:o.top+v.css(e[0],"borderTopWidth",!0),left:o.left+v.css(e[0],"borderLeftWidth",!0)}),{top:t.top-o.top-v.css(n,"marginTop",!0),left:t.left-o.left-v.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===v.css(e,"position");)e=e.offsetParent;return e||fe})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;v.fn[e]=function(o){return W(this,function(e,o,r){var i;return v.isWindow(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===r?i?i[t]:e[o]:void(i?i.scrollTo(n?i.pageXOffset:r,n?r:i.pageYOffset):e[o]=r)},e,o,arguments.length)}}),v.each(["top","left"],function(e,t){v.cssHooks[t]=Fe(p.pixelPosition,function(e,n){if(n)return n=Pe(e,t),Oe.test(n)?v(e).position()[t]+"px":n})}),v.each({Height:"height",Width:"width"},function(e,t){v.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,o){v.fn[o]=function(r,i){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===i?"margin":"border");return W(this,function(t,n,r){var i;return v.isWindow(t)?0===o.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?v.css(t,n,s):v.style(t,n,r,s)},t,a?r:void 0,a)}})}),v.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),v.holdReady=function(e){e?v.readyWait++:v.ready(!0)},v.isArray=Array.isArray,v.parseJSON=JSON.parse,v.nodeName=E,"function"==typeof define&&define.amd&&define("jquery",[],function(){return v});var st=e.jQuery,ct=e.$;return v.noConflict=function(t){return e.$===v&&(e.$=ct),t&&e.jQuery===v&&(e.jQuery=st),v},t||(e.jQuery=e.$=v),v}),function(e,t){"function"==typeof define&&define.amd?define("p5",[],function(){return e.returnExportsGlobal=t()}):"object"==typeof exports?module.exports=t():e.p5=t()}(this,function(){var amdclean={},c,a,b;return amdclean.shim=void(window.requestDraw=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}),amdclean.constants=(a=Math.PI,{ARROW:"default",CROSS:"crosshair",HAND:"pointer",MOVE:"move",TEXT:"text",WAIT:"wait",HALF_PI:a/2,PI:a,QUARTER_PI:a/4,TAU:2*a,TWO_PI:2*a,DEGREES:"degrees",RADIANS:"radians",CORNER:"corner",CORNERS:"corners",RADIUS:"radius",RIGHT:"right",LEFT:"left",CENTER:"center",TOP:"top",BOTTOM:"bottom",BASELINE:"alphabetic",POINTS:"points",LINES:"lines",TRIANGLES:"triangles",TRIANGLE_FAN:"triangles_fan",TRIANGLE_STRIP:"triangles_strip",QUADS:"quads",QUAD_STRIP:"quad_strip",CLOSE:"close",OPEN:"open",CHORD:"chord",PIE:"pie",PROJECT:"square",SQUARE:"butt",ROUND:"round",BEVEL:"bevel",MITER:"miter",RGB:"rgb",HSB:"hsb",AUTO:"auto",ALT:18,BACKSPACE:8,CONTROL:17,DELETE:46,DOWN_ARROW:40,ENTER:13,ESCAPE:27,LEFT_ARROW:37,OPTION:18,RETURN:13,RIGHT_ARROW:39,SHIFT:16,TAB:9,UP_ARROW:38,BLEND:"normal",ADD:"lighter",DARKEST:"darken",LIGHTEST:"lighten",DIFFERENCE:"difference",EXCLUSION:"exclusion",MULTIPLY:"multiply",SCREEN:"screen",REPLACE:"source-over",OVERLAY:"overlay",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DODGE:"color-dodge",BURN:"color-burn",THRESHOLD:"threshold",GRAY:"gray",OPAQUE:"opaque",INVERT:"invert",POSTERIZE:"posterize",DILATE:"dilate",ERODE:"erode",BLUR:"blur",NORMAL:"normal",ITALIC:"italic",BOLD:"bold",LINEAR:"linear",QUADRATIC:"quadratic",BEZIER:"bezier",CURVE:"curve"}),amdclean.core=function(e,t,n){"use strict";n=n;var o=function(e,t,r){for(var i in 2===arguments.length&&"boolean"==typeof t&&(r=t,t=void 0),this._setupDone=!1,this._pixelDensity=window.devicePixelRatio||1,this._startTime=(new Date).getTime(),this._userNode=t,this._curElement=null,this._elements=[],this._preloadCount=0,this._updateInterval=0,this._isGlobal=!1,this._loop=!0,this._styles=[],this._defaultCanvasSize={width:100,height:100},this._events={mousemove:null,mousedown:null,mouseup:null,click:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,touchstart:null,touchmove:null,touchend:null,resize:null,blur:null},window.DeviceOrientationEvent?this._events.deviceorientation=null:window.DeviceMotionEvent?this._events.devicemotion=null:this._events.MozOrientation=null,/Firefox/i.test(navigator.userAgent)?this._events.DOMMouseScroll=null:this._events.mousewheel=null,this._loadingScreenId="p5_loading",this._start=(function(){this._userNode&&"string"==typeof this._userNode&&(this._userNode=document.getElementById(this._userNode)),this._loadingScreen=document.getElementById(this._loadingScreenId),this._loadingScreen||(this._loadingScreen=document.createElement("loadingDiv"),this._loadingScreen.innerHTML="loading...",this._loadingScreen.style.position="absolute",(this._userNode||document.body).appendChild(this._loadingScreen)),this.createCanvas(this._defaultCanvasSize.width,this._defaultCanvasSize.height,!0);var e=this.preload||window.preload,t=this._isGlobal?window:this;e?(this._preloadMethods.forEach(function(e){t[e]=function(){var n=Array.prototype.slice.call(arguments);return t._preload(e,n)}}),e(),0===this._preloadCount&&(this._setup(),this._runFrames(),this._draw())):(this._setup(),this._runFrames(),this._draw())}).bind(this),this._preload=(function(e,t){var n=this._isGlobal?window:this;return n._setProperty("_preloadCount",n._preloadCount+1),t.push(function(){n._setProperty("_preloadCount",n._preloadCount-1),0===n._preloadCount&&(n._setup(),n._runFrames(),n._draw())}),o.prototype[e].apply(n,t)}).bind(this),this._setup=(function(){var e=this._isGlobal?window:this;"function"==typeof e.preload&&this._preloadMethods.forEach(function(t){e[t]=o.prototype[t]}),"function"==typeof e.setup&&e.setup(),this.canvas.style.visibility="",this.canvas.className=this.canvas.className.replace("p5_hidden",""),this._setupDone=!0,this._loadingScreen.parentNode.removeChild(this._loadingScreen)}).bind(this),this._draw=(function(){var e=(new Date).getTime();this._frameRate=1e3/(e-this._lastFrameTime),this._lastFrameTime=e,this._setProperty("frameCount",this.frameCount+1),this._loop&&(this._drawInterval&&clearInterval(this._drawInterval),this._drawInterval=setTimeout((function(){window.requestDraw(this._draw.bind(this))}).bind(this),1e3/this._targetFrameRate)),this.redraw(),this._updatePAccelerations(),this._updatePMouseCoords(),this._updatePTouchCoords()}).bind(this),this._runFrames=(function(){this._updateInterval&&clearInterval(this._updateInterval)}).bind(this),this._setProperty=(function(e,t){this[e]=t,this._isGlobal&&(window[e]=t)}).bind(this),this.remove=(function(){if(this._curElement){for(var e in this._loop=!1,this._drawInterval&&clearTimeout(this._drawInterval),this._updateInterval&&clearTimeout(this._updateInterval),this._events)window.removeEventListener(e,this._events[e]);for(var t=0;t<this._elements.length;t++){var n=this._elements[t];for(var r in n.elt.parentNode&&n.elt.parentNode.removeChild(n.elt),n._events)n.elt.removeEventListener(r,n._events[r])}var i=this;if(this._registeredMethods.remove.forEach(function(e){void 0!==e&&e.call(i)}),this._isGlobal){for(var a in o.prototype)try{delete window[a]}catch(s){window[a]=void 0}for(var c in this)if(this.hasOwnProperty(c))try{delete window[c]}catch(s){window[c]=void 0}}}}).bind(this),n)o.prototype[i]=n[i];if(e)e(this);else{for(var a in this._isGlobal=!0,o.prototype)if("function"==typeof o.prototype[a]){var s=a.substring(2);this._events.hasOwnProperty(s)||(window[a]=o.prototype[a].bind(this))}else window[a]=o.prototype[a];for(var c in this)this.hasOwnProperty(c)&&(window[c]=this[c])}for(var l in this._events){var u=this["_on"+l];if(u){var d=u.bind(this);window.addEventListener(l,d),this._events[l]=d}}var h=this;window.addEventListener("focus",function(){h._setProperty("focused",!0)}),window.addEventListener("blur",function(){h._setProperty("focused",!1)}),r?this._start():"complete"===document.readyState?this._start():window.addEventListener("load",this._start.bind(this),!1)};return o.prototype._preloadMethods=["loadJSON","loadImage","loadStrings","loadXML","loadShape","loadTable"],o.prototype._registeredMethods={pre:[],post:[],remove:[]},o.prototype.registerPreloadMethod=(function(e){o.prototype._preloadMethods.push(e)}).bind(this),o.prototype.registerMethod=(function(e,t){o.prototype._registeredMethods.hasOwnProperty(e)||(o.prototype._registeredMethods[e]=[]),o.prototype._registeredMethods[e].push(t)}).bind(this),o}(0,0,amdclean.constants),amdclean.utilscolor_utils=(c=amdclean.core,c.ColorUtils={}
1,c.ColorUtils.hsbaToRGBA=function(e){var t=e[0],n=e[1],o=e[2];t/=255,o/=255;var r=[];if(0==(n/=255))r=[Math.round(255*o),Math.round(255*o),Math.round(255*o),e[3]];else{var i=6*t;6===i&&(i=0);var a,s,c,l=Math.floor(i),u=o*(1-n),d=o*(1-n*(i-l)),h=o*(1-n*(1-(i-l)));0===l?(a=o,s=h,c=u):1===l?(a=d,s=o,c=u):2===l?(a=u,s=o,c=h):3===l?(a=u,s=d,c=o):4===l?(a=h,s=u,c=o):(a=o,s=u,c=d),r=[Math.round(255*a),Math.round(255*s),Math.round(255*c),e[3]]}return r},c.ColorUtils.rgbaToHSBA=function(e){var t,n,o=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(o,r,i),s=Math.max(o,r,i),c=s-a,l=s;if(0===c)t=0,n=0;else{n=c/s;var u=((s-o)/6+c/2)/c,d=((s-r)/6+c/2)/c,h=((s-i)/6+c/2)/c;o===s?t=h-d:r===s?t=1/3+u-h:i===s&&(t=2/3+d-u),0>t&&(t+=1),t>1&&(t-=1)}return[Math.round(255*t),Math.round(255*n),Math.round(255*l),e[3]]},c.ColorUtils),amdclean.p5Color=function(e,t,n,o){var r=amdclean.core,i=amdclean.utilscolor_utils;o=o,r.Color=function(e,t){return this.color_array=r.Color._getFormattedColor.apply(e,t),this._normalizeColorArray(e),e._colorMode===o.HSB?(this.hsba=this.color_array,this.rgba=i.hsbaToRGBA(this.hsba)):(this.rgba=this.color_array,this.hsba=i.rgbaToHSBA(this.rgba)),this},r.Color.prototype._normalizeColorArray=function(e){var t=e._colorMode===o.RGB?e._maxRGB:e._maxHSB,n=this.color_array;return n[0]*=255/t[0],n[1]*=255/t[1],n[2]*=255/t[2],n[3]*=255/t[3],n},r.Color.prototype.getHue=function(){return this.hsba[0]},r.Color.prototype.getSaturation=function(){return this.hsba[1]},r.Color.prototype.getBrightness=function(){return this.hsba[2]},r.Color.prototype.getRed=function(){return this.rgba[0]},r.Color.prototype.getGreen=function(){return this.rgba[1]},r.Color.prototype.getBlue=function(){return this.rgba[2]},r.Color.prototype.getAlpha=function(){return this.rgba[3]},r.Color.prototype.toString=function(){for(var e=this.rgba,t=0;3>t;t++)e[t]=Math.floor(e[t]);return"rgba("+e[0]+","+e[1]+","+e[2]+","+(void 0!==e[3]?e[3]/255:1)+")"};var a=/\s*/,s=/(\d{1,3})/,c=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,l=new RegExp(c.source+"%"),u={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
1almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},d={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:new RegExp(["^rgb\\(",s.source,",",s.source,",",s.source,"\\)$"].join(a.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",l.source,",",l.source,",",l.source,"\\)$"].join(a.source),"i"),RGBA:new RegExp(["^rgba\\(",s.source,",",s.source,",",s.source,",",c.source,"\\)$"].join(a.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",l.source,",",l.source,",",l.source,",",c.source,"\\)$"].join(a.source),"i")};return r.Color._getFormattedColor=function(){var e,t,n,i,a,s;if(arguments.length>=3)e=arguments[0],t=arguments[1],n=arguments[2],i="number"==typeof arguments[3]?arguments[3]:255;else{if("string"==typeof arguments[0])return a=arguments[0].trim().toLowerCase(),u[a]?r.Color._getFormattedColor.apply(this,[u[a]]):(s=d.HEX3.test(a)?d.HEX3.exec(a).slice(1).map(function(e){return parseInt(e+e,16)}):d.HEX6.test(a)?d.HEX6.exec(a).slice(1).map(function(e){return parseInt(e,16)}):d.RGB.test(a)?d.RGB.exec(a).slice(1).map(function(e){return parseInt(e,10)}):d.RGB_PERCENT.test(a)?d.RGB_PERCENT.exec(a).slice(1).map(function(e){return parseInt(parseFloat(e)/100*255,10)}):d.RGBA.test(a)?d.RGBA.exec(a).slice(1).map(function(e,t){return 3===t?parseInt(255*parseFloat(e),10):parseInt(e,10)}):d.RGBA_PERCENT.test(a)?d.RGBA_PERCENT.exec(a).slice(1).map(function(e,t){return 3===t?parseInt(255*parseFloat(e),10):parseInt(parseFloat(e)/100*255,10)}):[255],r.Color._getFormattedColor.apply(this,s));this._colorMode===o.RGB?e=t=n=arguments[0]:(e=n=arguments[0],t=0),i="number"==typeof arguments[1]?arguments[1]:255}return[e,t,n,i]},r.Color}(0,0,0,amdclean.constants),amdclean.p5Element=function(e,t){function n(e,t,n){var o=t.bind(n);n.elt.addEventListener(e,o,!1),n._events[e]=o}var o=amdclean.core;return o.Element=function(e,t){this.elt=e,this._pInst=t,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight},o.Element.prototype.parent=function(e){return"string"==typeof e?e=document.getElementById(e):e instanceof o.Element&&(e=e.elt),e.appendChild(this.elt),this},o.Element.prototype.id=function(e){return this.elt.id=e,this},o.Element.prototype.class=function(e){return this.elt.className+=" "+e,this},o.Element.prototype.mousePressed=function(e){return n("mousedown",e,this),n("touchstart",e,this),this},o.Element.prototype.mouseWheel=function(e){return n("mousewheel",e,this),this},o.Element.prototype.mouseReleased=function(e){return n("mouseup",e,this),n("touchend",e,this),this},o.Element.prototype.mouseClicked=function(e){return n("click",e,this),this},o.Element.prototype.mouseMoved=function(e){return n("mousemove",e,this),n("touchmove",e,this),this},o.Element.prototype.mouseOver=function(e){return n("mouseover",e,this),this},o.Element.prototype.mouseOut=function(e){return n("mouseout",e,this),this},o.Element.prototype.touchStarted=function(e){return n("touchstart",e,this),n("mousedown",e,this),this},o.Element.prototype.touchMoved=function(e){return n("touchmove",e,this),n("mousemove",e,this),this},o.Element.prototype.touchEnded=function(e){return n("touchend",e,this),n("mouseup",e,this),this},o.Element.prototype.dragOver=function(e){return n("dragover",e,this),this},o.Element.prototype.dragLeave=function(e){return n("dragleave",e,this),this},o.Element.prototype.drop=function(e,t){function r(t){var n=new o.File(t);return function(t){n.data=t.target.result,e(n)}}return window.File&&window.FileReader&&window.FileList&&window.Blob?(n("dragover",function(e){e.stopPropagation(),e.preventDefault()},this),n("dragleave",function(e){e.stopPropagation(),e.preventDefault()},this),arguments.length>1&&n("drop",t,this),n("drop",function(e){e.stopPropagation(),e.preventDefault();for(var t=e.dataTransfer.files,n=0;n<t.length;n++){var o=t[n],i=new FileReader;i.onload=r(o),"text"===o.type?i.readAsText(o):i.readAsDataURL(o)}},this)):console.log("The File APIs are not fully supported in this browser."),this},o.Element.prototype._setProperty=function(e,t){this[e]=t},o.Element}(),amdclean.p5Graphics=function(e,t,n){var o=amdclean.core;return n=n,o.Graphics=function(e,t,n){o.Element.call(this,e,t),this.canvas=e,this.drawingContext=this.canvas.getContext("2d"),this._pInst=t,n?(this._isMainCanvas=!0,this._pInst._setProperty("_curElement",this),this._pInst._setProperty("canvas",this.canvas),this._pInst._setProperty("drawingContext",this.drawingContext),this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)):(this.canvas.style.display="none",this._styles=[])},o.Graphics.prototype=Object.create(o.Element.prototype),o.Graphics.prototype._applyDefaults=function(){this.drawingContext.fillStyle="#FFFFFF",this.drawingContext.strokeStyle="#000000",this.drawingContext.lineCap=n.ROUND,this.drawingContext.font="normal 12px sans-serif"},o.Graphics.prototype.resize=function(e,t){this.width=e,this.height=t,this.elt.width=e*this._pInst._pixelDensity,this.elt.height=t*this._pInst._pixelDensity,this.elt.style.width=e+"px",this.elt.style.height=t+"px",this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)},o.Graphics}(0,0,amdclean.constants),amdclean.filters=function(){"use strict";function e(e,a){for(var s=i._toPixels(e),c=e.width,l=e.height,u=c*l,d=new Int32Array(u),h=0;u>h;h++)d[h]=i._getARGB(s,h);var f,p,g,m,v,y,w,b,_,C,T,x,S,R,E=new Int32Array(u),A=new Int32Array(u),k=new Int32Array(u),D=new Int32Array(u),I=0;for(function(e){var i=3.5*e|0;if(t!==(i=1>i?1:248>i?i:248)){n=1+(t=i)<<1,o=new Int32Array(n),r=new Array(n);for(var a=0;n>a;a++)r[a]=new Int32Array(256);for(var s,c,l,u,d=1,h=i-1;i>d;d++){o[i+d]=o[h]=c=h*h,l=r[i+d],u=r[h--];for(var f=0;256>f;f++)l[f]=u[f]=c*f}s=o[i]=i*i,l=r[i];for(var p=0;256>p;p++)l[p]=s*p}}(a),x=0;l>x;x++){for(T=0;c>T;T++){if(m=g=p=v=f=0,0>(y=T-t))C=-y,y=0;else{if(y>=c)break;C=0}for(S=C;n>S&&!(y>=c);S++){var M=d[y+I];v+=(R=r[S])[(-16777216&M)>>>24],p+=R[(16711680&M)>>16],g+=R[(65280&M)>>8],m+=R[255&M],f+=o[S],y++}E[w=I+T]=v/f,A[w]=p/f,k[w]=g/f,D[w]=m/f}I+=c}for(I=0,_=(b=-t)*c,x=0;l>x;x++){for(T=0;c>T;T++){if(m=g=p=v=f=0,0>b)C=w=-b,y=T;else{if(b>=l)break;C=0,w=b,y=T+_}for(S=C;n>S&&!(w>=l);S++)v+=(R=r[S])[E[y]],p+=R[A[y]],g+=R[k[y]],m+=R[D[y]],f+=o[S],w++,y+=c;d[T+I]=v/f<<24|p/f<<16|g/f<<8|m/f}I+=c,_+=c,b++}i._setPixels(s,d)}var t,n,o,r,i={_toPixels:function(e){return e instanceof ImageData?e.data:e.getContext("2d").getImageData(0,0,e.width,e.height).data},_getARGB:function(e,t){var n=4*t;return e[n+3]<<24&4278190080|e[n]<<16&16711680|e[n+1]<<8&65280|255&e[n+2]},_setPixels:function(e,t){for(var n=0,o=0,r=e.length;r>o;o++)e[0+(n=4*o)]=(16711680&t[o])>>>16,e[n+1]=(65280&t[o])>>>8,e[n+2]=255&t[o],e[n+3]=(4278190080&t[o])>>>24},_toImageData:function(e){return e instanceof ImageData?e:e.getContext("2d").getImageData(0,0,e.width,e.height)},_createImageData:function(e,t){return i._tmpCanvas=document.createElement("canvas"),i._tmpCtx=i._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(e,t)},apply:function(e,t,n){var o=e.getContext("2d"),r=o.getImageData(0,0,e.width,e.height),i=t(r,n);i instanceof ImageData?o.putImageData(i,0,0,0,0,e.width,e.height):o.putImageData(r,0,0,0,0,e.width,e.height)},threshold:function(e,t){var n=i._toPixels(e);void 0===t&&(t=.5);for(var o=Math.floor(255*t),r=0;r<n.length;r+=4)n[r]=n[r+1]=n[r+2]=.2126*n[r]+.7152*n[r+1]+.0722*n[r+2]>=o?255:0},gray:function(e){for(var t=i._toPixels(e),n=0;n<t.length;n+=4)t[n]=t[n+1]=t[n+2]=.2126*t[n]+.7152*t[n+1]+.0722*t[n+2]},opaque:function(e){for(var t=i._toPixels(e),n=0;n<t.length;n+=4)t[n+3]=255;return t},invert:function(e){for(var t=i._toPixels(e),n=0;n<t.length;n+=4)t[n]=255-t[n],t[n+1]=255-t[n+1],t[n+2]=255-t[n+2]},posterize:function(e,t){var n=i._toPixels(e);if(2>t||t>255)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var o=t-1,r=0;r<n.length;r+=4){var a=n[r+1],s=n[r+2];n[r]=255*(n[r]*t>>8)/o,n[r+1]=255*(a*t>>8)/o,n[r+2]=255*(s*t>>8)/o}},dilate:function(e){for(var t,n,o,r,a,s,c,l,u,d,h,f,p,g,m,v,y,w=i._toPixels(e),b=0,_=w.length?w.length/4:0,C=new Int32Array(_);_>b;)for(t=b,n=b+e.width;n>b;)o=r=i._getARGB(w,b),t>(c=b-1)&&(c=b),(s=b+1)>=n&&(s=b),0>(l=b-e.width)&&(l=0),(u=b+e.width)>=_&&(u=b),f=i._getARGB(w,l),h=i._getARGB(w,c),p=i._getARGB(w,u),(m=77*(h>>16&255)+151*(h>>8&255)+28*(255&h))>(a=77*(o>>16&255)+151*(o>>8&255)+28*(255&o))&&(r=h,a=m),(g=77*((d=i._getARGB(w,s))>>16&255)+151*(d>>8&255)+28*(255&d))>a&&(r=d,a=g),(v=77*(f>>16&255)+151*(f>>
18&255)+28*(255&f))>a&&(r=f,a=v),(y=77*(p>>16&255)+151*(p>>8&255)+28*(255&p))>a&&(r=p,a=y),C[b++]=r;i._setPixels(w,C)},erode:function(e){for(var t,n,o,r,a,s,c,l,u,d,h,f,p,g,m,v,y,w=i._toPixels(e),b=0,_=w.length?w.length/4:0,C=new Int32Array(_);_>b;)for(t=b,n=b+e.width;n>b;)o=r=i._getARGB(w,b),t>(c=b-1)&&(c=b),(s=b+1)>=n&&(s=b),0>(l=b-e.width)&&(l=0),(u=b+e.width)>=_&&(u=b),f=i._getARGB(w,l),h=i._getARGB(w,c),p=i._getARGB(w,u),(a=77*(o>>16&255)+151*(o>>8&255)+28*(255&o))>(m=77*(h>>16&255)+151*(h>>8&255)+28*(255&h))&&(r=h,a=m),a>(g=77*((d=i._getARGB(w,s))>>16&255)+151*(d>>8&255)+28*(255&d))&&(r=d,a=g),a>(v=77*(f>>16&255)+151*(f>>8&255)+28*(255&f))&&(r=f,a=v),a>(y=77*(p>>16&255)+151*(p>>8&255)+28*(255&p))&&(r=p,a=y),C[b++]=r;i._setPixels(w,C)},blur:function(t,n){e(t,n)}};return i}(),amdclean.p5Image=function(e,t,n){"use strict";var o=amdclean.core,r=amdclean.filters;return o.Image=function(e,t){this.width=e,this.height=t,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),this.pixels=[]},o.Image.prototype._setProperty=function(e,t){this[e]=t},o.Image.prototype.loadPixels=function(){o.prototype.loadPixels.call(this)},o.Image.prototype.updatePixels=function(e,t,n,r){o.prototype.updatePixels.call(this,e,t,n,r)},o.Image.prototype.get=function(e,t,n,r){return o.prototype.get.call(this,e,t,n,r)},o.Image.prototype.set=function(e,t,n){o.prototype.set.call(this,e,t,n)},o.Image.prototype.resize=function(e,t){e=e||this.canvas.width,t=t||this.canvas.height;var n=document.createElement("canvas");n.width=e,n.height=t,n.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,n.width,n.height),this.canvas.width=this.width=e,this.canvas.height=this.height=t,this.drawingContext.drawImage(n,0,0,e,t,0,0,e,t),this.pixels.length>0&&this.loadPixels()},o.Image.prototype.copy=function(){o.prototype.copy.apply(this,arguments)},o.Image.prototype.mask=function(e){void 0===e&&(e=this);var t=this.drawingContext.globalCompositeOperation,n=1;e instanceof o.Graphics&&(n=e._pInst._pixelDensity);var r=[e,0,0,n*e.width,n*e.height,0,0,this.width,this.height];this.drawingContext.globalCompositeOperation="destination-in",this.copy.apply(this,r),this.drawingContext.globalCompositeOperation=t},o.Image.prototype.filter=function(e,t){r.apply(this.canvas,r[e.toLowerCase()],t)},o.Image.prototype.blend=function(){o.prototype.blend.apply(this,arguments)},o.Image.prototype.save=function(e,t){var n;if(t)switch(t.toLowerCase()){case"png":n="image/png";break;case"jpeg":case"jpg":n="image/jpeg";break;default:n="image/png"}else t="png",n="image/png";var r=this.canvas.toDataURL(n);r=r.replace(n,"image/octet-stream"),o.prototype.downloadFile(r,e,t)},o.Image}(),amdclean.p5File=function(e,t){var n=amdclean.core;return n.File=function(e,t){this.file=e,this._pInst=t;var n=e.type.split("/");this.type=n[0],this.subtype=n[1],this.name=e.name,this.size=e.size,this.data=void 0},n.File}(),amdclean.polargeometry={degreesToRadians:function(e){return 2*Math.PI*e/360},radiansToDegrees:function(e){return 360*e/(2*Math.PI)}},amdclean.p5Vector=function(e,t,n,o){"use strict";var r=amdclean.core,i=amdclean.polargeometry;return o=o,r.Vector=function(){var e,t,n;arguments[0]instanceof r?(this.p5=arguments[0],e=arguments[1][0]||0,t=arguments[1][1]||0,n=arguments[1][2]||0):(e=arguments[0]||0,t=arguments[1]||0,n=arguments[2]||0),this.x=e,this.y=t,this.z=n},r.Vector.prototype.set=function(e,t,n){return e instanceof r.Vector?(this.x=e.x||0,this.y=e.y||0,this.z=e.z||0,this):e instanceof Array?(this.x=e[0]||0,this.y=e[1]||0,this.z=e[2]||0,this):(this.x=e||0,this.y=t||0,this.z=n||0,this)},r.Vector.prototype.copy=function(){return this.p5?new r.Vector(this.p5,[this.x,this.y,this.z]):new r.Vector(this.x,this.y,this.z)},r.Vector.prototype.add=function(e,t,n){return e instanceof r.Vector?(this.x+=e.x||0,this.y+=e.y||0,this.z+=e.z||0,this):e instanceof Array?(this.x+=e[0]||0,this.y+=e[1]||0,this.z+=e[2]||0,this):(this.x+=e||0,this.y+=t||0,this.z+=n||0,this)},r.Vector.prototype.sub=function(e,t,n){return e instanceof r.Vector?(this.x-=e.x||0,this.y-=e.
1y||0,this.z-=e.z||0,this):e instanceof Array?(this.x-=e[0]||0,this.y-=e[1]||0,this.z-=e[2]||0,this):(this.x-=e||0,this.y-=t||0,this.z-=n||0,this)},r.Vector.prototype.mult=function(e){return this.x*=e||0,this.y*=e||0,this.z*=e||0,this},r.Vector.prototype.div=function(e){return this.x/=e,this.y/=e,this.z/=e,this},r.Vector.prototype.mag=function(){return Math.sqrt(this.magSq())},r.Vector.prototype.magSq=function(){var e=this.x,t=this.y,n=this.z;return e*e+t*t+n*n},r.Vector.prototype.dot=function(e,t,n){return e instanceof r.Vector?this.dot(e.x,e.y,e.z):this.x*(e||0)+this.y*(t||0)+this.z*(n||0)},r.Vector.prototype.cross=function(e){var t=this.y*e.z-this.z*e.y,n=this.z*e.x-this.x*e.z,o=this.x*e.y-this.y*e.x;return this.p5?new r.Vector(this.p5,[t,n,o]):new r.Vector(t,n,o)},r.Vector.prototype.dist=function(e){return e.copy().sub(this).mag()},r.Vector.prototype.normalize=function(){return this.div(this.mag())},r.Vector.prototype.limit=function(e){var t=this.magSq();return t>e*e&&(this.div(Math.sqrt(t)),this.mult(e)),this},r.Vector.prototype.setMag=function(e){return this.normalize().mult(e)},r.Vector.prototype.heading=function(){var e=Math.atan2(this.y,this.x);return this.p5?this.p5._angleMode===o.RADIANS?e:i.radiansToDegrees(e):e},r.Vector.prototype.rotate=function(e){this.p5&&this.p5._angleMode===o.DEGREES&&(e=i.degreesToRadians(e));var t=this.heading()+e,n=this.mag();return this.x=Math.cos(t)*n,this.y=Math.sin(t)*n,this},r.Vector.prototype.lerp=function(e,t,n,o){return e instanceof r.Vector?this.lerp(e.x,e.y,e.z,t):(this.x+=(e-this.x)*o||0,this.y+=(t-this.y)*o||0,this.z+=(n-this.z)*o||0,this)},r.Vector.prototype.array=function(){return[this.x||0,this.y||0,this.z||0]},r.Vector.prototype.equals=function(e,t,n){return e instanceof r.Vector?(t=(e=e.x||0).y||0,n=e.z||0):e instanceof Array?(t=(e=e[0]||0)[1]||0,n=e[2]||0):(e=e||0,t=t||0,n=n||0),this.x===e&&this.y===t&&this.z===n},r.Vector.fromAngle=function(e){return this.p5&&this.p5._angleMode===o.DEGREES&&(e=i.degreesToRadians(e)),this.p5?new r.Vector(this.p5,[Math.cos(e),Math.sin(e),0]):new r.Vector(Math.cos(e),Math.sin(e),0)},r.Vector.random2D=function(){var e;return e=this.p5?this.p5.random(this.p5._angleMode===o.DEGREES?360:o.TWO_PI):Math.random()*Math.PI*2,this.fromAngle(e)},r.Vector.random3D=function(){var e,t;this.p5?(e=this.p5.random(0,o.TWO_PI),t=this.p5.random(-1,1)):(e=Math.random()*Math.PI*2,t=2*Math.random()-1);var n=Math.sqrt(1-t*t)*Math.cos(e),i=Math.sqrt(1-t*t)*Math.sin(e);return this.p5?new r.Vector(this.p5,[n,i,t]):new r.Vector(n,i,t)},r.Vector.add=function(e,t,n){return n?n.set(e):n=e.copy(),n.add(t),n},r.Vector.sub=function(e,t,n){return n?n.set(e):n=e.copy(),n.sub(t),n},r.Vector.mult=function(e,t,n){return n?n.set(e):n=e.copy(),n.mult(t),n},r.Vector.div=function(e,t,n){return n?n.set(e):n=e.copy(),n.div(t),n},r.Vector.dot=function(e,t){return e.dot(t)},r.Vector.cross=function(e,t){return e.cross(t)},r.Vector.dist=function(e,t){return e.dist(t)},r.Vector.lerp=function(e,t,n,o){return o?o.set(e):o=e.copy(),o.lerp(t,n),o},r.Vector.angleBetween=function(e,t){var n=Math.acos(e.dot(t)/(e.mag()*t.mag()));return this.p5&&this.p5._angleMode===o.DEGREES&&(n=i.radiansToDegrees(n)),n},r.Vector}(0,0,0,amdclean.constants),amdclean.p5TableRow=function(e,t){"use strict";var n=amdclean.core;return n.TableRow=function(e,t){var n=[],o={};e&&(n=e.split(t=t||","));for(var r=0;r<n.length;r++)o[r]=n[r];this.arr=n,this.obj=o,this.table=null},n.TableRow.prototype.set=function(e,t){if("string"==typeof e){var n=this.table.columns.indexOf(e);if(!(n>=0))throw'This table has no column named "'+e+'"';this.obj[e]=t,this.arr[n]=t}else{if(!(e<this.table.columns.length))throw"Column #"+e+" is out of the range of this table";this.arr[e]=t,this.obj[this.table.columns[e]]=t}},n.TableRow.prototype.setNum=function(e,t){var n=parseFloat(t,10);this.set(e,n)},n.TableRow.prototype.setString=function(e,t){var n=t.toString();this.set(e,n)},n.TableRow.prototype.get=function(e){return"string"==typeof e?this.obj[e]:this.arr[e]},n.TableRow.prototype.getNum=function(e){var t;if("NaN"===(t="string"==typeof e?parseFloat(this.obj[e],10):parseFloat(this.arr[e],10)).toString())throw"Error: "+this.obj[e]+" is NaN (Not a Number)";return t},n.TableRow.prototype.getString=function(e){return"string"==typeof e?this.obj[e].toString():this.arr[e].toString()},n.TableRow}(),amdclean.p5Table=function(e,t){"use strict";var n=amdclean.core;return n.Table=function(){this.columns=[],this.rows=[]},n.Table.prototype.addRow=function(e){var t=e||new n.TableRow;if(void 0===t.arr||void 0===t.obj)throw"invalid TableRow: "+t;return t.table=this,this.rows.push(t),t},n.Table.prototype.removeRow=function(e){this.rows[e].table=null;var t=this.rows.splice(e+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(t)},n.Table.prototype.getRow=function(e){return this.rows[e]},n.Table.prototype.getRows=function(){return this.rows},n.Table.prototype.findRow=function(e,t){if("string"==typeof t){for(var n=0;n<this.rows.length;n++)if(this.rows[n].obj[t]===e)return this.rows[n]}else for(var o=0;o<this.rows.length;o++)if(this.rows[o].arr[t]===e)return this.rows[o];return null},n.Table.prototype.findRows=function(e,t){var n=[];if("string"==typeof t)for(var o=0;o<this.rows.length;o++)this.rows[o].obj[t]===e&&n.push(this.rows[o]);else for(var r=0;r<this.rows.length;r++)this.rows[r].arr[t]===e&&n.push(this.rows[r]);return n},n.Table.prototype.matchRow=function(e,t){if("number"==typeof t){for(var n=0;n<this.rows.length;n++)if(this.rows[n].arr[t].match(e))return this.rows[n]}else for(var o=0;o<this.rows.length;o++)if(this.rows[o].obj[t].match(e))return this.rows[o];return null},n.Table.prototype.matchRows=function(e,t){var n=[];if("number"==typeof t)for(var o=0;o<this.rows.length;o++)this.rows[o].arr[t].match(e)&&n.push(this.rows[o]);else for(var r=0;r<this.rows.length;r++)this.rows[r].obj[t].match(e)&&n.push(this.rows[r]);return n},n.Table.prototype.getColumn=function(e){var t=[];if("string"==typeof e)for(var n=0;n<this.rows.length;n++)t.push(this.rows[n].obj[e]);else for(var o=0;o<this.rows.length;o++)t.push(this.rows[o].arr[e]);return t},n.Table.prototype.clearRows=function(){delete this.rows,this.rows=[]},n.Table.prototype.addColumn=function(e){this.columns.push(e||null)},n.Table.prototype.getColumnCount=function(){return this.columns.length},n.Table.prototype.getRowCount=function(){return this.rows.length},n.Table.prototype.removeTokens=function(e,t){for(var n=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},o=[],r=0;r<e.length;r++)o.push(n(e.charAt(r)));var i=new RegExp(o.join("|"),"g");if(void 0===t)for(var a=0;a<this.columns.length;a++)for(var s=0;s<this.rows.length;s++){var c=this.rows[s].arr[a];c=c.replace(i,""),this.rows[s].arr[a]=c,this.rows[s].obj[this.columns[a]]=c}else if("string"==typeof t)for(var l=0;l<this.rows.length;l++){var u=this.rows[l].obj[t];u=u.replace(i,""),this.rows[l].obj[t]=u;var d=this.columns.indexOf(t);this.rows[l].arr[d]=u}else for(var h=0;h<this.rows.length;h++){var f=this.rows[h].arr[t];f=f.replace(i,""),this.rows[h].arr[t]=f,this.rows[h].obj[this.columns[t]]=f}},n.Table.prototype.trim=function(e){var t=new RegExp(" ","g");if(void 0===e)for(var n=0;n<this.columns.length;n++)for(var o=0;o<this.rows.length;o++){var r=this.rows[o].arr[n];r=r.replace(t,""),this.rows[o].arr[n]=r,this.rows[o].obj[this.columns[n]]=r}else if("string"==typeof e)for(var i=0;i<this.rows.length;i++){var a=this.rows[i].obj[e];a=a.replace(t,""),this.rows[i].obj[e]=a;var s=this.columns.indexOf(e);this.rows[i].arr[s]=a}else for(var c=0;c<this.rows.length;c++){var l=this.rows[c].arr[e];l=l.replace(t,""),this.rows[c].arr[e]=l,this.rows[c].obj[this.columns[e]]=l}},n.Table.prototype.removeColumn=function(e){var t,n;"string"==typeof e?(t=e,n=this.columns.indexOf(e),console.log("string")):(n=e,t=this.columns[e]);var o=this.columns.splice(n+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(o);for(var r=0;r<this.rows.length;r++){var i=this.rows[r].arr,a=i.splice(n+1,i.length);i.pop(),this.rows[r].arr=i.concat(a),delete this.rows[r].obj[t]}},n.Table.prototype.set=function(e,t,n){this.rows[e].set(t,n)},n.Table.prototype.setNum=function(e,t,n){this.rows[e].set(t,n)},n.Table.prototype.setString=function(e,t,n){this.rows[e].set(t,n)},n.Table.prototype.get=function(e,t){return this.rows[e].get(t)},n.Table.prototype.getNum=function(e,t){return this.rows[e].getNum(t)},n.Table.prototype.getString=function(e,t){return this.rows[e].get
1String(t)},n.Table}(),amdclean.colorcreating_reading=function(e,t){"use strict";var n=amdclean.core;return n.prototype.alpha=function(e){if(e instanceof n.Color||e instanceof Array)return this.color(e).getAlpha();throw new Error("Needs p5.Color or pixel array as argument.")},n.prototype.blue=function(e){if(e instanceof n.Color||e instanceof Array)return this.color(e).getBlue();throw new Error("Needs p5.Color or pixel array as argument.")},n.prototype.brightness=function(e){if(!e instanceof n.Color)throw new Error("Needs p5.Color as argument.");return e.getBrightness()},n.prototype.color=function(){if(arguments[0]instanceof n.Color)return arguments[0];if(arguments[0]instanceof Array)return new n.Color(this,arguments[0]);var e=Array.prototype.slice.call(arguments);return new n.Color(this,e)},n.prototype.green=function(e){if(e instanceof n.Color||e instanceof Array)return this.color(e).getGreen();throw new Error("Needs p5.Color or pixel array as argument.")},n.prototype.hue=function(e){if(!e instanceof n.Color)throw new Error("Needs p5.Color as argument.");return e.getHue()},n.prototype.lerpColor=function(e,t,o){if(o=Math.max(Math.min(o,1),0),e instanceof Array){for(var r=[],i=0;i<e.length;i++)r.push(Math.sqrt(n.prototype.lerp(e[i]*e[i],t[i]*t[i],o)));return r}if(e instanceof n.Color){for(var a=[],s=0;4>s;s++)a.push(Math.sqrt(n.prototype.lerp(e.rgba[s]*e.rgba[s],t.rgba[s]*t.rgba[s],o)));return new n.Color(this,a)}return Math.sqrt(n.prototype.lerp(e*e,t*t,o))},n.prototype.red=function(e){if(e instanceof n.Color||e instanceof Array)return this.color(e).getRed();throw new Error("Needs p5.Color or pixel array as argument.")},n.prototype.saturation=function(e){if(!e instanceof n.Color)throw new Error("Needs p5.Color as argument.");return e.getSaturation()},n}(),amdclean.colorsetting=function(e,t,n){"use strict";var o=amdclean.core;return n=n,o.prototype._doStroke=!0,o.prototype._doFill=!0,o.prototype._colorMode=n.RGB,o.prototype._maxRGB=[255,255,255,255],o.prototype._maxHSB=[255,255,255,255],o.prototype.background=function(){if(this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pixelDensity,this._pixelDensity),arguments[0]instanceof o.Image)this.image(arguments[0],0,0,this.width,this.height);else{var e=this.drawingContext.fillStyle,t=this.color.apply(this,arguments).toString();this.drawingContext.fillStyle=t,this.drawingContext.fillRect(0,0,this.width,this.height),this.drawingContext.fillStyle=e}this.drawingContext.restore()},o.prototype.clear=function(){this.drawingContext.clearRect(0,0,this.width,this.height)},o.prototype.colorMode=function(){if(arguments[0]===n.RGB||arguments[0]===n.HSB){this._colorMode=arguments[0];var e=this._colorMode===n.RGB?this._maxRGB:this._maxHSB;2===arguments.length?(e[0]=arguments[1],e[1]=arguments[1],e[2]=arguments[1],e[3]=arguments[1]):arguments.length>2&&(e[0]=arguments[1],e[1]=arguments[2],e[2]=arguments[3]),5===arguments.length&&(e[3]=arguments[4])}},o.prototype.fill=function(){this._setProperty("_doFill",!0);var e=this.drawingContext,t=this.color.apply(this,arguments);e.fillStyle=t.toString()},o.prototype.noFill=function(){this._setProperty("_doFill",!1)},o.prototype.noStroke=function(){this._setProperty("_doStroke",!1)},o.prototype.stroke=function(){this._setProperty("_doStroke",!0);var e=this.drawingContext,t=this.color.apply(this,arguments);e.strokeStyle=t.toString()},o}(0,0,amdclean.constants),amdclean.dataconversion=function(e,t){"use strict";var n=amdclean.core;return n.prototype.float=function(e){return parseFloat(e)},n.prototype.int=function(e,t){return"string"==typeof e?(t=t||10,parseInt(e,t)):"number"==typeof e?0|e:"boolean"==typeof e?e?1:0:e instanceof Array?e.map(function(e){return n.prototype.int(e,t)}):void 0},n.prototype.str=function(e){return e instanceof Array?e.map(n.prototype.str):String(e)},n.prototype.boolean=function(e){return"number"==typeof e?0!==e:"string"==typeof e?"true"===e.toLowerCase():"boolean"==typeof e?e:e instanceof Array?e.map(n.prototype.boolean):void 0},n.prototype.byte=function(e){var t=n.prototype.int(e,10);return"number"==typeof t?(t+128)%256-128:t instanceof Array?t.map(n.prototype.byte):void 0},n.prototype.char=function(e){return"number"!=typeof e||isNaN(e)?e instanceof Array?e.map(n.prototype.char):"string"==typeof e?n.prototype.char(parseInt(e,10)):void 0:String.fromCharCode(e)},n.prototype.unchar=function(e){return"string"==typeof e&&1===e.length?e.charCodeAt(0):e instanceof Array?e.map(n.prototype.unchar):void 0},n.prototype.hex=function(e,t){if(t=null==t?t=8:t,e instanceof Array)return e.map(function(e){return n.prototype.hex(e,t)});if("number"==typeof e){0>e&&(e=4294967295+e+1);for(var o=Number(e).toString(16).toUpperCase();o.length<t;)o="0"+o;return o.length>=t&&(o=o.substring(o.length-t,o.length)),o}},n.prototype.unhex=function(e){return e instanceof Array?e.map(n.prototype.unhex):parseInt("0x"+e,16)},n}(),amdclean.dataarray_functions=function(e,t){"use strict";var n=amdclean.core;return n.prototype.append=function(e,t){return e.push(t),e},n.prototype.arrayCopy=function(e,t,n,o,r){var i,a;void 0!==r?(a=Math.min(r,e.length),i=o,e=e.slice(t,a+t)):(void 0!==n?(a=n,a=Math.min(a,e.length)):a=e.length,i=0,n=t,e=e.slice(0,a)),Array.prototype.splice.apply(n,[i,a].concat(e))},n.prototype.concat=function(e,t){return e.concat(t)},n.prototype.reverse=function(e){return e.reverse()},n.prototype.shorten=function(e){return e.pop(),e},n.prototype.shuffle=function(e,t){for(var n,o,r=(e=t||ArrayBuffer.isView(e)?e:e.slice()).length;r>1;)n=Math.random()*r|0,o=e[--r],e[r]=e[n],e[n]=o;return e},n.prototype.sort=function(e,t){var n=t?e.slice(0,Math.min(t,e.length)):e,o=t?e.slice(Math.min(t,e.length)):[];return(n="string"==typeof n[0]?n.sort():n.sort(function(e,t){return e-t})).concat(o)},n.prototype.splice=function(e,t,n){return Array.prototype.splice.apply(e,[n,0].concat(t)),e},n.prototype.subset=function(e,t,n){return e.slice(t,void 0!==n?t+n:e.length)},n}(),amdclean.datastring_functions=function(e,t){"use strict";function n(){var e=arguments[0],t=0>e,n=t?e.toString().substring(1):e.toString(),o=n.indexOf("."),r=-1!==o?n.substring(0,o):n,i=-1!==o?n.substring(o+1):"",a=t?"-":"";if(3===arguments.length){for(var s=0;s<arguments[1]-r.length;s++)a+="0";a+=r,a+=".",a+=i;for(var c=0;c<arguments[2]-i.length;c++)a+="0";return a}for(var l=0;l<Math.max(arguments[1]-r.length,0);l++)a+="0";return a+n}function o(){var e=arguments[0].toString(),t=e.indexOf("."),n=-1!==t?e.substring(t):"",o=-1!==t?e.substring(0,t):e;return o=o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),0===arguments[1]&&(n=""),arguments.length>1&&(n=n.substring(0,arguments[1]+1)),o+n}function r(){return parseFloat(arguments[0])>0?"+"+arguments[0].toString():arguments[0].toString()}function i(){return parseFloat(arguments[0])>0?" "+arguments[0].toString():arguments[0].toString()}var a=amdclean.core;return a.prototype.join=function(e,t){return e.join(t)},a.prototype.match=function(e,t){return e.match(t)},a.prototype.matchAll=function(e,t){for(var n=new RegExp(t,"g"),o=n.exec(e),r=[];null!==o;)r.push(o),o=n.exec(e);return r},a.prototype.nf=function(){if(arguments[0]instanceof Array){var e=arguments[1],t=arguments[2];return arguments[0].map(function(o){return n(o,e,t)})}return n.apply(this,arguments)},a.prototype.nfc=function(){if(arguments[0]instanceof Array){var e=arguments[1];return arguments[0].map(function(t){return o(t,e)})}return o.apply(this,arguments)},a.prototype.nfp=function(){var e=this.nf(arguments);return e instanceof Array?e.map(r):r(e)},a.prototype.nfs=function(){var e=this.nf(arguments);return e instanceof Array?e.map(i):i(e)},a.prototype.split=function(e,t){return e.split(t)},a.prototype.splitTokens=function(){return arguments[0].split(arguments.length>0?arguments[1]:/\s/g).filter(function(e){return e})},a.prototype.trim=function(e){return e instanceof Array?e.map(this.trim):e.trim()},a}(),amdclean.environment=function(e,t,n){"use strict";var o=amdclean.core,r=[n.ARROW,n.CROSS,n.HAND,n.MOVE,n.TEXT,n.WAIT];return o.prototype._frameRate=0,o.prototype._lastFrameTime=(new Date).getTime(),o.prototype._targetFrameRate=60,o.prototype.frameCount=0,o.prototype.focu
1sed=!0,o.prototype.cursor=function(e,t,n){var o="auto",i=this._curElement.elt;if(r.indexOf(e)>-1)o=e;else if("string"==typeof e){var a="";t&&n&&"number"==typeof t&&"number"==typeof n&&(a=t+" "+n),o="http://"!==e.substring(0,6)?"url("+e+") "+a+", auto":/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(e)?"url("+e+") "+a+", auto":e}i.style.cursor=o},o.prototype.frameRate=function(e){return void 0===e?this._frameRate:(this._setProperty("_targetFrameRate",e),this._runFrames(),this)},o.prototype.getFrameRate=function(){return this.frameRate()},o.prototype.setFrameRate=function(e){return this.frameRate(e)},o.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},o.prototype.displayWidth=screen.width,o.prototype.displayHeight=screen.height,o.prototype.windowWidth=window.innerWidth,o.prototype.windowHeight=window.innerHeight,o.prototype._onresize=function(e){this._setProperty("windowWidth",window.innerWidth),this._setProperty("windowHeight",window.innerHeight);var t,n=this._isGlobal?window:this;"function"==typeof n.windowResized&&(void 0===(t=n.windowResized(e))||t||e.preventDefault())},o.prototype.width=0,o.prototype.height=0,o.prototype.fullscreen=function(e){return void 0===e?document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement:void(e?function(e){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw new Error("Fullscreen not enabled in this browser.");e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}(document.documentElement):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())},o.prototype.devicePixelScaling=function(e){this._pixelDensity=e?"number"==typeof e?e:window.devicePixelRatio||1:1,this.resizeCanvas(this.width,this.height,!0)},o.prototype.getURL=function(){return location.href},o.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(e){return""!==e})},o.prototype.getURLParams=function(){for(var e,t=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,n={};null!=(e=t.exec(location.search));)e.index===t.lastIndex&&t.lastIndex++,n[e[1]]=e[2];return n},o}(0,0,amdclean.constants),amdclean.imageimage=function(e,t,n){"use strict";var o=amdclean.core;return o.prototype._imageMode=(n=n).CORNER,o.prototype._tint=null,o.prototype.createImage=function(e,t){return new o.Image(e,t)},o}(0,0,amdclean.constants),amdclean.canvas=(b=amdclean.constants,b=b,{modeAdjust:function(e,t,n,o,r){return r===b.CORNER?{x:e,y:t,w:n,h:o}:r===b.CORNERS?{x:e,y:t,w:n-e,h:o-t}:r===b.RADIUS?{x:e-n,y:t-o,w:2*n,h:2*o}:r===b.CENTER?{x:e-.5*n,y:t-.5*o,w:n,h:o}:void 0},arcModeAdjust:function(e,t,n,o,r){return r===b.CORNER?{x:e+.5*n,y:t+.5*o,w:n,h:o}:r===b.CORNERS?{x:e,y:t,w:n+e,h:o+t}:r===b.RADIUS?{x:e,y:t,w:2*n,h:2*o}:r===b.CENTER?{x:e,y:t,w:n,h:o}:void 0}}),amdclean.imageloading_displaying=function(e,t,n,o,r){"use strict";var i=amdclean.core,a=amdclean.filters;return o=o,r=r,i.prototype.loadImage=function(e,t,n){var o=new Image,r=new i.Image(1,1,this);return o.onload=function(){r.width=r.canvas.width=o.width,r.height=r.canvas.height=o.height,r.canvas.getContext("2d").drawImage(o,0,0),"function"==typeof t&&t(r)},o.onerror=function(e){"function"==typeof n&&n(e)},0!==e.indexOf("data:image/")&&(o.crossOrigin="Anonymous"),o.src=e,r},i.prototype.image=function(e,t,n,r,i){var a=e.canvas||e.elt,s=o.modeAdjust(t=t||0,n=n||0,r=r||e.width,i=i||e.height,this._imageMode);try{this.drawingContext.drawImage(this._tint&&e.canvas?this._getTintedImageCanvas(e):a,s.x,s.y,s.w,s.h)}catch(c){if("NS_ERROR_NOT_AVAILABLE"!==c.name)throw c}},i.prototype.tint=function(){var e=this.color.apply(this,arguments);this._tint=e.rgba},i.prototype.noTint=function(){this._tint=null},i.prototype._getTintedImageCanvas=function(e){if(!e.canvas)return e;var t=a._toPixels(e.canvas),n=document.createElement("canvas");n.width=e.canvas.width,n.height=e.canvas.height;for(var o=n.getContext("2d"),r=o.createImageData(e.canvas.width,e.canvas.height),i=r.data,s=0;s<t.length;s+=4){var c=t[s+1],l=t[s+2],u=t[s+3];i[s]=t[s]*this._tint[0]/255,i[s+1]=c*this._tint[1]/255,i[s+2]=l*this._tint[2]/255,i[s+3]=u*this._tint[3]/255}return o.putImageData(r,0,0),n},i.prototype.imageMode=function(e){(e===r.CORNER||e===r.CORNERS||e===r.CENTER)&&(this._imageMode=e)},i}(0,0,0,amdclean.canvas,amdclean.constants),amdclean.imagepixels=function(e,t,n){"use strict";var o=amdclean.core,r=amdclean.filters;return o.prototype.pixels=[],o.prototype.blend=function(){var e=this.drawingContext.globalCompositeOperation,t=arguments[arguments.length-1],n=Array.prototype.slice.call(arguments,0,arguments.length-1);this.drawingContext.globalCompositeOperation=t,this.copy.apply(this,n),this.drawingContext.globalCompositeOperation=e},o.prototype.copy=function(){var e,t,n,o,r,i,a,s,c;if(9===arguments.length)e=arguments[0],t=arguments[1],n=arguments[2],o=arguments[3],r=arguments[4],i=arguments[5],a=arguments[6],s=arguments[7],c=arguments[8];else{if(8!==arguments.length)throw new Error("Signature not supported");t=arguments[0],n=arguments[1],o=arguments[2],r=arguments[3],i=arguments[4],a=arguments[5],s=arguments[6],c=arguments[7],e=this}var l=e.canvas.width/e.width;this.drawingContext.drawImage(e.canvas,l*t,l*n,l*o,l*r,i,a,s,c)},o.prototype.filter=function(e,t){r.apply(this.canvas,r[e.toLowerCase()],t)},o.prototype.get=function(e,t,n,r){if(void 0===e&&void 0===t&&void 0===n&&void 0===r?(e=0,t=0,n=this.width,r=this.height):void 0===n&&void 0===r&&(n=1,r=1),e>this.width||t>this.height||0>e||0>t)return[0,0,0,255];var i=this.drawingContext.getImageData(e,t,n,r),a=i.data;if(1===n&&1===r){for(var s=[],c=0;c<a.length;c+=4)s.push(a[c],a[c+1],a[c+2],a[c+3]);return s}n=Math.min(n,this.width),r=Math.min(r,this.height);var l=new o.Image(n,r);return l.canvas.getContext("2d").putImageData(i,0,0,0,0,n,r),l},o.prototype.loadPixels=function(){var e=this.drawingContext.getImageData(0,0,this.width,this.height);this._setProperty("imageData",e),this._setProperty("pixels",e.data)},o.prototype.set=function(e,t,n){if(n instanceof o.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pixelDensity,this._pixelDensity),this.drawingContext.drawImage(n.canvas,e,t),this.loadPixels.call(this),this.drawingContext.restore(
1);else{var r=4*(t*this.width+e);if(this.imageData||this.loadPixels.call(this),"number"==typeof n)r<this.pixels.length&&(this.pixels[r]=n,this.pixels[r+1]=n,this.pixels[r+2]=n,this.pixels[r+3]=255);else if(n instanceof Array){if(n.length<4)throw new Error("pixel array must be of the form [R, G, B, A]");r<this.pixels.length&&(this.pixels[r]=n[0],this.pixels[r+1]=n[1],this.pixels[r+2]=n[2],this.pixels[r+3]=n[3])}else n instanceof o.Color&&r<this.pixels.length&&(this.pixels[r]=n.rgba[0],this.pixels[r+1]=n.rgba[1],this.pixels[r+2]=n.rgba[2],this.pixels[r+3]=n.rgba[3])}},o.prototype.updatePixels=function(e,t,n,o){void 0===e&&void 0===t&&void 0===n&&void 0===o&&(e=0,t=0,n=this.width,o=this.height),this.drawingContext.putImageData(this.imageData,e,t,0,0,n,o)},o}(),function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define("reqwest",n):t.reqwest=n()}(0,amdclean,function(){function succeed(e){var t=protocolRe.exec(e.url);return t=t&&t[1]||window.location.protocol,httpsRe.test(t)?twoHundo.test(e.request.status):!!e.request.response}function handleReadyState(e,t,n){return function(){return e._aborted?n(e.request):e._timedOut?n(e.request,"Request is aborted: timeout"):void(e.request&&4==e.request[readyState]&&(e.request.onreadystatechange=noop,succeed(e)?t(e.request):n(e.request)))}}function setHeaders(e,t){var n,o=t.headers||{};o.Accept=o.Accept||defaultHeaders.accept[t.type]||defaultHeaders.accept["*"];var r="function"==typeof FormData&&t.data instanceof FormData;for(n in t.crossOrigin||o[requestedWith]||(o[requestedWith]=defaultHeaders.requestedWith),o[contentType]||r||(o[contentType]=t.contentType||defaultHeaders.contentType),o)o.hasOwnProperty(n)&&"setRequestHeader"in e&&e.setRequestHeader(n,o[n])}function setCredentials(e,t){void 0!==t.withCredentials&&void 0!==e.withCredentials&&(e.withCredentials=!!t.withCredentials)}function generalCallback(e){lastValue=e}function urlappend(e,t){return e+(/\?/.test(e)?"&":"?")+t}function handleJsonp(e,t,n,o){var r=uniqid++,i=e.jsonpCallback||"callback",a=e.jsonpCallbackName||reqwest.getcallbackPrefix(r),s=new RegExp("((^|\\?|&)"+i+")=([^&]+)"),c=o.match(s),l=doc.createElement("script"),u=0,d=-1!==navigator.userAgent.indexOf("MSIE 10.0");return c?"?"===c[3]?o=o.replace(s,"$1="+a):a=c[3]:o=urlappend(o,i+"="+a),win[a]=generalCallback,l.type="text/javascript",l.src=o,l.async=!0,void 0===l.onreadystatechange||d||(l.htmlFor=l.id="_reqwest_"+r),l.onload=l.onreadystatechange=function(){return!(l[readyState]&&"complete"!==l[readyState]&&"loaded"!==l[readyState]||u)&&(l.onload=l.onreadystatechange=null,l.onclick&&l.onclick(),t(lastValue),lastValue=void 0,head.removeChild(l),void(u=1))},head.appendChild(l),{abort:function(){l.onload=l.onreadystatechange=null,n({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(l),u=1}}}function getRequest(e,t){var n,o=this.o,r=(o.method||"GET").toUpperCase(),i="string"==typeof o?o:o.url,a=!1!==o.processData&&o.data&&"string"!=typeof o.data?reqwest.toQueryString(o.data):o.data||null,s=!1;return"jsonp"!=o.type&&"GET"!=r||!a||(i=urlappend(i,a),a=null),"jsonp"==o.type?handleJsonp(o,e,t,i):((n=o.xhr&&o.xhr(o)||xhr(o)).open(r,i,!1!==o.async),setHeaders(n,o),setCredentials(n,o),win[xDomainRequest]&&n instanceof win[xDomainRequest]?(n.onload=e,n.onerror=t,n.onprogress=function(){},s=!0):n.onreadystatechange=handleReadyState(this,e,t),o.before&&o.before(n),s?setTimeout(function(){n.send(a)},200):n.send(a),n)}function Reqwest(e,t){this.o=e,this.fn=t,init.apply(this,arguments)}function setType(e){return e.match("json")?"json":e.match("javascript")?"js":e.match("text")?"html":e.match("xml")?"xml":void 0}function init(o,fn){function complete(e){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(e)}function success(resp){var type=o.type||resp&&setType(resp.getResponseHeader("Content-Type"));resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function timedOut(){self._timedOut=!0,self.request.abort()}function error(e,t,n){for(self._responseArgs.resp=e=self.request,self._responseArgs.msg=t,self._responseArgs.t=n,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(e,t,n);complete(e)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){timedOut()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(e,t){return new Reqwest(e,t)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,t){var n,o,r,i,a=e.name,s=e.tagName.toLowerCase(),c=function(e){e&&!e.disabled&&t(a,normalize(e.attributes.value&&e.attributes.value.specified?e.value:e.text))};if(!e.disabled&&a)switch(s){case"input":/reset|button|image|file/i.test(e.type)||(n=/checkbox/i.test(e.type),o=/radio/i.test(e.type),r=e.value,(!n&&!o||e.checked)&&t(a,normalize(n&&""===r?"on":r)));break;case"textarea":t(a,normalize(e.value));break;case"select":if("select-one"===e.type.toLowerCase())c(e.selectedIndex>=0?e.options[e.selectedIndex]:null);else for(i=0;e.length&&i<e.length;i++)e.options[i].selected&&c(e.options[i])}}function eachFormElement(){var e,t,n=this,o=function(e,t){var o,r,i;for(o=0;o<t.length;o++)for(i=e[byTag](t[o]),r=0;r<i.length;r++)serial(i[r],n)};for(t=0;t<arguments.length;t++)/input|select|textarea/i.test((e=arguments[t]).tagName)&&serial(e,n),o(e,["input","select","textarea"])}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var e={};return eachFormElement.apply(function(t,n){t in e?(e[t]&&!isArray(e[t])&&(e[t]=[e[t]]),e[t].push(n)):e[t]=n},arguments),e}function buildParams(e,t,n,o){var r,i,a,s=/\[\]$/;if(isArray(t))for(i=0;t&&i<t.length;i++)a=t[i],n||s.test(e)?o(e,a):buildParams(e+"["+("object"==typeof a?i:"")+"]",a,n,o);else if(t&&"[object Object]"===t.toString())for(r in t)buildParams(e+"["+r+"]",t[r],n,o);else o(e,t)}var win=window,doc=document,httpsRe=/^http/,protocolRe=/(^\w+):\/\//,twoHundo=/^(20\d|1223)$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",xDomainRequest="XDomainRequest",n
1oop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=function(e){if(!0===e.crossOrigin){var t=win[xmlHttpRequest]?new XMLHttpRequest:null;if(t&&"withCredentials"in t)return t;if(win[xDomainRequest])return new XDomainRequest;throw new Error("Browser does not support cross-origin requests")}return win[xmlHttpRequest]?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},globalSetupOptions={dataFilter:function(e){return e}};return Reqwest.prototype={abort:function(){this._aborted=!0,this.request.abort()},retry:function(){init.call(this,this.o,this.fn)},then:function(e,t){return e=e||function(){},t=t||function(){},this._fulfilled?this._responseArgs.resp=e(this._responseArgs.resp):this._erred?t(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):(this._fulfillmentHandlers.push(e),this._errorHandlers.push(t)),this},always:function(e){return this._fulfilled||this._erred?e(this._responseArgs.resp):this._completeHandlers.push(e),this},fail:function(e){return this._erred?e(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):this._errorHandlers.push(e),this},catch:function(e){return this.fail(e)}},reqwest.serializeArray=function(){var e=[];return eachFormElement.apply(function(t,n){e.push({name:t,value:n})},arguments),e},reqwest.serialize=function(){if(0===arguments.length)return"";var e,t=Array.prototype.slice.call(arguments,0);return(e=t.pop())&&e.nodeType&&t.push(e)&&(e=null),e&&(e=e.type),("map"==e?serializeHash:"array"==e?reqwest.serializeArray:serializeQueryString).apply(null,t)},reqwest.toQueryString=function(e,t){var n,o,r=t||!1,i=[],a=encodeURIComponent,s=function(e,t){t="function"==typeof t?t():null==t?"":t,i[i.length]=a(e)+"="+a(t)};if(isArray(e))for(o=0;e&&o<e.length;o++)s(e[o].name,e[o].value);else for(n in e)e.hasOwnProperty(n)&&buildParams(n,e[n],r,s);return i.join("&").replace(/%20/g,"+")},reqwest.getcallbackPrefix=function(){return callbackPrefix},reqwest.compat=function(e,t){return e&&(e.type&&(e.method=e.type)&&delete e.type,e.dataType&&(e.type=e.dataType),e.jsonpCallback&&(e.jsonpCallbackName=e.jsonpCallback)&&delete e.jsonpCallback,e.jsonp&&(e.jsonpCallback=e.jsonp)),new Reqwest(e,t)},reqwest.ajaxSetup=function(e){for(var t in e=e||{})globalSetupOptions[t]=e[t]},reqwest}),amdclean.inputfiles=function(e,t,n){"use strict";function o(e,t){var n={};if(void 0===(t=t||[]))for(var o=0;o<e.length;o++)t[o.toString()]=o;for(var r=0;r<t.length;r++)n[t[r]]=e[r];return n}var r=amdclean.core;return n=n,r.prototype.createInput=function(){throw"not yet implemented"},r.prototype.createReader=function(){throw"not yet implemented"},r.prototype.loadBytes=function(){throw"not yet implemented"},r.prototype.loadJSON=function(){var e=arguments[1],t=[],o="json";return"string"==typeof arguments[2]&&("jsonp"===arguments[2]||"json"===arguments[2])&&(o=arguments[2]),n({url:arguments[0],type:o,crossOrigin:!0}).then(function(n){for(var o in n)t[o]=n[o];void 0!==e&&e(n)}),t},r.prototype.loadStrings=function(e,t){var n=[],o=new XMLHttpRequest;return o.open("GET",e,!0),o.onreadystatechange=function(){if(4===o.readyState&&(200===o.status||0===o.status)){var e=o.responseText.match(/[^\r\n]+/g);for(var r in e)n[r]=e[r];void 0!==t&&t(n)}},o.send(null),n},r.prototype.loadTable=function(e){for(var t=null,i=[],a=!1,s=",",c=!1,l=1;l<arguments.length;l++)if("function"==typeof arguments[l])t=arguments[l];else if("string"==typeof arguments[l])if(i.push(arguments[l]),"header"===arguments[l]&&(a=!0),"csv"===arguments[l]){if(c)throw new Error("Cannot set multiple separator types.");s=",",c=!0}else if("tsv"===arguments[l]){if(c)throw new Error("Cannot set multiple separator types.");s="\t",c=!0}var u=new r.Table;return n({url:e,crossOrigin:!0,type:"csv"}).then(function(e){e=e.responseText;
1for(var n,i={},c='"',d=[],h=0,f=null,p=function(){i.currentState=4,d.push(f),f=null},g=function(){i.currentState=0,i.token=""},m=function(){f.push(i.token),g()};;){if(null==(n=e[h++])){if(i.escaped)throw new Error("Unclosed quote in file.");if(f){m(),p();break}}if(null===f&&(i.escaped=!1,f=[],g()),0===i.currentState){if(n===c){i.escaped=!0,i.currentState=1;continue}i.currentState=1}1===i.currentState&&i.escaped?n===c?e[h]===c?(i.token+=c,h++):(i.escaped=!1,i.currentState=2):i.token+=n:"\r"===n?("\n"===e[h]&&h++,m(),p()):"\n"===n?(m(),p()):n===s?m():1===i.currentState&&(i.token+=n)}if(a)u.columns=d.shift();else for(l=0;l<d.length;l++)u.columns[l]=l.toString();var v;for(l=0;l<d.length;l++)(v=new r.TableRow).arr=d[l],v.obj=o(d[l],u.columns),u.addRow(v);null!==t&&t(u)}).fail(function(){void 0!==t&&t(!1)}),u},r.prototype.loadXML=function(e,t){return n({url:e,type:"xml",crossOrigin:!0}).then(function(e){t(e)}),[]},r.prototype.parseXML=function(){throw"not yet implemented"},r.prototype.selectFolder=function(){throw"not yet implemented"},r.prototype.selectInput=function(){throw"not yet implemented"},r.prototype.httpGet=function(){var e=Array.prototype.slice.call(arguments);e.push("GET"),r.prototype.httpDo.apply(this,e)},r.prototype.httpPost=function(){var e=Array.prototype.slice.call(arguments);e.push("POST"),r.prototype.httpDo.apply(this,e)},r.prototype.httpDo=function(){for(var e,t="GET",o=arguments[0],r={},i="",a=1;a<arguments.length;a++){var s=arguments[a];"string"==typeof s?"GET"===s||"POST"===s||"PUT"===s?t=s:i=s:"object"==typeof s?r=s:"function"==typeof s&&(e=s)}""===i&&(i=-1!==o.indexOf("json")?"json":-1!==o.indexOf("xml")?"xml":"text"),n({url:o,method:t,data:r,type:i,crossOrigin:!0,success:function(t){void 0!==e&&e("text"===i?t.response:t)}})},r}(0,0,amdclean.reqwest),amdclean.inputkeyboard=function(e,t){"use strict";var n=amdclean.core,o={};return n.prototype.isKeyPressed=!1,n.prototype.keyIsPressed=!1,n.prototype.key="",n.prototype.keyCode=0,n.prototype._onkeydown=function(e){this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",e.which),o[e.which]=!0;var t=String.fromCharCode(e.which);t||(t=e.which),this._setProperty("key",t);var n=this.keyPressed||window.keyPressed;"function"!=typeof n||e.charCode||!1===n(e)&&e.preventDefault()},n.prototype._onkeyup=function(e){var t=this.keyReleased||window.keyReleased;this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1),o[e.which]=!1;var n=String.fromCharCode(e.which);n||(n=e.which),this._setProperty("key",n),this._setProperty("keyCode",e.which),"function"==typeof t&&!1===t(e)&&e.preventDefault()},n.prototype._onkeypress=function(e){this._setProperty("keyCode",e.which),this._setProperty("key",String.fromCharCode(e.which));var t=this.keyTyped||window.keyTyped;"function"==typeof t&&!1===t(e)&&e.preventDefault()},n.prototype._onblur=function(){o={}},n.prototype.keyIsDown=function(e){return o[e]},n}(),amdclean.inputacceleration=function(e,t){"use strict";var n=amdclean.core;n.prototype.deviceOrientation=void 0,n.prototype.accelerationX=0,n.prototype.accelerationY=0,n.prototype.accelerationZ=0,n.prototype.pAccelerationX=0,n.prototype.pAccelerationY=0,n.prototype.pAccelerationZ=0,n.prototype._updatePAccelerations=function(){this._setProperty("pAccelerationX",this.accelerationX),this._setProperty("pAccelerationY",this.accelerationY),this._setProperty("pAccelerationZ",this.accelerationZ)};var o=.5;n.prototype.setMoveThreshold=function(e){"number"==typeof e&&(o=e)};var r="",i="";return n.prototype._ondeviceorientation=function(e){this._setProperty("accelerationX",e.beta),this._setProperty("accelerationY",e.gamma),this._setProperty("accelerationZ",e.alpha),this._handleMotion()},n.prototype._ondevicemotion=function(e){this._setProperty("accelerationX",2*e.acceleration.x),this._setProperty("accelerationY",2*e.acceleration.y),this._setProperty("accelerationZ",2*e.acceleration.z),this._handleMotion()},n.prototype._onMozOrientation=function(e){this._setProperty("accelerationX",e.x),this._setProperty("accelerationY",e.y
1),this._setProperty("accelerationZ",e.z),this._handleMotion()},n.prototype._handleMotion=function(){90===window.orientation||-90===window.orientation?this._setProperty("deviceOrientation","landscape"):0===window.orientation?this._setProperty("deviceOrientation","portrait"):void 0===window.orientation&&this._setProperty("deviceOrientation","undefined");var e=this.onDeviceMove||window.onDeviceMove;"function"==typeof e&&(Math.abs(this.accelerationX-this.pAccelerationX)>o||Math.abs(this.accelerationY-this.pAccelerationY)>o||Math.abs(this.accelerationZ-this.pAccelerationZ)>o)&&e();var t=this.onDeviceTurn||window.onDeviceTurn;if("function"==typeof t){var n=0;Math.abs(this.accelerationX)>n&&(n=this.accelerationX,i="x"),Math.abs(this.accelerationY)>n&&(n=this.accelerationY,i="y"),Math.abs(this.accelerationZ)>n&&(i="z"),""!==r&&r!==i&&t(i),r=i}},n}(),amdclean.inputmouse=function(e,t,n){"use strict";var o=amdclean.core;return n=n,o.prototype.mouseX=0,o.prototype.mouseY=0,o.prototype.pmouseX=0,o.prototype.pmouseY=0,o.prototype.winMouseX=0,o.prototype.winMouseY=0,o.prototype.pwinMouseX=0,o.prototype.pwinMouseY=0,o.prototype.mouseButton=0,o.prototype.mouseIsPressed=!1,o.prototype.isMousePressed=!1,o.prototype._updateMouseCoords=function(e){if("touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type)this._setProperty("mouseX",this.touchX),this._setProperty("mouseY",this.touchY);else if(null!==this._curElement){var t=function(e,t){var n=e.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}}(this._curElement.elt,e);this._setProperty("mouseX",t.x),this._setProperty("mouseY",t.y)}this._setProperty("winMouseX",e.pageX),this._setProperty("winMouseY",e.pageY)},o.prototype._updatePMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY)},o.prototype._setMouseButton=function(e){1===e.button?this._setProperty("mouseButton",n.CENTER):2===e.button?this._setProperty("mouseButton",n.RIGHT):(this._setProperty("mouseButton",n.LEFT),("touchstart"===e.type||"touchmove"===e.type)&&(this._setProperty("mouseX",this.touchX),this._setProperty("mouseY",this.touchY)))},o.prototype._onmousemove=function(e){var t=this._isGlobal?window:this;this._updateMouseCoords(e),this.isMousePressed?"function"==typeof t.mouseDragged?!1===t.mouseDragged(e)&&e.preventDefault():"function"==typeof t.touchMoved&&(!1===t.touchMoved(e)&&e.preventDefault(),this._updateTouchCoords(e)):"function"==typeof t.mouseMoved&&!1===t.mouseMoved(e)&&e.preventDefault()},o.prototype._onmousedown=function(e){var t=this._isGlobal?window:this;this._setProperty("isMousePressed",!0),this._setProperty("mouseIsPressed",!0),this._setMouseButton(e),this._updateMouseCoords(e),"function"==typeof t.mousePressed?!1===t.mousePressed(e)&&e.preventDefault():"function"==typeof t.touchStarted&&(!1===t.touchStarted(e)&&e.preventDefault(),this._updateTouchCoords(e))},o.prototype._onmouseup=function(e){var t=this._isGlobal?window:this;this._setProperty("isMousePressed",!1),this._setProperty("mouseIsPressed",!1),"function"==typeof t.mouseReleased?!1===t.mouseReleased(e)&&e.preventDefault():"function"==typeof t.touchEnded&&(!1===t.touchEnded(e)&&e.preventDefault(),this._updateTouchCoords(e))},o.prototype._onclick=function(e){var t=this._isGlobal?window:this;"function"==typeof t.mouseClicked&&!1===t.mouseClicked(e)&&e.preventDefault()},o.prototype._onmousewheel=o.prototype._onDOMMouseScroll=function(e){var t=this._isGlobal?window:this;"function"==typeof t.mouseWheel&&!1===t.mouseWheel(e)&&e.preventDefault()},o}(0,0,amdclean.constants),amdclean.inputtime_date=function(e,t){"use strict";var n=amdclean.core;return n.prototype.day=function(){return(new Date).getDate()},n.prototype.hour=function(){return(new Date).getHours()},n.prototype.minute=function(){return(new Date).getMinutes()},n.prototype.millis=function(){return(new Date).getTime()-this._startTime},n.prototype.month=function(){return(new Date).getMonth()+1},n.prototype.second=function(){return(new Date).getSeconds()},n.prototype.year=function(){return(new Date).getFullYear()},n}(),amdclean.inputtouch=function(e,t){"use strict";function n(e,t,n){n=n||0;var o=e.getBoundingClientRect(),r=t.touches[n]||t.changedTouches[n];return{x:r.clientX-o.left,y:r.clientY-o.top}}var o=amdclean.core;return o.prototype.touchX=0,o.prototype.touchY=0,o.prototype.ptouchX=0,o.prototype.ptouchY=0,o.prototype.touches=[],o.prototype.touchIsDown=!1,o.prototype._updateTouchCoords=function(e){if("mousedown"===e.type||"mousemove"===e.type||"mouseup"===e.type)this._setProperty("touchX",this.mouseX),this._setProperty("touchY",this.mouseY);else{var t=n(this._curElement.elt,e,0);this._setProperty("touchX",t.x),this._setProperty("touchY",t.y);for(var o=[],r=0;r<e.touches.length;r++){var i=n(this._curElement.elt,e,r);o[r]={x:i.x,y:i.y}}this._setProperty("touches",o)}},o.prototype._updatePTouchCoords=function(){this._setProperty("ptouchX",this.touchX),this._setProperty("ptouchY",this.touchY)},o.prototype._ontouchstart=function(e){var t=this._isGlobal?window:this;this._updateTouchCoords(e),this._setProperty("touchIsDown",!0),"function"==typeof t.touchStarted?!1===t.touchStarted(e)&&e.preventDefault():"function"==typeof t.mousePressed&&!1===t.mousePressed(e)&&e.preventDefault()},o.prototype._ontouchmove=function(e){var t=this._isGlobal?window:this;this._updateTouchCoords(e),"function"==typeof t.touchMoved?!1===t.touchMoved(e)&&e.preventDefault():"function"==typeof t.mouseDragged&&(!1===t.mouseDragged(e)&&e.preventDefault(),this._updateMouseCoords(e))},o.prototype._ontouchend=function(e){this._updateTouchCoords(e),0===this.touches.length&&this._setProperty("touchIsDown",!1);var t=this._isGlobal?window:this;"function"==typeof t.touchEnded?!1===t.touchEnded(e)&&e.preventDefault():"function"==typeof t.mouseReleased&&(!1===t.mouseReleased(e)&&e.preventDefault(),this._updateMouseCoords(e))},o}(),amdclean.mathmath=function(e,t){"use strict";var n=amdclean.core;return n.prototype.createVector=function(e,t,o){return this instanceof n?new n.Vector(this,arguments):new n.Vector(e,t,o)},n}(),amdclean.mathcalculation=function(e,t){"use strict";var n=amdclean.core;return n.prototype.abs=Math.abs,n.prototype.ceil=Math.ceil,n.prototype.constrain=function(e,t,n){return Math.max(Math.min(e,n),t)},n.prototype.dist=function(e,t,n,o){return Math.sqrt((n-e)*(n-e)+(o-t)*(o-t))},n.prototype.exp=Math.exp,n.prototype.floor=Math.floor,n.prototype.lerp=function(e,t,n){return n*(t-e)+e}
1,n.prototype.log=Math.log,n.prototype.mag=function(e,t){return Math.sqrt(e*e+t*t)},n.prototype.map=function(e,t,n,o,r){return(e-t)/(n-t)*(r-o)+o},n.prototype.max=function(){return arguments[0]instanceof Array?Math.max.apply(null,arguments[0]):Math.max.apply(null,arguments)},n.prototype.min=function(){return arguments[0]instanceof Array?Math.min.apply(null,arguments[0]):Math.min.apply(null,arguments)},n.prototype.norm=function(e,t,n){return this.map(e,t,n,0,1)},n.prototype.pow=Math.pow,n.prototype.round=Math.round,n.prototype.sq=function(e){return e*e},n.prototype.sqrt=Math.sqrt,n}(),amdclean.mathrandom=function(e,t){"use strict";var n=amdclean.core,o=!1,r=function(){var e,t,n=4294967296;return{setSeed:function(o){t=e=(null==o?Math.random()*n:o)>>>0},getSeed:function(){return e},rand:function(){return(t=(1664525*t+1013904223)%n)/n}}}();n.prototype.randomSeed=function(e){r.setSeed(e),o=!0},n.prototype.random=function(e,t){var n;if(n=o?r.rand():Math.random(),0===arguments.length)return n;if(1===arguments.length)return n*e;if(e>t){var i=e;e=t,t=i}return n*(t-e)+e};var i,a=!1;return n.prototype.randomGaussian=function(e,t){var n,o,r,s;if(a)n=i,a=!1;else{do{s=(o=this.random(2)-1)*o+(r=this.random(2)-1)*r}while(s>=1);n=o*(s=Math.sqrt(-2*Math.log(s)/s)),i=r*s,a=!0}return n*(t||1)+(e||0)},n}(),amdclean.mathnoise=function(e,t){"use strict";for(var n=amdclean.core,o=4095,r=4,i=.5,a=Math.floor(720),s=new Array(a),c=new Array(a),l=Math.PI/180,u=0;a>u;u++)s[u]=Math.sin(u*l*.5),c[u]=Math.cos(u*l*.5);var d,h=a;return h>>=1,n.prototype.noise=function(e,t,n){if(t=t||0,n=n||0,null==d){d=new Array(o+1);for(var s=0;o+1>s;s++)d[s]=Math.random()}0>e&&(e=-e),0>t&&(t=-t),0>n&&(n=-n);for(var l,u,f,p,g,m=Math.floor(e),v=Math.floor(t),y=Math.floor(n),w=e-m,b=t-v,_=n-y,C=0,T=.5,x=function(e){return.5*(1-c[Math.floor(e*h)%a])},S=0;r>S;S++){var R=m+(v<<4)+(y<<8);l=x(w),u=x(b),f=d[R&o],f+=l*(d[R+1&o]-f),p=d[R+16&o],f+=u*((p+=l*(d[R+16+1&o]-p))-f),p=d[(R+=256)&o],p+=l*(d[R+1&o]-p),g=d[R+16&o],p+=u*((g+=l*(d[R+16+1&o]-g))-p),C+=(f+=x(_)*(p-f))*T,T*=i,m<<=1,v<<=1,y<<=1,(w*=2)>=1&&(m++,w--),(b*=2)>=1&&(v++,b--),(_*=2)>=1&&(y++,_--)}return C},n.prototype.noiseDetail=function(e,t){e>0&&(r=e),t>0&&(i=t)},n.prototype.noiseSeed=function(e){var t=function(){var e,t,n=4294967296;return{setSeed:function(o){t=e=(null==o?Math.random()*n:o)>>>0},getSeed:function(){return e},rand:function(){return(t=(1664525*t+1013904223)%n)/n}}}();t.setSeed(e),d=new Array(o+1);for(var n=0;o+1>n;n++)d[n]=t.rand()},n}(),amdclean.mathtrigonometry=function(e,t,n,o){"use strict";var r=amdclean.core,i=amdclean.polargeometry;return r.prototype._angleMode=(o=o).RADIANS,r.prototype.acos=function(e){return this._angleMode===o.RADIANS?Math.acos(e):i.radiansToDegrees(Math.acos(e))},r.prototype.asin=function(e){return this._angleMode===o.RADIANS?Math.asin(e):i.radiansToDegrees(Math.asin(e))},r.prototype.atan=function(e){return this._angleMode===o.RADIANS?Math.atan(e):i.radiansToDegrees(Math.atan(e))},r.prototype.atan2=function(e,t){return this._angleMode===o.RADIANS?Math.atan2(e,t):i.radiansToDegrees(Math.atan2(e,t))},r.prototype.cos=function(e){return Math.cos(this._angleMode===o.RADIANS?e:this.radians(e))},r.prototype.sin=function(e){return Math.sin(this._angleMode===o.RADIANS?e:this.radians(e))},r.prototype.tan=function(e){return Math.tan(this._angleMode===o.RADIANS?e:this.radians(e))},r.prototype.degrees=function(e){return i.radiansToDegrees(e)},r.prototype.radians=function(e){return i.degreesToRadians(e)},r.prototype.angleMode=function(e){(e===o.DEGREES||e===o.RADIANS)&&(this._angleMode=e)},r}(0,0,0,amdclean.constants),amdclean.outputfiles=function(e,t){"use strict";function n(e,t){t&&!0!==t&&"true"!==t||(t=""),e||(e="untitled");var n="";return e&&e.indexOf(".")>-1&&(n=e.split(".").pop()),t&&n!==t&&(e=e+"."+(n=t)),[e,n]}function o(e){document.body.removeChild(e.target)}var r=amdclean.core;window.URL=window.URL||window.webkitURL,r.prototype._pWriters=[],r.prototype.beginRaw=function(){throw"not yet implemented"},r.prototype.beginRecord=function(){throw"not yet implemented"},r.prototype.createOutput=function(){throw"not yet implemented"},r.prototype.createWriter=function(e,t){var n;for(var o in r.prototype._pWriters)if(r.prototype._pWriters[o].name===e)return n=new r.PrintWriter(e+window.millis(),t),r.prototype._pWriters.push(n),n;return n=new r.PrintWriter(e,t),r.prototype._pWriters.push(n),n},r.prototype.endRaw=function(){throw"not yet implemented"},r.prototype.endRecord=function(){throw"not yet implemented"},r.PrintWriter=function(e,t){var n=this;this.name=e,this.content="",this.print=function(e){this.content+=e},this.println=function(e){this.content+=e+"\n"},this.flush=function(){this.content=""},this.close=function(){var o=[];for(var i in o.push(this.content),r.prototype.writeFile(o,e,t),r.prototype._pWriters)r.prototype._pWriters[i].name===this.name&&r.prototype._pWriters.splice(i,1);n.flush(),n={}}},r.prototype.saveBytes=function(){throw"not yet implemented"},r.prototype.save=function(){var e=arguments,t=this._curElement.elt;if(0!==e.length)if(e[0]instanceof r.Graphics)r.prototype.saveCanvas(e[0].elt,e[1],e[2]);else if(1===e.length&&"string"==typeof e[0])r.prototype.saveCanvas(t,e[0]);else switch(n(e[1],e[2])[1]){case"json":return void r.prototype.saveJSON(e[0],e[1],e[2]);case"txt":return void r.prototype.saveStrings(e[0],e[1],e[2]);default:e[0]instanceof Array?r.prototype.saveStrings(e[0],e[1],e[2]):e[0]instanceof r.Table?r.prototype.saveTable(e[0],e[1],e[2],e[3]):e[0]instanceof r.Image?r.prototype.saveCanvas(e[0].canvas,e[1]):e[0]instanceof r.SoundFile&&r.prototype.saveSound(e[0],e[1],e[2],e[3])}else r.prototype.saveCanvas(t)},r.prototype.saveJSON=function(e,t,n){var o;o=n?JSON.stringify(e):JSON.stringify(e,void 0,2),console.log(o),this.saveStrings(o.split("\n"),t,"json")},r.prototype.saveJSONObject=r.prototype.saveJSON,r.prototype.saveJSONArray=r.prototype.saveJSON,r.prototype.saveStream=function(){throw"not yet implemented"},r.prototype.saveStrings=function(e,t,n){var o=this.createWriter(t,n||"txt");for(var r in e)r<e.length-1?o.println(e[r]):o.print(e[r]);o.close(),o.flush()},r.prototype.saveXML=function(){throw"not yet implemented"},r.prototype.selectOutput=function(){throw"not yet implemented"},r.prototype.saveTable=function(e,t,n){var o=this.createWriter(t,n),r=e.columns,a=",";if("tsv"===n&&(a="\t"),"html"!==n){if("0"!==r[0])for(var s=0;s<r.length;s++)s<r.length-1?o.print(r[s]+a):o.println(r[s]);for(var c=0;c<e.rows.length;c++){var l;
1for(l=0;l<e.rows[c].arr.length;l++)l<e.rows[c].arr.length-1?o.print(e.rows[c].arr[l]+a):c<e.rows.length-1?o.println(e.rows[c].arr[l]):o.print(e.rows[c].arr[l])}}else{if(o.println("<html>"),o.println("<head>"),o.println(' <meta http-equiv="content-type" content="text/html;charset=utf-8" />'),o.println("</head>"),o.println("<body>"),o.println(" <table>"),"0"!==r[0]){o.println(" <tr>");for(var u=0;u<r.length;u++){var d=i(r[u]);o.println(" <td>"+d),o.println(" </td>")}o.println(" </tr>")}for(var h=0;h<e.rows.length;h++){o.println(" <tr>");for(var f=0;f<e.columns.length;f++){var p=e.rows[h].getString(f),g=i(p);o.println(" <td>"+g),o.println(" </td>")}o.println(" </tr>")}o.println(" </table>"),o.println("</body>"),o.print("</html>")}o.close(),o.flush()};var i=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")};return r.prototype.writeFile=function(e,t,n){var o="application/octet-stream";r.prototype._isSafari()&&(o="text/plain");var i=new Blob(e,{type:o}),a=window.URL.createObjectURL(i);r.prototype.downloadFile(a,t,n)},r.prototype.downloadFile=function(e,t,i){var a=n(t,i),s=a[0],c=a[1],l=document.createElement("a");if(l.href=e,l.download=s,l.onclick=o,l.style.display="none",document.body.appendChild(l),r.prototype._isSafari()){var u="Hello, Safari user! To download this file...\n";u+="1. Go to File --\x3e Save As.\n",u+='2. Choose "Page Source" as the Format.\n',u+='3. Name it with this extension: ."'+c+'"',alert(u)}l.click(),e=null},r.prototype._checkFileExtension=n,r.prototype._isSafari=function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0},r}(),amdclean.outputimage=function(e,t){"use strict";var n=amdclean.core,o=[];return n.prototype.saveCanvas=function(e,t,o){var r;if(o||""===(o=n.prototype._checkFileExtension(t,o)[1])&&(o="png"),e?r=e:this._curElement&&this._curElement.elt&&(r=this._curElement.elt),n.prototype._isSafari())alert("Hello, Safari user!\nNow capturing a screenshot...\nTo save this image,\ngo to File --\x3e Save As.\n"),window.location.href=r.toDataURL();else{var i;if(void 0===o)o="png",i="image/png";else switch(o){case"png":i="image/png";break;case"jpeg":case"jpg":i="image/jpeg";break;default:i="image/png"}var a=r.toDataURL(i);a=a.replace(i,"image/octet-stream"),n.prototype.downloadFile(a,t,o)}},n.prototype.saveFrames=function(e,t,r,i,a){var s=r||3;s=n.prototype.constrain(s,0,15),s*=1e3;var c=i||15;c=n.prototype.constrain(c,0,22);var l=0,u=n.prototype._makeFrame,d=this._curElement.elt,h=setInterval(function(){u(e+l,t,d),l++},1e3/c);setTimeout(function(){if(clearInterval(h),a)a(o);else for(var e=0;e<o.length;e++){var t=o[e];n.prototype.downloadFile(t.imageData,t.filename,t.ext)}o=[]},s+.01)},n.prototype._makeFrame=function(e,t,n){var r,i;if(r=this?this._curElement.elt:n,t)switch(t.toLowerCase()){case"png":i="image/png";break;case"jpeg":case"jpg":i="image/jpeg";break;default:i="image/png"}else t="png",i="image/png";var a=r.toDataURL(i);a=a.replace(i,"image/octet-stream");var s={};s.imageData=a,s.filename=e,s.ext=t,o.push(s)},n}(),amdclean.outputtext_area=function(e,t){"use strict";var n=amdclean.core;return n.prototype.print=window.console&&console.log?console.log.bind(console):function(){},n.prototype.println=n.prototype.print,n}(),amdclean.renderingrendering=function(e,t,n){var o=amdclean.core;return n=n,o.prototype.createCanvas=function(e,t,n){var r;return n?(r=document.createElement("canvas")).id="defaultCanvas":r=this.canvas,this._setupDone||(r.className+=" p5_hidden",r.style.visibility="hidden"),this._userNode?this._userNode.appendChild(r):document.body.appendChild(r),this._defaultGraphics||(this._defaultGraphics=new o.Graphics(r,this,!0),this._elements.push(this._defaultGraphics)),this._defaultGraphics.resize(e,t),this._defaultGraphics._applyDefaults(),this._defaultGraphics},o.prototype.resizeCanvas=function(e,t,n){this._defaultGraphics&&(this._defaultGraphics.resize(e,t),this._defaultGraphics._applyDefaults(),n||this.redraw())},o.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},o.prototype.createGraphics=function(e,t){var n=document.createElement("canvas");(this._userNode||document.body).appendChild(n);var r=new o.Graphics(n,this,!1);for(var i in this._elements.push(r),o.prototype)r.hasOwnProperty(i)||(r[i]="function"==typeof o.prototype[i]?o.prototype[i].bind(r):o.prototype[i]);return r.resize(e,t),r._applyDefaults(),r},o.prototype.blendMode=function(e){if(e!==n.BLEND&&e!==n.DARKEST&&e!==n.LIGHTEST&&e!==n.DIFFERENCE&&e!==n.MULTIPLY&&e!==n.EXCLUSION&&e!==n.SCREEN&&e!==n.REPLACE&&e!==n.OVERLAY&&e!==n.HARD_LIGHT&&e!==n.SOFT_LIGHT&&e!==n.DODGE&&e!==n.BURN&&e!==n.ADD&&e!==n.NORMAL)throw new Error("Mode "+e+" not recognized.");this.drawingContext.globalCompositeOperation=e},o}(0,0,amdclean.constants),amdclean.shape2d_primitives=function(e,t,n,o){"use strict";function r(e,t,n){for(var o=2*Math.PI,r=[],a=Math.PI/2,c=n>t?1:-1,l=t,u=Math.min(o,Math.abs(n-t));u>s;){var d=l+c*Math.min(u,a);r.push(i(e,l,d)),u-=Math.abs(d-l),l=d}return r}function i(e,t,n){var o=(n-t)/2,r=e*Math.cos(o),i=e*Math.sin(o),a=r,s=-i,c=.5522847498*Math.tan(o),l=a+c*i,u=s+c*r,d=l,h=-u,f=o+t,p=Math.cos(f),g=Math.sin(f);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:l*p-u*g,y2:l*g+u*p,x3:d*p-h*g,y3:d*g+h*p,x4:e*Math.cos(n),y4:e*Math.sin(n)}}var a=amdclean.core,s=(n=n,o=o,1e-5);return a.prototype.arc=function(e,t,i,a,s,c,l){if(this._doStroke||this._doFill){this._angleMode===o.DEGREES&&(s=this.radians(s),c=this.radians(c));var u=this.drawingContext,d=n.arcModeAdjust(e,t,i,a,this._ellipseMode),h=r(1,s,c),f=d.w/2,p=d.h/2;return u.beginPath(),h.forEach(function(e,t){0===t&&u.moveTo(d.x+e.x1*f,d.y+e.y1*p),u.bezierCurveTo(d.x+e.x2*f,d.y+e.y2*p,d.x+e.x3*f,d.y+e.y3*p,d.x+e.x4*f,d.y+e.y4*p)}),this._doFill&&((l===o.PIE||null==l)&&u.lineTo(d.x,d.y),u.closePath(),u.fill(),this._doStroke&&(l===o.CHORD||l===o.PIE))?(u.stroke(),this):(this._doStroke&&(l===o.OPEN||null==l)&&(u.beginPath(),h.forEach(function(e,t){0===t&&u.moveTo(d.x+e.x1*f,d.y+e.y1*p),u.bezierCurveTo(d.x+e.x2*f,d.y+e.y2*p,d.x+e.x3*f,d.y+e.y3*p,d.x+e.x4*f,d.y+e.y4*p)}),u.stroke()),this)}},a.prototype.ellipse=function(e,t,o,r){if(this._doStroke||this._doFill){o=Math.abs(o),r=Math.abs(r);var i=this.drawingContext,a=n.modeAdjust(e,t,o,r,this._ellipseMode);if(i.beginPath(),o===r)i.arc(a.x+a.w/2,a.y+a.w/2,a.w/2,0,2*Math.PI,!1);else{var s=.5522848,c=a.w/2*s,l=a.h/2*s,u=a.x+a.w,d=a.y+a.h,h=a.x+a.w/2,f=a.y+a.h/2;i.moveTo(a.x,f),i.bezierCurveTo(a.x,f-l,h-c,a.y,h,a.y),i.bezierCurveTo(h+c,a.y,u,f-l,u,f),i.bezierCurveTo(u,f+l,h+c,d,h,d),i.bezierCurveTo(h-c,d,a.x,f+l,a.x,f),i.closePath()}return this._doFill&&i.fill(),this._doStroke&&i.stroke(),this}},a.prototype.line=function(e,t,n,o){if(this._doStroke){var r=this.drawingContext;if("rgba(0,0,0,0)"!==r.strokeStyle)return r.beginPath(),r.moveTo(e,t),r.lineTo(n,o),r.stroke(),this}},a.prototype.point=function(e,t){if(this._doStroke){var n=this.drawingContext,r=n.strokeStyle,i=n.fillStyle;if("rgba(0,0,0,0)"!==r)return e=Math.round(e),t=Math.round(t),n.fillStyle=r,n.lineWidth>1?(n.beginPath(),n.arc(e,t,n.lineWidth/2,0,o.TWO_PI,!1),n.fill()):n.fillRect(e,t,1,1),n.fillStyle=i,this}}
1,a.prototype.quad=function(e,t,n,o,r,i,a,s){if(this._doStroke||this._doFill){var c=this.drawingContext;return c.beginPath(),c.moveTo(e,t),c.lineTo(n,o),c.lineTo(r,i),c.lineTo(a,s),c.closePath(),this._doFill&&c.fill(),this._doStroke&&c.stroke(),this}},a.prototype.rect=function(e,t,o,r,i,a,s,c){if(this._doStroke||this._doFill){var l=n.modeAdjust(e,t,o,r,this._rectMode),u=this.drawingContext;if(this._doStroke&&u.lineWidth%2==1&&u.translate(.5,.5),u.beginPath(),void 0===i)u.rect(l.x,l.y,l.w,l.h);else{void 0===a&&(a=i),void 0===s&&(s=a),void 0===c&&(c=s);var d=l.x,h=l.y,f=l.w,p=l.h,g=f/2,m=p/2;2*i>f&&(i=g),2*i>p&&(i=m),2*a>f&&(a=g),2*a>p&&(a=m),2*s>f&&(s=g),2*s>p&&(s=m),2*c>f&&(c=g),2*c>p&&(c=m),u.beginPath(),u.moveTo(d+i,h),u.arcTo(d+f,h,d+f,h+p,a),u.arcTo(d+f,h+p,d,h+p,s),u.arcTo(d,h+p,d,h,c),u.arcTo(d,h,d+f,h,i),u.closePath()}return this._doFill&&u.fill(),this._doStroke&&u.stroke(),this._doStroke&&u.lineWidth%2==1&&u.translate(-.5,-.5),this}},a.prototype.triangle=function(e,t,n,o,r,i){if(this._doStroke||this._doFill){var a=this.drawingContext;return a.beginPath(),a.moveTo(e,t),a.lineTo(n,o),a.lineTo(r,i),a.closePath(),this._doFill&&a.fill(),this._doStroke&&a.stroke(),this}},a}(0,0,amdclean.canvas,amdclean.constants),amdclean.shapeattributes=function(e,t,n){"use strict";var o=amdclean.core;return o.prototype._rectMode=(n=n).CORNER,o.prototype._ellipseMode=n.CENTER,o.prototype.ellipseMode=function(e){return(e===n.CORNER||e===n.CORNERS||e===n.RADIUS||e===n.CENTER)&&(this._ellipseMode=e),this},o.prototype.noSmooth=function(){return this.drawingContext.mozImageSmoothingEnabled=!1,this.drawingContext.webkitImageSmoothingEnabled=!1,this},o.prototype.rectMode=function(e){return(e===n.CORNER||e===n.CORNERS||e===n.RADIUS||e===n.CENTER)&&(this._rectMode=e),this},o.prototype.smooth=function(){return this.drawingContext.mozImageSmoothingEnabled=!0,this.drawingContext.webkitImageSmoothingEnabled=!0,this},o.prototype.strokeCap=function(e){return(e===n.ROUND||e===n.SQUARE||e===n.PROJECT)&&(this.drawingContext.lineCap=e),this},o.prototype.strokeJoin=function(e){return(e===n.ROUND||e===n.BEVEL||e===n.MITER)&&(this.drawingContext.lineJoin=e),this},o.prototype.strokeWeight=function(e){return this.drawingContext.lineWidth=void 0===e||0===e?1e-4:e,this},o}(0,0,amdclean.constants),amdclean.shapecurves=function(e,t){"use strict";var n=amdclean.core;return n.prototype._curveTightness=0,n.prototype.bezier=function(e,t,n,o,r,i,a,s){return this._doStroke?(this.beginShape(),this.vertex(e,t),this.bezierVertex(n,o,r,i,a,s),this.endShape(),this.stroke(),this):void 0},n.prototype.bezierDetail=function(e){return this},n.prototype.bezierPoint=function(e,t,n,o,r){var i=1-r;return Math.pow(i,3)*e+3*Math.pow(i,2)*r*t+3*i*Math.pow(r,2)*n+Math.pow(r,3)*o},n.prototype.bezierTangent=function(e,t,n,o,r){var i=1-r;return 3*o*Math.pow(r,2)-3*n*Math.pow(r,2)+6*n*i*r-6*t*i*r+3*t*Math.pow(i,2)-3*e*Math.pow(i,2)},n.prototype.curve=function(e,t,n,o,r,i,a,s){return this._doStroke?(this.beginShape(),this.curveVertex(e,t),this.curveVertex(n,o),this.curveVertex(r,i),this.curveVertex(a,s),this.endShape(),this.stroke(),this):void 0},n.prototype.curveDetail=function(e){return this},n.prototype.curveTightness=function(e){this._setProperty("_curveTightness",e)},n.prototype.curvePoint=function(e,t,n,o,r){var i=r*r*r,a=r*r;return e*(-.5*i+a-.5*r)+t*(1.5*i-2.5*a+1)+n*(-1.5*i+2*a+.5*r)+o*(.5*i-.5*a)},n.prototype.curveTangent=function(e,t,n,o,r){var i=r*r;return e*(-3*i/2+2*r-.5)+t*(9*i/2-5*r)+n*(-9*i/2+4*r+.5)+o*(3*i/2-r)},n}(),amdclean.shapevertex=function(e,t,n){"use strict";var o=amdclean.core,r=(n=n,null),i=[],a=[],s=!1,c=!1,l=!1,u=!1;return o.prototype._doFillStrokeClose=function(){this._doFill&&this.drawingContext.fill(),this._doStroke&&this.drawingContext.stroke(),this.drawingContext.closePath()},o.prototype.beginContour=function(){return a=[],u=!0,this},o.prototype.beginShape=function(e){return r=e===n.POINTS||e===n.LINES||e===n.TRIANGLES||e===n.TRIANGLE_FAN||e===n.TRIANGLE_STRIP||e===n.QUADS||e===n.QUAD_STRIP?e:null,i=[],a=[],this},o.prototype.bezierVertex=function(){if(0===i.length)throw"vertex() must be used once before calling bezierVertex()";s=!0;for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.isVert=!1,u?a.push(e):i.push(e),this},o.prototype.curveVertex=function(e,t){return c=!0,this.vertex(e,t),this},o.prototype.endContour=function(){var e=a[0].slice();e.isVert=a[0].isVert,e.moveTo=!1,a.push(e),i.push(i[0]);for(var t=0;t<a.length;t++)i.push(a[t]);return this},o.prototype.endShape=function(e){if(0===i.length)return this;if(!this._doStroke&&!this._doFill)return this;var t,o=e===n.CLOSE;o&&!u&&i.push(i[0]);var a,d,h=i.length;if(!c||r!==n.POLYGON&&null!==r)if(!s||r!==n.POLYGON&&null!==r)if(!l||r!==n.POLYGON&&null!==r)if(r===n.POINTS)for(a=0;h>a;a++)t=i[a],this._doStroke&&this.stroke(t[6]),this.point(t[0],t[1]);else if(r===n.LINES)for(a=0;h>a+1;a+=2)t=i[a],this._doStroke&&this.stroke(i[a+1][6]),this.line(t[0],t[1],i[a+1][0],i[a+1][1]);else if(r===n.TRIANGLES)for(a=0;h>a+2;a+=3)t=i[a],this.drawingContext.beginPath(),this.drawingContext.moveTo(t[0],t[1]),this.drawingContext.lineTo(i[a+1][0],i[a+1][1]),this.drawingContext.lineTo(i[a+2][0],i[a+2][1]),this.drawingContext.lineTo(t[0],t[1]),this._doFill&&(this.fill(i[a+2][5]),this.drawingContext.fill()),this._doStroke&&(this.stroke(i[a+2][6]),this.drawingContext.stroke()),this.drawingContext.closePath();else if(r===n.TRIANGLE_STRIP)for(a=0;h>a+1;a++)t=i[a],this.drawingContext.beginPath(),this.drawingContext.moveTo(i[a+1][0],i[a+1][1]),this.drawingContext.lineTo(t[0],t[1]),this._doStroke&&this.stroke(i[a+1][6]),this._doFill&&this.fill(i[a+1][5]),h>a+2&&(this.drawingContext.lineTo(i[a+2][0],i[a+2][1]),this._doStroke&&this.stroke(i[a+2][6]),this._doFill&&this.fill(i[a+2][5])),this._doFillStrokeClose();else if(r===n.TRIANGLE_FAN){if(h>2)for(this.drawingContext.beginPath(),this.drawingContext.moveTo(i[0][0],i[0][1]),this.drawingContext.lineTo(i[1][0],i[1][1]),this.drawingContext.lineTo(i[2][0],i[2][1]),this._doFill&&this.fill(i[2][5]),this._doStroke&&this.stroke(i[2][6]),this._doFillStrokeClose(),a=3;h>a;a++)t=i[a],this.drawingContext.beginPath(),this.drawingContext.moveTo(i[0][0],i[0][1]),this.drawingContext.lineTo(i[a-1][0],i[a-1][1]),this.drawingContext.lineTo(t[0],t[1]),this._doFill&&this.fill(t[5]),this._doStroke&&this.stroke(t[6]),this._doFillStrokeClose()}else if(r===n.QUADS)for(a=0;h>a+3;a+=4){for(t=i[a],this.drawingContext.beginPath(),this.drawingContext.moveTo(t[0],t[1]),d=1;4>d;d++)this.drawingContext.lineTo(i[a+d][0],i[a+d][1]);this.drawingContext.lineTo(t[0],t[1]),this._doFill&&this.fill(i[a+3][5]),this._doStroke&&this.stroke(i[a+3][6]),this._doFillStrokeClose()}else if(r===n.QUAD_STRIP){if(h>3)for(a=0;h>a+1;a+=2)t=i[a],this.drawingContext.beginPath(),h>a+3?(this.drawingContext.moveTo(i[a+2][0],i[a+2][1]),this.drawingContext.lineTo(t[0],t[1]),this.drawingContext.lineTo(i[a+1][0],i[a+1][1]),this.drawingContext.lineTo(i[a+3][0],i[a+3][1]),this._doFill&&this.fill(i[a+3][5]),this._doStroke&&this.stroke(i[a+3][6])):(this.drawingContext.moveTo(t[0],t[1]),this.drawingContext.lineTo(i[a+1][0],i[a+1][1])),this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),this.drawingContext.moveTo(i[0][0],i[0][1]),a=1;h>a;a++)(t=i[a]).isVert&&(t.moveTo?this.drawingContext.moveTo(t[0],t[1]):this.drawingContext.lineTo(t[0],t[1]));this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),a=0;h>a;a++)i[a].isVert?i[a].moveTo?this.drawingContext.moveTo([0],i[a][1]):this.drawingContext.lineTo(i[a][0],i[a][1]):this.drawingContext.quadraticCurveTo(i[a][0],i[a][1],i[a][2],i[a][3]);this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),a=0;h>a;a++)i[a].isVert?i[a].moveTo?this.drawingContext.moveTo(i[a][0],i[a][1]):this.drawingContext.lineTo(i[a][0],i[a][1]):this.drawingContext.bezierCurveTo(i[a][0],i[a][1],i[a][2],i[a][3],i[a][4],i[a][5]);this._doFillStrokeClose()}else if(h>3){var f=[],p=1-this._curveTightness;for(this.drawingContext.beginPath(),this.drawingContext.moveTo(i[1][0],i[1][1]),a=1;h>a+2;a++)f[0]=[(t=i[a])[0],t[1]],f[1]=[t[0]+(p*i[a+1][0]-p*i[a-1][0])/6,t[1]+(p*i[a+1][1]-p*i[a-1][1])/6],f[2]=[i[a+1][0]+(p*i[a][0]-p*i[a+2][0])/6,i[a+1][1]+(p*i[a][
11]-p*i[a+2][1])/6],f[3]=[i[a+1][0],i[a+1][1]],this.drawingContext.bezierCurveTo(f[1][0],f[1][1],f[2][0],f[2][1],f[3][0],f[3][1]);o&&this.drawingContext.lineTo(i[a+1][0],i[a+1][1]),this._doFillStrokeClose()}return c=!1,s=!1,l=!1,u=!1,o&&i.pop(),this},o.prototype.quadraticVertex=function(e,t,o,r){if(this._contourInited){var s={};return s.x=e,s.y=t,s.x3=o,s.y3=r,s.type=n.QUADRATIC,this._contourVertices.push(s),this}if(!(i.length>0))throw"vertex() must be used once before calling quadraticVertex()";l=!0;for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return c.isVert=!1,u?a.push(c):i.push(c),this},o.prototype.vertex=function(e,t,n){var o=[];return o.isVert=!0,o[0]=e,o[1]=t,o[2]=0,o[3]=0,o[4]=0,o[5]=this.drawingContext.fillStyle,o[6]=this.drawingContext.strokeStyle,n&&(o.moveTo=n),u?(0===a.length&&(o.moveTo=!0),a.push(o)):i.push(o),this},o}(0,0,amdclean.constants),amdclean.structure=function(e,t){"use strict";var n=amdclean.core;return n.prototype.exit=function(){throw"exit() not implemented, see remove()"},n.prototype.noLoop=function(){this._loop=!1,this._drawInterval&&clearInterval(this._drawInterval)},n.prototype.loop=function(){this._loop=!0,this._draw()},n.prototype.push=function(){this.drawingContext.save(),this._styles.push({doStroke:this._doStroke,doFill:this._doFill,tint:this._tint,imageMode:this._imageMode,rectMode:this._rectMode,ellipseMode:this._ellipseMode,colorMode:this._colorMode,textFont:this.textFont,textLeading:this.textLeading,textSize:this.textSize,textStyle:this.textStyle})},n.prototype.pop=function(){this.drawingContext.restore();var e=this._styles.pop();this._doStroke=e.doStroke,this._doFill=e.doFill,this._tint=e.tint,this._imageMode=e.imageMode,this._rectMode=e.rectMode,this._ellipseMode=e.ellipseMode,this._colorMode=e.colorMode,this.textFont=e.textFont,this.textLeading=e.textLeading,this.textSize=e.textSize,this.textStyle=e.textStyle},n.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},n.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},n.prototype.redraw=function(){var e=this.setup||window.setup,t=this.draw||window.draw;"function"==typeof t&&(this.push(),void 0===e&&this.scale(this._pixelDensity,this._pixelDensity),this._registeredMethods.pre.forEach(function(e){e.call(this)}),t(),this._registeredMethods.post.forEach(function(e){e.call(this)}),this.pop())},n.prototype.size=function(){throw"size() not implemented, see createCanvas()"},n}(),amdclean.transform=function(e,t,n){"use strict";var o=amdclean.core;return n=n,o.prototype.applyMatrix=function(e,t,n,o,r,i){return this.drawingContext.transform(e,t,n,o,r,i),this},o.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},o.prototype.printMatrix=function(){throw new Error("printMatrix() not implemented")},o.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")},o.prototype.resetMatrix=function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this},o.prototype.rotate=function(e){return this._angleMode===n.DEGREES&&(e=this.radians(e)),this.drawingContext.rotate(e),this},o.prototype.rotateX=function(){throw"not yet implemented"},o.prototype.rotateY=function(){throw"not yet implemented"},o.prototype.scale=function(){var e=1,t=1;return 1===arguments.length?e=t=arguments[0]:(e=arguments[0],t=arguments[1]),this.drawingContext.scale(e,t),this},o.prototype.shearX=function(e){return this._angleMode===n.DEGREES&&(e=this.radians(e)),this.drawingContext.transform(1,0,this.tan(e),1,0,0),this},o.prototype.shearY=function(e){return this._angleMode===n.DEGREES&&(e=this.radians(e)),this.drawingContext.transform(1,this.tan(e),0,1,0,0),this},o.prototype.translate=function(e,t){return this.drawingContext.translate(e,t),this},o}(0,0,amdclean.constants),amdclean.typographyattributes=function(e,t,n){"use strict";var o=amdclean.core;return n=n,o.prototype._textLeading=15,o.prototype._textFont="sans-serif",o.prototype._textSize=12,o.prototype._textStyle=n.NORMAL,o.prototype._textAscent=null,o.prototype._textDescent=null,o.prototype.textAlign=function(e,t){(e===n.LEFT||e===n.RIGHT||e===n.CENTER)&&(this.drawingContext.textAlign=e),(t===n.TOP||t===n.BOTTOM||t===n.CENTER||t===n.BASELINE)&&(this.drawingContext.textBaseline=t)},o.prototype.textLeading=function(e){this._setProperty("_textLeading",e)},o.prototype.textSize=function(e){this._setProperty("_textSize",e),this._setProperty("_textLeading",1.25*e),this._applyTextProperties()},o.prototype.textStyle=function(e){(e===n.NORMAL||e===n.ITALIC||e===n.BOLD)&&
1(this._setProperty("_textStyle",e),this._applyTextProperties())},o.prototype.textWidth=function(e){return this.drawingContext.measureText(e).width},o.prototype.textAscent=function(){return null==this._textAscent&&this._updateTextMetrics(),this._textAscent},o.prototype.textDescent=function(){return null==this._textDescent&&this._updateTextMetrics(),this._textDescent},o.prototype._applyTextProperties=function(){this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),this.drawingContext.font=this._textStyle+" "+this._textSize+"px "+this._textFont},o.prototype._updateTextMetrics=function(){var e=document.createElement("span");e.style.fontFamily=this._textFont,e.style.fontSize=this._textSize+"px",e.innerHTML="ABCjgq|";var t=document.createElement("div");t.style.display="inline-block",t.style.width="1px",t.style.height="0px";var n=document.createElement("div");n.appendChild(e),n.appendChild(t),n.style.height="0px",n.style.overflow="hidden",document.body.appendChild(n),t.style.verticalAlign="baseline";var o=this._calculateOffset(t),r=this._calculateOffset(e),i=o[1]-r[1];t.style.verticalAlign="bottom",o=this._calculateOffset(t),r=this._calculateOffset(e);var a=o[1]-r[1]-i;document.body.removeChild(n),this._setProperty("_textAscent",i),this._setProperty("_textDescent",a)},o.prototype._calculateOffset=function(e){var t=0,n=0;if(e.offsetParent)do{t+=e.offsetLeft,n+=e.offsetTop}while(e=e.offsetParent);else t+=e.offsetLeft,n+=e.offsetTop;return[t,n]},o}(0,0,amdclean.constants),amdclean.typographyloading_displaying=function(e,t){"use strict";var n=amdclean.core;return n.prototype.text=function(e,t,n,o,r){"string"!=typeof e&&(e=e.toString()),void 0!==o&&(r+=n+=this._textLeading);for(var i=(e=e.replace(/(\t)/g," ")).split("\n"),a=0;a<i.length;a++){for(var s="",c=i[a].split(" "),l=0;l<c.length;l++)if(n+this._textLeading<=r||void 0===r){var u=s+c[l]+" ",d=this.drawingContext.measureText(u);void 0!==o&&d.width>o?(this._doFill&&this.drawingContext.fillText(s,t,n),this._doStroke&&this.drawingContext.strokeText(s,t,n),s=c[l]+" ",n+=this._textLeading):s=u}this._doFill&&this.drawingContext.fillText(s,t,n),this._doStroke&&this.drawingContext.strokeText(s,t,n),n+=this._textLeading}},n.prototype.textFont=function(e){this._setProperty("_textFont",e),this._applyTextProperties()},n}(),amdclean.src_app=function(e,t){"use strict";var n=amdclean.core,o=function(){window.PHANTOMJS||window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&new n};return"complete"===document.readyState?o():window.addEventListener("load",o,!1),n}(),amdclean.src_app}),function(e,t){"function"==typeof define&&define.amd?define("p5.speech",["p5"],function(e){t(e)}):"object"==typeof exports?t(require("../p5")):t(e.p5)}(this,function(e){e.Speech=function(e,t){this.synth=window.speechSynthesis,this.utterance=new SpeechSynthesisUtterance,this.isLoaded=0,this.interrupt=!1,this.voices=[],void 0!==e&&(this.initvoice=e),void 0!==t&&(this.onLoad=t);var n=this;window.speechSynthesis.onvoiceschanged=function(){0==n.isLoaded&&(n.voices=window.speechSynthesis.getVoices(),n.isLoaded=1,console.log("p5.Speech: voices loaded!"),null!=n.initvoice&&(n.setVoice(n.initvoice),console.log("p5.Speech: initial voice: "+n.initvoice)),null!=n.onLoad&&n.onLoad(),n.utterance.onstart=function(e){null!=n.onStart&&n.onStart(e)},n.utterance.onpause=function(e){null!=n.onPause&&n.onPause(e)},n.utterance.onresume=function(e){null!=n.onResume&&n.onResume(e)},n.utterance.onend=function(e){null!=n.onEnd&&n.onEnd(e)})}},e.Speech.prototype.listVoices=function(){if(this.isLoaded)for(var e=0;e<this.voices.length;e++)console.log(this.voices[e].name);else console.log("p5.Speech: voices not loaded yet!")},e.Speech.prototype.setVoice=function(e){"string"==typeof e?this.utterance.voice=this.voices.filter(function(t){return t.name==e})[0]:"number"==typeof e&&(this.utterance.voice=this.voices[Math.min(Math.max(e,0),this.voices.length-1)])},e.Speech.prototype.setVolume=function(e){this.utterance.volume=Math.min(Math.max(e,0),1)},e.Speech.prototype.setRate=function(e){this.utterance.rate=Math.min(Math.max(e,.1),2)},e.Speech.prototype.setPitch=function(e){this.utterance.pitch=Math.min(Math.max(e,.01),2)},e.Speech.prototype.setLang=function(e){this.utterance.lang=e},e.Speech.prototype.speak=function(e){this.interrupt&&this.synth.cancel(),this.utterance.text=e,this.synth.speak(this.utterance)},e.Speech.prototype.pause=function(){this.synth.pause()},e.Speech.prototype.resume=function(){this.synth.resume()},e.Speech.prototype.stop=function(){this.synth.cancel()},e.Speech.prototype.cancel=function(){this.synth.cancel()},e.Speech.prototype.started=function(e){this.onStart=e},e.Speech.prototype.ended=function(e){this.onEnd=e},e.Speech.prototype.paused=function(e){this.onPause=e},e.Speech.prototype.resumed=function(e){this.onResume=e},e.SpeechRec=function(e,t){"webkitSpeechRecognition"in window?this.rec=new webkitSpeechRecognition:(this.rec=new Object,console.log("p5.SpeechRec: webkitSpeechRecognition not supported in this browser.")),void 0!==e&&(this.rec.lang=e),void 0!==t&&(this.onResult=t),this.continuous=!1,this.interimResults=!1;var n=this;this.rec.onresult=function(e){n.resultJSON=e,n.resultValue=e.returnValue,n.resultString=e.results[e.results.length-1][0].transcript.trim(),n.resultConfidence=e.results[e.results.length-1][0].c
1onfidence,null!=n.onResult&&n.onResult()},this.rec.onstart=function(e){null!=n.onStart&&n.onStart(e)},this.rec.onerror=function(e){null!=n.onError&&n.onError(e)},this.rec.onend=function(){null!=n.onEnd&&n.onEnd()}},e.SpeechRec.prototype.start=function(e,t){"webkitSpeechRecognition"in window&&(void 0!==e&&(this.continuous=e),void 0!==t&&(this.interimResults=t),this.rec.continuous=this.continuous,this.rec.interimResults=this.interimResults,this.rec.start())}}),RecordRTC.version="5.5.9","undefined"!=typeof module&&(module.exports=RecordRTC),"function"==typeof define&&define.amd&&define("RecordRTC",[],function(){return RecordRTC}),RecordRTC.getFromDisk=function(e,t){if(!t)throw"callback is mandatory.";console.log("Getting recorded "+("all"===e?"blobs":e+" blob ")+" from disk!"),DiskStorage.Fetch(function(n,o){"all"!==e&&o===e+"Blob"&&t&&t(n),"all"===e&&t&&t(n,o.replace("Blob",""))})},RecordRTC.writeToDisk=function(e){console.log("Writing recorded blob(s) to disk!"),(e=e||{}).audio&&e.video&&e.gif?e.audio.getDataURL(function(t){e.video.getDataURL(function(n){e.gif.getDataURL(function(e){DiskStorage.Store({audioBlob:t,videoBlob:n,gifBlob:e})})})}):e.audio&&e.video?e.audio.getDataURL(function(t){e.video.getDataURL(function(e){DiskStorage.Store({audioBlob:t,videoBlob:e})})}):e.audio&&e.gif?e.audio.getDataURL(function(t){e.gif.getDataURL(function(e){DiskStorage.Store({audioBlob:t,gifBlob:e})})}):e.video&&e.gif?e.video.getDataURL(function(t){e.gif.getDataURL(function(e){DiskStorage.Store({videoBlob:t,gifBlob:e})})}):e.audio?e.audio.getDataURL(function(e){DiskStorage.Store({audioBlob:e})}):e.video?e.video.getDataURL(function(e){DiskStorage.Store({videoBlob:e})}):e.gif&&e.gif.getDataURL(function(e){DiskStorage.Store({gifBlob:e})})},MRecordRTC.getFromDisk=RecordRTC.getFromDisk,MRecordRTC.writeToDisk=RecordRTC.writeToDisk,void 0!==RecordRTC&&(RecordRTC.MRecordRTC=MRecordRTC);var browserFakeUserAgent="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";!function(e){e&&"undefined"==typeof window&&"undefined"!=typeof global&&(global.navigator={userAgent:browserFakeUserAgent,getUserMedia:function(){}},global.console||(global.console={}),void 0!==global.console.log&&void 0!==global.console.error||(global.console.error=global.console.log=global.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(e.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},e.HTMLVideoElement=function(){}),"undefined"==typeof location&&(e.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(e.screen={width:0,height:0}),void 0===URL&&(e.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),e.window=global)}("undefined"!=typeof global?global:null);var requestAnimationFrame=window.requestAnimationFrame;if(void 0===requestAnimationFrame)if("undefined"!=typeof webkitRequestAnimationFrame)requestAnimationFrame=webkitRequestAnimationFrame;else if("undefined"!=typeof mozRequestAnimationFrame)requestAnimationFrame=mozRequestAnimationFrame;else if("undefined"!=typeof msRequestAnimationFrame)requestAnimationFrame=msRequestAnimationFrame;else if(void 0===requestAnimationFrame){var lastTime=0;requestAnimationFrame=function(e,t){var n=(new Date).getTime(),o=Math.max(0,16-(n-lastTime)),r=setTimeout(function(){e(n+o)},o);return lastTime=n+o,r}}var cancelAnimationFrame=window.cancelAnimationFrame;void 0===cancelAnimationFrame&&("undefined"!=typeof webkitCancelAnimationFrame?cancelAnimationFrame=webkitCancelAnimationFrame:"undefined"!=typeof mozCancelAnimationFrame?cancelAnimationFrame=mozCancelAnimationFrame:"undefined"!=typeof msCancelAnimationFrame?cancelAnimationFrame=msCancelAnimationFrame:void 0===cancelAnimationFrame&&(cancelAnimationFrame=function(e){clearTimeout(e)}));var AudioContext=window.AudioContext;void 0===AudioContext&&("undefined"!=typeof webkitAudioContext&&(AudioContext=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(AudioContext=mozAudioContext));var URL=window.URL;void 0===URL&&"undefined"!=typeof webkitURL&&(URL=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var isEdge=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),isOpera=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),isChrome=!isOpera&&!isEdge&&!!navigator.webkitGetUserMedia||isElectron()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);isSafari&&!isChrome&&-1!==navigator.userAgent.indexOf("CriOS")&&(isSafari=!1,isChrome=!0);var MediaStream=window.MediaStream;function bytesToSize(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function invokeSaveAsDialog(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(a){}var n=(e.type||"video/webm").split("/")[1];if(t&&-1!==t.indexOf(".")){var o=t.split(".");t=o[0],n=o[1]}
vendor: 19,672 bytes, line 1
1var r=(t||Math.round(9999999999*Math.random())+888888888)+"."+n;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,r);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,r);var i=document.createElement("a");i.href=URL.createObjectURL(e),i.download=r,i.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(i),"function"==typeof i.click?i.click():(i.target="_blank",i.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),URL.revokeObjectURL(i.href)}function isElectron(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0}function getTracks(e,t){return e&&e.getTracks?e.getTracks().filter(function(e){return e.kind===(t||"audio")}):[]}function setSrcObject(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}function getSeekableBlob(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var n=new EBML.Reader,o=new EBML.Decoder,r=EBML.tools,i=new FileReader;i.onload=function(e){o.decode(this.result).forEach(function(e){n.read(e)}),n.stop();var i=r.makeMetadataSeekable(n.metadatas,n.duration,n.cues),a=this.result.slice(n.metadataSize),s=new Blob([i,a],{type:"video/webm"});t(s)},i.readAsArrayBuffer(e)}void 0===MediaStream&&"undefined"!=typeof webkitMediaStream&&(MediaStream=webkitMediaStream),void 0!==MediaStream&&void 0===MediaStream.prototype.stop&&(MediaStream.prototype.stop=function(){this.getTracks().forEach(function(e){e.stop()})}),void 0!==RecordRTC&&(RecordRTC.invokeSaveAsDialog=invokeSaveAsDialog,RecordRTC.getTracks=getTracks,RecordRTC.getSeekableBlob=getSeekableBlob,RecordRTC.bytesToSize=bytesToSize,RecordRTC.isElectron=isElectron);var Storage={};function isMediaRecorderCompatible(){if(isFirefox||isSafari||isEdge)return!0;navigator;var e,t,n=navigator.userAgent,o=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10);return(isChrome||isOpera)&&(e=n.indexOf("Chrome"),o=n.substring(e+7)),-1!==(t=o.indexOf(";"))&&(o=o.substring(0,t)),-1!==(t=o.indexOf(" "))&&(o=o.substring(0,t)),r=parseInt(""+o,10),isNaN(r)&&(o=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10)),r>=49}function MediaStreamRecorder(e,t){var n,o=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";"audio"===(t=t||{mimeType:"video/webm"}).type&&(getTracks(e,"video").length&&getTracks(e,"audio").length&&(navigator.mozGetUserMedia?(n=new MediaStream).addTrack(getTracks(e,"audio")[0]):n=new MediaStream(getTracks(e,"audio")),e=n),t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=isChrome?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg"));var r,i=[];function a(){o.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(o.timestamps[o.timestamps.length-1],o.timestamps)}function s(e){return r&&r.mimeType?r.mimeType:e.mimeType||"video/webm"}function c(){i=[],r=null,o.timestamps=[]}this.getArrayOfBlobs=function(){return i},this.record=function(){o.blob=null,o.clearRecordedData(),o.timestamps=[],l=[],i=[];var n=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",n),r&&(r=null),isChrome&&!isMediaRecorderCompatible()&&(n="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&n.mimeType&&(MediaRecorder.isTypeSupported(n.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",n.mimeType),n.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{r=new MediaRecorder(e,n),t.mimeType=n.mimeType}catch(c){r=new MediaRecorder(e)}n.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in r&&!1===r.canRecordMimeType(n.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",n.mimeType)),r.ondataavailable=function(e){if(e.data&&l.push("ondataavailable: "+bytesToSize(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||o.blob?o.recordingCallback&&(o.recordingCallback(new Blob([],{type:s(n)})),o.recordingCallback=null):(o.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:s(n)}),o.recordingCallback&&(o.recordingCallback(o.blob),o.recordingCallback=null));else if(e.data&&e.data.size&&e.data.size>100&&(i.push(e.data),a(),"function"==typeof t.ondataavailable)){var r=t.getNativeBlob?e.data:new Blob([e.data],{type:s(n)});t.ondataavailable(r)}},r.onstart=function(){l.push("started")},r.onpause=function(){l.push("paused")},r.onresume=function(){l.push("resumed")},r.onstop=function(){l.push("stopped")},r.onerror=function(e){e&&(e.name||(e.name="UnknownError"),l.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",n.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!o.manuallyStopped&&r&&"inactive"===r.state)return delete t.timeslice,void r.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==r.state&&"stopped"!==r.state&&r.stop())},"number"==typeof t.timeSlice?(a(),r.start(t.timeSlice)):r.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},o.manuallyStopped=!0,r&&(this.recordingCallback=e,"recording"===r.state&&r.stop(),"number"==typeof t.timeSlice&&setTimeout(function(){o.blob=new Blob(i,{type:s(t)}),o.recordingCallback(o.blob)},100))},this.pause=function(){r&&"recording"===r.state&&r.pause()},this.resume=function(){r&&"paused"===r.state&&r.resume()},this.clearRecordedData=function(){r&&"recording"===r.state&&o.stop(c),c()},this.getInternalRecorder=function(){return r},this.blob=null,this.getState=function(){return r&&r.state||"inactive"};var l=[];this.getAllStates=function(){return l},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1),o=this,function n(){if(r&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void o.stop()):void setTimeout(n,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function StereoAudioRecorder(e,t){if(!getTracks(e,"audio").length)throw"Your stream has no audio tracks.";var n,o=this,r=[],i=[],a=!1,s=0,c=2,l=(t=t||{}).desiredSampRate;function u(){if(!1===t.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function d(e,t){function n(e,t){var n,o=e.numberOfAudioChannels,r=e.leftBuffers.slice(0),i=e.rightBuffers.slice(0),a=e.sampleRate,s=e.internalInterleavedLength,c=e.desiredSampRate;function l(e,t,n){var o=Math.round(e.length*(t/n)),r=[],i=Number((e.length-1)/(o-1));r[0]=e[0];for(var a=1;a<o-1;a++){var s=a*i,c=Number(Math.floor(s)).toFixed(),l=Number(Math.ceil(s)).toFixed();r[a]=u(e[c],e[l],s-c)}return r[o-1]=e[e.length-1],r}function u(e,t,n){return e+(t-e)*n}function d(e,t){for(var n=new Float64Array(t),o=0,r=e.length,i=0;i<r;i++){var a=e[i];n.set(a,o),o+=a.length}return n}function h(e,t,n){for(var o=n.length,r=0;r<o;r++)e.setUint8(t+r,n.charCodeAt(r))}2===o&&(r=d(r,s),i=d(i,s),c&&(r=l(r,c,a),i=l(i,c,a))),1===o&&(r=d(r,s),c&&(r=l(r,c,a))),c&&(a=c),2===o&&(n=function(e,t){for(var n=e.length+t.length,o=new Float64Array(n),r=0,i=0;i<n;)o[i++]=e[r],o[i++]=t[r],r++;return o}(r,i)),1===o&&(n=r);var f=n.length,p=new ArrayBuffer(44+2*f),g=new DataView(p);h(g,0,"RIFF"),g.setUint32(4,36+2*f,!0),h(g,8,"WAVE"),h(g,12,"fmt "),g.setUint32(16,16,!0),g.setUint16(20,1,!0),g.setUint16(22,o,!0),g.setUint32(24,a,!0),g.setUint32(28,2*a,!0),g.setUint16(32,2*o,!0),g.setUint16(34,16,!0),h(g,36,"data"),g.setUint32(40,2*f,!0);for(var m=f,v=44,y=0;y<m;y++)g.setInt16(v,32767*n[y],!0),v+=2;if(t)return t({buffer:p,view:g});postMessage({buffer:p,view:g})}if(e.noWorker)n(e,function(e){t(e.buffer,e.view)});else{var o,r,i,a=(o=n,r=URL.createObjectURL(new Blob([o.toString(),";this.onmessage = function (eee) {"+o.name+"(eee.data);}"],{type:"application/javascript"})),(i=new Worker(r)).workerURL=r,i);a.onmessage=function(e){t(e.data.buffer,e.data.view),URL.revokeObjectURL(a.workerURL),a.terminate()},a.postMessage(e)}}!0===t.leftChannel&&(c=1),1===t.numberOfAudioChannels&&(c=1),(!c||c<1)&&(c=2),t.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+c),void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!0),this.record=function(){if(!1===u())throw"Please make sure MediaStream is active.";y(),b=v=!1,a=!0,void 0!==t.timeSlice&&C()},this.stop=function(e){e=e||function(){},a=!1,d({desiredSampRate:l,sampleRate:m,numberOfAudioChannels:c,internalInterleavedLength:s,leftBuffers:r,rightBuffers:1===c?[]:i,noWorker:t.noWorker},function(t,n){o.blob=new Blob([n],{type:"audio/wav"}),o.buffer=new ArrayBuffer(n.buffer.byteLength),o.view=n,o.sampleRate=l||m,o.bufferSize=g,o.length=s,b=!1,e&&e(o.blob)})},void 0===RecordRTC.Storage&&(RecordRTC.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),RecordRTC.Storage.AudioContextConstructor&&"closed"!==RecordRTC.Storage.AudioContextConstructor.state||(RecordRTC.Storage.AudioContextConstructor=new RecordRTC.Storage.AudioContext);var h=RecordRTC.Storage.AudioContextConstructor,f=h.createMediaStreamSource(e),p=[0,256,512,1024,2048,4096,8192,16384],g=void 0===t.bufferSize?4096:t.bufferSize;if(-1===p.indexOf(g)&&(t.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(p,null,"\t"))),h.createJavaScriptNode)n=h.createJavaScriptNode(g,c,c);else{if(!h.createScriptProcessor)throw"WebAudio API has no support on this browser.";n=h.createScriptProcessor(g,c,c)}f.connect(n),t.bufferSize||(g=n.bufferSize);var m=void 0!==t.sampleRate?t.sampleRate:h.sampleRate||44100;(m<22050||m>96e3)&&(t.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),t.disableLogs||t.desiredSampRate&&console.log("Desired sample-rate: "+t.desiredSampRate);var v=!1;function y(){i=[],s=0,b=!1,a=!1,v=!1,h=null,o.leftchannel=r=[],o.rightchannel=i,o.numberOfAudioChannels=c,o.desiredSampRate=l,o.sampleRate=m,o.recordingLength=s,_={left:[],right:[],recordingLength:0}}function w(){n&&(n.onaudioprocess=null,n.disconnect(),n=null),f&&(f.disconnect(),f=null),y()}this.pause=function(){v=!0},this.resume=function(){if(!1===u())throw"Please make sure MediaStream is active.";if(!a)return t.disableLogs||console.log("Seems recording has been restarted."),void this.record();v=!1},this.clearRecordedData=function(){t.checkForInactiveTracks=!1,a&&this.stop(w),w()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var b=!1;n.onaudioprocess=function(e){if(!v)if(!1===u()&&(t.disableLogs||console.log("MediaStream seems stopped."),n.disconnect(),a=!1),a){b||(b=!0,t.onAudioProcessStarted&&t.onAudioProcessStarted(),t.initCallback&&t.initCallback());var l=e.inputBuffer.getChannelData(0),d=new Float32Array(l);if(r.push(d),2===c){var h=e.inputBuffer.getChannelData(1),p=new Float32Array(h);i.push(p)}o.recordingLength=s+=g,void 0!==t.timeSlice&&(_.recordingLength+=g,_.left.push(d),2===c&&_.right.push(p))}else f&&(f.disconnect(),f=null)},n.connect(h.createMediaStreamDestination?h.createMediaStreamDestination():h.destination),this.leftchannel=r,this.rightchannel=i,this.numberOfAudioChannels=c,this.desiredSampRate=l,this.sampleRate=m,o.recordingLength=s;var _={left:[],right:[],recordingLength:0};function C(){a&&"function"==typeof t.ondataavailable&&void 0!==t.timeSlice&&(_.left.length?(d({desiredSampRate:l,sampleRate:m,numberOfAudioChannels:c,internalInterleavedLength:_.recordingLength,leftBuffers:_.left,rightBuffers:1===c?[]:_.right},function(e,n){var o=new Blob([n],{type:"audio/wav"});t.ondataavailable(o),setTimeout(C,t.timeSlice)}),_={left:[],right:[],recordingLength:0}):setTimeout(C,t.timeSlice))}}function CanvasRecorder(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var n=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach(function(e){e in document.createElement("canvas")&&(n=!0)});var o,r,i,a=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),s=50,c=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(a&&c&&c[2]&&(s=parseInt(c[2],10)),a&&s<52&&(n=!1),t.useWhammyRecorder&&(n=!1),n)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)o=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";o=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(i=!0,n&&!t.useWhammyRecorder){var e;"captureStream"in o?e=o.captureStream(25):"mozCaptureStream"in o?e=o.mozCaptureStream(25):"webkitCaptureStream"in o&&(e=o.webkitCaptureStream(25));try{var a=new MediaStream;a.addTrack(getTracks(e,"video")[0]),e=a}catch(s){}if(!e)throw"captureStream API are NOT available.";(r=new MediaStreamRecorder(e,{mimeType:t.mimeType||"video/webm"})).record()}else f.frames=[],h=(new Date).getTime(),d();t.initCallback&&t.initCallback()},this.getWebPImages=function(n){if("canvas"===e.nodeName.toLowerCase()){var o=f.frames.length;f.frames.forEach(function(e,n){var r=o-n;t.disableLogs||console.log(r+"/"+o+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(r,o);var i=e.image.toDataURL("image/webp",1);f.frames[n].image=i}),t.disableLogs||console.log("Generating WebM"),n()}else n()},this.stop=function(e){i=!1;var o=this;n&&r?r.stop(e):this.getWebPImages(function(){f.compile(function(n){t.disableLogs||console.log("Recording finished!"),o.blob=n,o.blob.forEach&&(o.blob=new Blob([],{type:"video/webm"})),e&&e(o.blob),f.frames=[]})})};var l=!1;function u(){f.frames=[],i=!1,l=!1}function d(){if(l)return h=(new Date).getTime(),setTimeout(d,500);if("canvas"===e.nodeName.toLowerCase()){var n=(new Date).getTime()-h;return h=(new Date).getTime(),f.frames.push({image:(o=document.createElement("canvas"),r=o.getContext("2d"),o.width=e.width,o.height=e.height,r.drawImage(e,0,0),o),duration:n}),void(i&&setTimeout(d,t.frameInterval))}var o,r;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var n=(new Date).getTime()-h;if(!n)return setTimeout(d,t.frameInterval);h=(new Date).getTime(),f.frames.push({image:e.toDataURL("image/webp",1),duration:n}),i&&setTimeout(d,t.frameInterval)}})}this.pause=function(){l=!0,r instanceof MediaStreamRecorder&&r.pause()},this.resume=function(){l=!1,r instanceof MediaStreamRecorder?r.resume():i||this.record()},this.clearRecordedData=function(){i&&this.stop(u),u()},this.name="CanvasRecorder",this.toString=function(){return this.name};var h=(new Date).getTime(),f=new Whammy.Video(100)}function WhammyRecorder(e,t){function n(e){e=void 0!==e?e:10;var t=(new Date).getTime()-s;return t?r?(s=(new Date).getTime(),setTimeout(n,100)):(s=(new Date).getTime(),a.paused&&a.play(),u.drawImage(a,0,0,l.width,l.height),c.frames.push({duration:t,image:l.toDataURL("image/webp")}),void(o||setTimeout(n,e,e))):setTimeout(n,e,e)}(t=t||{}).frameInterval||(t.frameInterval=10),t.disableLogs||console.log("Using frames-interval:",t.frameInterval),this.record=function(){t.width||(t.width=320),t.height||(t.height=240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),l.width=t.canvas.width||320,l.height=t.canvas.height||240,u=l.getContext("2d"),t.video&&t.video instanceof HTMLVideoElement?(a=t.video.cloneNode(),t.initCallback&&t.initCallback()):(a=document.createElement("video"),setSrcObject(e,a),a.onloadedmetadata=function(){t.initCallback&&t.initCallback()},a.width=t.video.width,a.height=t.video.height),a.muted=!0,a.play(),s=(new Date).getTime(),c=new Whammy.Video,t.disableLogs||(console.log("canvas resolutions",l.width,"*",l.height),console.log("video width/height",a.width||l.width,"*",a.height||l.height)),n(t.frameInterval)};var o=!1;this.stop=function(e){e=e||function(){},o=!0;var n=this;setTimeout(function(){!function(e,t,n,o,r){var i=document.createElement("canvas");i.width=l.width,i.height=l.height;var a,s,c,u=i.getContext("2d"),d=[],h=e.length,f=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),p=!1;s=-1,c=(a={length:h,functionToLoop:function(t,n){var o,r,i,a=function(){!p&&i-o<=0*i||(p=!0,d.push(e[n])),t()};if(p)a();else{var s=new Image;s.onload=function(){u.drawImage(s,0,0,l.width,l.height);var e=u.getImageData(0,0,l.width,l.height);o=0,r=e.data.length,i=e.data.length/4;for(var t=0;t<r;t+=4){var n={r:e.data[t],g:e.data[t+1],b:e.data[t+2]};Math.sqrt(Math.pow(n.r-0,2)+Math.pow(n.g-0,2)+Math.pow(n.b-0,2))<=0*f&&o++}a()},s.src=e[n].image}},callback:function(){(d=d.concat(e.slice(h))).length<=0&&d.push(e[e.length-1]),r(d)}}).length,function e(){++s!==c?setTimeout(function(){a.functionToLoop(e,s)},1):a.callback()}()}(c.frames,0,0,0,function(o){c.frames=o,t.advertisement&&t.advertisement.length&&(c.frames=t.advertisement.concat(c.frames)),c.compile(function(t){n.blob=t,n.blob.forEach&&(n.blob=new Blob([],{type:"video/webm"})),e&&e(n.blob)})})},10)};var r=!1;function i(){c.frames=[],o=!0,r=!1}this.pause=function(){r=!0},this.resume=function(){r=!1,o&&this.record()},this.clearRecordedData=function(){o||this.stop(i),i()},this.name="WhammyRecorder",this.toString=function(){return this.name};var a,s,c,l=document.createElement("canvas"),u=l.getContext("2d")}void 0!==AudioContext?Storage.AudioContext=AudioContext:"undefined"!=typeof webkitAudioContext&&(Storage.AudioContext=webkitAudioContext),void 0!==RecordRTC&&(RecordRTC.Storage=Storage),void 0!==RecordRTC&&(RecordRTC.MediaStreamRecorder=MediaStreamRecorder),void 0!==RecordRTC&&(RecordRTC.StereoAudioRecorder=StereoAudioRecorder),void 0!==RecordRTC&&(RecordRTC.CanvasRecorder=CanvasRecorder),void 0!==RecordRTC&&(RecordRTC.WhammyRecorder=WhammyRecorder);var Whammy=function(){function e(e){this.frames=[],this.duration=e||1,this.qual
1ity=.8}function t(e){function t(e,t,n){return[{data:e,id:231}].concat(n.map(function(e){var n=function(e){var t=0;if(e.keyframe&&(t|=128),e.invisible&&(t|=8),e.lacing&&(t|=e.lacing<<1),e.discardable&&(t|=1),e.trackNum>127)throw"TrackNumber > 127 not supported";return[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map(function(e){return String.fromCharCode(e)}).join("")+e.frame}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:n,id:163}}))}function n(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function o(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var n=0;n<e.length;n+=8)t.push(parseInt(e.substr(n,8),2));return new Uint8Array(t)}function r(e,t){return parseInt(e.substr(t+4,4).split("").map(function(e){var t=e.charCodeAt(0).toString(2);return new Array(8-t.length+1).join("0")+t}).join(""),2)}var i=new function(e){var r=function(e){if(e[0]){for(var t=e[0].width,n=e[0].height,o=e[0].duration,r=1;r<e.length;r++)o+=e[r].duration;return{duration:o,width:t,height:n}}postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."})}(e);if(!r)return[];for(var i,a=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(i=r.duration,[].slice.call(new Uint8Array(new Float64Array([i]).buffer),0).map(function(e){return String.fromCharCode(e)}).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:r.width,id:176},{data:r.height,id:186}]}]}]}]}],s=0,c=0;s<e.length;){var l=[],u=0;do{l.push(e[s]),u+=e[s].duration,s++}while(s<e.length&&u<3e4);var d={id:524531317,data:t(c,0,l)};a[1].data.push(d),c+=u}return function e(t){for(var r=[],i=0;i<t.length;i++){var a=t[i].data;"object"==typeof a&&(a=e(a)),"number"==typeof a&&(a=o(a.toString(2))),"string"==typeof a&&(a=new Uint8Array(a.split("").map(function(e){return e.charCodeAt(0)})));var s=a.size||a.byteLength||a.length,c=Math.ceil(Math.ceil(Math.log(s)/Math.log(2))/8),l=s.toString(2),u=new Array(7*c+7+1-l.length).join("0")+l,d=new Array(c).join("0")+"1"+u;r.push(n(t[i].id)),r.push(o(d)),r.push(a)}return new Blob(r,{type:"video/webm"})}(a)}(e.map(function(e){var t=function(e){for(var t=e.RIFF[0].WEBP[0],n=t.indexOf("\x9d\x01*"),o=0,r=[];o<4;o++)r[o]=t.charCodeAt(n+3+o);return{width:16383&(r[1]<<8|r[0]),height:16383&(r[3]<<8|r[2]),data:t,riff:e}}(function e(t){for(var n=0,o={};n<t.length;){var i=t.substr(n,4),a=r(t,n),s=t.substr(n+4+4,a);n+=8+a,o[i]=o[i]||[],o[i].push("RIFF"===i||"LIST"===i?e(s):s)}return o}(atob(e.image.slice(23))));return t.duration=e.duration,t}));postMessage(i)}return e.prototype.add=function(e,t){if("canvas"in e&&(e=e.canvas),"toDataURL"in e&&(e=e.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/gi.test(e))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:e,duration:t||this.duration})},e.prototype.compile=function(e){var n,o,r,i=(n=t,o=URL.createObjectURL(new Blob([n.toString(),"this.onmessage = function (eee) {"+n.name+"(eee.data);}"],{type:"application/javascript"})),r=new Worker(o),URL.revokeObjectURL(o),r);i.onmessage=function(t){t.data.error?console.error(t.data.error):e(t.data)},i.postMessage(this.frames)},{Video:e}}();void 0!==RecordRTC&&(RecordRTC.Whammy=Whammy);var DiskStorage={init:function(){var e=this;if("undefined"!=typeof indexedDB&&void 0!==indexedDB.open){var t,n=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),o=indexedDB.open(n,1);o.onerror=e.onError,o.onsuccess=function(){(t=o.result).onerror=e.onError,t.setVersion&&1!==t.version?t.setVersion(1).onsuccess=function(){r(t),i()}:i()},o.onupgradeneeded=function(e){r(e.target.result)}}else console.error("IndexedDB API are not available in this browser.");function r(t){t.createObjectStore(e.dataStoreName)}function i(){var n=t.transaction([e.dataStoreName],"readwrite");function o(t){n.objectStore(e.dataStoreName).get(t).onsuccess=function(n){e.callback&&e.callback(n.target.result,t)}}e.videoBlob&&n.objectStore(e.dataStoreName).put(e.videoBlob,"videoBlob"),e.gifBlob&&n.objectStore(e.dataStoreName).put(e.gifBlob,"gifBlob"),e.audioBlob&&n.objectStore(e.dataStoreName).put(e.audioBlob,"audio
1Blob"),o("audioBlob"),o("videoBlob"),o("gifBlob")}},Fetch:function(e){return this.callback=e,this.init(),this},Store:function(e){return this.audioBlob=e.audioBlob,this.videoBlob=e.videoBlob,this.gifBlob=e.gifBlob,this.init(),this},onError:function(e){console.error(JSON.stringify(e,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function GifRecorder(e,t){if("undefined"==typeof GIFEncoder){var n=document.createElement("script");n.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(n)}t=t||{};var o=e instanceof CanvasRenderingContext2D||e instanceof HTMLCanvasElement;this.record=function(){"undefined"!=typeof GIFEncoder&&s?(o||(t.width||(t.width=c.offsetWidth||320),t.height||(t.height=c.offsetHeight||240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),i.width=t.canvas.width||320,i.height=t.canvas.height||240,c.width=t.video.width||320,c.height=t.video.height||240),(u=new GIFEncoder).setRepeat(0),u.setDelay(t.frameRate||200),u.setQuality(t.quality||10),u.start(),"function"==typeof t.onGifRecordingStarted&&t.onGifRecordingStarted(),Date.now(),d=requestAnimationFrame(function e(n){if(!0!==h.clearedRecordedData){if(r)return setTimeout(function(){e(n)},100);d=requestAnimationFrame(e),void 0===typeof l&&(l=n),n-l<90||(!o&&c.paused&&c.play(),o||a.drawImage(c,0,0,i.width,i.height),t.onGifPreview&&t.onGifPreview(i.toDataURL("image/png")),u.addFrame(a),l=n)}}),t.initCallback&&t.initCallback()):setTimeout(h.record,1e3)},this.stop=function(e){e=e||function(){},d&&cancelAnimationFrame(d),Date.now(),this.blob=new Blob([new Uint8Array(u.stream().bin)],{type:"image/gif"}),e(this.blob),u.stream().bin=[]};var r=!1;this.pause=function(){r=!0},this.resume=function(){r=!1},this.clearRecordedData=function(){h.clearedRecordedData=!0,u&&(u.stream().bin=[])},this.name="GifRecorder",this.toString=function(){return this.name};var i=document.createElement("canvas"),a=i.getContext("2d");o&&(e instanceof CanvasRenderingContext2D?i=(a=e).canvas:e instanceof HTMLCanvasElement&&(a=e.getContext("2d"),i=e));var s=!0;if(!o){var c=document.createElement("video");c.muted=!0,c.autoplay=!0,c.playsInline=!0,s=!1,c.onloadedmetadata=function(){s=!0},setSrcObject(e,c),c.play()}var l,u,d=null,h=this}function MultiStreamsMixer(e,t){var n;n="undefined"!=typeof global?global:null,void 0===RecordRTC&&n&&"undefined"==typeof window&&"undefined"!=typeof global&&(global.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},global.console||(global.console={}),void 0!==global.console.log&&void 0!==global.console.error||(global.console.error=global.console.log=global.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(n.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},n.HTMLVideoElement=function(){}),"undefined"==typeof location&&(n.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(n.screen={width:0,height:0}),void 0===l&&(n.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),n.window=global),t=t||"multi-streams-mixer";var o=[],r=!1,i=document.createElement("canvas"),a=i.getContext("2d");i.style.opacity=0,i.style.position="absolute",i.style.zIndex=-1,i.style.top="-1000em",i.style.left="-1000em",i.className=t,(document.body||document.documentElement).appendChild(i),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var s=this,c=window.AudioContext;void 0===c&&("undefined"!=typeof webkitAudioContext&&(c=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(c=mozAudioContext));var l=window.URL;void 0===l&&"undefined"!=typeof webkitURL&&(l=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var u=window.MediaStream;void 0===u&&"undefined"!=typeof webkitMediaStream&&(u=webkitMediaStream),void 0!==u&&void 0===u.prototype.stop&&(u.prototype.stop=function(){this.getTracks().forEac
1h(function(e){e.stop()})});var d={};function h(){if(!r){var e=o.length,t=!1,n=[];if(o.forEach(function(e){e.stream||(e.stream={}),e.stream.fullcanvas?t=e:n.push(e)}),t)i.width=t.stream.width,i.height=t.stream.height;else if(n.length){i.width=e>1?2*n[0].width:n[0].width;var a=1;3!==e&&4!==e||(a=2),5!==e&&6!==e||(a=3),7!==e&&8!==e||(a=4),9!==e&&10!==e||(a=5),i.height=n[0].height*a}else i.width=s.width||360,i.height=s.height||240;t&&t instanceof HTMLVideoElement&&f(t),n.forEach(function(e,t){f(e,t)}),setTimeout(h,s.frameInterval)}}function f(e,t){if(!r){var n=0,o=0,i=e.width,s=e.height;1===t&&(n=e.width),2===t&&(o=e.height),3===t&&(n=e.width,o=e.height),4===t&&(o=2*e.height),5===t&&(n=e.width,o=2*e.height),6===t&&(o=3*e.height),7===t&&(n=e.width,o=3*e.height),void 0!==e.stream.left&&(n=e.stream.left),void 0!==e.stream.top&&(o=e.stream.top),void 0!==e.stream.width&&(i=e.stream.width),void 0!==e.stream.height&&(s=e.stream.height),a.drawImage(e,n,o,i,s),"function"==typeof e.stream.onRender&&e.stream.onRender(a,n,o,i,s,t)}}function p(e){var n=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,n),n.className=t,n.muted=!0,n.volume=0,n.width=e.width||s.width||360,n.height=e.height||s.height||240,n.play(),n}function g(t){o=[],(t=t||e).forEach(function(e){if(e.getTracks().filter(function(e){return"video"===e.kind}).length){var t=p(e);t.stream=e,o.push(t)}})}void 0!==c?d.AudioContext=c:"undefined"!=typeof webkitAudioContext&&(d.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){h()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach(function(t){var n=new u;if(t.getTracks().filter(function(e){return"video"===e.kind}).length){var r=p(t);r.stream=t,o.push(r),n.addTrack(t.getTracks().filter(function(e){return"video"===e.kind})[0])}if(t.getTracks().filter(function(e){return"audio"===e.kind}).length){var i=s.audioContext.createMediaStreamSource(t);s.audioDestination=s.audioContext.createMediaStreamDestination(),i.connect(s.audioDestination),n.addTrack(s.audioDestination.stream.getTracks().filter(function(e){return"audio"===e.kind})[0])}e.push(n)})},this.releaseStreams=function(){o=[],r=!0,s.gainNode&&(s.gainNode.disconnect(),s.gainNode=null),s.audioSources.length&&(s.audioSources.forEach(function(e){e.disconnect()}),s.audioSources=[]),s.audioDestination&&(s.audioDestination.disconnect(),s.audioDestination=null),s.audioContext&&s.audioContext.close(),s.audioContext=null,a.clearRect(0,0,i.width,i.height),i.stream&&(i.stream.stop(),i.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),g(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){r=!1;var t=function(){var e;g(),"captureStream"in i?e=i.captureStream():"mozCaptureStream"in i?e=i.mozCaptureStream():s.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new u;return e.getTracks().filter(function(e){return"video"===e.kind}).forEach(function(e){t.addTrack(e)}),i.stream=t,t}(),n=function(){d.AudioContextConstructor||(d.AudioContextConstructor=new d.AudioContext),s.audioContext=d.AudioContextConstructor,s.audioSources=[],!0===s.useGainNode&&(s.gainNode=s.audioContext.createGain(),s.gainNode.connect(s.audioContext.destination),s.gainNode.gain.value=0);var t=0;if(e.forEach(function(e){if(e.getTracks().filter(function(e){return"audio"===e.kind}).length){t++;var n=s.audioContext.createMediaStreamSource(e);!0===s.useGainNode&&n.connect(s.gainNode),s.audioSources.push(n)}}),t)return s.audioDestination=s.audioContext.createMediaStreamDestination(),s.audioSources.forEach(function(e){e.connect(s.audioDestination)}),s.audioDestination.stream}();return n&&n.getTracks().filter(function(e){return"audio"===e.kind}).forEach(function(e){t.addTrack(e)}),e.forEach(function(e){}),t}}function MultiStreamRecorder(e,t){e=e||[];var n,o,r=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var r;n=new MultiStreamsMixer(e,t.elementClass||"multi-streams-mixer"),(r=[],e.forEach(function(e){getTracks(e,"video").forEach(function(e){r.push(e)})}),r).length&&(n.frameInterval=t.frameInterval||10,n.width=t.video.width||360,n.height=t.video.height||240,n.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(n.getMixedStream()),(o=new MediaStreamRecorder(n.getMixedStream(),t)).record()},this.stop=function(e){o&&o.stop(function(t){r.blob=t,e(t),r.clearRecordedData()})},this.pause=function(){o&&o.pause()},this.resume=function(){o&&o.resume()},this.clearRecordedData=function(){o&&(o.clearRecordedData(),o=null),n&&(n.releaseStreams(),n=null)},this.addStreams=function(r){if(!r)throw"First parameter is required.";r instanceof Array||(r=[r]),e.concat(r),o&&n&&(n.appendStreams(r),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(n.getMixedStream()))},this.resetVideoStreams=function(e){n&&(!e||e instanceof Array||(e=[e]),n.resetVideoStreams(e))},this.getMixer=function(){return n},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function RecordRTCPromisesHandler(e,t){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var n=this;n.recordRTC=new RecordRTC(e,t),this.startRecording=function(){return new Promise(function(e,t){try{n.recordRTC.startRecording(),e()}catch(o){t(o)}})},this.stopRecording=function(){return new Promise(function(e,t){try{n.recordRTC.stopRecording(function(o){n.blob=n.recordRTC.getBlob(),n.blob&&n.blob.size?e(o):t("Empty blob.",n.blob)})}catch(o){t(o)}})},this.pauseRecording=function(){return new Promise(function(e,t){try{n.recordRTC.pauseRecording(),e()}catch(o){t(o)}})},this.resumeRecording=function(){return new Promise(function(e,t){try{n.recordRTC.resumeRecording(),e()}catch(o){t(o)}})},this.getDataURL=function(e){return new Promise(function(e,t){try{n.recordRTC.getDataURL(function(t){e(t)})}catch(o){t(o)}})},this.getBlob=function(){return new Promise(function(e,t){try{e(n.recordRTC.getBlob())}catch(o){t(o)}})},this.getInternalRecorder=function(){return new Promise(function(e,t){try{e(n.recordRTC.getInternalRecorder())}catch(o){t(o)}})},this.reset=function(){return new Promise(function(e,t){try{e(n.recordRTC.reset())}catch(o){t(o)}})},this.destroy=function(){return new Promise(function(e,t){try{e(n.recordRTC.destroy())}catch(o){t(o)}})}
1,this.getState=function(){return new Promise(function(e,t){try{e(n.recordRTC.getState())}catch(o){t(o)}})},this.blob=null,this.version="5.5.9"}function WebAssemblyRecorder(e,t){function n(){return new ReadableStream({start:function(n){var o=document.createElement("canvas"),r=document.createElement("video");r.srcObject=e,r.onplaying=function(){o.width=t.width,o.height=t.height;var e=o.getContext("2d"),i=1e3/t.frameRate;setTimeout(function o(){e.drawImage(r,0,0),n.enqueue(e.getImageData(0,0,t.width,t.height)),setTimeout(o,i)},i)},r.play()}})}var o,r;"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,this.record=function(){i=[],r=!1,this.blob=null,function e(a,s){if(t.workerPath||s){if(!t.workerPath&&s instanceof ArrayBuffer){var c=new Blob([s],{type:"text/javascript"});t.workerPath=URL.createObjectURL(c)}t.workerPath||console.error("workerPath parameter is missing."),(o=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),o.addEventListener("message",function(e){"READY"===e.data?(o.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:!0}),n().pipeTo(new WritableStream({write:function(e){o&&o.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(r||i.push(e.data))})}else fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then(function(t){t.arrayBuffer().then(function(t){e(a,t)})})}(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){r=!0},this.resume=function(){r=!1};var i=[];this.stop=function(e){o&&(o.postMessage(null),o.terminate(),o=null),this.blob=new Blob(i,{type:"video/webm"}),e(this.blob)},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){i=[],r=!1,this.blob=null},this.blob=null}function clamp(e,t,n){return t<n?e<t?t:e>n?n:e:e<n?n:e>t?t:e}function frequencyToIndex(e,t,n){return clamp(Math.round(e/(t/2)*n),0,n)}function analyserFrequencyAverage(e,t,n,o,r){for(var i=t.context.sampleRate,a=t.frequencyBinCount,s=frequencyToIndex(o,i,a),c=frequencyToIndex(r,i,a),l=c-s,u=0;s<c;s++)u+=n[s]/e;return 0===l?0:u/l}void 0!==RecordRTC&&(RecordRTC.DiskStorage=DiskStorage),void 0!==RecordRTC&&(RecordRTC.GifRecorder=GifRecorder),void 0===RecordRTC&&("undefined"!=typeof module&&(module.exports=MultiStreamsMixer),"function"==typeof define&&define.amd&&define("MultiStreamsMixer",[],function(){return MultiStreamsMixer})),void 0!==RecordRTC&&(RecordRTC.MultiStreamRecorder=MultiStreamRecorder),void 0!==RecordRTC&&(RecordRTC.RecordRTCPromisesHandler=RecordRTCPromisesHandler),void 0!==RecordRTC&&(RecordRTC.WebAssemblyRecorder=WebAssemblyRecorder);var analyserFrequency=analyserFrequencyAverage.bind(null,255);analyserFrequency.floatData=analyserFrequencyAverage.bind(null,1),vad=function(e,t,n){n=n||{};var o={fftSize:1024,bufferLen:1024,smoothingTimeConstant:.2,minCaptureFreq:85,maxCaptureFreq:255,noiseCaptureDuration:1e3,minNoiseLevel:.3,maxNoiseLevel:.7,avgNoiseMultiplier:1.2,onVoiceStart:function(){},onVoiceStop:function(){},onUpdate:function(e){}},r={};for(var i in o)r[i]=n.hasOwnProperty(i)?n[i]:o[i];var a=0,s=1,c=0,l=[],u=!0,d=void 0,h=!1,f=null,p=e.createMediaStreamSource(t),g=e.createAnalyser();g.smoothingTimeConstant=r.smoothingTimeConstant,g.fftSize=r.fftSize;var m=e.createScriptProcessor(r.bufferLen,1,1);function v(){p.connect(g),g.connect(m),m.connect(e.destination)}function y(){m.disconnect(),g.disconnect(),p.disconnect()}return v(),m.onaudioprocess=function(){var e=new Uint8Array(g.frequencyBinCount);g.getByteFrequencyData(e);var t=analyserFrequency(g,e,r.minCaptureFreq,r.maxCaptureFreq);u?l.push(t):(t>=a&&c<60?c++:t<a&&c>0&&c--,d!==(h=c>5)&&(h?r.onVoiceStart():r.onVoiceStop(),d=h),r.onUpdate(Math.max(0,t-a)/s))},u&&(f=setTimeout(function(){u=!1;var e=(l=l.filter(function(e){return e}).sort()).length?l.reduce(function(e,t){return Math.min(e,t)},1):r.minNoiseLevel||.1;a=e*r.avgNoiseMultiplier,r.minNoiseLevel&&a<r.minNoiseLevel&&(a=r.minNoiseLevel),r.maxNoiseLevel&&a>r.maxNoiseLevel&&(a=r.maxNoiseLevel),s=1-a}
1,r.noiseCaptureDuration)),{connect:v,disconnect:y,destroy:function(){f&&clearTimeout(f),y(),m.onaudioprocess=null}}},"boxShadow"in document.body.style||document.body.setAttribute("class","noBoxShadow"),document.body.addEventListener("click",function(e){var t=e.target;"INPUT"===t.tagName&&-1===t.getAttribute("class").indexOf("liga")&&t.select()});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.