define('core/ajax', ["jquery","core/config"],function(a,b){var c=function(a){var b,c,d=this,e=null,f=0;for(f=0;fb;b++)c=a.charCodeAt(b),e=(e<<5)-e+c,e|=0;return e},j=function(){b=f();var e=a.wwwroot+"/"+a.jsrev,g=i(e);c=g+"/",e=a.wwwroot+"/",g=i(e),d=g+"/jsrev"};return j(),{get:function(a){return b?(h(),a=g(a),e.getItem(a)):!1},set:function(a,c){if(!b)return!1;h(),a=g(a);try{e.setItem(a,c)}catch(d){return!1}return!0}}}); define('core/log', ["core/loglevel"],function(a){var b=a.methodFactory;return a.methodFactory=function(a,c){var d=b(a,c);return function(a,b){d(b?b+": "+a:a)}},a.setConfig=function(b){"undefined"!=typeof b.level&&a.setLevel(b.level)},a}); !function(a,b){"object"==typeof module&&module.exports&&"function"==typeof require?module.exports=b():"function"==typeof define&&"object"==typeof define.amd?define('core/loglevel', b):a.log=b()}(this,function(){function a(a){return typeof console===i?!1:void 0!==console[a]?b(console,a):void 0!==console.log?b(console,"log"):h}function b(a,b){var c=a[b];if("function"==typeof c.bind)return c.bind(a);try{return Function.prototype.bind.call(c,a)}catch(d){return function(){return Function.prototype.apply.apply(c,[a,arguments])}}}function c(a,b){return function(){typeof console!==i&&(d(b),g[a].apply(g,arguments))}}function d(a){for(var b=0;bb?h:g.methodFactory(c,a)}}function e(a){var b=(j[a]||"silent").toUpperCase();try{return void(window.localStorage.loglevel=b)}catch(c){}try{window.document.cookie="loglevel="+b+";"}catch(c){}}function f(){var a;try{a=window.localStorage.loglevel}catch(b){}if(typeof a===i)try{a=/loglevel=([^;]+)/.exec(window.document.cookie)[1]}catch(b){}void 0===g.levels[a]&&(a="WARN"),g.setLevel(g.levels[a])}var g={},h=function(){},i="undefined",j=["trace","debug","info","warn","error"];g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=function(b,d){return a(b)||c(b,d)},g.setLevel=function(a){if("string"==typeof a&&void 0!==g.levels[a.toUpperCase()]&&(a=g.levels[a.toUpperCase()]),!("number"==typeof a&&a>=0&&a<=g.levels.SILENT))throw"log.setLevel() called with invalid level: "+a;return e(a),d(a),typeof console===i&&a"'\/]/g,function(a){return q[a]})}function g(b,d){function f(){if(w&&!x)for(;q.length;)delete p[q.pop()];else q=[];w=!1,x=!1}function g(a){if("string"==typeof a&&(a=a.split(s,2)),!n(a)||2!==a.length)throw new Error("Invalid tags: "+a);k=new RegExp(c(a[0])+"\\s*"),l=new RegExp("\\s*"+c(a[1])),m=new RegExp("\\s*"+c("}"+a[1]))}if(!b)return[];var k,l,m,o=[],p=[],q=[],w=!1,x=!1;g(d||a.tags);for(var y,z,A,B,C,D,E=new j(b);!E.eos();){if(y=E.pos,A=E.scanUntil(k))for(var F=0,G=A.length;G>F;++F)B=A.charAt(F),e(B)?q.push(p.length):x=!0,p.push(["text",B,y,y+1]),y+=1,"\n"===B&&f();if(!E.scan(k))break;if(w=!0,z=E.scan(v)||"name",E.scan(r),"="===z?(A=E.scanUntil(t),E.scan(t),E.scanUntil(l)):"{"===z?(A=E.scanUntil(m),E.scan(u),E.scanUntil(l),z="&"):A=E.scanUntil(l),!E.scan(l))throw new Error("Unclosed tag at "+E.pos);if(C=[z,A,y,E.pos],p.push(C),"#"===z||"^"===z)o.push(C);else if("/"===z){if(D=o.pop(),!D)throw new Error('Unopened section "'+A+'" at '+y);if(D[1]!==A)throw new Error('Unclosed section "'+D[1]+'" at '+y)}else"name"===z||"{"===z||"&"===z?x=!0:"="===z&&g(A)}if(D=o.pop())throw new Error('Unclosed section "'+D[1]+'" at '+E.pos);return i(h(p))}function h(a){for(var b,c,d=[],e=0,f=a.length;f>e;++e)b=a[e],b&&("text"===b[0]&&c&&"text"===c[0]?(c[1]+=b[1],c[3]=b[3]):(d.push(b),c=b));return d}function i(a){for(var b,c,d=[],e=d,f=[],g=0,h=a.length;h>g;++g)switch(b=a[g],b[0]){case"#":case"^":e.push(b),f.push(b),e=b[4]=[];break;case"/":c=f.pop(),c[5]=b[2],e=f.length>0?f[f.length-1][4]:d;break;default:e.push(b)}return d}function j(a){this.string=a,this.tail=a,this.pos=0}function k(a,b){this.view=null==a?{}:a,this.cache={".":this.view},this.parent=b}function l(){this.cache={}}var m=Object.prototype.toString,n=Array.isArray||function(a){return"[object Array]"===m.call(a)},o=RegExp.prototype.test,p=/\S/,q={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},r=/\s*/,s=/\s+/,t=/\s*=/,u=/\s*\}/,v=/#|\^|\/|>|\{|&|=|!/;j.prototype.eos=function(){return""===this.tail},j.prototype.scan=function(a){var b=this.tail.match(a);if(!b||0!==b.index)return"";var c=b[0];return this.tail=this.tail.substring(c.length),this.pos+=c.length,c},j.prototype.scanUntil=function(a){var b,c=this.tail.search(a);switch(c){case-1:b=this.tail,this.tail="";break;case 0:b="";break;default:b=this.tail.substring(0,c),this.tail=this.tail.substring(c)}return this.pos+=b.length,b},k.prototype.push=function(a){return new k(a,this)},k.prototype.lookup=function(a){var c,d=this.cache;if(a in d)c=d[a];else{for(var e,f,g=this;g;){if(a.indexOf(".")>0)for(c=g.view,e=a.split("."),f=0;null!=c&&fl;++l)switch(h=c[l],h[0]){case"#":if(i=d.lookup(h[1]),!i)continue;if(n(i))for(var o=0,p=i.length;p>o;++o)j+=this.renderTokens(h[4],d.push(i[o]),e,f);else if("object"==typeof i||"string"==typeof i)j+=this.renderTokens(h[4],d.push(i),e,f);else if(b(i)){if("string"!=typeof f)throw new Error("Cannot use higher-order sections without the original template");i=i.call(d.view,f.slice(h[3],h[5]),g),null!=i&&(j+=i)}else j+=this.renderTokens(h[4],d,e,f);break;case"^":i=d.lookup(h[1]),(!i||n(i)&&0===i.length)&&(j+=this.renderTokens(h[4],d,e,f));break;case">":if(!e)continue;i=b(e)?e(h[1]):e[h[1]],null!=i&&(j+=this.renderTokens(this.parse(i),d,e,i));break;case"&":i=d.lookup(h[1]),null!=i&&(j+=i);break;case"name":i=d.lookup(h[1]),null!=i&&(j+=a.escape(i));break;case"text":j+=h[1]}return j},a.name="mustache.js",a.version="1.0.0",a.tags=["{{","}}"];var w=new l;a.clearCache=function(){return w.clearCache()},a.parse=function(a,b){return w.parse(a,b)},a.render=function(a,b,c){return w.render(a,b,c)},a.to_html=function(c,d,e,f){var g=a.render(c,d,e);return b(f)?void f(g):g},a.escape=f,a.Scanner=j,a.Context=k,a.Writer=l}); define('core/notification', ["core/yui"],function(a){return{alert:function(b,c,d){a.use("moodle-core-notification-alert",function(){var a=new M.core.alert({title:b,message:c,yesLabel:d});a.show()})},confirm:function(b,c,d,e,f){a.use("moodle-core-notification-confirm",function(){var a=new M.core.confirm({title:b,question:c,yesLabel:d,noLabel:e});a.on("complete-yes",function(){f()}),a.show()})},exception:function(b){b.backtrace&&(b.lineNumber=b.backtrace[0].line,b.fileName=b.backtrace[0].file,b.fileName="..."+b.fileName.substr(b.fileName.length-20),b.stack=b.debuginfo,b.name=b.errorcode),a.use("moodle-core-notification-exception",function(){var a=new M.core.exception(b);a.show()})}}}); define('core/str', ["jquery","core/ajax","core/localstorage"],function(a,b,c){return{get_string:function(b,d,e,f){var g=a.Deferred();if("undefined"!=typeof M.str[d]&&"undefined"!=typeof M.str[d][b])return g.resolve(M.util.get_string(b,d,e)),g.promise();var h=c.get("core_str/"+b+"/"+d+"/"+f);if(h)return"undefined"==typeof M.str[d]&&(M.str[d]=[]),M.str[d][b]=h,g.resolve(M.util.get_string(b,d,e)),g.promise();var i=this.get_strings([{key:b,component:d,param:e,lang:f}]);return i.done(function(a){c.set("core_str/"+b+"/"+d+"/"+f,a[0]),g.resolve(a[0])}).fail(function(a){g.reject(a)}),g.promise()},get_strings:function(d){var e,f=a.Deferred(),g=[],h=0,i=!1;for(h=0;h0&&(g=e.shift().trim()),e.length>0&&(h=e.shift().trim()),e.length>0&&(j=e.join(",").trim());var k=f.imageUrl(g,h),l={attributes:[{name:"src",value:k},{name:"alt",value:c(j)},{name:"class",value:"smallicon"}]},n=i[m+"/core/pix_icon"];return d=a.render(n,l,o),d.trim()},o=function(a){var b="";return u(a,!1).done(function(a){b=a}).fail(e.exception),b},p=function(a,b){return k.push(b(a,this)),""},q=function(a,b){var c=a.split(","),d="",e="",f="";c.length>0&&(d=c.shift().trim()),c.length>0&&(e=c.shift().trim()),c.length>0&&(f=c.join(",").trim()),""!==f&&(f=b(f,this)),0===f.indexOf("{")&&0!==f.indexOf("{{")&&(f=JSON.parse(f));var g=j.length;return j.push({key:d,component:e,param:f}),"{{_s"+g+"}}"},r=function(a,b){m=b,j=[],k=[],a.uniqid=l++,a.str=function(){return q},a.pix=function(){return n},a.js=function(){return p},a.globals={config:g},a.currentTheme=b},s=function(a){var b="";k.length>0&&(b=k.join(";\n"));var c=0;for(c=0;c0?d.get_strings(j).done(function(a){var c;for(c=0;c").attr("type","text/javascript").html(a);b("head").append(c)}}}); define('core/url', ["core/config"],function(a){return{fileUrl:function(b,c){var d=a.wwwroot+b;return"/"!=c.charAt(0)&&(c="/"+c),d+=a.slasharguments?c:"?file="+encodeURIComponent(c)},relativeUrl:function(b){if(0===b.indexOf("http:")||0===b.indexOf("https:")||b.indexOf("://")>=0)throw new Error("relativeUrl function does not accept absolute urls");return"/"!=b.charAt(0)&&(b="/"+b),"admin"!==a.admin&&(b=b.replace(/^\/admin\//,"/"+a.admin+"/")),a.wwwroot+b},imageUrl:function(a,b){return M.util.image_url(a,b)}}}); define('core/yui', function(){return Y}); define('filter_poodll/literallycanvas_amd', ["jquery","core/log","filter_poodll/utils_amd","filter_poodll/react_amd","filter_poodll/literallycanvas"],function(a,b,c,d,e){"use strict";return b.debug("Filter PoodLL: literallycanvas.js initialising"),{loadliterallycanvas:function(b){var d="#amdopts_"+b.recorderid,f=a(d).get(0);f&&(b=JSON.parse(f.value),a(d).remove()),c.whiteboardopts[b.recorderid]=b;var g=a("#"+b.recorderid+"_literally")[0];if(b.backgroundimage){var h=a("#"+b.recorderid+"_separate-background-image")[0],i=new Image;i.src=h.src,i.crossOrigin="Anonymous";var j=e.createShape("Image",{x:0,y:0,image:i,scale:1}),k=e.init(g,{imageURLPrefix:b.imageurlprefix,backgroundColor:b.backgroundcolor,backgroundShapes:[j],recorderid:b.recorderid})}else var k=e.init(g,{imageURLPrefix:b.imageurlprefix,backgroundColor:b.backgroundcolor,recorderid:b.recorderid});var l=c.whiteboardopts[b.recorderid].vectordata;l&&(0==l.indexOf('{"shapes"')||0==l.indexOf('{"colors"'))&&k.loadSnapshot(JSON.parse(l)),b.autosave?k.on("drawingChange",function(b,d){return function(){var b=a("#"+d+"_messages")[0],e=a("#"+d+"_btn_upload_whiteboard")[0];if(b){e&&(e.disabled=!1),b.innerHTML="";var f=c.timeouthandles[d];f&&clearTimeout(f),c.timeouthandles[d]=setTimeout(function(){c.WhiteboardUploadHandler(d)},c.whiteboardopts[d].autosave)}}}(this,b.recorderid)):k.on("drawingChange",function(b,c){return function(){var b=a("#"+c+"_messages");b&&(b.innerHTML="File has not been saved.")}}(this,b.recorderid)),c.whiteboards[b.recorderid]=k;var m="#"+b.recorderid+"_btn_upload_whiteboard",n=a(m);n&&(b.autosave?n.click(function(){c.WhiteboardUploadHandler(b.recorderid)},!1):n.click(function(){c.CallFileUpload(b.recorderid)},!1))}}}); define('filter_poodll/utils_amd', ["jquery","core/log"],function(a,b){"use strict";return b.debug("Filter PoodLL: utils initialising"),{whiteboards:[],whiteboardopts:[],timeouthandles:[],WhiteboardUploadHandler:function(a){var b=this.getbyid(a+"_btn_upload_whiteboard");b.disabled=!0,clearTimeout(this.timeouthandle),this.CallFileUpload(a)},CallFileUpload:function(a){var b=this.whiteboards[a],c=null,d="";if(0==a.indexOf("drawingboard_")){c=b.canvas;var d=JSON.stringify(b.history,null,2)}else{c=this.whiteboardopts[a].bgimage?b.canvasWithBackground(this.getbyid(a+"_separate-background-image")):b.getImage({});var d=JSON.stringify(b.getSnapshot())}if(this.whiteboardopts[a].vectorcontrol){var e=this.getbyid(this.whiteboardopts[a].vectorcontrol);e&&(e.value=d)}var f=c.toDataURL().split(",")[1],g={type:"image/png"};this.UploadFile(g,f,a)},loadmobileupload:function(a,b){this.gyui=a,this.whiteboardopts[b.recorderid]=b;var c=this.getbyid(b.recorderid+"_poodllfileselect");if(c){var d=this;c.addEventListener("change",function(a){return function(b){d.FileSelectHandler(b,a)}}(b),!1)}},FileSelectHandler:function(a,b){for(var c,d=a.target.files||a.dataTransfer.files,e=0;c=d[e];e++)this.ParseFile(c,b)},ParseFile:function(a,b){var c="",d=new FileReader,e=this;d.onloadend=function(d){c=d.target.result,e.UploadFile(a,c,b.recorderid)},d.readAsDataURL(a)},Output:function(a,b){var c=this.getbyid(a+"_messages");c.innerHTML=b},getbyid:function(b){b="#"+b.replace(/(:|\.|\[|\]|,)/g,"\\$1");var c=a(b);return c&&c.length>0?c[0]:(c=a(b,window.parent.document),c&&c.length>0?c[0]:null)},UploadFile:function(a,b,c){var d=this.whiteboardopts[c],e=new XMLHttpRequest,f="";switch(a.type){case"image/jpeg":f="jpg";break;case"image/png":f="png";break;case"video/quicktime":f="mov";break;case"audio/mpeg3":f="mp3";break;case"audio/x-mpeg-3":f="mp3";break;case"audio/mpeg3":f="mp3";break;case"audio/3gpp":f="3gpp";break;case"video/mpeg3":f="3gpp";break;case"video/mp4":f="mp4"}var g=this.getbyid(c+"_progress");if(null!=g){var h=g.firstChild;null==h&&(h=g.appendChild(document.createElement("p"))),h.className="",h.style.display="block",h.style.backgroundPosition="100% 0",e.upload.addEventListener("progress",function(a){var b=parseInt(100-a.loaded/a.total*100);h.style.backgroundPosition=b+"% 0"},!1)}else var h=!1;this.Output(c,"Uploading."),e.onreadystatechange=function(a){return function(b){if(4==e.readyState)if(h&&(h.className=200==e.status?"success":"failure"),200==e.status){var f=e.responseText,g=f.indexOf("success");if(1>g)return;var i=f.indexOf(""),j=f.substring(g+14,i);if(d.callbackjs&&""!=d.callbackjs){var k=new Array;k[0]=d.recorderid,k[1]="filesubmitted",k[2]=j,k[3]=d.updatecontrol,a.Output(c,"File saved successfully."),a.executeFunctionByName(d.callbackjs,window,k)}else{a.Output(c,"File saved successfully.");var l=c+"_updatecontrol",m=a.getbyid(l);if(!m)return void a.Output(c,"could not fetch by id: "+l);m=m.value;var n=a.getbyid(m);n?n.value=j:a.Output(c,"File could not be uploaded.")}}else a.Output(c,"File could not be uploaded.")}}(this);var i="datatype=uploadfile";i+="¶mone="+encodeURIComponent(b),i+="¶mtwo="+f,i+="¶mthree="+this.getbyid(c+"_mediatype").value,i+="&requestid="+c,i+="&contextid="+this.getbyid(c+"_contextid").value,i+="&component="+this.getbyid(c+"_component").value,i+="&filearea="+this.getbyid(c+"_filearea").value,i+="&itemid="+this.getbyid(c+"_itemid").value,e.open("POST",this.getbyid(c+"_fileliburl").value,!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.setRequestHeader("Cache-Control","no-cache"),e.setRequestHeader("Content-length",i.length),e.setRequestHeader("Connection","close"),e.send(i)},executeFunctionByName:function(a,b,c){for(var d=a.split("."),e=d.pop(),f=0;f').wrap('
'),a.$elem.find(".owl-wrapper").wrap('
'),a.wrapperOuter=a.$elem.find(".owl-wrapper-outer"),a.$elem.css("display","block")},baseClass:function(){var a=this,b=a.$elem.hasClass(a.options.baseClass),c=a.$elem.hasClass(a.options.theme);b||a.$elem.addClass(a.options.baseClass),c||a.$elem.addClass(a.options.theme)},updateItems:function(){var b,c,d=this;if(d.options.responsive===!1)return!1;if(d.options.singleItem===!0)return d.options.items=d.orignalItems=1,d.options.itemsCustom=!1,d.options.itemsDesktop=!1,d.options.itemsDesktopSmall=!1,d.options.itemsTablet=!1,d.options.itemsTabletSmall=!1,d.options.itemsMobile=!1,!1;if(b=a(d.options.responsiveBaseWidth).width(),b>(d.options.itemsDesktop[0]||d.orignalItems)&&(d.options.items=d.orignalItems),d.options.itemsCustom!==!1)for(d.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),c=0;cd.itemsAmount&&d.options.itemsScaleUp===!0&&(d.options.items=d.itemsAmount)},response:function(){var b,c,d=this;return d.options.responsive!==!0?!1:(c=a(window).width(),d.resizer=function(){a(window).width()!==c&&(d.options.autoPlay!==!1&&window.clearInterval(d.autoPlayInterval),window.clearTimeout(b),b=window.setTimeout(function(){c=a(window).width(),d.updateVars()},d.options.responsiveRefreshRate))},void a(window).resize(d.resizer))},updatePosition:function(){var a=this;a.jumpTo(a.currentItem),a.options.autoPlay!==!1&&a.checkAp()},appendItemsSizes:function(){var b=this,c=0,d=b.itemsAmount-b.options.items;b.$owlItems.each(function(e){var f=a(this);f.css({width:b.itemWidth}).data("owl-item",Number(e)),(e%b.options.items===0||e===d)&&(e>d||(c+=1)),f.data("owl-roundPages",c)})},appendWrapperSizes:function(){var a=this,b=a.$owlItems.length*a.itemWidth;a.$owlWrapper.css({width:2*b,left:0}),a.appendItemsSizes()},calculateAll:function(){var a=this;a.calculateWidth(),a.appendWrapperSizes(),a.loops(),a.max()},calculateWidth:function(){var a=this;a.itemWidth=Math.round(a.$elem.width()/a.options.items)},max:function(){var a=this,b=-1*(a.itemsAmount*a.itemWidth-a.options.items*a.itemWidth);return a.options.items>a.itemsAmount?(a.maximumItem=0,b=0,a.maximumPixels=0):(a.maximumItem=a.itemsAmount-a.options.items,a.maximumPixels=b),b},min:function(){return 0},loops:function(){var b,c,d,e=this,f=0,g=0;for(e.positionsInArray=[0],e.pagesInArray=[],b=0;b').toggleClass("clickable",!b.browser.isTouch).appendTo(b.$elem)),b.options.pagination===!0&&b.buildPagination(),b.options.navigation===!0&&b.buildButtons()},buildButtons:function(){var b=this,c=a('
');b.owlControls.append(c),b.buttonPrev=a("
",{"class":"owl-prev",html:b.options.navigationText[0]||""}),b.buttonNext=a("
",{"class":"owl-next",html:b.options.navigationText[1]||""}),c.append(b.buttonPrev).append(b.buttonNext),c.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()}),c.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(c){c.preventDefault(),a(this).hasClass("owl-next")?b.next():b.prev()})},buildPagination:function(){var b=this;b.paginationWrapper=a('
'),b.owlControls.append(b.paginationWrapper),b.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(c){c.preventDefault(),Number(a(this).data("owl-page"))!==b.currentItem&&b.goTo(Number(a(this).data("owl-page")),!0)})},updatePagination:function(){var b,c,d,e,f,g,h=this;if(h.options.pagination===!1)return!1;for(h.paginationWrapper.html(""),b=0,c=h.itemsAmount-h.itemsAmount%h.options.items,e=0;e",{"class":"owl-page"}),g=a("",{text:h.options.paginationNumbers===!0?b:"","class":h.options.paginationNumbers===!0?"owl-numbers":""}),f.append(g),f.data("owl-page",c===e?d:e),f.data("owl-roundPages",b),h.paginationWrapper.append(f));h.checkPagination()},checkPagination:function(){var b=this;return b.options.pagination===!1?!1:void b.paginationWrapper.find(".owl-page").each(function(){a(this).data("owl-roundPages")===a(b.$owlItems[b.currentItem]).data("owl-roundPages")&&(b.paginationWrapper.find(".owl-page").removeClass("active"),a(this).addClass("active"))})},checkNavigation:function(){var a=this;return a.options.navigation===!1?!1:void(a.options.rewindNav===!1&&(0===a.currentItem&&0===a.maximumItem?(a.buttonPrev.addClass("disabled"),a.buttonNext.addClass("disabled")):0===a.currentItem&&0!==a.maximumItem?(a.buttonPrev.addClass("disabled"),a.buttonNext.removeClass("disabled")):a.currentItem===a.maximumItem?(a.buttonPrev.removeClass("disabled"),a.buttonNext.addClass("disabled")):0!==a.currentItem&&a.currentItem!==a.maximumItem&&(a.buttonPrev.removeClass("disabled"),a.buttonNext.removeClass("disabled"))))},updateControls:function(){var a=this;a.updatePagination(),a.checkNavigation(),a.owlControls&&(a.options.items>=a.itemsAmount?a.owlControls.hide():a.owlControls.show())},destroyControls:function(){var a=this;a.owlControls&&a.owlControls.remove()},next:function(a){var b=this;if(b.isTransition)return!1;if(b.currentItem+=b.options.scrollPerPage===!0?b.options.items:1,b.currentItem>b.maximumItem+(b.options.scrollPerPage===!0?b.options.items-1:0)){if(b.options.rewindNav!==!0)return b.currentItem=b.maximumItem,!1;b.currentItem=0,a="rewind"}b.goTo(b.currentItem,a)},prev:function(a){var b=this;if(b.isTransition)return!1;if(b.options.scrollPerPage===!0&&b.currentItem>0&&b.currentItem=e.maximumItem?a=e.maximumItem:0>=a&&(a=0),e.currentItem=e.owl.currentItem=a,e.options.transitionStyle!==!1&&"drag"!==c&&1===e.options.items&&e.browser.support3d===!0?(e.swapSpeed(0),e.browser.support3d===!0?e.transition3d(e.positionsInArray[a]):e.css2slide(e.positionsInArray[a],1),e.afterGo(),e.singleItemTransition(),!1):(d=e.positionsInArray[a],e.browser.support3d===!0?(e.isCss3Finish=!1,b===!0?(e.swapSpeed("paginationSpeed"),window.setTimeout(function(){e.isCss3Finish=!0},e.options.paginationSpeed)):"rewind"===b?(e.swapSpeed(e.options.rewindSpeed),window.setTimeout(function(){e.isCss3Finish=!0},e.options.rewindSpeed)):(e.swapSpeed("slideSpeed"),window.setTimeout(function(){e.isCss3Finish=!0},e.options.slideSpeed)),e.transition3d(d)):b===!0?e.css2slide(d,e.options.paginationSpeed):"rewind"===b?e.css2slide(d,e.options.rewindSpeed):e.css2slide(d,e.options.slideSpeed),void e.afterGo()))},jumpTo:function(a){var b=this;"function"==typeof b.options.beforeMove&&b.options.beforeMove.apply(this,[b.$elem]),a>=b.maximumItem||-1===a?a=b.maximumItem:0>=a&&(a=0),b.swapSpeed(0),b.browser.support3d===!0?b.transition3d(b.positionsInArray[a]):b.css2slide(b.positionsInArray[a],1),b.currentItem=b.owl.currentItem=a,b.afterGo()},afterGo:function(){var a=this;a.prevArr.push(a.currentItem),a.prevItem=a.owl.prevItem=a.prevArr[a.prevArr.length-2],a.prevArr.shift(0),a.prevItem!==a.currentItem&&(a.checkPagination(),a.checkNavigation(),a.eachMoveUpdate(),a.options.autoPlay!==!1&&a.checkAp()),"function"==typeof a.options.afterMove&&a.prevItem!==a.currentItem&&a.options.afterMove.apply(this,[a.$elem])},stop:function(){var a=this;a.apStatus="stop",window.clearInterval(a.autoPlayInterval)},checkAp:function(){var a=this;"stop"!==a.apStatus&&a.play()},play:function(){var a=this;return a.apStatus="play",a.options.autoPlay===!1?!1:(window.clearInterval(a.autoPlayInterval),void(a.autoPlayInterval=window.setInterval(function(){a.next(!0)},a.options.autoPlay)))},swapSpeed:function(a){var b=this;"slideSpeed"===a?b.$owlWrapper.css(b.addCssSpeed(b.options.slideSpeed)):"paginationSpeed"===a?b.$owlWrapper.css(b.addCssSpeed(b.options.paginationSpeed)):"string"!=typeof a&&b.$owlWrapper.css(b.addCssSpeed(a))},addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){var b=this;b.$owlWrapper.css(b.doTranslate(a))},css2move:function(a){var b=this;b.$owlWrapper.css({left:a})},css2slide:function(a,b){var c=this;c.isCssFinish=!1,c.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||c.options.slideSpeed,complete:function(){c.isCssFinish=!0}})},checkBrowser:function(){var a,b,c,d,e=this,f="translate3d(0px, 0px, 0px)",g=document.createElement("div");g.style.cssText=" -moz-transform:"+f+"; -ms-transform:"+f+"; -o-transform:"+f+"; -webkit-transform:"+f+"; transform:"+f,a=/translate3d\(0px, 0px, 0px\)/g,b=g.style.cssText.match(a),c=null!==b&&1===b.length,d="ontouchstart"in window||window.navigator.msMaxTouchPoints,e.browser={support3d:c,isTouch:d}},moveEvents:function(){var a=this;(a.options.mouseDrag!==!1||a.options.touchDrag!==!1)&&(a.gestures(),a.disabledEvents())},eventTypes:function(){var a=this,b=["s","e","x"];a.ev_types={},a.options.mouseDrag===!0&&a.options.touchDrag===!0?b=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:a.options.mouseDrag===!1&&a.options.touchDrag===!0?b=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:a.options.mouseDrag===!0&&a.options.touchDrag===!1&&(b=["mousedown.owl","mousemove.owl","mouseup.owl"]),a.ev_types.start=b[0],a.ev_types.move=b[1],a.ev_types.end=b[2]},disabledEvents:function(){var b=this;b.$elem.on("dragstart.owl",function(a){a.preventDefault()}),b.$elem.on("mousedown.disableTextSelect",function(b){return a(b.target).is("input, textarea, select, option")})},gestures:function(){function b(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function c(b){"on"===b?(a(document).on(g.ev_types.move,e),a(document).on(g.ev_types.end,f)):"off"===b&&(a(document).off(g.ev_types.move),a(document).off(g.ev_types.end))}function d(d){var e,f=d.originalEvent||d||window.event;if(3===f.which)return!1;if(!(g.itemsAmount<=g.options.items)){if(g.isCssFinish===!1&&!g.options.dragBeforeAnimFinish)return!1;if(g.isCss3Finish===!1&&!g.options.dragBeforeAnimFinish)return!1;g.options.autoPlay!==!1&&window.clearInterval(g.autoPlayInterval),g.browser.isTouch===!0||g.$owlWrapper.hasClass("grabbing")||g.$owlWrapper.addClass("grabbing"),g.newPosX=0,g.newRelativeX=0,a(this).css(g.removeTransition()),e=a(this).position(),h.relativePos=e.left,h.offsetX=b(f).x-e.left,h.offsetY=b(f).y-e.top,c("on"),h.sliding=!1,h.targetElement=f.target||f.srcElement}}function e(c){var d,e,f=c.originalEvent||c||window.event;g.newPosX=b(f).x-h.offsetX,g.newPosY=b(f).y-h.offsetY,g.newRelativeX=g.newPosX-h.relativePos,"function"==typeof g.options.startDragging&&h.dragging!==!0&&0!==g.newRelativeX&&(h.dragging=!0,g.options.startDragging.apply(g,[g.$elem])),(g.newRelativeX>8||g.newRelativeX<-8)&&g.browser.isTouch===!0&&(void 0!==f.preventDefault?f.preventDefault():f.returnValue=!1,h.sliding=!0),(g.newPosY>10||g.newPosY<-10)&&h.sliding===!1&&a(document).off("touchmove.owl"),d=function(){return g.newRelativeX/5},e=function(){return g.maximumPixels+g.newRelativeX/5},g.newPosX=Math.max(Math.min(g.newPosX,d()),e()),g.browser.support3d===!0?g.transition3d(g.newPosX):g.css2move(g.newPosX)}function f(b){var d,e,f,i=b.originalEvent||b||window.event;i.target=i.target||i.srcElement,h.dragging=!1,g.browser.isTouch!==!0&&g.$owlWrapper.removeClass("grabbing"),g.newRelativeX<0?g.dragDirection=g.owl.dragDirection="left":g.dragDirection=g.owl.dragDirection="right",0!==g.newRelativeX&&(d=g.getNewPosition(),g.goTo(d,!1,"drag"),h.targetElement===i.target&&g.browser.isTouch!==!0&&(a(i.target).on("click.disable",function(b){b.stopImmediatePropagation(),b.stopPropagation(),b.preventDefault(),a(b.target).off("click.disable")}),e=a._data(i.target,"events").click,f=e.pop(),e.splice(0,0,f))),c("off")}var g=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};g.isCssFinish=!0,g.$elem.on(g.ev_types.start,".owl-wrapper",d)},getNewPosition:function(){var a=this,b=a.closestItem();return b>a.maximumItem?(a.currentItem=a.maximumItem,b=a.maximumItem):a.newPosX>=0&&(b=0,a.currentItem=0),b},closestItem:function(){var b=this,c=b.options.scrollPerPage===!0?b.pagesInArray:b.positionsInArray,d=b.newPosX,e=null;return a.each(c,function(f,g){d-b.itemWidth/20>c[f+1]&&d-b.itemWidth/20(c[f+1]||c[f]-b.itemWidth)&&"right"===b.moveDirection()&&(b.options.scrollPerPage===!0?(e=c[f+1]||c[c.length-1],b.currentItem=a.inArray(e,b.positionsInArray)):(e=c[f+1],b.currentItem=f+1))}),b.currentItem},moveDirection:function(){var a,b=this;return b.newRelativeX<0?(a="right",b.playDirection="next"):(a="left",b.playDirection="prev"),a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()}),a.$elem.on("owl.prev",function(){a.prev()}),a.$elem.on("owl.play",function(b,c){a.options.autoPlay=c,a.play(),a.hoverStatus="play"}),a.$elem.on("owl.stop",function(){a.stop(),a.hoverStatus="stop"}),a.$elem.on("owl.goTo",function(b,c){a.goTo(c)}),a.$elem.on("owl.jumpTo",function(b,c){a.jumpTo(c)})},stopOnHover:function(){var a=this;a.options.stopOnHover===!0&&a.browser.isTouch!==!0&&a.options.autoPlay!==!1&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var b,c,d,e,f,g=this;if(g.options.lazyLoad===!1)return!1;for(b=0;b=g.currentItem:!0,f&&d=g?window.setTimeout(d,100):c()}var e,f=this,g=0;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),e=!0):b[0].src=b.data("src"),d()},autoHeight:function(){function b(){var b=a(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",b+"px"),e.wrapperOuter.hasClass("autoHeight")||window.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function c(){d+=1,e.completeImg(f.get(0))?b():100>=d?window.setTimeout(c,100):e.wrapperOuter.css("height","")}var d,e=this,f=a(e.$owlItems[e.currentItem]).find("img");void 0!==f.get(0)?(d=0,c()):b()},completeImg:function(a){var b;return a.complete?(b=typeof a.naturalWidth,"undefined"!==b&&0===a.naturalWidth?!1:!0):!1},onVisibleItems:function(){var b,c=this;for(c.options.addClassActive===!0&&c.$owlItems.removeClass("active"),c.visibleItems=[],b=c.currentItem;b=d.$userItems.length||-1===c?d.$userItems.eq(-1).after(a):d.$userItems.eq(c).before(a),void d.setVars()):!1},removeItem:function(a){var b,c=this;return 0===c.$elem.children().length?!1:(b=void 0===a||-1===a?-1:a,c.unWrap(),c.$userItems.eq(b).remove(),void c.setVars())}};a.fn.owlCarousel=function(c){return this.each(function(){if(a(this).data("owl-init")===!0)return!1;a(this).data("owl-init",!0);var d=Object.create(b);d.init(c,this),a.data(this,"owlCarousel",d)})},a.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:window,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}); !function(a,b){"function"==typeof define&&define.amd?define('filter_poodll/reveal', function(){return a.Reveal=b(),a.Reveal}):"object"==typeof exports?module.exports=b():a.Reveal=b()}(this,function(){"use strict";function a(a){if(b(),Jb.transforms2d||Jb.transforms3d){Ib.wrapper=document.querySelector(".reveal"),Ib.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",L,!1);var d=qb.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,p(Cb,a),p(Cb,d),B(),c()}else{document.body.setAttribute("class","no-transforms");for(var e=q(document.getElementsByTagName("img")),f=q(document.getElementsByTagName("iframe")),g=e.concat(f),h=0,i=g.length;i>h;h++){var j=g[h];j.getAttribute("data-src")&&(j.setAttribute("src",j.getAttribute("data-src")),j.removeAttribute("data-src"))}}}function b(){Jb.transforms3d="WebkitPerspective"in document.body.style||"MozPerspective"in document.body.style||"msPerspective"in document.body.style||"OPerspective"in document.body.style||"perspective"in document.body.style,Jb.transforms2d="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style,Jb.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,Jb.requestAnimationFrame="function"==typeof Jb.requestAnimationFrameMethod,Jb.canvas=!!document.createElement("canvas").getContext,Jb.touch=!!("ontouchstart"in window),Jb.overviewTransitions=!/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),wb=/(iphone|ipod|ipad|android)/gi.test(navigator.userAgent)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=Cb.dependencies.length;h>g;g++){var i=Cb.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),l(),h(),ea(),m(),ya(),la(!0),setTimeout(function(){Ib.slides.classList.remove("no-transition"),Db=!0,D("ready",{indexh:rb,indexv:sb,currentSlide:ub})},1),A()&&(o(),"complete"===document.readyState?g():window.addEventListener("load",g))}function e(){Ib.slides.classList.add("no-transition"),Ib.background=i(Ib.wrapper,"div","backgrounds",null),Ib.progress=i(Ib.wrapper,"div","progress",""),Ib.progressbar=Ib.progress.querySelector("span"),i(Ib.wrapper,"aside","controls",''),Ib.slideNumber=i(Ib.wrapper,"div","slide-number",""),i(Ib.wrapper,"div","pause-overlay",null),Ib.controls=document.querySelector(".reveal .controls"),Ib.theme=document.querySelector("#theme"),Ib.wrapper.setAttribute("role","application"),Ib.controlsLeft=q(document.querySelectorAll(".navigate-left")),Ib.controlsRight=q(document.querySelectorAll(".navigate-right")),Ib.controlsUp=q(document.querySelectorAll(".navigate-up")),Ib.controlsDown=q(document.querySelectorAll(".navigate-down")),Ib.controlsPrev=q(document.querySelectorAll(".navigate-prev")),Ib.controlsNext=q(document.querySelectorAll(".navigate-next")),Ib.statusDiv=f()}function f(){var a=document.getElementById("aria-status-div");return a||(a=document.createElement("div"),a.style.position="absolute",a.style.height="1px",a.style.width="1px",a.style.overflow="hidden",a.style.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","aria-status-div"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),Ib.wrapper.appendChild(a)),a}function g(){var a=N(window.innerWidth,window.innerHeight),b=Math.floor(a.width*(1+Cb.margin)),c=Math.floor(a.height*(1+Cb.margin)),d=a.width,e=a.height;v("@page{size:"+b+"px "+c+"px; margin: 0;}"),v(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+d+"px; max-height:"+e+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=b+"px",document.body.style.height=c+"px",q(Ib.wrapper.querySelectorAll(yb)).forEach(function(a){if(a.classList.contains("stack")===!1){var f=(b-d)/2,g=(c-e)/2,h=y(a),i=Math.max(Math.ceil(h/c),1);(1===i&&Cb.center||a.classList.contains("center"))&&(g=Math.max((c-h)/2,0)),a.style.left=f+"px",a.style.top=g+"px",a.style.width=d+"px";var j=a.querySelector(".slide-background");j&&(j.style.width=b+"px",j.style.height=c*i+"px",j.style.top=-g+"px",j.style.left=-f+"px")}}),q(Ib.wrapper.querySelectorAll(yb+" .fragment")).forEach(function(a){a.classList.add("visible")})}function h(){Ib.slides.querySelector("iframe")&&setInterval(function(){(0!==Ib.wrapper.scrollTop||0!==Ib.wrapper.scrollLeft)&&(Ib.wrapper.scrollTop=0,Ib.wrapper.scrollLeft=0)},500)}function i(a,b,c,d){for(var e=a.querySelectorAll("."+c),f=0;f1&&Cb.autoSlide&&Cb.autoSlideStoppable&&Jb.canvas&&Jb.requestAnimationFrame&&(xb=new pb(Ib.wrapper,function(){return Math.min(Math.max((Date.now()-Pb)/Nb,0),1)}),xb.on("click",ob),Qb=!1),Cb.fragments===!1&&q(Ib.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),da()}function n(){if(Mb=!0,window.addEventListener("hashchange",jb,!1),window.addEventListener("resize",kb,!1),Cb.touch&&(Ib.wrapper.addEventListener("touchstart",Xa,!1),Ib.wrapper.addEventListener("touchmove",Ya,!1),Ib.wrapper.addEventListener("touchend",Za,!1),window.navigator.pointerEnabled?(Ib.wrapper.addEventListener("pointerdown",$a,!1),Ib.wrapper.addEventListener("pointermove",_a,!1),Ib.wrapper.addEventListener("pointerup",ab,!1)):window.navigator.msPointerEnabled&&(Ib.wrapper.addEventListener("MSPointerDown",$a,!1),Ib.wrapper.addEventListener("MSPointerMove",_a,!1),Ib.wrapper.addEventListener("MSPointerUp",ab,!1))),Cb.keyboard&&(document.addEventListener("keydown",Wa,!1),document.addEventListener("keypress",Va,!1)),Cb.progress&&Ib.progress&&Ib.progress.addEventListener("click",cb,!1),Cb.focusBodyOnPageVisibilityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,lb,!1)}var b=["touchstart","click"];navigator.userAgent.match(/android/gi)&&(b=["touchstart"]),b.forEach(function(a){Ib.controlsLeft.forEach(function(b){b.addEventListener(a,db,!1)}),Ib.controlsRight.forEach(function(b){b.addEventListener(a,eb,!1)}),Ib.controlsUp.forEach(function(b){b.addEventListener(a,fb,!1)}),Ib.controlsDown.forEach(function(b){b.addEventListener(a,gb,!1)}),Ib.controlsPrev.forEach(function(b){b.addEventListener(a,hb,!1)}),Ib.controlsNext.forEach(function(b){b.addEventListener(a,ib,!1)})})}function o(){Mb=!1,document.removeEventListener("keydown",Wa,!1),document.removeEventListener("keypress",Va,!1),window.removeEventListener("hashchange",jb,!1),window.removeEventListener("resize",kb,!1),Ib.wrapper.removeEventListener("touchstart",Xa,!1),Ib.wrapper.removeEventListener("touchmove",Ya,!1),Ib.wrapper.removeEventListener("touchend",Za,!1),window.navigator.pointerEnabled?(Ib.wrapper.removeEventListener("pointerdown",$a,!1),Ib.wrapper.removeEventListener("pointermove",_a,!1),Ib.wrapper.removeEventListener("pointerup",ab,!1)):window.navigator.msPointerEnabled&&(Ib.wrapper.removeEventListener("MSPointerDown",$a,!1),Ib.wrapper.removeEventListener("MSPointerMove",_a,!1),Ib.wrapper.removeEventListener("MSPointerUp",ab,!1)),Cb.progress&&Ib.progress&&Ib.progress.removeEventListener("click",cb,!1),["touchstart","click"].forEach(function(a){Ib.controlsLeft.forEach(function(b){b.removeEventListener(a,db,!1)}),Ib.controlsRight.forEach(function(b){b.removeEventListener(a,eb,!1)}),Ib.controlsUp.forEach(function(b){b.removeEventListener(a,fb,!1)}),Ib.controlsDown.forEach(function(b){b.removeEventListener(a,gb,!1)}),Ib.controlsPrev.forEach(function(b){b.removeEventListener(a,hb,!1)}),Ib.controlsNext.forEach(function(b){b.removeEventListener(a,ib,!1)})})}function p(a,b){for(var c in b)a[c]=b[c]}function q(a){return Array.prototype.slice.call(a)}function r(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function s(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function t(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.transform=b}function u(a){"string"==typeof a.layout&&(Hb.layout=a.layout),"string"==typeof a.overview&&(Hb.overview=a.overview),Hb.layout?t(Ib.slides,Hb.layout+" "+Hb.overview):t(Ib.slides,Hb.overview)}function v(a){var b=document.createElement("style");b.type="text/css",b.styleSheet?b.styleSheet.cssText=a:b.appendChild(document.createTextNode(a)),document.getElementsByTagName("head")[0].appendChild(b)}function w(a){var b=a.match(/^#([0-9a-f]{3})$/i);if(b&&b[1])return b=b[1],{r:17*parseInt(b.charAt(0),16),g:17*parseInt(b.charAt(1),16),b:17*parseInt(b.charAt(2),16)};var c=a.match(/^#([0-9a-f]{6})$/i);if(c&&c[1])return c=c[1],{r:parseInt(c.substr(0,2),16),g:parseInt(c.substr(2,2),16),b:parseInt(c.substr(4,2),16)};var d=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(d)return{r:parseInt(d[1],10),g:parseInt(d[2],10),b:parseInt(d[3],10)};var e=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return e?{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10),a:parseFloat(e[4])}:null}function x(a){return"string"==typeof a&&(a=w(a)),a?(299*a.r+587*a.g+114*a.b)/1e3:null}function y(a){var b=0;if(a){var c=0;q(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===window.getComputedStyle(a).position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function z(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function A(){return/print-pdf/gi.test(window.location.search)}function B(){Cb.hideAddressBar&&wb&&(window.addEventListener("load",C,!1),window.addEventListener("orientationchange",C,!1))}function C(){setTimeout(function(){window.scrollTo(0,1)},10)}function D(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),p(c,b),Ib.wrapper.dispatchEvent(c),Cb.postMessageEvents&&window.parent!==window.self&&window.parent.postMessage(JSON.stringify({namespace:"reveal",eventName:a,state:Ea()}),"*")}function E(){if(Jb.transforms3d&&!("msPerspective"in document.body.style))for(var a=Ib.wrapper.querySelectorAll(yb+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function F(){for(var a=Ib.wrapper.querySelectorAll(yb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function G(a){var b=q(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",nb,!1)})}function H(){var a=q(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",nb,!1)})}function I(a){K(),Ib.overlay=document.createElement("div"),Ib.overlay.classList.add("overlay"),Ib.overlay.classList.add("overlay-preview"),Ib.wrapper.appendChild(Ib.overlay),Ib.overlay.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),Ib.overlay.querySelector("iframe").addEventListener("load",function(a){Ib.overlay.classList.add("loaded")},!1),Ib.overlay.querySelector(".close").addEventListener("click",function(a){K(),a.preventDefault()},!1),Ib.overlay.querySelector(".external").addEventListener("click",function(a){K()},!1),setTimeout(function(){Ib.overlay.classList.add("visible")},1)}function J(){if(Cb.help){K(),Ib.overlay=document.createElement("div"),Ib.overlay.classList.add("overlay"),Ib.overlay.classList.add("overlay-help"),Ib.wrapper.appendChild(Ib.overlay);var a='

Keyboard Shortcuts


';a+="";for(var b in Sb)a+="";a+="
KEYACTION
"+b+""+Sb[b]+"
",Ib.overlay.innerHTML=["
",'',"
",'
','
'+a+"
","
"].join(""),Ib.overlay.querySelector(".close").addEventListener("click",function(a){K(),a.preventDefault()},!1),setTimeout(function(){Ib.overlay.classList.add("visible")},1)}}function K(){Ib.overlay&&(Ib.overlay.parentNode.removeChild(Ib.overlay),Ib.overlay=null)}function L(){if(Ib.wrapper&&!A()){var a=N(),b=20;M(Cb.width,Cb.height,b),Ib.slides.style.width=a.width+"px",Ib.slides.style.height=a.height+"px",Gb=Math.min(a.presentationWidth/a.width,a.presentationHeight/a.height),Gb=Math.max(Gb,Cb.minScale),Gb=Math.min(Gb,Cb.maxScale),1===Gb?(Ib.slides.style.zoom="",Ib.slides.style.left="",Ib.slides.style.top="",Ib.slides.style.bottom="",Ib.slides.style.right="",u({layout:""})):!wb&&/chrome/i.test(navigator.userAgent)&&"undefined"!=typeof Ib.slides.style.zoom?(Ib.slides.style.zoom=Gb,u({layout:""})):(Ib.slides.style.left="50%",Ib.slides.style.top="50%",Ib.slides.style.bottom="auto",Ib.slides.style.right="auto",u({layout:"translate(-50%, -50%) scale("+Gb+")"}));for(var c=q(Ib.wrapper.querySelectorAll(yb)),d=0,e=c.length;e>d;d++){var f=c[d];"none"!==f.style.display&&(Cb.center||f.classList.contains("center")?f.classList.contains("stack")?f.style.top=0:f.style.top=Math.max((a.height-y(f))/2-b,0)+"px":f.style.top="")}ia(),ma()}}function M(a,b,c){q(Ib.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=z(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function N(a,b){var c={width:Cb.width,height:Cb.height,presentationWidth:a||Ib.wrapper.offsetWidth,presentationHeight:b||Ib.wrapper.offsetHeight};return c.presentationWidth-=c.presentationWidth*Cb.margin,c.presentationHeight-=c.presentationHeight*Cb.margin,"string"==typeof c.width&&/%$/.test(c.width)&&(c.width=parseInt(c.width,10)/100*c.presentationWidth),"string"==typeof c.height&&/%$/.test(c.height)&&(c.height=parseInt(c.height,10)/100*c.presentationHeight),c}function O(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function P(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function Q(){Cb.overview&&!V()&&(Eb=!0,Ib.wrapper.classList.add("overview"),Ib.wrapper.classList.remove("overview-deactivating"),Jb.overviewTransitions&&setTimeout(function(){Ib.wrapper.classList.add("overview-animated")},1),La(),Ib.slides.appendChild(Ib.background),q(Ib.wrapper.querySelectorAll(yb)).forEach(function(a){a.classList.contains("stack")||a.addEventListener("click",mb,!0)}),ha(),R(),S(),L(),D("overviewshown",{indexh:rb,indexv:sb,currentSlide:ub}))}function R(){var a=70,b=Cb.width+a,c=Cb.height+a;Cb.rtl&&(b=-b),q(Ib.wrapper.querySelectorAll(zb)).forEach(function(a,d){a.setAttribute("data-index-h",d),t(a,"translate3d("+d*b+"px, 0, 0)"),a.classList.contains("stack")&&q(a.querySelectorAll("section")).forEach(function(a,b){a.setAttribute("data-index-h",d),a.setAttribute("data-index-v",b),t(a,"translate3d(0, "+b*c+"px, 0)")})}),q(Ib.background.childNodes).forEach(function(a,d){t(a,"translate3d("+d*b+"px, 0, 0)"),q(a.querySelectorAll(".slide-background")).forEach(function(a,b){t(a,"translate3d(0, "+b*c+"px, 0)")})})}function S(){var a=70,b=Cb.width+a,c=Cb.height+a;Cb.rtl&&(b=-b),u({overview:["translateX("+-rb*b+"px)","translateY("+-sb*c+"px)","translateZ("+(window.innerWidth<400?-1e3:-2500)+"px)"].join(" ")})}function T(){Cb.overview&&(Eb=!1,Ib.wrapper.classList.remove("overview"),Ib.wrapper.classList.remove("overview-animated"),Ib.wrapper.classList.add("overview-deactivating"),setTimeout(function(){Ib.wrapper.classList.remove("overview-deactivating")},1),Ib.wrapper.appendChild(Ib.background),q(Ib.wrapper.querySelectorAll(yb)).forEach(function(a){t(a,""),a.removeEventListener("click",mb,!0)}),q(Ib.background.querySelectorAll(".slide-background")).forEach(function(a){t(a,"")}),u({overview:""}),ca(rb,sb),L(),Ka(),D("overviewhidden",{indexh:rb,indexv:sb,currentSlide:ub}))}function U(a){"boolean"==typeof a?a?Q():T():V()?T():Q()}function V(){return Eb}function W(a){return a=a?a:ub,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function X(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function Y(){if(Cb.pause){var a=Ib.wrapper.classList.contains("paused");La(),Ib.wrapper.classList.add("paused"),a===!1&&D("paused")}}function Z(){var a=Ib.wrapper.classList.contains("paused");Ib.wrapper.classList.remove("paused"),Ka(),a&&D("resumed")}function $(a){"boolean"==typeof a?a?Y():Z():_()?Z():Y()}function _(){return Ib.wrapper.classList.contains("paused")}function aa(a){"boolean"==typeof a?a?Na():Ma():Qb?Na():Ma()}function ba(){return!(!Nb||Qb)}function ca(a,b,c,d){tb=ub;var e=Ib.wrapper.querySelectorAll(zb);void 0!==b||V()||(b=P(e[a])),tb&&tb.parentNode&&tb.parentNode.classList.contains("stack")&&O(tb.parentNode,sb);var f=Fb.concat();Fb.length=0;var g=rb||0,h=sb||0;rb=ga(zb,void 0===a?rb:a),sb=ga(Ab,void 0===b?sb:b),ha(),L();a:for(var i=0,j=Fb.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"),a.setAttribute("aria-hidden","true"))})})}function fa(){var a=q(Ib.wrapper.querySelectorAll(zb));a.forEach(function(a){var b=q(a.querySelectorAll("section"));b.forEach(function(a,b){Ga(a.querySelectorAll(".fragment"))}),0===b.length&&Ga(a.querySelectorAll(".fragment"))})}function ga(a,b){var c=q(Ib.wrapper.querySelectorAll(a)),d=c.length,e=A();if(d){Cb.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var f=0;d>f;f++){var g=c[f],h=Cb.rtl&&!W(g);if(g.classList.remove("past"),g.classList.remove("present"),g.classList.remove("future"),g.setAttribute("hidden",""),g.setAttribute("aria-hidden","true"),g.querySelector("section")&&g.classList.add("stack"),e)g.classList.add("present");else if(b>f){if(g.classList.add(h?"future":"past"),Cb.fragments)for(var i=q(g.querySelectorAll(".fragment"));i.length;){var j=i.pop();j.classList.add("visible"),j.classList.remove("current-fragment")}}else if(f>b&&(g.classList.add(h?"past":"future"),Cb.fragments))for(var k=q(g.querySelectorAll(".fragment.visible"));k.length;){var l=k.pop();l.classList.remove("visible"),l.classList.remove("current-fragment")}}c[b].classList.add("present"),c[b].removeAttribute("hidden"),c[b].removeAttribute("aria-hidden");var m=c[b].getAttribute("data-state");m&&(Fb=Fb.concat(m.split(" ")))}else b=0;return b}function ha(){var a,b,c=q(Ib.wrapper.querySelectorAll(zb)),d=c.length;if(d&&"undefined"!=typeof rb){var e=V()?10:Cb.viewDistance;wb&&(e=V()?6:2),A()&&(e=Number.MAX_VALUE);for(var f=0;d>f;f++){var g=c[f],h=q(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((rb||0)-f)||0,Cb.loop&&(a=Math.abs(((rb||0)-f)%(d-e))||0),e>a?na(g):oa(g),i)for(var j=P(g),k=0;i>k;k++){var l=h[k];b=f===(rb||0)?Math.abs((sb||0)-k):Math.abs(k-j),e>a+b?na(l):oa(l)}}}}function ia(){Cb.progress&&Ib.progressbar&&(Ib.progressbar.style.width=wa()*Ib.wrapper.offsetWidth+"px")}function ja(){if(Cb.slideNumber&&Ib.slideNumber){var a="c";"string"==typeof Cb.slideNumber&&(a=Cb.slideNumber),Ib.slideNumber.innerHTML=a.replace(/h/g,rb).replace(/v/g,sb).replace(/c/g,va()+1).replace(/t/g,Ba())}}function ka(){var a=pa(),b=qa();Ib.controlsLeft.concat(Ib.controlsRight).concat(Ib.controlsUp).concat(Ib.controlsDown).concat(Ib.controlsPrev).concat(Ib.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&Ib.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&Ib.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&Ib.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&Ib.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&Ib.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&Ib.controlsNext.forEach(function(a){a.classList.add("enabled")}),ub&&(b.prev&&Ib.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&Ib.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),W(ub)?(b.prev&&Ib.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&Ib.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&Ib.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&Ib.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function la(a){var b=null,c=Cb.rtl?"future":"past",d=Cb.rtl?"past":"future";if(q(Ib.background.childNodes).forEach(function(e,f){e.classList.remove("past"),e.classList.remove("present"),e.classList.remove("future"),rb>f?e.classList.add(c):f>rb?e.classList.add(d):(e.classList.add("present"),b=e),(a||f===rb)&&q(e.querySelectorAll(".slide-background")).forEach(function(a,c){a.classList.remove("past"),a.classList.remove("present"),a.classList.remove("future"),sb>c?a.classList.add("past"):c>sb?a.classList.add("future"):(a.classList.add("present"),f===rb&&(b=a))})}),vb){var e=vb.querySelector("video");e&&e.pause()}if(b){var f=b.querySelector("video");f&&(f.currentTime=0,f.play());var g=b.style.backgroundImage||"";/\.gif/i.test(g)&&(b.style.backgroundImage="",window.getComputedStyle(b).opacity,b.style.backgroundImage=g);var h=vb?vb.getAttribute("data-background-hash"):null,i=b.getAttribute("data-background-hash");i&&i===h&&b!==vb&&Ib.background.classList.add("no-transition"),vb=b}ub&&["has-light-background","has-dark-background"].forEach(function(a){ub.classList.contains(a)?Ib.wrapper.classList.add(a):Ib.wrapper.classList.remove(a)}),setTimeout(function(){Ib.background.classList.remove("no-transition")},1)}function ma(){if(Cb.parallaxBackgroundImage){var a,b,c=Ib.wrapper.querySelectorAll(zb),d=Ib.wrapper.querySelectorAll(Ab),e=Ib.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f,g,h=Ib.background.offsetWidth,i=c.length;f="number"==typeof Cb.parallaxBackgroundHorizontal?Cb.parallaxBackgroundHorizontal:(a-h)/(i-1),g=f*rb*-1;var j,k,l=Ib.background.offsetHeight,m=d.length;j="number"==typeof Cb.parallaxBackgroundVertical?Cb.parallaxBackgroundVertical:(b-l)/(m-1),k=m>0?j*sb*1:0,Ib.background.style.backgroundPosition=g+"px "+-k+"px"}}function na(a){a.style.display="block",q(a.querySelectorAll("img[data-src], video[data-src], audio[data-src]")).forEach(function(a){a.setAttribute("src",a.getAttribute("data-src")),a.removeAttribute("data-src")}),q(a.querySelectorAll("video, audio")).forEach(function(a){var b=0;q(a.querySelectorAll("source[data-src]")).forEach(function(a){a.setAttribute("src",a.getAttribute("data-src")),a.removeAttribute("data-src"),b+=1}),b>0&&a.load()});var b=Aa(a),c=Da(b.h,b.v);if(c&&(c.style.display="block",c.hasAttribute("data-loaded")===!1)){c.setAttribute("data-loaded","true");var d=a.getAttribute("data-background-image"),e=a.getAttribute("data-background-video"),f=a.hasAttribute("data-background-video-loop"),g=a.getAttribute("data-background-iframe");if(d)c.style.backgroundImage="url("+d+")";else if(e&&!xa()){var h=document.createElement("video");f&&h.setAttribute("loop",""),e.split(",").forEach(function(a){h.innerHTML+=''}),c.appendChild(h)}else if(g){var i=document.createElement("iframe");i.setAttribute("src",g),i.style.width="100%",i.style.height="100%",i.style.maxHeight="100%",i.style.maxWidth="100%",c.appendChild(i)}}}function oa(a){a.style.display="none";var b=Aa(a),c=Da(b.h,b.v);c&&(c.style.display="none")}function pa(){var a=Ib.wrapper.querySelectorAll(zb),b=Ib.wrapper.querySelectorAll(Ab),c={left:rb>0||Cb.loop,right:rb0,down:sb0,next:!!b.length}}return{prev:!1,next:!1}}function ra(){var a=function(a,b,c){q(Ib.slides.querySelectorAll("iframe["+a+'*="'+b+'"]')).forEach(function(b){var d=b.getAttribute(a);d&&-1===d.indexOf(c)&&b.setAttribute(a,d+(/\?/.test(d)?"&":"?")+c)})};a("src","youtube.com/embed/","enablejsapi=1"),a("data-src","youtube.com/embed/","enablejsapi=1"),a("src","player.vimeo.com/","api=1"),a("data-src","player.vimeo.com/","api=1")}function sa(a){a&&!xa()&&(q(a.querySelectorAll('img[src$=".gif"]')).forEach(function(a){a.setAttribute("src",a.getAttribute("src"))}),q(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&"function"==typeof a.play&&a.play()}),q(a.querySelectorAll("iframe[src]")).forEach(function(a){ta({target:a})}),q(a.querySelectorAll("iframe[data-src]")).forEach(function(a){a.getAttribute("src")!==a.getAttribute("data-src")&&(a.removeEventListener("load",ta),a.addEventListener("load",ta),a.setAttribute("src",a.getAttribute("data-src")))}))}function ta(a){var b=a.target;/youtube\.com\/embed\//.test(b.getAttribute("src"))&&b.hasAttribute("data-autoplay")?b.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(b.getAttribute("src"))&&b.hasAttribute("data-autoplay")?b.contentWindow.postMessage('{"method":"play"}',"*"):b.contentWindow.postMessage("slide:start","*")}function ua(a){a&&a.parentNode&&(q(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.pause||a.pause()}),q(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*"),a.removeEventListener("load",ta)}),q(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),q(a.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"method":"pause"}',"*")}),q(a.querySelectorAll("iframe[data-src]")).forEach(function(a){a.setAttribute("src","about:blank"),a.removeAttribute("src")}))}function va(){var a=q(Ib.wrapper.querySelectorAll(zb)),b=0;a:for(var c=0;c0){var d=ub.querySelectorAll(".fragment.visible"),e=.9;b+=d.length/c.length*e}}return b/(a-1)}function xa(){return!!window.location.search.match(/receiver/gi)}function ya(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;if(/^[a-zA-Z][\w:.-]*$/.test(c)&&(d=document.getElementById(c)),d){var e=qb.getIndices(d);ca(e.h,e.v)}else ca(rb||0,sb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==rb||g!==sb)&&ca(f,g)}}function za(a){if(Cb.history)if(clearTimeout(Lb),"number"==typeof a)Lb=setTimeout(za,a);else if(ub){var b="/",c=ub.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),"string"==typeof c&&c.length?b="/"+c:((rb>0||sb>0)&&(b+=rb),sb>0&&(b+="/"+sb)),window.location.hash=b}}function Aa(a){var b,c=rb,d=sb;if(a){var e=W(a),f=e?a.parentNode:a,g=q(Ib.wrapper.querySelectorAll(zb));c=Math.max(g.indexOf(f),0),d=void 0,e&&(d=Math.max(q(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&ub){var h=ub.querySelectorAll(".fragment").length>0;if(h){var i=ub.querySelector(".current-fragment");b=i&&i.hasAttribute("data-fragment-index")?parseInt(i.getAttribute("data-fragment-index"),10):ub.querySelectorAll(".fragment.visible").length-1}}return{h:c,v:d,f:b}}function Ba(){return Ib.wrapper.querySelectorAll(yb+":not(.stack)").length}function Ca(a,b){var c=Ib.wrapper.querySelectorAll(zb)[a],d=c&&c.querySelectorAll("section");return d&&d.length&&"number"==typeof b?d?d[b]:void 0:c}function Da(a,b){if(A()){var c=Ca(a,b);if(c){var d=c.querySelector(".slide-background");if(d&&d.parentNode===c)return d}return void 0}var e=Ib.wrapper.querySelectorAll(".backgrounds>.slide-background")[a],f=e&&e.querySelectorAll(".slide-background");return f&&f.length&&"number"==typeof b?f?f[b]:void 0:e}function Ea(){var a=Aa();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:_(),overview:V()}}function Fa(a){if("object"==typeof a){ca(r(a.indexh),r(a.indexv),r(a.indexf));var b=r(a.paused),c=r(a.overview);"boolean"==typeof b&&b!==_()&&$(b),"boolean"==typeof c&&c!==V()&&U(c)}}function Ga(a){a=q(a);var b=[],c=[],d=[];a.forEach(function(a,d){if(a.hasAttribute("data-fragment-index")){var e=parseInt(a.getAttribute("data-fragment-index"),10);b[e]||(b[e]=[]),b[e].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function Ha(a,b){if(ub&&Cb.fragments){var c=Ga(ub.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=Ga(ub.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return q(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),Ib.statusDiv.textContent=b.textContent,c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&D("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&D("fragmentshown",{fragment:e[0],fragments:e}),ka(),ia(),!(!e.length&&!f.length)}}return!1}function Ia(){return Ha(null,1)}function Ja(){return Ha(null,-1)}function Ka(){if(La(),ub){var a=ub.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=ub.parentNode?ub.parentNode.getAttribute("data-autoslide"):null,d=ub.getAttribute("data-autoslide");Nb=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):Cb.autoSlide,0===ub.querySelectorAll(".fragment").length&&q(ub.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&Nb&&1e3*a.duration>Nb&&(Nb=1e3*a.duration+1e3)}),!Nb||Qb||_()||V()||qb.isLastSlide()&&!qa().next&&Cb.loop!==!0||(Ob=setTimeout(Ta,Nb),Pb=Date.now()),xb&&xb.setPlaying(-1!==Ob)}}function La(){clearTimeout(Ob),Ob=-1}function Ma(){Nb&&!Qb&&(Qb=!0,D("autoslidepaused"),clearTimeout(Ob),xb&&xb.setPlaying(!1))}function Na(){Nb&&Qb&&(Qb=!1,D("autoslideresumed"),Ka())}function Oa(){Cb.rtl?(V()||Ia()===!1)&&pa().left&&ca(rb+1):(V()||Ja()===!1)&&pa().left&&ca(rb-1)}function Pa(){Cb.rtl?(V()||Ja()===!1)&&pa().right&&ca(rb-1):(V()||Ia()===!1)&&pa().right&&ca(rb+1)}function Qa(){(V()||Ja()===!1)&&pa().up&&ca(rb,sb-1)}function Ra(){(V()||Ia()===!1)&&pa().down&&ca(rb,sb+1)}function Sa(){if(Ja()===!1)if(pa().up)Qa();else{var a;if(a=Cb.rtl?q(Ib.wrapper.querySelectorAll(zb+".future")).pop():q(Ib.wrapper.querySelectorAll(zb+".past")).pop()){var b=a.querySelectorAll("section").length-1||void 0,c=rb-1;ca(c,b)}}}function Ta(){Ia()===!1&&(pa().down?Ra():Cb.rtl?Oa():Pa()),Ka()}function Ua(a){Cb.autoSlideStoppable&&Ma()}function Va(a){a.shiftKey&&63===a.charCode&&(Ib.overlay?K():J(!0))}function Wa(a){if("function"==typeof Cb.keyboardCondition&&Cb.keyboardCondition()===!1)return!0;var b=Qb;Ua(a);var c=document.activeElement&&"inherit"!==document.activeElement.contentEditable,d=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName);if(!(c||d||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(_()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var e=!1;if("object"==typeof Cb.keyboard)for(var f in Cb.keyboard)if(parseInt(f,10)===a.keyCode){var g=Cb.keyboard[f];"function"==typeof g?g.apply(null,[a]):"string"==typeof g&&"function"==typeof qb[g]&&qb[g].call(),e=!0}if(e===!1)switch(e=!0,a.keyCode){case 80:case 33:Sa();break;case 78:case 34:Ta();break;case 72:case 37:Oa();break;case 76:case 39:Pa();break;case 75:case 38:Qa();break;case 74:case 40:Ra();break;case 36:ca(0);break;case 35:ca(Number.MAX_VALUE);break;case 32:V()?T():a.shiftKey?Sa():Ta();break;case 13:V()?T():e=!1;break;case 58:case 59:case 66:case 190:case 191:$();break;case 70:X();break;case 65:Cb.autoSlideStoppable&&aa(b);break;default:e=!1}e?a.preventDefault&&a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!Jb.transforms3d||(Ib.overlay?K():U(),a.preventDefault&&a.preventDefault()),Ka()}}function Xa(a){Rb.startX=a.touches[0].clientX,Rb.startY=a.touches[0].clientY,Rb.startCount=a.touches.length,2===a.touches.length&&Cb.overview&&(Rb.startSpan=s({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:Rb.startX,y:Rb.startY}))}function Ya(a){if(Rb.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Ua(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===Rb.startCount&&Cb.overview){var d=s({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:Rb.startX,y:Rb.startY});Math.abs(Rb.startSpan-d)>Rb.threshold&&(Rb.captured=!0,dRb.threshold&&Math.abs(e)>Math.abs(f)?(Rb.captured=!0,Oa()):e<-Rb.threshold&&Math.abs(e)>Math.abs(f)?(Rb.captured=!0,Pa()):f>Rb.threshold?(Rb.captured=!0,Qa()):f<-Rb.threshold&&(Rb.captured=!0,Ra()),Cb.embedded?(Rb.captured||W(ub))&&a.preventDefault():a.preventDefault()}}}function Za(a){Rb.captured=!1}function $a(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Xa(a))}function _a(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Ya(a))}function ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Za(a))}function bb(a){if(Date.now()-Kb>600){Kb=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ta():Sa()}}function cb(a){Ua(a),a.preventDefault();var b=q(Ib.wrapper.querySelectorAll(zb)).length,c=Math.floor(a.clientX/Ib.wrapper.offsetWidth*b);Cb.rtl&&(c=b-c),ca(c)}function db(a){a.preventDefault(),Ua(),Oa()}function eb(a){a.preventDefault(),Ua(),Pa()}function fb(a){a.preventDefault(),Ua(),Qa()}function gb(a){a.preventDefault(),Ua(),Ra()}function hb(a){a.preventDefault(),Ua(),Sa()}function ib(a){a.preventDefault(),Ua(),Ta()}function jb(a){ya()}function kb(a){L()}function lb(a){var b=document.webkitHidden||document.msHidden||document.hidden;b===!1&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function mb(a){if(Mb&&V()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(T(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);ca(c,d)}}}function nb(a){if(a.currentTarget&&a.currentTarget.hasAttribute("href")){var b=a.currentTarget.getAttribute("href");b&&(I(b),a.preventDefault())}}function ob(a){qb.isLastSlide()&&Cb.loop===!1?(ca(0,0),Na()):Qb?Na():Ma()}function pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var qb,rb,sb,tb,ub,vb,wb,xb,yb=".slides section",zb=".slides>section",Ab=".slides>section.present>section",Bb=".slides>section:first-of-type",Cb={width:960,height:700,margin:.1,minScale:.2,maxScale:1.5,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,keyboardCondition:null,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,help:!0,pause:!0,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,viewDistance:3,dependencies:[]},Db=!1,Eb=!1,Fb=[],Gb=1,Hb={layout:"",overview:""},Ib={},Jb={},Kb=0,Lb=0,Mb=!1,Nb=0,Ob=0,Pb=-1,Qb=!1,Rb={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40},Sb={"N , SPACE":"Next slide",P:"Previous slide","← , H":"Navigate left","→ , L":"Navigate right","↑ , K":"Navigate up","↓ , J":"Navigate down",Home:"First slide",End:"Last slide","B , .":"Pause",F:"Fullscreen","ESC, O":"Slide overview"};return pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&Jb.requestAnimationFrameMethod.call(window,this.animate.bind(this))},pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+2*a*Math.PI,g=-Math.PI/2+2*this.progressOffset*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},qb={initialize:a,configure:m,sync:da,slide:ca,left:Oa,right:Pa,up:Qa,down:Ra,prev:Sa,next:Ta,navigateFragment:Ha,prevFragment:Ja,nextFragment:Ia,navigateTo:ca,navigateLeft:Oa,navigateRight:Pa,navigateUp:Qa,navigateDown:Ra,navigatePrev:Sa,navigateNext:Ta,layout:L,availableRoutes:pa,availableFragments:qa,toggleOverview:U,togglePause:$,toggleAutoSlide:aa,isOverview:V,isPaused:_,isAutoSliding:ba,addEventListeners:n,removeEventListeners:o,getState:Ea,setState:Fa,getProgress:wa,getIndices:Aa,getTotalSlides:Ba,getSlide:Ca,getSlideBackground:Da,getPreviousSlide:function(){return tb},getCurrentSlide:function(){return ub},getScale:function(){return Gb},getConfig:function(){return Cb},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=r(unescape(c))}return a},isFirstSlide:function(){return 0===rb&&0===sb},isLastSlide:function(){return ub?ub.nextElementSibling?!1:W(ub)&&ub.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return Db},addEventListener:function(a,b,c){"addEventListener"in window&&(Ib.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(Ib.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)},triggerKey:function(a){Wa({keyCode:a})}}}); /** * React (with addons) v0.14.3 * * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define('filter_poodll/react-with-addons', [],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!u&&s)return s(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i8&&11>=x),T=32,M=String.fromCharCode(T),N=f.topLevelTypes,w={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[N.topCompositionEnd,N.topKeyPress,N.topTextInput,N.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[N.topBlur,N.topCompositionEnd,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[N.topBlur,N.topCompositionStart,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[N.topBlur,N.topCompositionUpdate,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]}},S=!1,R=null,I={eventTypes:w,extractEvents:function(e,t,n,r,o){return[l(e,t,n,r,o),d(e,t,n,r,o)]}};t.exports=I},{100:100,104:104,144:144,15:15,163:163,19:19,20:20}],4:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},a=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){a.forEach(function(t){o[r(t,e)]=o[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},u={isUnitlessNumber:o,shorthandPropertyExpansions:i};t.exports=u},{}],5:[function(e,t,n){"use strict";var r=e(4),o=e(144),a=e(76),i=(e(146),e(116)),u=e(157),s=e(165),l=(e(168),s(function(e){return u(e)})),c=!1,p="cssFloat";if(o.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(f){c=!0}void 0===document.documentElement.style.cssFloat&&(p="styleFloat")}var h={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=l(n)+":",t+=i(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var o in t)if(t.hasOwnProperty(o)){var a=i(o,t[o]);if("float"===o&&(o=p),a)n[o]=a;else{var u=c&&r.shorthandPropertyExpansions[o];if(u)for(var s in u)n[s]="";else n[o]=""}}}};a.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),t.exports=h},{116:116,144:144,146:146,157:157,165:165,168:168,4:4,76:76}],6:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(25),a=e(24),i=e(158);a(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?i(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n8));var A=!1;E.canUseDOM&&(A=P("input")&&(!("documentMode"in document)||document.documentMode>9));var L={get:function(){return k.get.call(this)},set:function(e){I=""+e,k.set.call(this,e)}},U={eventTypes:w,extractEvents:function(e,t,n,o,a){var i,u;if(r(t)?O?i=s:u=l:T(t)?A?i=f:(i=v,u=h):m(t)&&(i=g),i){var c=i(e,t,n);if(c){var p=x.getPooled(w.change,c,o,a);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}u&&u(e,t,n)}};t.exports=U},{102:102,125:125,130:130,131:131,144:144,15:15,16:16,163:163,19:19,93:93}],8:[function(e,t,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};t.exports=o},{}],9:[function(e,t,n){"use strict";function r(e,t,n){var r=n>=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=e(12),a=e(72),i=e(76),u=e(135),s=e(136),l=e(158),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:s,processUpdates:function(e,t){for(var n,i=null,c=null,p=0;pt||e.hasOverloadedBooleanValue&&t===!1}var a=e(10),i=e(76),u=e(133),s=(e(168),/^[a-zA-Z_][\w\.\-]*$/),l={},c={},p={createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+u(e)},setAttributeForID:function(e,t){e.setAttribute(a.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+u(t)}return a.isCustomAttribute(e)?null==t?"":e+"="+u(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+u(t):""},setValueForProperty:function(e,t,n){var r=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(r){var i=r.mutationMethod;if(i)i(e,n);else if(o(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var u=r.attributeName,s=r.attributeNamespace;s?e.setAttributeNS(s,u,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(u,""):e.setAttribute(u,""+n)}else{var l=r.propertyName;r.hasSideEffects&&""+e[l]==""+n||(e[l]=n)}}else a.isCustomAttribute(t)&&p.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var o=n.propertyName,i=a.getDefaultValueForProperty(e.nodeName,o);n.hasSideEffects&&""+e[o]===i||(e[o]=i)}}else a.isCustomAttribute(t)&&e.removeAttribute(t)}};i.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),t.exports=p},{10:10,133:133,168:168,76:76}],12:[function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e(144),a=e(149),i=e(150),u=e(154),s=e(158),l=/^(<[^ \/>]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){o.canUseDOM?void 0:s(!1);for(var t,n={},p=0;p-1?void 0:i(!1),!l.plugins[n]){t.extractEvents?void 0:i(!1),l.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?i(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];a(u,t,n)}return!0}return e.registrationName?(a(e.registrationName,t,n),!0):!1}function a(e,t,n){l.registrationNameModules[e]?i(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(158),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){u?i(!1):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?i(!1):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{158:158}],18:[function(e,t,n){"use strict";function r(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function o(e){return e===m.topMouseMove||e===m.topTouchMove}function a(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=v.Mount.getNode(r),t?f.invokeGuardedCallbackWithCatch(o,n,e,r):f.invokeGuardedCallback(o,n,e,r),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;oe&&n[e]===o[e];e++);var i=r-e;for(t=1;i>=t&&n[r-t]===o[a-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},{128:128,24:24,25:25}],21:[function(e,t,n){"use strict";var r,o=e(10),a=e(144),i=o.injection.MUST_USE_ATTRIBUTE,u=o.injection.MUST_USE_PROPERTY,s=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(a.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:i|s,allowTransparency:i,alt:null,async:s,autoComplete:null,autoPlay:s,capture:i|s,cellPadding:null,cellSpacing:null,charSet:i,challenge:i,checked:u|s,classID:i,className:r?i:u,cols:i|p,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:u|s,coords:null,crossOrigin:null,data:null,dateTime:i,"default":s,defer:s,dir:null,disabled:i|s,download:d,draggable:null,encType:null,form:i,formAction:i,formEncType:i,formMethod:i,formNoValidate:s,formTarget:i,frameBorder:i,headers:null,height:i,hidden:i|s,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:u,inputMode:i,integrity:null,is:i,keyParams:i,keyType:i,kind:null,label:null,lang:null,list:i,loop:u|s,low:null,manifest:i,marginHeight:null,marginWidth:null,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,minLength:i,multiple:u|s,muted:u|s,name:null,nonce:i,noValidate:s,open:s,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:u|s,rel:null,required:s,reversed:s,role:i,rows:i|p,rowSpan:null,sandbox:null,scope:null,scoped:s,scrolling:null,seamless:i|s,selected:u|s,shape:null,size:i|p,sizes:i,span:p,spellCheck:null,src:null,srcDoc:u,srcLang:null,srcSet:i,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:u|l,width:i,wmode:i,wrap:null,about:i,datatype:i,inlist:i,prefix:i,property:i,resource:i,"typeof":i,vocab:i,autoCapitalize:null,autoCorrect:null,autoSave:null,color:null,itemProp:i,itemScope:i|s,itemType:i,itemID:i,itemRef:i,results:null,security:i,unselectable:i},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=h},{10:10,144:144}],22:[function(e,t,n){"use strict";var r=e(68),o=e(88),a={linkState:function(e){return new r(this.state[e],o.createStateKeySetter(this,e))}};t.exports=a},{68:68,88:88}],23:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?l(!1):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?l(!1):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function i(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=e(80),s=e(79),l=e(158),c=(e(168),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},d={},f={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,s.prop);o instanceof Error&&!(o.message in d)&&(d[o.message]=!0,i(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=f},{158:158,168:168,79:79,80:80}],24:[function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o=0||null!=t.is}function m(e){h(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var g=e(2),y=e(5),C=e(10),b=e(11),E=e(15),_=e(28),x=e(35),D=e(41),P=e(46),T=e(47),M=e(48),N=e(52),w=e(70),S=e(71),R=e(76),I=e(92),k=e(24),O=e(114),A=e(118),L=e(158),U=(e(130),e(163)),F=e(135),B=e(136),V=(e(166),e(141),e(168),_.deleteListener),j=_.listenTo,W=_.registrationNameModules,K={string:!0,number:!0},q=U({children:null}),H=U({style:null}),z=U({__html:null}),Y=1,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},Q={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},X={listing:!0,pre:!0,textarea:!0},$=(k({menuitem:!0},Q),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),Z={},J={}.hasOwnProperty;m.displayName="ReactDOMComponent",m.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(p,this);break;case"button":r=D.getNativeProps(this,r,n);break;case"input":P.mountWrapper(this,r,n),r=P.getNativeProps(this,r,n);break;case"option":T.mountWrapper(this,r,n),r=T.getNativeProps(this,r,n);break;case"select":M.mountWrapper(this,r,n),r=M.getNativeProps(this,r,n),n=M.processChildContext(this,r,n);break;case"textarea":N.mountWrapper(this,r,n),r=N.getNativeProps(this,r,n)}s(this,r);var o;if(t.useCreateElement){var a=n[w.ownerDocumentContextKey],i=a.createElement(this._currentElement.type);b.setAttributeForID(i,this._rootNodeID),w.getID(i),this._updateDOMProperties({},r,t,i),this._createInitialChildren(t,r,n,i),o=i}else{var u=this._createOpenTagMarkupAndPutListeners(t,r),l=this._createContentMarkup(t,r,n);o=!l&&Q[this._tag]?u+"/>":u+">"+l+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(d,this);case"button":case"select":case"textarea":r.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this)}return o},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&l(this._rootNodeID,r,o,e);else{r===H&&(o&&(o=this._previousStyleCopy=k({},t.style)),o=y.createMarkupForStyles(o));var a=null;null!=this._tag&&v(this._tag,t)?r!==q&&(a=b.createMarkupForCustomAttribute(r,o)):a=b.createMarkupForProperty(r,o),a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n;var i=b.createMarkupForID(this._rootNodeID);return n+" "+i},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=K[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=A(a);else if(null!=i){var u=this.mountChildren(i,e,n);r=u.join("")}}return X[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&F(r,o.__html);else{var a=K[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)B(r,a);else if(null!=i)for(var u=this.mountChildren(i,e,n),s=0;st.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var u=l(e,o),s=l(e,a);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=e(144),l=e(127),c=e(128),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:u};t.exports=d},{127:127,128:128,144:144}],50:[function(e,t,n){"use strict";var r=e(54),o=e(86),a=e(94);r.inject();var i={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:a};t.exports=i},{54:54,86:86,94:94}],51:[function(e,t,n){"use strict";var r=e(9),o=e(11),a=e(35),i=e(70),u=e(24),s=e(118),l=e(136),c=(e(141),function(e){});u(c.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){if(this._rootNodeID=e,t.useCreateElement){var r=n[i.ownerDocumentContextKey],a=r.createElement("span");return o.setAttributeForID(a,e),i.getID(a),l(a,this._stringText),a}var u=s(this._stringText);return t.renderToStaticMarkup?u:""+u+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=i.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=c},{11:11,118:118,136:136,141:141,24:24,35:35,70:70,9:9}],52:[function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=a.executeOnChange(t,e);return u.asap(r,this),n}var a=e(23),i=e(45),u=e(93),s=e(24),l=e(158),c=(e(168),{getNativeProps:function(e,t,n){null!=t.dangerouslySetInnerHTML?l(!1):void 0;var r=s({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return r},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?l(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:l(!1),r=r[0]),n=""+r),null==n&&(n="");var i=a.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=a.getValue(t);null!=n&&i.updatePropertyByID(e._rootNodeID,"value",""+n)}});t.exports=c},{158:158,168:168,23:23,24:24,45:45,93:93}],53:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(93),a=e(110),i=e(24),u=e(150),s={initialize:u,close:function(){d.isBatchingUpdates=!1}},l={initialize:u,close:o.flushBatchedUpdates.bind(o)},c=[l,s];i(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};t.exports=d},{110:110,150:150,24:24,93:93}],54:[function(e,t,n){"use strict";function r(){P||(P=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(u),g.EventPluginHub.injectInstanceHandle(y),g.EventPluginHub.injectMount(C),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:x,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:E,BeforeInputEventPlugin:o}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(v),g.Class.injectMixin(p),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(D),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(b),g.Updates.injectBatchingStrategy(f),g.RootIndex.injectCreateReactRootIndex(l.canUseDOM?i.createReactRootIndex:_.createReactRootIndex),g.Component.injectEnvironment(d))}var o=e(3),a=e(7),i=e(8),u=e(13),s=e(14),l=e(144),c=e(21),p=e(27),d=e(35),f=e(53),h=e(42),v=e(51),m=e(61),g=e(63),y=e(65),C=e(70),b=e(81),E=e(96),_=e(97),x=e(98),D=e(95),P=!1;t.exports={inject:r}},{13:13,14:14,144:144,21:21,27:27,3:3,35:35,42:42,51:51,53:53,61:61,63:63,65:65,7:7,70:70,8:8,81:81,95:95,96:96,97:97,98:98}],55:[function(e,t,n){"use strict";var r=e(39),o=e(24),a=(e(114),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),i={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,i,u){var s={$$typeof:a,type:e,key:t,ref:n,props:u,_owner:i};return s};u.createElement=function(e,t,n){var o,a={},s=null,l=null,c=null,p=null;if(null!=t){l=void 0===t.ref?null:t.ref,s=void 0===t.key?null:""+t.key,c=void 0===t.__self?null:t.__self,p=void 0===t.__source?null:t.__source;for(o in t)t.hasOwnProperty(o)&&!i.hasOwnProperty(o)&&(a[o]=t[o])}var d=arguments.length-2;if(1===d)a.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];a.children=f}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)"undefined"==typeof a[o]&&(a[o]=v[o])}return u(e,s,l,c,p,r.current,a)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){var n=u(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},u.cloneAndReplaceProps=function(e,t){var n=u(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},u.cloneElement=function(e,t,n){var a,s=o({},e.props),l=e.key,c=e.ref,p=e._self,d=e._source,f=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,f=r.current),void 0!==t.key&&(l=""+t.key);for(a in t)t.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(s[a]=t[a])}var h=arguments.length-2;if(1===h)s.children=n;else if(h>1){for(var v=Array(h),m=0;h>m;m++)v[m]=arguments[m+2];s.children=v}return u(e.type,l,c,p,d,f,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.exports=u},{114:114,24:24,39:39}],56:[function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,a("uniqueKey",e,t))}function a(e,t,n){var o=r();if(!o){var a="string"==typeof n?n:n.displayName||n.name;a&&(o=" Check the top-level render call using <"+a+">.")}var i=h[e]||(h[e]={});if(i[o])return null;i[o]=!0;var u={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(u.childOwner=" It was passed a child from "+t._owner.getName()+"."),u}function i(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n=i;i++)if(o(e,i)&&o(t,i))r=i;else if(e.charAt(i)!==t.charAt(i))break;var u=e.substr(0,r);return a(u)?void 0:d(!1),u}function c(e,t,n,r,o,a){e=e||"",t=t||"",e===t?d(!1):void 0;var l=i(t,e);l||i(e,t)?void 0:d(!1);for(var c=0,p=l?u:s,f=e;;f=p(f,t)){var h;if(o&&f===e||a&&f===t||(h=n(f,l,r)),h===!1||f===t)break;c++1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var a=l(e,t);a!==e&&c(e,a,n,r,!1,!0),a!==t&&c(a,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:f};t.exports=m},{158:158,84:84}],66:[function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=r},{}],67:[function(e,t,n){"use strict";var r=e(32),o=e(34),a=e(33),i=e(43),u=e(55),s=(e(56),e(80)),l=e(94),c=e(24),p=e(132),d=u.createElement,f=u.createFactory,h=u.cloneElement,v={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:p},Component:o,createElement:d,cloneElement:h,isValidElement:u.isValidElement,PropTypes:s,createClass:a.createClass,createFactory:f,createMixin:function(e){return e},DOM:i,version:l,__spread:c};t.exports=v},{132:132,24:24,32:32,33:33,34:34,43:43,55:55,56:56,80:80,94:94}],68:[function(e,t,n){"use strict";function r(e,t){this.value=e,this.requestChange=t}function o(e){var t={value:"undefined"==typeof e?a.PropTypes.any.isRequired:e.isRequired,requestChange:a.PropTypes.func.isRequired};return a.PropTypes.shape(t)}var a=e(26);r.PropTypes={link:o},t.exports=r},{26:26}],69:[function(e,t,n){"use strict";var r=e(113),o=/\/?>/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=a},{113:113}],70:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function a(e){var t=o(e);return t&&X.getID(t)}function i(e){var t=u(e);if(t)if(V.hasOwnProperty(t)){var n=V[t];n!==e&&(p(n,t)?L(!1):void 0,V[t]=e)}else V[t]=e;return t}function u(e){return e&&e.getAttribute&&e.getAttribute(B)||""}function s(e,t){var n=u(e);n!==t&&delete V[n],e.setAttribute(B,t),V[t]=e}function l(e){return V.hasOwnProperty(e)&&p(V[e],e)||(V[e]=X.findReactNodeByID(e)),V[e]}function c(e){var t=T.get(e)._rootNodeID;return D.isNullComponentID(t)?null:(V.hasOwnProperty(t)&&p(V[t],t)||(V[t]=X.findReactNodeByID(t)),V[t])}function p(e,t){if(e){u(e)!==t?L(!1):void 0;var n=X.findReactContainerForID(t);if(n&&O(n,e))return!0}return!1}function d(e){delete V[e]}function f(e){var t=V[e];return t&&p(t,e)?void(G=t):!1}function h(e){G=null,P.traverseAncestors(e,f);var t=G;return G=null,t}function v(e,t,n,r,o,a){_.useCreateElement&&(a=I({},a),n.nodeType===W?a[q]=n:a[q]=n.ownerDocument);var i=w.mountComponent(e,t,r,a);e._renderedComponent._topLevelWrapper=e,X._mountImageIntoNode(i,n,o,r)}function m(e,t,n,r,o){var a=R.ReactReconcileTransaction.getPooled(r);a.perform(v,null,e,t,n,a,r,o),R.ReactReconcileTransaction.release(a)}function g(e,t){for(w.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=a(e);return t?t!==P.getReactRootIDFromNodeID(t):!1}function C(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=u(e);if(t){var n,r=P.getReactRootIDFromNodeID(t),o=e;do if(n=u(o),o=o.parentNode,null==o)return null;while(n!==r);if(o===z[r])return e}}return null}var b=e(10),E=e(28),_=(e(39),e(44)),x=e(55),D=e(58),P=e(65),T=e(66),M=e(69),N=e(76),w=e(82),S=e(92),R=e(93),I=e(24),k=e(151),O=e(147),A=e(129),L=e(158),U=e(135),F=e(138),B=(e(141),e(168),b.ID_ATTRIBUTE_NAME),V={},j=1,W=9,K=11,q="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),H={},z={},Y=[],G=null,Q=function(){};Q.prototype.isReactComponent={},Q.prototype.render=function(){return this.props};var X={TopLevelWrapper:Q,_instancesByReactRootID:H,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return X.scrollMonitor(n,function(){S.enqueueElementInternal(e,t),r&&S.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==j&&t.nodeType!==W&&t.nodeType!==K?L(!1):void 0,E.ensureScrollValueMonitoring();var n=X.registerContainer(t);return H[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var o=A(e,null),a=X._registerComponent(o,t);return R.batchedUpdates(m,o,a,t,n,r),o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?L(!1):void 0,X._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){x.isValidElement(t)?void 0:L(!1);var i=new x(Q,null,null,null,null,null,t),s=H[a(n)];if(s){var l=s._currentElement,c=l.props;if(F(c,t)){var p=s._renderedComponent.getPublicInstance(),d=r&&function(){r.call(p)};return X._updateRootComponent(s,i,n,d),p}X.unmountComponentAtNode(n)}var f=o(n),h=f&&!!u(f),v=y(n),m=h&&!s&&!v,g=X._renderNewRootComponent(i,n,m,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):k)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return X._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=a(e);return t&&(t=P.getReactRootIDFromNodeID(t)),t||(t=P.createReactRootID()),z[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==j&&e.nodeType!==W&&e.nodeType!==K?L(!1):void 0;var t=a(e),n=H[t];if(!n){var r=(y(e),u(e));return r&&r===P.getReactRootIDFromNodeID(r),!1}return R.batchedUpdates(g,n,e),delete H[t],delete z[t],!0},findReactContainerForID:function(e){var t=P.getReactRootIDFromNodeID(e),n=z[t];return n},findReactNodeByID:function(e){var t=X.findReactContainerForID(e);return X.findComponentRoot(t,e)},getFirstReactDOM:function(e){return C(e)},findComponentRoot:function(e,t){var n=Y,r=0,o=h(t)||e;for(n[0]=o.firstChild,n.length=1;r>"}var y=e(55),C=e(78),b=e(150),E=e(126),_="<>",x={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:a(),arrayOf:i,element:u(),instanceOf:s,node:d(),objectOf:c,oneOf:l,oneOfType:p,shape:f};t.exports=x},{126:126,150:150,55:55,78:78}],81:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=!e&&u.useCreateElement}var o=e(6),a=e(25),i=e(28),u=e(44),s=e(64),l=e(110),c=e(24),p={initialize:s.getSelectionInformation,close:s.restoreSelection},d={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],v={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};c(r.prototype,l.Mixin,v),a.addPoolingTo(r),t.exports=r},{110:110,24:24,25:25,28:28,44:44,6:6,64:64}],82:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(83),a={mountComponent:function(e,t,n,o){var a=e.mountComponent(t,n,o);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),a},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var u=o.shouldUpdateRefs(i,t);u&&o.detachRefs(e,i),e.receiveComponent(t,n,a),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};t.exports=a},{83:83}],83:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=e(75),i={};i.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},i.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=i},{75:75}],84:[function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:r};t.exports=o},{}],85:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],86:[function(e,t,n){"use strict";function r(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!1),t.perform(function(){var r=f(e,null),o=r.mountComponent(n,t,d);return s.addChecksumToMarkup(o)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}function o(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!0),t.perform(function(){var r=f(e,null);return r.mountComponent(n,t,d)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}var a=e(53),i=e(55),u=e(65),s=e(69),l=e(85),c=e(87),p=e(93),d=e(151),f=e(129),h=e(158);t.exports={renderToString:r,renderToStaticMarkup:o}},{129:129,151:151,158:158,53:53,55:55,65:65,69:69,85:85,87:87,93:93}],87:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=a.getPooled(null),this.useCreateElement=!1}var o=e(25),a=e(6),i=e(110),u=e(24),s=e(150),l={initialize:function(){this.reactMountReady.reset()},close:s},c=[l],p={getTransactionWrappers:function(){return c},getReactMountReady:function(){return this.reactMountReady},destructor:function(){a.release(this.reactMountReady),this.reactMountReady=null}};u(r.prototype,i.Mixin,p),o.addPoolingTo(r),t.exports=r},{110:110,150:150,24:24,25:25,6:6}],88:[function(e,t,n){"use strict";function r(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var o={createStateSetter:function(e,t){return function(n,r,o,a,i,u){var s=t.call(e,n,r,o,a,i,u);s&&e.setState(s)}},createStateKeySetter:function(e,t){var n=e.__keySetters||(e.__keySetters={});return n[t]||(n[t]=r(e,t))}};o.Mixin={createStateSetter:function(e){return o.createStateSetter(this,e)},createStateKeySetter:function(e){return o.createStateKeySetter(this,e)}},t.exports=o},{}],89:[function(e,t,n){"use strict";var r=e(120),o={getChildMapping:function(e){return e?r(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var a in e)t.hasOwnProperty(a)?o.length&&(r[a]=o,o=[]):o.push(a);var i,u={};for(var s in t){if(r.hasOwnProperty(s))for(i=0;in;n++){var r=g[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,f.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;ar;){for(;rr;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;t.exports=r},{}],114:[function(e,t,n){"use strict";var r=!1;t.exports=r},{}],115:[function(e,t,n){"use strict";function r(e,t){var n=a.mergeProps(t,e.props);return!n.hasOwnProperty(u)&&e.props.hasOwnProperty(u)&&(n.children=e.props.children),o.createElement(e.type,n)}var o=e(55),a=e(77),i=e(163),u=(e(168),i({children:null}));t.exports=r},{163:163,168:168,55:55,77:77}],116:[function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||a.hasOwnProperty(e)&&a[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e(4),a=o.isUnitlessNumber;t.exports=r},{4:4}],117:[function(e,t,n){"use strict";function r(e,t,n,r,o){return o}e(24),e(168);t.exports=r},{168:168,24:24}],118:[function(e,t,n){"use strict";function r(e){return a[e]}function o(e){return(""+e).replace(i,r)}var a={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=o},{}],119:[function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:o.has(e)?a.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?i(!1):void 0,void i(!1))}var o=(e(39),e(66)),a=e(70),i=e(158);e(168);t.exports=r},{158:158,168:168,39:39,66:66,70:70}],120:[function(e,t,n){"use strict";function r(e,t,n){var r=e,o=void 0===r[n];o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return a(e,r,t),t}var a=e(139);e(168);t.exports=o},{139:139,168:168}],121:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],122:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],123:[function(e,t,n){"use strict";function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=e(122),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{122:122}],124:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=a[e];return r?!!n[r]:!1}function o(e){return r}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],125:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=r},{}],126:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[a]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,a="@@iterator";t.exports=r},{}],127:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var n=r(e),a=0,i=0;n;){if(3===n.nodeType){if(i=a+n.textContent.length,t>=a&&i>=t)return{node:n,offset:t-a};a=i}n=r(o(n))}}t.exports=a},{}],128:[function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=e(144),a=null;t.exports=r},{144:144}],129:[function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e){var t;if(null===e||e===!1)t=new i(o);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?l(!1):void 0,t="string"==typeof n.type?u.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=u.createInstanceForText(e):l(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var a=e(38),i=e(57),u=e(73),s=e(24),l=e(158),c=(e(168),function(){});s(c.prototype,a.Mixin,{_instantiateReactComponent:o}),t.exports=o},{158:158,168:168,24:24,38:38,57:57,73:73}],130:[function(e,t,n){"use strict";function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=e(144);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{144:144}],131:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&o[e.type]||"textarea"===t)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},{}],132:[function(e,t,n){"use strict";function r(e){return o.isValidElement(e)?void 0:a(!1),e}var o=e(55),a=e(158);t.exports=r},{158:158,55:55}],133:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(118);t.exports=r},{118:118}],134:[function(e,t,n){"use strict";var r=e(70);t.exports=r.renderSubtreeIntoContainer},{70:70}],135:[function(e,t,n){"use strict";var r=e(144),o=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(i=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var u=document.createElement("div");u.innerHTML=" ",""===u.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&a.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{144:144}],136:[function(e,t,n){"use strict";var r=e(144),o=e(118),a=e(135),i=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),t.exports=i},{118:118,135:135,144:144}],137:[function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=e(166);t.exports=r},{166:166}],138:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}t.exports=r},{}],139:[function(e,t,n){"use strict";function r(e){return v[e]}function o(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function a(e){return(""+e).replace(m,r)}function i(e){return"$"+a(e)}function u(e,t,n,r){var a=typeof e;if(("undefined"===a||"boolean"===a)&&(e=null),null===e||"string"===a||"number"===a||l.isValidElement(e))return n(r,e,""===t?f+o(e,0):t),1;var s,c,v=0,m=""===t?f:t+h;if(Array.isArray(e))for(var g=0;g-1}};t.exports=o},{158:158}],143:[function(e,t,n){"use strict";var r=e(150),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{150:150}],144:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],145:[function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],146:[function(e,t,n){"use strict";function r(e){return o(e.replace(a,"ms-"))}var o=e(145),a=/^-ms-/;t.exports=r},{145:145}],147:[function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,a=t;if(n=!1,r&&a){if(r===a)return!0;if(o(r))return!1;if(o(a)){e=r,t=a.parentNode,n=!0;continue e}return r.contains?r.contains(a):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(a)):!1}return!1}}var o=e(160);t.exports=r},{160:160}],148:[function(e,t,n){"use strict";function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return r(e)?Array.isArray(e)?e.slice():a(e):[e]}var a=e(167);t.exports=o},{167:167}],149:[function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=l;l?void 0:s(!1);var o=r(e),a=o&&u(o);if(a){n.innerHTML=a[1]+e+a[2];for(var c=a[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:s(!1),i(p).forEach(t));for(var d=i(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var a=e(144),i=e(148),u=e(154),s=e(158),l=a.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{144:144,148:148,154:154,158:158}],150:[function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],151:[function(e,t,n){"use strict";var r={};t.exports=r},{}],152:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],153:[function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],154:[function(e,t,n){"use strict";function r(e){return i?void 0:a(!1),d.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?i.innerHTML="":i.innerHTML="<"+e+">",u[e]=!i.firstChild),u[e]?d[e]:null}var o=e(144),a=e(158),i=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,u[e]=!0}),t.exports=r},{144:144,158:158}],155:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],156:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],157:[function(e,t,n){"use strict";function r(e){return o(e).replace(a,"-ms-")}var o=e(156),a=/^ms-/;t.exports=r},{156:156}],158:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw s.framesToPop=1,s}};t.exports=r},{}],159:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],160:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(159);t.exports=r},{159:159}],161:[function(e,t,n){"use strict";function r(e){e||(e="");var t,n=arguments.length;if(n>1)for(var r=1;n>r;r++)t=arguments[r],t&&(e=(e?e+" ":"")+t);return e}t.exports=r},{}],162:[function(e,t,n){"use strict";var r=e(158),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{158:158}],163:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],164:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var a in e)o.call(e,a)&&(r[a]=t.call(n,e[a],a,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],165:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],166:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=o.bind(t),i=0;ia;a++)r[a]=e[a];return r}var o=e(158);t.exports=r},{158:158}],168:[function(e,t,n){"use strict";var r=e(150),o=r;t.exports=o},{150:150}]},{},[1])(1)}); !function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define('filter_poodll/literallycanvas', t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.LC=t()}}(function(){return function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){var h="function"==typeof require&&require;if(!a&&h)return h(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return r(n?n:t)},l,l.exports,t,e,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;se;e++)if(e in this&&this[e]===t)return e;return-1};a=t("./actions"),h=t("./bindEvents"),c=t("./math"),y=t("./shapes"),l=y.createShape,g=y.shapeToJSON,r=y.JSONToShape,u=t("./canvasRenderer").renderShapeToContext,p=t("./svgRenderer").renderShapeToSVG,d=t("./renderSnapshotToImage"),f=t("./renderSnapshotToSVG"),s=t("../tools/Pencil"),m=t("./util"),i="infinite",e.exports=o=function(){function t(t,e){this.containerEl=t,this.setImageSize=S(this.setImageSize,this),this._unsubscribeEvents=h(this,this.containerEl,e.keyboardShortcuts),this.opts=e,this.config={zoomMin:e.zoomMin||.2,zoomMax:e.zoomMax||4,zoomStep:e.zoomStep||.2},this.colors={primary:e.primaryColor||"#000",secondary:e.secondaryColor||"#fff",background:e.backgroundColor||"transparent"},this.containerEl.style["background-color"]=this.colors.background,this.watermarkImage=e.watermarkImage,this.watermarkScale=e.watermarkScale||1,this.backgroundCanvas=document.createElement("canvas"),this.backgroundCtx=this.backgroundCanvas.getContext("2d"),this.containerEl.appendChild(this.backgroundCanvas),this.backgroundShapes=e.backgroundShapes||[],this._shapesInProgress=[],this.canvas=document.createElement("canvas"),this.canvas.style["background-color"]="transparent",this.containerEl.appendChild(this.canvas),this.buffer=document.createElement("canvas"),this.buffer.style["background-color"]="transparent",this.ctx=this.canvas.getContext("2d"),this.bufferCtx=this.buffer.getContext("2d"),this.backingScale=m.getBackingScale(this.ctx),this.shapes=[],this.undoStack=[],this.redoStack=[],this.isDragging=!1,this.position={x:0,y:0},this.scale=1,this.tool=new this.opts.tools[0](this),this.width=e.imageSize.width||i,this.height=e.imageSize.height||i,this.setZoom(this.scale),m.matchElementSize(this.containerEl,[this.backgroundCanvas,this.canvas],this.backingScale,function(t){return function(){return t.keepPanInImageBounds(),t.repaintAllLayers()}}(this)),this.watermarkImage&&(this.watermarkImage.onload=function(t){return function(){return t.repaintLayer("background")}}(this)),e.snapshot&&this.loadSnapshot(e.snapshot)}return t.prototype._teardown=function(){return this.tool.willBecomeInactive(this),this.tool=null,this._unsubscribeEvents()},t.prototype.trigger=function(t,e){return this.canvas.dispatchEvent(new CustomEvent(t,{detail:e})),null},t.prototype.on=function(t,e){var n;return n=function(t){return e(t.detail)},this.canvas.addEventListener(t,n),function(e){return function(){return e.canvas.removeEventListener(t,n)}}(this)},t.prototype.getRenderScale=function(){return this.scale*this.backingScale},t.prototype.clientCoordsToDrawingCoords=function(t,e){return{x:(t*this.backingScale-this.position.x)/this.getRenderScale(),y:(e*this.backingScale-this.position.y)/this.getRenderScale()}},t.prototype.drawingCoordsToClientCoords=function(t,e){return{x:t*this.getRenderScale()+this.position.x,y:e*this.getRenderScale()+this.position.y}},t.prototype.setImageSize=function(t,e){return this.width=t||i,this.height=e||i,this.keepPanInImageBounds(),this.repaintAllLayers(),this.trigger("imageSizeChange",{width:this.width,height:this.height})},t.prototype.setTool=function(t){return this.tool.willBecomeInactive(this),this.tool=t,this.trigger("toolChange",{tool:t}),t.didBecomeActive(this)},t.prototype.setShapesInProgress=function(t){return this._shapesInProgress=t},t.prototype.pointerDown=function(t,e){var n;return n=this.clientCoordsToDrawingCoords(t,e),this.tool.usesSimpleAPI?(this.tool.begin(n.x,n.y,this),this.isDragging=!0,this.trigger("drawStart",{tool:this.tool})):(this.isDragging=!0,this.trigger("lc-pointerdown",{tool:this.tool,x:n.x,y:n.y,rawX:t,rawY:e}))},t.prototype.pointerMove=function(t,e){return m.requestAnimationFrame(function(n){return function(){var i;return i=n.clientCoordsToDrawingCoords(t,e),n.tool.usesSimpleAPI?n.isDragging?(n.tool["continue"](i.x,i.y,n),n.trigger("drawContinue",{tool:n.tool})):void 0:n.isDragging?n.trigger("lc-pointerdrag",{tool:n.tool,x:i.x,y:i.y,rawX:t,rawY:e}):n.trigger("lc-pointermove",{tool:n.tool,x:i.x,y:i.y,rawX:t,rawY:e})}}(this))},t.prototype.pointerUp=function(t,e){var n;return n=this.clientCoordsToDrawingCoords(t,e),this.tool.usesSimpleAPI?this.isDragging?(this.tool.end(n.x,n.y,this),this.isDragging=!1,this.trigger("drawEnd",{tool:this.tool})):void 0:(this.isDragging=!1,this.trigger("lc-pointerup",{tool:this.tool,x:n.x,y:n.y,rawX:t,rawY:e}))},t.prototype.setColor=function(t,e){switch(this.colors[t]=e,t){case"background":this.containerEl.style.backgroundColor=this.colors.background,this.repaintLayer("background");break;case"primary":this.repaintLayer("main");break;case"secondary":this.repaintLayer("main")}return this.trigger(""+t+"ColorChange",this.colors[t]),"background"===t?this.trigger("drawingChange"):void 0},t.prototype.getColor=function(t){return this.colors[t]},t.prototype.saveShape=function(t,e,n){return null==e&&(e=!0),null==n&&(n=null),n||(n=this.shapes.length?this.shapes[this.shapes.length-1].id:null),this.execute(new a.AddShapeAction(this,t,n)),e&&this.trigger("shapeSave",{shape:t,previousShapeId:n}),this.trigger("drawingChange")},t.prototype.pan=function(t,e){return this.setPan(this.position.x-t,this.position.y-e)},t.prototype.keepPanInImageBounds=function(){var t,e,n,r;return t=this.getRenderScale(),r=this.position,e=r.x,n=r.y,this.width!==i&&(e=this.canvas.width>this.width*t?(this.canvas.width-this.width*t)/2:Math.max(Math.min(0,e),this.canvas.width-this.width*t)),this.height!==i&&(n=this.canvas.height>this.height*t?(this.canvas.height-this.height*t)/2:Math.max(Math.min(0,n),this.canvas.height-this.height*t)),this.position={x:e,y:n}},t.prototype.setPan=function(t,e){return this.position={x:t,y:e},this.keepPanInImageBounds(),this.repaintAllLayers(),this.trigger("pan",{x:this.position.x,y:this.position.y})},t.prototype.zoom=function(t){var e;return e=this.scale+t,e=Math.max(e,this.config.zoomMin),e=Math.min(e,this.config.zoomMax),e=Math.round(100*e)/100,this.setZoom(e)},t.prototype.setZoom=function(t){var e;return e=this.scale,this.scale=t,this.position.x=c.scalePositionScalar(this.position.x,this.canvas.width,e,this.scale),this.position.y=c.scalePositionScalar(this.position.y,this.canvas.height,e,this.scale),this.keepPanInImageBounds(),this.repaintAllLayers(),this.trigger("zoom",{oldScale:e,newScale:this.scale})},t.prototype.repaintAllLayers=function(){var t,e,n,i;for(i=["background","main"],e=0,n=i.length;n>e;e++)t=i[e],this.repaintLayer(t);return null},t.prototype.repaintLayer=function(t,e){var n;switch(null==e&&(e="main"===t),t){case"background":this.backgroundCtx.clearRect(0,0,this.backgroundCanvas.width,this.backgroundCanvas.height),n=function(t){return function(){return t.repaintLayer("background")}}(this),this.watermarkImage&&this._renderWatermark(this.backgroundCtx,!0,n),this.draw(this.backgroundShapes,this.backgroundCtx,n);break;case"main":n=function(t){return function(){return t.repaintLayer("main",!0)}}(this),e&&(this.buffer.width=this.canvas.width,this.buffer.height=this.canvas.height,this.bufferCtx.clearRect(0,0,this.buffer.width,this.buffer.height),this.draw(this.shapes,this.bufferCtx,n)),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.canvas.width>0&&this.canvas.height>0&&(this.ctx.fillStyle="#ccc",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height),this.clipped(function(t){return function(){return t.ctx.clearRect(0,0,t.canvas.width,t.canvas.height),t.ctx.drawImage(t.buffer,0,0)}}(this),this.ctx),this.clipped(function(t){return function(){return t.transformed(function(){var e,n,i,r,o;for(r=t._shapesInProgress,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(u(t.ctx,e,{bufferCtx:t.bufferCtx,shouldOnlyDrawLatest:!0}));return o},t.ctx,t.bufferCtx)}}(this),this.ctx,this.bufferCtx))}return this.trigger("repaint",{layerKey:t})},t.prototype._renderWatermark=function(t,e,n){return null==e&&(e=!0),this.watermarkImage.width?(t.save(),t.translate(t.canvas.width/2,t.canvas.height/2),t.scale(this.watermarkScale,this.watermarkScale),e&&t.scale(this.backingScale,this.backingScale),t.drawImage(this.watermarkImage,-this.watermarkImage.width/2,-this.watermarkImage.height/2),t.restore()):void(this.watermarkImage.onload=n)},t.prototype.drawShapeInProgress=function(t){return this.repaintLayer("main",!1),this.clipped(function(e){return function(){return e.transformed(function(){return u(e.ctx,t,{bufferCtx:e.bufferCtx,shouldOnlyDrawLatest:!0})},e.ctx,e.bufferCtx)}}(this),this.ctx,this.bufferCtx)},t.prototype.draw=function(t,e,n){var i;if(t.length)return i=function(i){return function(){var i,r,o,s;for(s=[],r=0,o=t.length;o>r;r++)i=t[r],s.push(u(e,i,{retryCallback:n}));return s}}(this),this.clipped(function(t){return function(){return t.transformed(i,e)}}(this),e)},t.prototype.clipped=function(){var t,e,n,r,o,s,a,h,l,c,u,p;for(n=arguments[0],t=2<=arguments.length?v.call(arguments,1):[],s=this.width===i?0:this.position.x,a=this.height===i?0:this.position.y,o=function(){switch(this.width){case i:return this.canvas.width;default:return this.width*this.getRenderScale()}}.call(this),r=function(){switch(this.height){case i:return this.canvas.height;default:return this.height*this.getRenderScale()}}.call(this),h=0,c=t.length;c>h;h++)e=t[h],e.save(),e.beginPath(),e.rect(s,a,o,r),e.clip();for(n(),p=[],l=0,u=t.length;u>l;l++)e=t[l],p.push(e.restore());return p},t.prototype.transformed=function(){var t,e,n,i,r,o,s,a,h;for(n=arguments[0],t=2<=arguments.length?v.call(arguments,1):[],r=0,s=t.length;s>r;r++)e=t[r],e.save(),e.translate(Math.floor(this.position.x),Math.floor(this.position.y)),i=this.getRenderScale(),e.scale(i,i);for(n(),h=[],o=0,a=t.length;a>o;o++)e=t[o],h.push(e.restore());return h},t.prototype.clear=function(){var t,e;return e=this.shapes,t=[],this.execute(new a.ClearAction(this,e,t)),this.repaintLayer("main"),this.trigger("clear",null),this.trigger("drawingChange",{})},t.prototype.execute=function(t){return this.undoStack.push(t),t["do"](),this.redoStack=[]},t.prototype.undo=function(){var t;if(this.undoStack.length)return t=this.undoStack.pop(),t.undo(),this.redoStack.push(t),this.trigger("undo",{action:t}),this.trigger("drawingChange",{})},t.prototype.redo=function(){var t;if(this.redoStack.length)return t=this.redoStack.pop(),this.undoStack.push(t),t["do"](),this.trigger("redo",{action:t}),this.trigger("drawingChange",{})},t.prototype.canUndo=function(){return!!this.undoStack.length},t.prototype.canRedo=function(){return!!this.redoStack.length},t.prototype.getPixel=function(t,e){var n,i;return n=this.drawingCoordsToClientCoords(t,e),i=this.ctx.getImageData(n.x,n.y,1,1).data,i[3]?"rgb("+i[0]+", "+i[1]+", "+i[2]+")":null},t.prototype.getContentBounds=function(){return m.getBoundingRect(this.shapes.concat(this.backgroundShapes).map(function(t){return t.getBoundingRect()}),this.width===i?0:this.width,this.height===i?0:this.height)},t.prototype.getImage=function(t){return null==t&&(t={}),null==t.includeWatermark&&(t.includeWatermark=!0),null==t.scaleDownRetina&&(t.scaleDownRetina=!0),null==t.scale&&(t.scale=1),t.scaleDownRetina||(t.scale*=this.backingScale),t.includeWatermark&&(t.watermarkImage=this.watermarkImage,t.watermarkScale=this.watermarkScale,t.scaleDownRetina||(t.watermarkScale*=this.backingScale)),d(this.getSnapshot(),t)},t.prototype.canvasForExport=function(){return this.repaintAllLayers(),m.combineCanvases(this.backgroundCanvas,this.canvas)},t.prototype.canvasWithBackground=function(t){return m.combineCanvases(t,this.canvasForExport())},t.prototype.getSnapshot=function(t){var e,n,i,r,o,s;for(null==t&&(t=null),null==t&&(t=["shapes","imageSize","colors","position","scale","backgroundShapes"]),i={},s=["colors","position","scale"],r=0,o=s.length;o>r;r++)e=s[r],x.call(t,e)>=0&&(i[e]=this[e]);return x.call(t,"shapes")>=0&&(i.shapes=function(){var t,e,i,r;for(i=this.shapes,r=[],t=0,e=i.length;e>t;t++)n=i[t],r.push(g(n));return r}.call(this)),x.call(t,"backgroundShapes")>=0&&(i.backgroundShapes=function(){var t,e,i,r;for(i=this.backgroundShapes,r=[],t=0,e=i.length;e>t;t++)n=i[t],r.push(g(n));return r}.call(this)),x.call(t,"imageSize")>=0&&(i.imageSize={width:this.width,height:this.height}),i},t.prototype.getSnapshotJSON=function(){return console.warn("lc.getSnapshotJSON() is deprecated. use JSON.stringify(lc.getSnapshot()) instead."),JSON.stringify(this.getSnapshot())},t.prototype.getSVGString=function(t){return null==t&&(t={}),f(this.getSnapshot(),t)},t.prototype.loadSnapshot=function(t){var e,n,i,o,s,h,l,c,u,p;if(t){if(t.colors)for(u=["primary","secondary","background"],s=0,l=u.length;l>s;s++)e=u[s],this.setColor(e,t.colors[e]);if(t.shapes)for(this.shapes=[],p=t.shapes,h=0,c=p.length;c>h;h++)o=p[h],i=r(o),i&&this.execute(new a.AddShapeAction(this,i));return t.backgroundShapes&&(this.backgroundShapes=function(){var e,i,o,s;for(o=t.backgroundShapes,s=[],e=0,i=o.length;i>e;e++)n=o[e],s.push(r(n));return s}()),t.imageSize&&(this.width=t.imageSize.width,this.height=t.imageSize.height),t.position&&(this.position=t.position),t.scale&&(this.scale=t.scale),this.repaintAllLayers(),this.trigger("snapshotLoad"),this.trigger("drawingChange",{})}},t.prototype.loadSnapshotJSON=function(t){return console.warn("lc.loadSnapshotJSON() is deprecated. use lc.loadSnapshot(JSON.parse(snapshot)) instead."),this.loadSnapshot(JSON.parse(t))},t}()},{"../tools/Pencil":40,"./actions":4,"./bindEvents":5,"./canvasRenderer":6,"./math":10,"./renderSnapshotToImage":11,"./renderSnapshotToSVG":12,"./shapes":13,"./svgRenderer":14,"./util":15}],3:[function(t,e,n){var i,r,o,s;t("./fontmetrics.js"),s=function(t){var e,n,i,r,o,s,a,h;for(n=t.split(" "),i=0,a=0,h=n.length;h>a;a++)r=n[a],o=parseInt(r.replace("px",""),10),isNaN(o)||(i=o);if(!i)throw"Font size not found";return s=t.substring(n[0].length+1).replace("bold ","").replace("italic ","").replace("underline ",""),e=s,{fontSize:i,fontFamily:e}},o=function(t,e,n){var i,r,o,s,a,h,l,c,u,p;if(!e.length)return["",""];for(r=0,h=0,l=0,p=!1;;)if(r+=1,o=r>=e.length,a=!o&&e[r].match(/\s/),s=a||o,u=e.substring(0,r),i=n?t.measureTextWidth(u).width<=n:!0,i&&(l=r),s&&p&&(p=!1,i&&(h=r)),p=!a,o||!i){if(i)return[e,""];if(h>0){for(c=h+1;cl;l++)if(a=h[l],u=o(t,a,n),r=u[0],s=u[1],r)for(;r;)i.push(r),p=o(t,s,n),r=p[0],s=p[1];else i.push(a);return i},i=function(){function t(t,e,n,i,o){var a,h,l;this.text=e,this.font=n,this.forcedWidth=i,this.forcedHeight=o,l=s(this.font),a=l.fontFamily,h=l.fontSize,t.font=this.font,t.textBaseline="baseline",this.emDashWidth=t.measureTextWidth("—",h,a).width,this.caratWidth=t.measureTextWidth("|",h,a).width,this.lines=r(t,e,this.forcedWidth),this.metricses=this.lines.map(function(e){return function(n){return t.measureText2(n||"X",h,e.font)}}(this)),this.metrics={ascent:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.ascent})),descent:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.descent})),fontsize:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.fontsize})),leading:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.leading})),width:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.width})),height:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.height})),bounds:{minx:Math.min.apply(Math,this.metricses.map(function(t){var e;return e=t.bounds,e.minx})),miny:Math.min.apply(Math,this.metricses.map(function(t){var e;return e=t.bounds,e.miny})),maxx:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.bounds,e.maxx})),maxy:Math.max.apply(Math,this.metricses.map(function(t){var e;return e=t.bounds,e.maxy}))}},this.boundingBoxWidth=Math.ceil(this.metrics.width)}return t.prototype.draw=function(t,e,n){var i,r,o,s,a,h;for(t.textBaseline="top",t.font=this.font,i=0,a=this.lines,h=[],o=0,s=a.length;s>o;o++)r=a[o],t.fillText(r,e,n+i*this.metrics.leading),h.push(i+=1);return h},t.prototype.getWidth=function(t){return null==t&&(t=!1),this.forcedWidth?this.forcedWidth:t?this.metrics.bounds.maxx+this.caratWidth:this.metrics.bounds.maxx},t.prototype.getHeight=function(){return this.forcedHeight||this.metrics.leading*this.lines.length},t}(),e.exports=i},{"./fontmetrics.js":7}],4:[function(t,e,n){var i,r;r=function(){function t(t,e,n){this.lc=t,this.oldShapes=e,this.newShapes=n}return t.prototype["do"]=function(){return this.lc.shapes=this.newShapes,this.lc.repaintLayer("main")},t.prototype.undo=function(){return this.lc.shapes=this.oldShapes,this.lc.repaintLayer("main")},t}(),i=function(){function t(t,e,n){this.lc=t,this.shape=e,this.previousShapeId=null!=n?n:null}return t.prototype["do"]=function(){var t,e,n,i,r,o;if(this.lc.shapes.length&&this.lc.shapes[this.lc.shapes.length-1].id!==this.previousShapeId&&null!==this.previousShapeId){for(e=[],t=!1,o=this.lc.shapes,i=0,r=o.length;r>i;i++)n=o[i],e.push(n),n.id===this.previousShapeId&&(e.push(this.shape),t=!0);t||e.push(this.shape),this.lc.shapes=e}else this.lc.shapes.push(this.shape);return this.lc.repaintLayer("main")},t.prototype.undo=function(){var t,e,n,i,r;if(this.lc.shapes[this.lc.shapes.length-1].id===this.shape.id)this.lc.shapes.pop();else{for(t=[],r=this.lc.shapes,n=0,i=r.length;i>n;n++)e=r[n],e.id!==this.shape.id&&t.push(e);lc.shapes=t}return this.lc.repaintLayer("main")},t}(),e.exports={ClearAction:r,AddShapeAction:i}},{}],5:[function(t,e,n){var i,r,o,s;o=function(t,e){var n,i,r;return i=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY,n=t.getBoundingClientRect(),[i-n.left,r-n.top]},s=function(t,e){var n;return n=t.getBoundingClientRect(),{left:e.clientX-n.left,top:e.clientY-n.top}},r=function(t){return null!=t.buttons?1===t.buttons:t.which>0},e.exports=i=function(t,e,n){var i,r,a,h,l,c;return null==n&&(n=!1),c=[],r=function(n){return function(n){var i;return n.preventDefault(),i=s(e,n),t.pointerMove(i.left,i.top)}}(this),a=function(n){return function(n){var i;return n.preventDefault(),e.onselectstart=function(){return!0},i=s(e,n),t.pointerUp(i.left,i.top),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",a),e.addEventListener("mousemove",r)}}(this),e.addEventListener("mousedown",function(n){return function(n){var i,o;if("canvas"===n.target.tagName.toLowerCase())return i=!0,n.preventDefault(),e.onselectstart=function(){return!1},o=s(e,n),t.pointerDown(o.left,o.top),e.removeEventListener("mousemove",r),document.addEventListener("mousemove",r),document.addEventListener("mouseup",a)}}(this)),l=function(n){return n.preventDefault(),t.pointerMove.apply(t,o(e,n))},h=function(n){return n.preventDefault(),t.pointerUp.apply(t,o(e,n)),document.removeEventListener("touchmove",l),document.removeEventListener("touchend",h),document.removeEventListener("touchcancel",h)},e.addEventListener("touchstart",function(n){return"canvas"===n.target.tagName.toLowerCase()?(n.preventDefault(),1===n.touches.length?(t.pointerDown.apply(t,o(e,n)),document.addEventListener("touchmove",l),document.addEventListener("touchend",h),document.addEventListener("touchcancel",h)):t.pointerMove.apply(t,o(e,n))):void 0}),n&&(console.warn("Keyboard panning is deprecated."),i=function(e){switch(e.keyCode){case 37:t.pan(-10,0);break;case 38:t.pan(0,-10);break;case 39:t.pan(10,0);break;case 40:t.pan(0,10)}return t.repaintAllLayers()},document.addEventListener("keydown",i),c.push(function(){return document.removeEventListener(i)})),function(){var t,e,n,i;for(i=[],e=0,n=c.length;n>e;e++)t=c[e],i.push(t());return i}}},{}],6:[function(t,e,n){var i,r,o,s,a,h,l,c,u,p,d;h=t("./lineEndCapShapes.coffee"),p={},i=function(t,e,n){return p[t]={drawFunc:e,drawLatestFunc:n}},l=function(){},u=function(t,e,n){var i;if(null==n&&(n={}),null==n.shouldIgnoreUnsupportedShapes&&(n.shouldIgnoreUnsupportedShapes=!1),null==n.retryCallback&&(n.retryCallback=l),null==n.shouldOnlyDrawLatest&&(n.shouldOnlyDrawLatest=!1),null==n.bufferCtx&&(n.bufferCtx=null),i=n.bufferCtx,p[e.className])return n.shouldOnlyDrawLatest&&p[e.className].drawLatestFunc?p[e.className].drawLatestFunc(t,i,e,n.retryCallback):p[e.className].drawFunc(t,e,n.retryCallback);if(n.shouldIgnoreUnsupportedShapes)return console.warn("Can't render shape of type "+e.className+" to canvas");throw"Can't render shape of type "+e.className+" to canvas"},c=function(t,e,n){return u(t.getContext("2d"),e,n)},i("Rectangle",function(t,e){var n,i;return n=e.x,i=e.y,e.strokeWidth%2!==0&&(n+=.5,i+=.5),t.fillStyle=e.fillColor,t.fillRect(n,i,e.width,e.height),t.lineWidth=e.strokeWidth,t.strokeStyle=e.strokeColor,t.strokeRect(n,i,e.width,e.height)}),i("Ellipse",function(t,e){var n,i,r,o;return t.save(),o=Math.floor(e.width/2),r=Math.floor(e.height/2),n=e.x+o,i=e.y+r,t.translate(n,i),t.scale(1,Math.abs(e.height/e.width)),t.beginPath(),t.arc(0,0,Math.abs(o),0,2*Math.PI),t.closePath(),t.restore(),t.fillStyle=e.fillColor,t.fill(),t.lineWidth=e.strokeWidth,t.strokeStyle=e.strokeColor,t.stroke()}),i("SelectionBox",function(){var t;return t=function(t,e,n,i){var r,o;return r=n.x,o=n.y,t.fillStyle="#fff",t.fillRect(r,o,i,i),t.strokeStyle="#000",t.strokeRect(r,o,i,i)},function(e,n){return n.backgroundColor&&(e.fillStyle=n.backgroundColor,e.fillRect(n._br.x-n.margin,n._br.y-n.margin,n._br.width+2*n.margin,n._br.height+2*n.margin)),e.lineWidth=1,e.strokeStyle="#000",e.setLineDash([2,4]),e.strokeRect(n._br.x-n.margin,n._br.y-n.margin,n._br.width+2*n.margin,n._br.height+2*n.margin),e.setLineDash([]),t(e,n.getTopLeftHandleRect(),n.handleSize),t(e,n.getTopRightHandleRect(),n.handleSize),t(e,n.getBottomLeftHandleRect(),n.handleSize),t(e,n.getBottomRightHandleRect(),n.handleSize)}}()),i("Image",function(t,e,n){return e.image.width?t.drawImage(e.image,e.x,e.y):n?e.image.onload=n:void 0}),i("Line",function(t,e){var n,i,r,o,s;if(e.x1!==e.x2||e.y1!==e.y2)return i=e.x1,r=e.x2,o=e.y1,s=e.y2,e.strokeWidth%2!==0&&(i+=.5,r+=.5,o+=.5,s+=.5),t.lineWidth=e.strokeWidth,t.strokeStyle=e.color,t.lineCap=e.capStyle,e.dash&&t.setLineDash(e.dash),t.beginPath(),t.moveTo(i,o),t.lineTo(r,s),t.stroke(),e.dash&&t.setLineDash([]),n=Math.max(2.2*e.strokeWidth,5),e.endCapShapes[0]&&h[e.endCapShapes[0]].drawToCanvas(t,i,o,Math.atan2(o-s,i-r),n,e.color),e.endCapShapes[1]?h[e.endCapShapes[1]].drawToCanvas(t,r,s,Math.atan2(s-o,r-i),n,e.color):void 0}),d=function(t,e,n,i){var r,o,s,a;if(null==n&&(n=!1),null==i&&(i="round"),e.length){for(t.lineCap=i,t.strokeStyle=e[0].color,t.lineWidth=e[0].size,t.beginPath(),e[0].size%2===0?t.moveTo(e[0].x,e[0].y):t.moveTo(e[0].x+.5,e[0].y+.5),a=e.slice(1),o=0,s=a.length;s>o;o++)r=a[o],e[0].size%2===0?t.lineTo(r.x,r.y):t.lineTo(r.x+.5,r.y+.5);return n?t.closePath():void 0}},s=function(t,e){return d(t,e.smoothedPoints),t.stroke()},a=function(t,e,n){var i,r,o;return n.tail?(o=n.smoothedPoints.length-n.segmentSize*n.tailSize,r=o<2*n.segmentSize?0:o,i=o+n.segmentSize+1,d(e,n.smoothedPoints.slice(r,i)),e.stroke()):(d(e,n.smoothedPoints),e.stroke())},i("LinePath",s,a),r=function(t,e){return t.save(),t.globalCompositeOperation="destination-out",s(t,e),t.restore()},o=function(t,e,n){return t.save(),t.globalCompositeOperation="destination-out",e.save(),e.globalCompositeOperation="destination-out",a(t,e,n),t.restore(),e.restore()},i("ErasedLinePath",r,o),i("Text",function(t,e){return e.renderer||e._makeRenderer(t),t.fillStyle=e.color,e.renderer.draw(t,e.x,e.y)}),i("Polygon",function(t,e){return t.fillStyle=e.fillColor,d(t,e.points,e.isClosed,"butt"),t.fill(),t.stroke()}),e.exports={defineCanvasRenderer:i,renderShapeToCanvas:c,renderShapeToContext:u}},{"./lineEndCapShapes.coffee":8}],7:[function(t,e,n){!function(){if(!document.defaultView.getComputedStyle)throw"ERROR: 'document.defaultView.getComputedStyle' not found. This library only works in browsers that can report computed CSS values.";CanvasRenderingContext2D.prototype.measureTextWidth=CanvasRenderingContext2D.prototype.measureText;var t=function(t,e){return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)};CanvasRenderingContext2D.prototype.measureText2=function(e,n,i){var r=this.measureTextWidth(e),o=!/\S/.test(e);r.fontsize=n;var s=document.createElement("div");s.style.position="absolute",s.style.opacity=0,s.style.font=i,s.innerHTML=e+"
"+e,document.body.appendChild(s),r.leading=1.2*n;var a=t(s,"height");if(a=a.replace("px",""),a>=2*n&&(r.leading=a/2|0),document.body.removeChild(s),o)r.ascent=0,r.descent=0,r.bounds={minx:0,maxx:r.width,miny:0,maxy:0},r.height=0;else{var h=document.createElement("canvas"),l=100;h.width=r.width+l,h.height=3*n,h.style.opacity=1,h.style.font=i;var c=h.getContext("2d");c.font=i;var u=h.width,p=h.height,d=p/2;c.fillStyle="white",c.fillRect(-1,-1,u+2,p+2),c.fillStyle="black",c.fillText(e,l/2,d);for(var f=c.getImageData(0,0,u,p).data,g=0,m=4*u,y=f.length;++g0&&255===f[g];);var v=g/m|0;for(g=0;y>g&&255===f[g];)g+=m,g>=y&&(g=g-y+4);var x=g%m/4|0,w=1;for(g=y-3;g>=0&&255===f[g];)g-=m,0>g&&(g=y-3-4*w++);var b=g%m/4+1|0;r.ascent=d-S,r.descent=v-d,r.bounds={minx:x-l/2,maxx:b-l/2,miny:0,maxy:v-S},r.height=1+(v-S)}return r}}()},{}],8:[function(t,e,n){e.exports={arrow:function(){var t;return t=function(t,e,n,i,r){return[{x:t+Math.cos(n+Math.PI/2)*i/2,y:e+Math.sin(n+Math.PI/2)*i/2},{x:t+Math.cos(n)*r,y:e+Math.sin(n)*r},{x:t+Math.cos(n-Math.PI/2)*i/2,y:e+Math.sin(n-Math.PI/2)*i/2}]},{drawToCanvas:function(e,n,i,r,o,s,a){var h;return null==a&&(a=0),a=a||o,e.fillStyle=s,e.lineWidth=0,e.strokeStyle="transparent",e.beginPath(),h=t(n,i,r,o,a),e.moveTo(h[0].x,h[0].y),e.lineTo(h[1].x,h[1].y),e.lineTo(h[2].x,h[2].y),e.fill()},svg:function(e,n,i,r,o,s){var a;return null==s&&(s=0),s=s||r,a=t(e,n,i,r,s),""}}}()}},{}],9:[function(t,e,n){var i,r,o;r={},i=function(t){return r=t},o=function(t){var e;return e=r[t],e||t},e.exports={localize:i,_:o}},{}],10:[function(t,e,n){var i,r,o,s,a,h;i=t("./shapes").Point,a=t("./util"),r={},r.toPoly=function(t){var e,n,i,r,s,a,l;for(r=[],s=[],e=0,a=0,l=t.length;l>a;a++)i=t[a],n=o(i,h(t,e)),r=r.concat([n[0]]),s=[n[1]].concat(s),e+=1;return r.concat(s)},h=function(t,e){var n;return t.length<3&&(n={x:0,y:0}),n=0===e?h(t,e+1):e===t.length-1?h(t,e-1):r.diff(t[e-1],t[e+1])},r.diff=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},s=function(t){var e;return e=r.len(t),{x:t.x/e,y:t.y/e}},o=function(t,e){return e=s(e),e.x=e.x*t.size/2,e.y=e.y*t.size/2,[{x:t.x-e.y,y:t.y+e.x,color:t.color},{x:t.x+e.y,y:t.y-e.x,color:t.color}]},r.len=function(t){return Math.sqrt(Math.pow(t.x,2)+Math.pow(t.y,2))},r.scalePositionScalar=function(t,e,n,i){var r,o;return o=e*n,r=e*i,t+(o-r)/2},e.exports=r},{"./shapes":13,"./util":15}],11:[function(t,e,n){var i,r,o,s;s=t("./util"),r=t("./shapes").JSONToShape,i="infinite",o=function(t,e,n){return e.width?(t.save(),t.translate(t.canvas.width/2,t.canvas.height/2),t.scale(n,n),t.drawImage(e,-e.width/2,-e.height/2),t.restore()):void 0},e.exports=function(t,e){var n,a,h,l,c,u,p,d,f,g;return null==e&&(e={}),null==e.scale&&(e.scale=1),p=function(){var e,n,i,o;for(i=t.shapes,o=[],e=0,n=i.length;n>e;e++)u=i[e],o.push(r(u));return o}(),a=[],t.backgroundShapes&&(a=function(){var e,n,i,o;for(i=t.backgroundShapes,o=[],e=0,n=i.length;n>e;e++)u=i[e],o.push(r(u));return o}()),c=t.imageSize||{width:i,height:i},g=c.width,l=c.height,h=t.colors||{background:"transparent"},n=p.concat(a),d=document.createElement("canvas"),f=d.getContext("2d"),null==e.margin&&(e.margin={top:0,right:0,bottom:0,left:0}),e.rect||(e.rect=s.getBoundingRect(function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)u=n[t],i.push(u.getBoundingRect(f));return i}(),g===i?0:g,l===i?0:l)),e.rect.x-=e.margin.left,e.rect.y-=e.margin.top,e.rect.width+=e.margin.left+e.margin.right,e.rect.height+=e.margin.top+e.margin.bottom,d.width=e.rect.width*e.scale,d.height=e.rect.height*e.scale,f.fillStyle=h.background,f.fillRect(0,0,d.width,d.height),e.rect.width&&e.rect.height?(e.watermarkImage&&o(f,e.watermarkImage,e.watermarkScale),s.combineCanvases(d,s.renderShapes(a,e.rect,e.scale),s.renderShapes(p,e.rect,e.scale))):null}},{"./shapes":13,"./util":15}],12:[function(t,e,n){var i,r,o;o=t("./util"),r=t("./shapes").JSONToShape,i="infinite",e.exports=function(t,e){var n,s,a,h,l,c,u,p,d,f;return null==e&&(e={}),d=function(){var e,n,i,o;for(i=t.shapes,o=[],e=0,n=i.length;n>e;e++)p=i[e],o.push(r(p));return o}(),s=[],t.backgroundShapes&&(s=function(){var e,n,i,o;for(i=t.backgroundShapes,o=[],e=0,n=i.length;n>e;e++)p=i[e],o.push(r(p));return o}()),u=t.imageSize||{width:i,height:i},f=u.width,c=u.height,a=t.colors||{background:"transparent"},n=d.concat(s),l=document.createElement("canvas"),h=l.getContext("2d"),null==e.margin&&(e.margin={top:0,right:0,bottom:0,left:0}),e.rect||(e.rect=o.getBoundingRect(function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)p=n[t],i.push(p.getBoundingRect(h));return i}(),f===i?0:f,c===i?0:c)),e.rect.x-=e.margin.left,e.rect.y-=e.margin.top,e.rect.width+=e.margin.left+e.margin.right,e.rect.height+=e.margin.top+e.margin.bottom,LC.renderShapesToSVG(s.concat(d),e.rect,a.background)}},{"./shapes":13,"./util":15}],13:[function(t,e,n){var i,r,o,s,a,h,l,c,u,p,d,f,g,m,y,S,v,x,w,b,k,C;y=t("./util"),o=t("./TextRenderer"),u=t("./lineEndCapShapes.coffee"),b=t("./canvasRenderer"),h=b.defineCanvasRenderer,d=b.renderShapeToContext,k=t("./svgRenderer"),l=k.defineSVGRenderer,f=k.renderShapeToSVG,m={},c=function(t,e){var n,i,r,o,s,a,c,u;n=function(t,n,i,r,o,s,a,h,l,c,u,p,d,f,g,m){return e.constructor.call(this,t,n,i,r,o,s,a,h,l,c,u,p,d,f,g,m),this},n.prototype.className=t,n.fromJSON=e.fromJSON,e.draw&&(s=e.draw,a=e.draw||function(t,e,n){return this.draw(t,e,n)},i=function(t,e,n){return s.call(e,t,n)},r=function(t,e,n,i){return a.call(n,t,e,i)},delete e.draw,e.drawLatest&&delete e.drawLatest,h(t,i,r)),e.toSVG&&(c=e.toSVG,u=function(t){return c.call(t)},delete e.toSVG,l(t,u)),n.prototype.draw=function(t,e){return d(t,this,{retryCallback:e})},n.prototype.drawLatest=function(t,e,n){return d(t,this,{retryCallback:n,bufferCtx:e,shouldOnlyDrawLatest:!0})},n.prototype.toSVG=function(){return f(this)};for(o in e)"fromJSON"!==o&&(n.prototype[o]=e[o]);return m[t]=n,n},a=function(t,e,n,i,r,o,s,a,h,l,c,u,p,d,f,g,S){var v;return v=new m[t](e,n,i,r,o,s,a,h,l,c,u,p,d,f,g,S),v.id=y.getGUID(),v},i=function(t){var e,n,i,r;return e=t.className,n=t.data,i=t.id,e in m?(r=m[e].fromJSON(n),r?(i&&(r.id=i),r):(console.log("Unreadable shape:",e,n),null)):(console.log("Unknown shape:",e,n),null)},g=function(t){return{className:t.className,data:t.toJSON(),id:t.id}},s=function(t,e){return e?s(x(x(C(t))),e-1):t},C=function(t){var e,n,i,r,o;for(t=[t[0]].concat(t).concat(y.last(t)),i=[],e=0,r=0,o=t.length;o>r;r++)n=t[r],i[2*e]=n,t[e+1]&&(i[2*e+1]=w(n,t[e+1])),e+=1;return i},x=function(t){var e,n,i,r,o;for(e=[],n=0,r=0,o=t.length;o>r;r++)i=t[r],t[n+1]&&(e[n]=w(i,t[n+1])),n+=1;return e},w=function(t,e){return a("Point",{x:t.x+(e.x-t.x)/2,y:t.y+(e.y-t.y)/2,size:t.size+(e.size-t.size)/2,color:t.color})},c("Image",{constructor:function(t){return null==t&&(t={}),this.x=t.x||0,this.y=t.y||0,this.image=t.image||null}, getBoundingRect:function(){return{x:this.x,y:this.y,width:this.image.width,height:this.image.height}},toJSON:function(){return{x:this.x,y:this.y,imageSrc:this.image.src,imageObject:this.image}},fromJSON:function(t){var e,n;return e=null,(null!=(n=t.imageObject)?n.width:void 0)?e=t.imageObject:(e=new Image,e.src=t.imageSrc),a("Image",{x:t.x,y:t.y,image:e})}}),c("Rectangle",{constructor:function(t){return null==t&&(t={}),this.x=t.x||0,this.y=t.y||0,this.width=t.width||0,this.height=t.height||0,this.strokeWidth=t.strokeWidth||1,this.strokeColor=t.strokeColor||"black",this.fillColor=t.fillColor||"transparent"},getBoundingRect:function(){return{x:this.x-this.strokeWidth/2,y:this.y-this.strokeWidth/2,width:this.width+this.strokeWidth,height:this.height+this.strokeWidth}},toJSON:function(){return{x:this.x,y:this.y,width:this.width,height:this.height,strokeWidth:this.strokeWidth,strokeColor:this.strokeColor,fillColor:this.fillColor}},fromJSON:function(t){return a("Rectangle",t)}}),c("Ellipse",{constructor:function(t){return null==t&&(t={}),this.x=t.x||0,this.y=t.y||0,this.width=t.width||0,this.height=t.height||0,this.strokeWidth=t.strokeWidth||1,this.strokeColor=t.strokeColor||"black",this.fillColor=t.fillColor||"transparent"},getBoundingRect:function(){return{x:this.x-this.strokeWidth/2,y:this.y-this.strokeWidth/2,width:this.width+this.strokeWidth,height:this.height+this.strokeWidth}},toJSON:function(){return{x:this.x,y:this.y,width:this.width,height:this.height,strokeWidth:this.strokeWidth,strokeColor:this.strokeColor,fillColor:this.fillColor}},fromJSON:function(t){return a("Ellipse",t)}}),c("Line",{constructor:function(t){return null==t&&(t={}),this.x1=t.x1||0,this.y1=t.y1||0,this.x2=t.x2||0,this.y2=t.y2||0,this.strokeWidth=t.strokeWidth||1,this.color=t.color||"black",this.capStyle=t.capStyle||"round",this.endCapShapes=t.endCapShapes||[null,null],this.dash=t.dash||null},getBoundingRect:function(){return{x:Math.min(this.x1,this.x2)-this.strokeWidth/2,y:Math.min(this.y1,this.y2)-this.strokeWidth/2,width:Math.abs(this.x2-this.x1)+this.strokeWidth/2,height:Math.abs(this.y2-this.y1)+this.strokeWidth/2}},toJSON:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2,strokeWidth:this.strokeWidth,color:this.color,capStyle:this.capStyle,dash:this.dash,endCapShapes:this.endCapShapes}},fromJSON:function(t){return a("Line",t)}}),v=function(t){var e,n,i,r,o;if(!t.length)return!1;for(i=t[0].size,e=t[0].color,r=0,o=t.length;o>r;r++)if(n=t[r],(n.size!==i||n.color!==e)&&console.log(i,e,n.size,n.color),n.size!==i||n.color!==e)return!1;return!0},S=function(t,e){var n,r,o,s,h;return r=null,e.points?r=function(){var t,r,o,s;for(o=e.points,s=[],t=0,r=o.length;r>t;t++)n=o[t],s.push(i(n));return s}():e.pointCoordinatePairs&&(r=function(){var t,n,r,o,a;for(r=e.pointCoordinatePairs,a=[],t=0,n=r.length;n>t;t++)o=r[t],s=o[0],h=o[1],a.push(i({className:"Point",data:{x:s,y:h,size:e.pointSize,color:e.pointColor,smooth:e.smooth}}));return a}()),o=null,e.smoothedPointCoordinatePairs&&(o=function(){var t,n,r,o,a;for(r=e.smoothedPointCoordinatePairs,a=[],t=0,n=r.length;n>t;t++)o=r[t],s=o[0],h=o[1],a.push(i({className:"Point",data:{x:s,y:h,size:e.pointSize,color:e.pointColor,smooth:e.smooth}}));return a}()),r[0]?a(t,{points:r,smoothedPoints:o,order:e.order,tailSize:e.tailSize,smooth:e.smooth}):null},p={constructor:function(t){var e,n,i,r,o;if(null==t&&(t={}),n=t.points||[],this.order=t.order||3,this.tailSize=t.tailSize||3,this.smooth="smooth"in t?t.smooth:!0,this.segmentSize=Math.pow(2,this.order),this.sampleSize=this.tailSize+1,t.smoothedPoints)return this.points=t.points,this.smoothedPoints=t.smoothedPoints;for(this.points=[],o=[],i=0,r=n.length;r>i;i++)e=n[i],o.push(this.addPoint(e));return o},getBoundingRect:function(){return y.getBoundingRect(this.points.map(function(t){return{x:t.x-t.size/2,y:t.y-t.size/2,width:t.size,height:t.size}}))},toJSON:function(){var t,e;return v(this.points)?{order:this.order,tailSize:this.tailSize,smooth:this.smooth,pointCoordinatePairs:function(){var t,n,i,r;for(i=this.points,r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push([e.x,e.y]);return r}.call(this),smoothedPointCoordinatePairs:function(){var t,n,i,r;for(i=this.smoothedPoints,r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push([e.x,e.y]);return r}.call(this),pointSize:this.points[0].size,pointColor:this.points[0].color}:{order:this.order,tailSize:this.tailSize,smooth:this.smooth,points:function(){var e,n,i,r;for(i=this.points,r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(g(t));return r}.call(this)}},fromJSON:function(t){return S("LinePath",t)},addPoint:function(t){return this.points.push(t),this.smooth?!this.smoothedPoints||this.points.lengthn;n++)e=r[n],e.color=this.strokeColor,o.push(e.size=this.strokeWidth);return o},addPoint:function(t,e){return this.points.push(LC.createShape("Point",{x:t,y:e}))},getBoundingRect:function(){return y.getBoundingRect(this.points.map(function(t){return t.getBoundingRect()}))},toJSON:function(){return{strokeWidth:this.strokeWidth,fillColor:this.fillColor,strokeColor:this.strokeColor,dash:this.dash,isClosed:this.isClosed,pointCoordinatePairs:this.points.map(function(t){return[t.x,t.y]})}},fromJSON:function(t){return t.points=t.pointCoordinatePairs.map(function(e){var n,i;return n=e[0],i=e[1],a("Point",{x:n,y:i,size:t.strokeWidth,color:t.strokeColor})}),a("Polygon",t)}}),c("Text",{constructor:function(t){return null==t&&(t={}),this.x=t.x||0,this.y=t.y||0,this.v=t.v||0,this.text=t.text||"",this.color=t.color||"black",this.font=t.font||"18px sans-serif",this.forcedWidth=t.forcedWidth||null,this.forcedHeight=t.forcedHeight||null},_makeRenderer:function(t){return t.lineHeight=1.2,this.renderer=new o(t,this.text,this.font,this.forcedWidth,this.forcedHeight),this.v<1?(console.log("repairing baseline"),this.v=1,this.x-=this.renderer.metrics.bounds.minx,this.y-=this.renderer.metrics.leading-this.renderer.metrics.descent):void 0},setText:function(t){return this.text=t,this.renderer=null},setFont:function(t){return this.font=t,this.renderer=null},setPosition:function(t,e){return this.x=t,this.y=e},setSize:function(t,e){return this.forcedWidth=Math.max(t,0),this.forcedHeight=Math.max(e,0),this.renderer=null},enforceMaxBoundingRect:function(t){var e,n,i;return e=this.getBoundingRect(t.ctx),i={x:-t.position.x/t.scale,y:-t.position.y/t.scale,width:t.canvas.width/t.scale,height:t.canvas.height/t.scale},e.x+e.width>i.x+i.width?(n=e.x-i.x,this.forcedWidth=i.width-n-10,this.renderer=null):void 0},getBoundingRect:function(t,e){if(null==e&&(e=!1),!this.renderer){if(!t)throw"Must pass ctx if text hasn't been rendered yet";this._makeRenderer(t)}return{x:this.x,y:this.y,width:this.renderer.getWidth(!0),height:this.renderer.getHeight()}},toJSON:function(){return{x:this.x,y:this.y,text:this.text,color:this.color,font:this.font,forcedWidth:this.forcedWidth,forcedHeight:this.forcedHeight,v:this.v}},fromJSON:function(t){return a("Text",t)}}),c("SelectionBox",{constructor:function(t){return null==t&&(t={}),this.shape=t.shape,this.handleSize=10,this.margin=4,this.backgroundColor=t.backgroundColor||null,this._br=this.shape.getBoundingRect(t.ctx)},getTopLeftHandleRect:function(){return{x:this._br.x-this.handleSize-this.margin,y:this._br.y-this.handleSize-this.margin,width:this.handleSize,height:this.handleSize}},getBottomLeftHandleRect:function(){return{x:this._br.x-this.handleSize-this.margin,y:this._br.y+this._br.height+this.margin,width:this.handleSize,height:this.handleSize}},getTopRightHandleRect:function(){return{x:this._br.x+this._br.width+this.margin,y:this._br.y-this.handleSize-this.margin,width:this.handleSize,height:this.handleSize}},getBottomRightHandleRect:function(){return{x:this._br.x+this._br.width+this.margin,y:this._br.y+this._br.height+this.margin,width:this.handleSize,height:this.handleSize}},getBoundingRect:function(){return{x:this._br.x-this.margin,y:this._br.y-this.margin,width:this._br.width+2*this.margin,height:this._br.height+2*this.margin}}}),e.exports={defineShape:c,createShape:a,JSONToShape:i,shapeToJSON:g}},{"./TextRenderer":3,"./canvasRenderer":6,"./lineEndCapShapes.coffee":8,"./svgRenderer":14,"./util":15}],14:[function(t,e,n){var i,r,o,s;r=t("./lineEndCapShapes.coffee"),s={},i=function(t,e){return s[t]=e},o=function(t,e){if(null==e&&(e={}),null==e.shouldIgnoreUnsupportedShapes&&(e.shouldIgnoreUnsupportedShapes=!1),s[t.className])return s[t.className](t);if(e.shouldIgnoreUnsupportedShapes)return console.warn("Can't render shape of type "+t.className+" to SVG"),"";throw"Can't render shape of type "+t.className+" to SVG"},i("Rectangle",function(t){var e,n;return e=t.x,n=t.y,t.strokeWidth%2!==0&&(e+=.5,n+=.5),""}),i("Ellipse",function(t){var e,n,i,r;return r=Math.floor(t.width/2),i=Math.floor(t.height/2),e=t.x+r,n=t.y+i,""}),i("Image",function(t){return""}),i("Line",function(t){var e,n,i,o,s,a,h;return i=t.dash?"stroke-dasharray='"+t.dash.join(", ")+"'":"",n="",e=Math.max(2.2*t.strokeWidth,5),o=t.x1,s=t.x2,a=t.y1,h=t.y2,t.strokeWidth%2!==0&&(o+=.5,s+=.5,a+=.5,h+=.5),t.endCapShapes[0]&&(n+=r[t.endCapShapes[0]].svg(o,a,Math.atan2(a-h,o-s),e,t.color)),t.endCapShapes[1]&&(n+=r[t.endCapShapes[1]].svg(s,h,Math.atan2(h-a,s-o),e,t.color))," "+n+" "}),i("LinePath",function(t){return""}),i("ErasedLinePath",function(t){return""}),i("Polygon",function(t){return t.isClosed?"":" "}),i("Text",function(t){var e,n,i;return i=t.forcedWidth?"width='"+t.forcedWidth+"px'":"",e=t.forcedHeight?"height='"+t.forcedHeight+"px'":"",n=t.text.split(/\r\n|\r|\n/g),t.renderer&&(n=t.renderer.lines)," "+n.map(function(e){return function(e,n){var i;return i=0===n?0:"1.2em"," "+e+" "}}(this)).join("")+" "}),e.exports={defineSVGRenderer:i,renderShapeToSVG:o}},{"./lineEndCapShapes.coffee":8}],15:[function(t,e,n){var i,r,o,s,a=[].slice;o=Array.prototype.slice,i=t("./canvasRenderer").renderShapeToContext,r=t("./svgRenderer").renderShapeToSVG,s={addImageOnload:function(t,e){var n;return n=t.onload,t.onload=function(){return"function"==typeof n&&n(),e()},t},last:function(t,e){return null==e&&(e=null),e?o.call(t,Math.max(t.length-e,0)):t[t.length-1]},classSet:function(t){var e,n;e=[];for(n in t)t[n]&&e.push(n);return e.join(" ")},matchElementSize:function(t,e,n,i){var r;return null==i&&(i=function(){}),r=function(r){return function(){var r,o,s;for(o=0,s=e.length;s>o;o++)r=e[o],r.style.width=""+t.offsetWidth+"px",r.style.height=""+t.offsetHeight+"px",null!=r.width&&(r.setAttribute("width",r.offsetWidth*n),r.setAttribute("height",r.offsetHeight*n));return i()}}(this),t.addEventListener("resize",r),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),r()},combineCanvases:function(){var t,e,n,i,r,o,s,h;for(n=1<=arguments.length?a.call(arguments,0):[],t=document.createElement("canvas"),t.width=n[0].width,t.height=n[0].height,r=0,s=n.length;s>r;r++)e=n[r],t.width=Math.max(e.width,t.width),t.height=Math.max(e.height,t.height);for(i=t.getContext("2d"),o=0,h=n.length;h>o;o++)e=n[o],i.drawImage(e,0,0);return t},renderShapes:function(t,e,n,r){var o,s,a,h;for(null==n&&(n=1),null==r&&(r=null),r=r||document.createElement("canvas"),r.width=e.width*n,r.height=e.height*n,o=r.getContext("2d"),o.translate(-e.x*n,-e.y*n),o.scale(n,n),a=0,h=t.length;h>a;a++)s=t[a],i(o,s);return r},renderShapesToSVG:function(t,e,n){var i,o,s,a;return s=e.x,a=e.y,o=e.width,i=e.height,(" "+t.map(r).join("")+" ").replace(/(\r\n|\n|\r)/gm,"")},getBoundingRect:function(t,e,n){var i,r,o,s,a,h,l;if(!t.length)return{x:0,y:0,width:e,height:n};for(o=t[0].x,s=t[0].y,i=t[0].x+t[0].width,r=t[0].y+t[0].height,h=0,l=t.length;l>h;h++)a=t[h],o=Math.floor(Math.min(a.x,o)),s=Math.floor(Math.min(a.y,s)),i=Math.ceil(Math.max(i,a.x+a.width)),r=Math.ceil(Math.max(r,a.y+a.height));return o=e?0:o,s=n?0:s,i=e||i,r=n||r,{x:o,y:s,width:i-o,height:r-s}},getBackingScale:function(t){return null==window.devicePixelRatio?1:window.devicePixelRatio>1?window.devicePixelRatio:1},requestAnimationFrame:(window.requestAnimationFrame||window.setTimeout).bind(window),getGUID:function(){var t;return t=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}()},e.exports=s},{"./canvasRenderer":6,"./svgRenderer":14}],16:[function(t,e,n){!function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}t.prototype=window.CustomEvent.prototype,window.CustomEvent=t}()},{}],17:[function(t,e,n){var i=!1;CanvasRenderingContext2D.prototype.setLineDash||(CanvasRenderingContext2D.prototype.setLineDash=function(){i||(console.warn("context2D.setLineDash is a no-op in this browser."),i=!0)}),e.exports=null},{}],18:[function(t,e,n){var i,r,o,s,a,h,l,c,u,p,d,f,g,m,y,S,v,x;t("./ie_customevent"),t("./ie_setLineDash"),i=t("./core/LiterallyCanvas"),u=t("./reactGUI/init"),o=t("./core/canvasRenderer"),S=t("./core/svgRenderer"),y=t("./core/shapes"),x=t("./core/util"),f=t("./core/renderSnapshotToImage"),g=t("./core/renderSnapshotToSVG"),p=t("./core/localization").localize,t("./optionsStyles/font"),t("./optionsStyles/stroke-width"),t("./optionsStyles/line-options-and-stroke-width"),t("./optionsStyles/null"),l=t("./optionsStyles/optionsStyles").defineOptionsStyle,s={snapshotToShapes:function(t){var e,n,i,r,o;for(r=t.shapes,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(y.JSONToShape(e));return o},snapshotJSONToShapes:function(t){return s.snapshotToShapes(JSON.parse(t))}},r=t("./tools/base"),v={Pencil:t("./tools/Pencil"),Eraser:t("./tools/Eraser"),Line:t("./tools/Line"),Rectangle:t("./tools/Rectangle"),Ellipse:t("./tools/Ellipse"),Text:t("./tools/Text"),Polygon:t("./tools/Polygon"),Pan:t("./tools/Pan"),Eyedropper:t("./tools/Eyedropper"),Tool:r.Tool,ToolWithStroke:r.ToolWithStroke},h=[v.Pencil,v.Eraser,v.Line,v.Rectangle,v.Ellipse,v.Text,v.Polygon,v.Pan,v.Eyedropper],a="lib/img",m=function(t){return a=t},c=function(t,e){var n,r,o,s,l,c,p,d,f,g;null==e&&(e={}),null==e.imageURLPrefix&&(e.imageURLPrefix=a),null==e.primaryColor&&(e.primaryColor="#000"),null==e.secondaryColor&&(e.secondaryColor="#fff"),null==e.backgroundColor&&(e.backgroundColor="transparent"),null==e.strokeWidths&&(e.strokeWidths=[1,2,5,10,20,30]),null==e.defaultStrokeWidth&&(e.defaultStrokeWidth=5),null==e.toolbarPosition&&(e.toolbarPosition="top"),null==e.keyboardShortcuts&&(e.keyboardShortcuts=!0),null==e.imageSize&&(e.imageSize={width:"infinite",height:"infinite"}),null==e.backgroundShapes&&(e.backgroundShapes=[]),null==e.watermarkImage&&(e.watermarkImage=null),null==e.watermarkScale&&(e.watermarkScale=1),null==e.zoomMin&&(e.zoomMin=.2),null==e.zoomMax&&(e.zoomMax=4),null==e.zoomStep&&(e.zoomStep=.2),null==e.snapshot&&(e.snapshot=null),"tools"in e||(e.tools=h),g=t.children;for(d=0,f=g.length;f>d;d++)n=g[d],t.removeChild(n);return-1===[" "," "].join(t.className).indexOf(" literally ")&&(t.className=t.className+" literally"),p="top"===e.toolbarPosition?"toolbar-at-top":"bottom"===e.toolbarPosition?"toolbar-at-bottom":"hidden"===e.toolbarPosition?"toolbar-hidden":void 0,t.className=t.className+" "+p,l=document.createElement("div"),l.className="lc-picker",r=document.createElement("div"),r.className="lc-drawing",s=document.createElement("div"),s.className="lc-options horz-toolbar",t.appendChild(l),t.appendChild(r),t.appendChild(s),o=new i(r,e),u(l,s,o,e.tools,e.imageURLPrefix),"onInit"in e&&e.onInit(o),c=function(){return o._teardown(),l.remove(),r.remove(),s.remove()},o.teardown=c,o},d=function(t){return t.fn.literallycanvas=function(t){return null==t&&(t={}),this.each(function(e){return function(e,n){return n.literallycanvas=c(n,t)}}(this)),this}},window.LC={init:c},window.$&&d(window.$),e.exports={init:c,registerJQueryPlugin:d,util:x,tools:v,defineOptionsStyle:l,setDefaultImageURLPrefix:m,defaultTools:h,defineShape:y.defineShape,createShape:y.createShape,JSONToShape:y.JSONToShape,shapeToJSON:y.shapeToJSON,defineCanvasRenderer:o.defineCanvasRenderer,renderShapeToContext:o.renderShapeToContext,renderShapeToCanvas:o.renderShapeToCanvas,renderShapesToCanvas:x.renderShapes,defineSVGRenderer:S.defineSVGRenderer,renderShapeToSVG:S.renderShapeToSVG,renderShapesToSVG:x.renderShapesToSVG,snapshotToShapes:s.snapshotToShapes,snapshotJSONToShapes:s.snapshotJSONToShapes,renderSnapshotToImage:f,renderSnapshotToSVG:g,localize:p}},{"./core/LiterallyCanvas":2,"./core/canvasRenderer":6,"./core/localization":9,"./core/renderSnapshotToImage":11,"./core/renderSnapshotToSVG":12,"./core/shapes":13,"./core/svgRenderer":14,"./core/util":15,"./ie_customevent":16,"./ie_setLineDash":17,"./optionsStyles/font":19,"./optionsStyles/line-options-and-stroke-width":20,"./optionsStyles/null":21,"./optionsStyles/optionsStyles":22,"./optionsStyles/stroke-width":23,"./reactGUI/init":34,"./tools/Ellipse":35,"./tools/Eraser":36,"./tools/Eyedropper":37,"./tools/Line":38,"./tools/Pan":39,"./tools/Pencil":40,"./tools/Polygon":41,"./tools/Rectangle":42,"./tools/Text":43,"./tools/base":44}],19:[function(t,e,n){var i,r;i=t("./optionsStyles").defineOptionsStyle,r=t("../core/localization")._,i("font",React.createClass({displayName:"FontOptions",getInitialState:function(){return{isItalic:!1,isBold:!1,fontFamilyIndex:0,fontSizeIndex:4}},getFontSizes:function(){return[9,10,12,14,18,24,36,48,64,72,96,144,288]},getFamilies:function(){var t;return t=this.props.lc,[{name:r("Sans-serif"),value:'"Helvetica Neue",Helvetica,Arial,sans-serif'},{name:r("Serif"),value:'"Hoefler Text","Times New Roman",serif'},{name:r("Typewriter"),value:'"Lucida Typewriter",monospace'}]},updateTool:function(t){var e,n,i;null==t&&(t={});for(i in this.state)i in t||(t[i]=this.state[i]);return e=this.getFontSizes()[t.fontSizeIndex],n=[],t.isItalic&&n.push("italic"),t.isBold&&n.push("bold"),n.push(""+e+"px"),n.push(this.getFamilies()[t.fontFamilyIndex].value),this.props.lc.tool.font=n.join(" "),this.props.lc.trigger("setFont",n.join(" "))},handleFontSize:function(t){var e;return e={fontSizeIndex:t.target.value},this.setState(e),this.updateTool(e)},handleFontFamily:function(t){var e;return e={fontFamilyIndex:t.target.value},this.setState(e),this.updateTool(e)},handleItalic:function(t){var e;return e={isItalic:!this.state.isItalic},this.setState(e),this.updateTool(e)},handleBold:function(t){var e;return e={isBold:!this.state.isBold},this.setState(e),this.updateTool(e)},componentDidMount:function(){return this.updateTool()},render:function(){var t,e,n,i,o,s,a,h,l;return o=this.props.lc,l=React.DOM,e=l.div,n=l.input,a=l.select,s=l.option,t=l.br,i=l.label,h=l.span,e({className:"lc-font-settings"},a({value:this.state.fontSizeIndex,onChange:this.handleFontSize},this.getFontSizes().map(function(t){return function(t,e){return s({value:e,key:e},""+t+"px")}}(this))),a({value:this.state.fontFamilyIndex,onChange:this.handleFontFamily},this.getFamilies().map(function(t){return function(t,e){return s({value:e,key:e},t.name)}}(this))),i({htmlFor:"italic"},n({type:"checkbox",id:"italic",checked:this.state.isItalic,onChange:this.handleItalic},r("italic"))),i({htmlFor:"bold"},n({type:"checkbox",id:"bold",checked:this.state.isBold,onChange:this.handleBold},r("bold"))))}})),e.exports={}},{"../core/localization":9,"./optionsStyles":22}],20:[function(t,e,n){var i,r,o,s;s=t("./optionsStyles").defineOptionsStyle,i=React.createFactory(t("../reactGUI/StrokeWidthPicker")),o=t("../reactGUI/createSetStateOnEventMixin"),r=t("../core/util").classSet,s("line-options-and-stroke-width",React.createClass({displayName:"LineOptionsAndStrokeWidth",getState:function(){return{strokeWidth:this.props.tool.strokeWidth,isDashed:this.props.tool.isDashed,hasEndArrow:this.props.tool.hasEndArrow}},getInitialState:function(){return this.getState()},mixins:[o("toolChange")],render:function(){var t,e,n,o,s,a,h,l,c,u;return u=React.DOM,n=u.div,c=u.ul,s=u.li,o=u.img,h=function(t){return function(){return t.props.tool.isDashed=!t.props.tool.isDashed,t.setState(t.getState())}}(this),l=function(t){return function(){return t.props.tool.hasEndArrow=!t.props.tool.hasEndArrow,t.setState(t.getState())}}(this),e=r({"square-toolbar-button":!0,selected:this.state.isDashed}),t=r({"square-toolbar-button":!0,selected:this.state.hasEndArrow}),a={"float":"left",margin:1},n({},n({className:e,onClick:h,style:a},o({src:""+this.props.imageURLPrefix+"/dashed-line.png"})),n({className:t,onClick:l,style:a},o({src:""+this.props.imageURLPrefix+"/line-with-arrow.png"})),i({tool:this.props.tool,lc:this.props.lc}))}})),e.exports={}},{"../core/util":15,"../reactGUI/StrokeWidthPicker":29,"../reactGUI/createSetStateOnEventMixin":32,"./optionsStyles":22}],21:[function(t,e,n){var i;i=t("./optionsStyles").defineOptionsStyle,i("null",React.createClass({displayName:"NoOptions",render:function(){return React.DOM.div()}})),e.exports={}},{"./optionsStyles":22}],22:[function(t,e,n){var i,r;r={},i=function(t,e){return r[t]=React.createFactory(e)},e.exports={optionsStyles:r,defineOptionsStyle:i}},{}],23:[function(t,e,n){var i,r;r=t("./optionsStyles").defineOptionsStyle,i=t("../reactGUI/StrokeWidthPicker"),r("stroke-width",i),e.exports={}},{"../reactGUI/StrokeWidthPicker":29,"./optionsStyles":22}],24:[function(t,e,n){var i,r,o,s,a;r=t("./React-shim"),s=t("./createSetStateOnEventMixin"),a=t("../core/localization")._,o=t("../core/util").classSet,i=r.createClass({displayName:"ClearButton",getState:function(){return{isEnabled:this.props.lc.canUndo()}},getInitialState:function(){return this.getState()},mixins:[s("drawingChange")],render:function(){var t,e,n,i;return e=r.DOM.div,n=this.props.lc,t=o({"lc-clear":!0,"toolbar-button":!0,"fat-button":!0,disabled:!this.state.isEnabled}),i=n.canUndo()?function(t){return function(){return n.clear()}}(this):function(){},e({className:t,onClick:i},a("Clear"))}}),e.exports=i},{"../core/localization":9,"../core/util":15,"./React-shim":28,"./createSetStateOnEventMixin":32}],25:[function(t,e,n){var i,r,o;r=t("./React-shim"),o=t("../core/util").classSet,i=r.createClass({displayName:"ColorWell",getState:function(){return{color:this.props.lc.colors[this.props.colorName],isPickerVisible:!1}},getInitialState:function(){return this.getState()},componentDidMount:function(){return this.unsubscribe=this.props.lc.on(""+this.props.colorName+"ColorChange",function(t){return function(){return t.setState({color:t.props.lc.colors[t.props.colorName]})}}(this))},componentWillUnmount:function(){return this.unsubscribe()},togglePicker:function(){return this.setState({isPickerVisible:!this.state.isPickerVisible})},closePicker:function(){return this.setState({isPickerVisible:!1})},setColor:function(t){return this.props.lc.setColor(this.props.colorName,t)},render:function(){var t,e,n,i;return i=r.DOM,e=i.div,n=i.label,t=i.br,e({className:o({"color-well":!0,open:this.state.isPickerVisible}),onMouseLeave:this.closePicker,onClick:this.togglePicker,style:{"float":"left",textAlign:"center"}},n({"float":"left"},this.props.label),t({}),e({className:o({"color-well-color-container":!0,selected:this.state.isPickerVisible}),style:{backgroundColor:"white"}},e({className:"color-well-checker color-well-checker-top-left"}),e({className:"color-well-checker color-well-checker-bottom-right",style:{left:"50%",top:"50%"}}),e({className:"color-well-color",style:{backgroundColor:this.state.color}}," ")),this.renderPicker())},renderPicker:function(){var t,e,n,i,s,a,h,l;if(t=r.DOM.div,!this.state.isPickerVisible)return null;for(i=function(e){return function(){return t({className:"color-row",key:0,style:{height:20}},t({className:o({"color-cell transparent-cell":!0,selected:"transparent"===e.state.color}),onClick:function(){return e.setColor("transparent")}},"transparent"))}}(this),s=[],s.push("transparent"),s.push(function(){var t,e;for(e=[],n=t=0;100>=t;n=t+=10)e.push("hsl(0, 0%, "+n+"%)");return e}()),l=[0,30,60,90,120,150,180,210,240,270,300,330],a=0,h=l.length;h>a;a++)e=l[a],s.push(function(){var t,i;for(i=[],n=t=10;90>=t;n=t+=8)i.push("hsl("+e+", 100%, "+n+"%)");return i}());return t({className:"color-picker-popup"},s.map(function(e){return function(n,r){return"transparent"===n?i():t({className:"color-row",key:r,style:{width:20*n.length}},n.map(function(n,i){var r;return r=o({"color-cell":!0,selected:e.state.color===n}),t({className:r,onClick:function(){return e.setColor(n)},style:{backgroundColor:n},key:i})}))}}(this)))}}),e.exports=i},{"../core/util":15,"./React-shim":28}],26:[function(t,e,n){var i,r,o,s;r=t("./React-shim"),o=t("./createSetStateOnEventMixin"),s=t("../optionsStyles/optionsStyles").optionsStyles,i=r.createClass({displayName:"Options",getState:function(){var t;return{style:null!=(t=this.props.lc.tool)?t.optionsStyle:void 0,tool:this.props.lc.tool}},getInitialState:function(){return this.getState()},mixins:[o("toolChange")],render:function(){var t,e;return t=r.DOM.div,e=""+this.state.style,s[e]({lc:this.props.lc,tool:this.state.tool,imageURLPrefix:this.props.imageURLPrefix})}}),e.exports=i},{"../optionsStyles/optionsStyles":22,"./React-shim":28,"./createSetStateOnEventMixin":32}],27:[function(t,e,n){var i,r,o,s,a,h,l,c;a=t("./React-shim"),i=a.createFactory(t("./ClearButton")),h=a.createFactory(t("./UndoRedoButtons")),l=a.createFactory(t("./ZoomButtons")),c=t("../core/localization")._,o=a.createFactory(t("./ColorWell")),r=a.createFactory(a.createClass({displayName:"ColorPickers",render:function(){var t,e;return e=this.props.lc,(t=a.DOM.div)({className:"lc-color-pickers"},o({lc:e,colorName:"primary",label:c("stroke")}),o({lc:e,colorName:"secondary",label:c("fill")}),o({lc:e,colorName:"background",label:c("bg")}))}})),s=a.createClass({displayName:"Picker",getInitialState:function(){return{selectedToolIndex:0}},render:function(){var t,e,n,o,s;return t=a.DOM.div,s=this.props,o=s.toolButtonComponents,n=s.lc,e=s.imageURLPrefix,t({className:"lc-picker-contents"},o.map(function(t){return function(i,r){return i({lc:n,imageURLPrefix:e,key:r,isSelected:r===t.state.selectedToolIndex,onSelect:function(e){return n.setTool(e),t.setState({selectedToolIndex:r})}})}}(this)),o.length%2!==0?t({className:"toolbar-button thin-button disabled"}):void 0,t({style:{position:"absolute",bottom:0,left:0,right:0}},r({lc:this.props.lc}),h({lc:n,imageURLPrefix:e}),l({lc:n,imageURLPrefix:e}),i({lc:n})))}}),e.exports=s},{"../core/localization":9,"./ClearButton":24,"./ColorWell":25,"./React-shim":28,"./UndoRedoButtons":30,"./ZoomButtons":31}],28:[function(t,e,n){var i;try{i=t("React/addons")}catch(r){i=window.React}if(null==(null!=i?i.addons:void 0))throw"Can't find React (you need the version with addons)";e.exports=i},{}],29:[function(t,e,n){var i,r;r=t("../reactGUI/createSetStateOnEventMixin"),i=t("../core/util").classSet,e.exports=React.createClass({displayName:"StrokeWidthPicker",getState:function(){return{strokeWidth:this.props.tool.strokeWidth}},getInitialState:function(){return this.getState()},mixins:[r("toolChange")],render:function(){var t,e,n,r,o,s,a;return a=React.DOM,s=a.ul,n=a.li,o=a.svg,t=a.circle,e=a.div,r=this.props.lc.opts.strokeWidths,e({},r.map(function(n){return function(r,s){var a,h;return a=i({"square-toolbar-button":!0,selected:r===n.state.strokeWidth}),h=28,e({key:r},e({className:a,onClick:function(){return n.props.tool.strokeWidth=r,n.setState(n.getState())}},o({width:h-2,height:h-2,viewPort:"0 0 "+r+" "+r,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t({cx:Math.ceil(h/2-1),cy:Math.ceil(h/2-1),r:r/2}))))}}(this)))}})},{"../core/util":15,"../reactGUI/createSetStateOnEventMixin":32}],30:[function(t,e,n){var i,r,o,s,a,h,l;i=t("./React-shim"),h=t("./createSetStateOnEventMixin"),a=t("../core/util").classSet,l=function(t){return i.createClass({displayName:"undo"===t?"UndoButton":"RedoButton",getState:function(){return{isEnabled:function(){switch(!1){case"undo"!==t:return this.props.lc.canUndo();case"redo"!==t:return this.props.lc.canRedo()}}.call(this)}},getInitialState:function(){return this.getState()},mixins:[h("drawingChange")],render:function(){var e,n,r,o,s,h,l,c,u,p,d;return p=i.DOM,n=p.div,o=p.img,d=this.props,s=d.lc,r=d.imageURLPrefix,u="undo"===t?"Undo":"Redo",e="lc-"+t+" "+a({"toolbar-button":!0,"thin-button":!0,disabled:!this.state.isEnabled}),h=function(){switch(!1){case!!this.state.isEnabled:return function(){};case"undo"!==t:return function(){return s.undo()};case"redo"!==t:return function(){return s.redo()}}}.call(this),l=""+r+"/"+t+".png",c={backgroundImage:"url("+l+")"},n({className:e,onClick:h,title:u,style:c})}})},o=i.createFactory(l("undo")),r=i.createFactory(l("redo")),s=i.createClass({displayName:"UndoRedoButtons",render:function(){var t;return(t=i.DOM.div)({className:"lc-undo-redo"},o(this.props),r(this.props))}}),e.exports=s},{"../core/util":15,"./React-shim":28,"./createSetStateOnEventMixin":32}],31:[function(t,e,n){var i,r,o,s,a,h,l;i=t("./React-shim"),h=t("./createSetStateOnEventMixin"),a=t("../core/util").classSet,l=function(t){return i.createClass({displayName:"in"===t?"ZoomInButton":"ZoomOutButton",getState:function(){return{isEnabled:function(){switch(!1){case"in"!==t:return this.props.lc.scalethis.props.lc.config.zoomMin; }}.call(this)}},getInitialState:function(){return this.getState()},mixins:[h("zoom")],render:function(){var e,n,r,o,s,h,l,c,u,p,d;return p=i.DOM,n=p.div,o=p.img,d=this.props,s=d.lc,r=d.imageURLPrefix,u="in"===t?"Zoom in":"Zoom out",e="lc-zoom-"+t+" "+a({"toolbar-button":!0,"thin-button":!0,disabled:!this.state.isEnabled}),h=function(){switch(!1){case!!this.state.isEnabled:return function(){};case"in"!==t:return function(){return s.zoom(s.config.zoomStep)};case"out"!==t:return function(){return s.zoom(-s.config.zoomStep)}}}.call(this),l=""+r+"/zoom-"+t+".png",c={backgroundImage:"url("+l+")"},n({className:e,onClick:h,title:u,style:c})}})},s=i.createFactory(l("out")),o=i.createFactory(l("in")),r=i.createClass({displayName:"ZoomButtons",render:function(){var t;return(t=i.DOM.div)({className:"lc-zoom"},s(this.props),o(this.props))}}),e.exports=r},{"../core/util":15,"./React-shim":28,"./createSetStateOnEventMixin":32}],32:[function(t,e,n){var i,r;i=t("./React-shim"),e.exports=r=function(t){return{componentDidMount:function(){return this.unsubscribe=this.props.lc.on(t,function(t){return function(){return t.setState(t.getState())}}(this))},componentWillUnmount:function(){return this.unsubscribe()}}}},{"./React-shim":28}],33:[function(t,e,n){var i,r,o;i=t("./React-shim"),r=t("../core/util").classSet,o=function(t){var e,n,o,s;return e=t.displayName,n=t.getTool,o=t.imageName,s=n(),i.createFactory(i.createClass({displayName:e,getDefaultProps:function(){return{isSelected:!1,lc:null}},componentWillMount:function(){return this.props.isSelected?this.props.lc.setTool(s):void 0},render:function(){var t,n,a,h,l,c,u,p,d;return p=i.DOM,n=p.div,h=p.img,d=this.props,a=d.imageURLPrefix,l=d.isSelected,c=d.onSelect,t=r({"lc-pick-tool":!0,"toolbar-button":!0,"thin-button":!0,selected:l}),u=""+a+"/"+o+".png",n({className:t,style:{backgroundImage:"url("+u+")"},onClick:function(){return c(s)},title:e})}}))},e.exports=o},{"../core/util":15,"./React-shim":28}],34:[function(t,e,n){var i,r,o,s,a;o=t("./React-shim"),s=t("./createToolButton"),i=o.createFactory(t("./Options")),r=o.createFactory(t("./Picker")),a=function(t,e,n,a,h){var l;return l=a.map(function(t){var e;return e=new t(n),s({displayName:e.name,imageName:e.iconName,getTool:function(){return e}})}),o.render(r({lc:n,toolButtonComponents:l,imageURLPrefix:h}),t),o.render(i({lc:n,imageURLPrefix:h}),e)},e.exports=a},{"./Options":26,"./Picker":27,"./React-shim":28,"./createToolButton":33}],35:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").ToolWithStroke,o=t("../core/shapes").createShape,e.exports=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.name="Ellipse",e.prototype.iconName="ellipse",e.prototype.begin=function(t,e,n){return this.currentShape=o("Ellipse",{x:t,y:e,strokeWidth:this.strokeWidth,strokeColor:n.getColor("primary"),fillColor:n.getColor("secondary")})},e.prototype["continue"]=function(t,e,n){return this.currentShape.width=t-this.currentShape.x,this.currentShape.height=e-this.currentShape.y,n.drawShapeInProgress(this.currentShape)},e.prototype.end=function(t,e,n){return n.saveShape(this.currentShape)},e}(r)},{"../core/shapes":13,"./base":44}],36:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./Pencil"),o=t("../core/shapes").createShape,e.exports=i=function(t){function e(){this.strokeWidth=10}return a(e,t),e.prototype.name="Eraser",e.prototype.iconName="eraser",e.prototype.makePoint=function(t,e,n){return o("Point",{x:t,y:e,size:this.strokeWidth,color:"#000"})},e.prototype.makeShape=function(){return o("ErasedLinePath")},e}(r)},{"../core/shapes":13,"./Pencil":40}],37:[function(t,e,n){var i,r,o={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").Tool,e.exports=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.name="Eyedropper",e.prototype.iconName="eyedropper",e.prototype.readColor=function(t,e,n){var i;return i=n.getPixel(t,e),n.setColor("primary",i||n.getColor("background"))},e.prototype.begin=function(t,e,n){return this.readColor(t,e,n)},e.prototype["continue"]=function(t,e,n){return this.readColor(t,e,n)},e}(r)},{"./base":44}],38:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").Tool,o=t("../core/shapes").createShape,e.exports=i=function(t){function e(){this.strokeWidth=5}return a(e,t),e.prototype.name="Line",e.prototype.iconName="line",e.prototype.optionsStyle="line-options-and-stroke-width",e.prototype.begin=function(t,e,n){return this.currentShape=o("Line",{x1:t,y1:e,x2:t,y2:e,strokeWidth:this.strokeWidth,dash:function(){switch(!1){case!this.isDashed:return[2*this.strokeWidth,4*this.strokeWidth];default:return null}}.call(this),endCapShapes:this.hasEndArrow?[null,"arrow"]:null,color:n.getColor("primary")})},e.prototype["continue"]=function(t,e,n){return this.currentShape.x2=t,this.currentShape.y2=e,n.drawShapeInProgress(this.currentShape)},e.prototype.end=function(t,e,n){return n.saveShape(this.currentShape)},e}(r)},{"../core/shapes":13,"./base":44}],39:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").Tool,o=t("../core/shapes").createShape,e.exports=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.name="Pan",e.prototype.iconName="pan",e.prototype.usesSimpleAPI=!1,e.prototype.didBecomeActive=function(t){var e;return e=[],this.unsubscribe=function(t){return function(){var t,n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t());return r}}(this),e.push(t.on("lc-pointerdown",function(e){return function(n){var i,r;return i=n.rawX,r=n.rawY,e.oldPosition=t.position,e.pointerStart={x:i,y:r}}}(this))),e.push(t.on("lc-pointerdrag",function(e){return function(n){var i,r,o;return r=n.rawX,o=n.rawY,i={x:(r-e.pointerStart.x)*t.backingScale,y:(o-e.pointerStart.y)*t.backingScale},t.setPan(e.oldPosition.x+i.x,e.oldPosition.y+i.y)}}(this)))},e.prototype.willBecomeInactive=function(t){return this.unsubscribe()},e}(r)},{"../core/shapes":13,"./base":44}],40:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").ToolWithStroke,o=t("../core/shapes").createShape,e.exports=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.name="Pencil",e.prototype.iconName="pencil",e.prototype.eventTimeThreshold=10,e.prototype.begin=function(t,e,n){return this.color=n.getColor("primary"),this.currentShape=this.makeShape(),this.currentShape.addPoint(this.makePoint(t,e,n)),this.lastEventTime=Date.now()},e.prototype["continue"]=function(t,e,n){var i;return i=Date.now()-this.lastEventTime,i>this.eventTimeThreshold?(this.lastEventTime+=i,this.currentShape.addPoint(this.makePoint(t,e,n)),n.drawShapeInProgress(this.currentShape)):void 0},e.prototype.end=function(t,e,n){return n.saveShape(this.currentShape),this.currentShape=void 0},e.prototype.makePoint=function(t,e,n){return o("Point",{x:t,y:e,size:this.strokeWidth,color:this.color})},e.prototype.makeShape=function(){return o("LinePath")},e}(r)},{"../core/shapes":13,"./base":44}],41:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").ToolWithStroke,o=t("../core/shapes").createShape,e.exports=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.name="Polygon",e.prototype.iconName="polygon",e.prototype.usesSimpleAPI=!1,e.prototype.didBecomeActive=function(t){var e,n,i,r;return r=[],this.unsubscribe=function(t){return function(){var t,e,n,i;for(i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(t());return i}}(this),this.points=null,this.maybePoint=null,i=function(e){return function(){return e._getWillFinish()?e._close(t):(e.points||e._ensureFinishButtonsExist(t),e.points?e.points.push(e.maybePoint):e.points=[e.maybePoint],e.maybePoint={x:e.maybePoint.x,y:e.maybePoint.y},t.setShapesInProgress(e._getShapes(t)),t.repaintLayer("main"))}}(this),n=function(e){return function(n){var i,r;return i=n.x,r=n.y,e.maybePoint?(e.maybePoint.x=i,e.maybePoint.y=r,t.setShapesInProgress(e._getShapes(t)),t.repaintLayer("main")):void 0}}(this),e=function(e){return function(n){var i,r;return i=n.x,r=n.y,e.maybePoint={x:i,y:r},t.setShapesInProgress(e._getShapes(t)),t.repaintLayer("main")}}(this),r.push(t.on("drawingChange",function(e){return function(){return e._cancel(t)}}(this))),r.push(t.on("lc-pointerdown",e)),r.push(t.on("lc-pointerdrag",n)),r.push(t.on("lc-pointermove",n)),r.push(t.on("lc-pointerup",i))},e.prototype.willBecomeInactive=function(t){return(this.points||this.maybePoint)&&this._cancel(t),this.unsubscribe()},e.prototype._getArePointsClose=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)<10},e.prototype._getWillClose=function(){return this.points&&this.points.length>1&&this.maybePoint?this._getArePointsClose(this.points[0],this.maybePoint):!1},e.prototype._getWillFinish=function(){return this.points&&this.points.length>1&&this.maybePoint?this._getArePointsClose(this.points[0],this.maybePoint)||this._getArePointsClose(this.points[this.points.length-1],this.maybePoint):!1},e.prototype._cancel=function(t){return this._ensureFinishButtonsDontExist(t),this.maybePoint=null,this.points=null,t.setShapesInProgress([]),t.repaintLayer("main")},e.prototype._close=function(t){return this._ensureFinishButtonsDontExist(t),t.setShapesInProgress([]),this.points.length>2&&t.saveShape(this._getShape(t,!1)),this.maybePoint=null,this.points=null},e.prototype._getShapes=function(t,e){var n;return null==e&&(e=!0),n=this._getShape(t,e),n?[n]:[]},e.prototype._getShape=function(t,e){var n;return null==e&&(e=!0),n=[],this.points&&(n=n.concat(this.points)),!e&&n.length<3?null:(e&&this.maybePoint&&n.push(this.maybePoint),n.length>1?o("Polygon",{isClosed:this._getWillClose(),strokeColor:t.getColor("primary"),fillColor:t.getColor("secondary"),strokeWidth:this.strokeWidth,points:n.map(function(t){return o("Point",t)})}):null)},e.prototype._ensureFinishButtonsExist=function(t){var e;if(!this.containerEl)return e="
Finish polygon (closed)
Finish polygon (open)
Cancel polygon
",this.containerEl=document.createElement("div"),this.containerEl.className="polygon-toolbar horz-toolbar",this.containerEl.innerHTML=e,t.containerEl.appendChild(this.containerEl),document.getElementById("polygon-finish-closed").addEventListener("click",function(e){return function(n){return e.maybePoint=e.points[0],e._close(t)}}(this)),document.getElementById("polygon-finish-open").addEventListener("click",function(e){return function(n){return e.maybePoint={x:1/0,y:1/0},e._close(t)}}(this)),document.getElementById("polygon-cancel").addEventListener("click",function(e){return function(n){return e._cancel(t)}}(this))},e.prototype._ensureFinishButtonsDontExist=function(t){return this.containerEl?(t.containerEl.removeChild(this.containerEl),this.containerEl=null):void 0},e}(r)},{"../core/shapes":13,"./base":44}],42:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").ToolWithStroke,o=t("../core/shapes").createShape,e.exports=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.name="Rectangle",e.prototype.iconName="rectangle",e.prototype.begin=function(t,e,n){return this.currentShape=o("Rectangle",{x:t,y:e,strokeWidth:this.strokeWidth,strokeColor:n.getColor("primary"),fillColor:n.getColor("secondary")})},e.prototype["continue"]=function(t,e,n){return this.currentShape.width=t-this.currentShape.x,this.currentShape.height=e-this.currentShape.y,n.drawShapeInProgress(this.currentShape)},e.prototype.end=function(t,e,n){return n.saveShape(this.currentShape)},e}(r)},{"../core/shapes":13,"./base":44}],43:[function(t,e,n){var i,r,o,s,a={}.hasOwnProperty,h=function(t,e){function n(){this.constructor=t}for(var i in e)a.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./base").Tool,o=t("../core/shapes").createShape,s=function(t,e){return t.xe.x+e.width?!1:t.y>e.y+e.height?!1:!0},e.exports=i=function(t){function e(){this.text="",this.font="bold 18px sans-serif",this.currentShape=null,this.currentShapeState=null,this.initialShapeBoundingRect=null,this.dragAction=null,this.didDrag=!1}return h(e,t),e.prototype.name="Text",e.prototype.iconName="text",e.prototype.didBecomeActive=function(t){var e,n,i;return n=[],this.unsubscribe=function(t){return function(){var t,e,i,r;for(r=[],e=0,i=n.length;i>e;e++)t=n[e],r.push(t());return r}}(this),e=function(e){return function(){return e._ensureNotEditing(t),e._clearCurrentShape(t),t.repaintLayer("main")}}(this),i=function(e){return function(){return e._updateInputEl(t)}}(this),n.push(t.on("drawingChange",e)),n.push(t.on("zoom",i)),n.push(t.on("imageSizeChange",i)),n.push(t.on("snapshotLoad",function(e){return function(){return e._clearCurrentShape(t),t.repaintLayer("main")}}(this))),n.push(t.on("primaryColorChange",function(e){return function(n){return e.currentShape?(e.currentShape.color=n,e._updateInputEl(t),t.repaintLayer("main")):void 0}}(this))),n.push(t.on("setFont",function(e){return function(n){return e.currentShape?(e.font=n,e.currentShape.setFont(n),e._setShapesInProgress(t),e._updateInputEl(t),t.repaintLayer("main")):void 0}}(this)))},e.prototype.willBecomeInactive=function(t){return this.currentShape&&(this._ensureNotEditing(t),this.commit(t)),this.unsubscribe()},e.prototype.setText=function(t){return this.text=t},e.prototype._ensureNotEditing=function(t){return"editing"===this.currentShapeState?this._exitEditingState(t):void 0},e.prototype._clearCurrentShape=function(t){return this.currentShape=null,this.initialShapeBoundingRect=null,this.currentShapeState=null,t.setShapesInProgress([])},e.prototype.commit=function(t){return this.currentShape.text&&t.saveShape(this.currentShape),this._clearCurrentShape(t),t.repaintLayer("main")},e.prototype._getSelectionShape=function(t,e){return null==e&&(e=null),o("SelectionBox",{shape:this.currentShape,ctx:t,backgroundColor:e})},e.prototype._setShapesInProgress=function(t){switch(this.currentShapeState){case"selected":return t.setShapesInProgress([this._getSelectionShape(t.ctx),this.currentShape]);case"editing":return t.setShapesInProgress([this._getSelectionShape(t.ctx,"#fff")]);default:return t.setShapesInProgress([this.currentShape])}},e.prototype.begin=function(t,e,n){var i,r,a,h;return this.dragAction="none",this.didDrag=!1,"selected"===this.currentShapeState||"editing"===this.currentShapeState?(i=this.currentShape.getBoundingRect(n.ctx),h=this._getSelectionShape(n.ctx),a=h.getBoundingRect(),r={x:t,y:e},s(r,i)&&(this.dragAction="move"),s(r,h.getBottomRightHandleRect())&&(this.dragAction="resizeBottomRight"),s(r,h.getTopLeftHandleRect())&&(this.dragAction="resizeTopLeft"),s(r,h.getBottomLeftHandleRect())&&(this.dragAction="resizeBottomLeft"),s(r,h.getTopRightHandleRect())&&(this.dragAction="resizeTopRight"),"none"===this.dragAction&&"editing"===this.currentShapeState&&(this.dragAction="stop-editing",this._exitEditingState(n))):(this.color=n.getColor("primary"),this.currentShape=o("Text",{x:t,y:e,text:this.text,color:this.color,font:this.font,v:1}),this.dragAction="place",this.currentShapeState="selected"),"none"===this.dragAction?void this.commit(n):(this.initialShapeBoundingRect=this.currentShape.getBoundingRect(n.ctx),this.dragOffset={x:t-this.initialShapeBoundingRect.x,y:e-this.initialShapeBoundingRect.y},this._setShapesInProgress(n),n.repaintLayer("main"))},e.prototype["continue"]=function(t,e,n){var i,r,o;if("none"!==this.dragAction){switch(i=this.initialShapeBoundingRect,o=i.x+i.width,r=i.y+i.height,this.dragAction){case"place":this.currentShape.x=t,this.currentShape.y=e,this.didDrag=!0;break;case"move":this.currentShape.x=t-this.dragOffset.x,this.currentShape.y=e-this.dragOffset.y,this.didDrag=!0;break;case"resizeBottomRight":this.currentShape.setSize(t-(this.dragOffset.x-this.initialShapeBoundingRect.width)-i.x,e-(this.dragOffset.y-this.initialShapeBoundingRect.height)-i.y);break;case"resizeTopLeft":this.currentShape.setSize(o-t+this.dragOffset.x,r-e+this.dragOffset.y),this.currentShape.setPosition(t-this.dragOffset.x,e-this.dragOffset.y);break;case"resizeBottomLeft":this.currentShape.setSize(o-t+this.dragOffset.x,e-(this.dragOffset.y-this.initialShapeBoundingRect.height)-i.y),this.currentShape.setPosition(t-this.dragOffset.x,this.currentShape.y);break;case"resizeTopRight":this.currentShape.setSize(t-(this.dragOffset.x-this.initialShapeBoundingRect.width)-i.x,r-e+this.dragOffset.y),this.currentShape.setPosition(this.currentShape.x,e-this.dragOffset.y)}return this._setShapesInProgress(n),n.repaintLayer("main"),this._updateInputEl(n)}},e.prototype.end=function(t,e,n){return this.currentShape?(this.currentShape.setSize(this.currentShape.forcedWidth,0),"selected"===this.currentShapeState&&("place"===this.dragAction||"move"===this.dragAction&&!this.didDrag)&&this._enterEditingState(n),this._setShapesInProgress(n),n.repaintLayer("main"),this._updateInputEl(n)):void 0},e.prototype._enterEditingState=function(t){var e;if(this.currentShapeState="editing",this.inputEl)throw"State error";return this.inputEl=document.createElement("textarea"),this.inputEl.className="text-tool-input",this.inputEl.style.position="absolute",this.inputEl.style.transformOrigin="0px 0px",this.inputEl.style.backgroundColor="transparent",this.inputEl.style.border="none",this.inputEl.style.outline="none",this.inputEl.style.margin="0",this.inputEl.style.padding="4px",this.inputEl.style.zIndex="1000",this.inputEl.style.overflow="hidden",this.inputEl.style.resize="none",this.inputEl.value=this.currentShape.text,this.inputEl.addEventListener("mousedown",function(t){return t.stopPropagation()}),this.inputEl.addEventListener("touchstart",function(t){return t.stopPropagation()}),e=function(e){return function(n){return e.currentShape.setText(n.target.value),e.currentShape.enforceMaxBoundingRect(t),e._setShapesInProgress(t),t.repaintLayer("main"),e._updateInputEl(t),n.stopPropagation()}}(this),this.inputEl.addEventListener("keydown",function(e){return function(){return e._updateInputEl(t,!0)}}(this)),this.inputEl.addEventListener("keyup",e),this.inputEl.addEventListener("change",e),this._updateInputEl(t),t.containerEl.appendChild(this.inputEl),this.inputEl.focus(),this._setShapesInProgress(t)},e.prototype._exitEditingState=function(t){return this.currentShapeState="selected",t.containerEl.removeChild(this.inputEl),this.inputEl=null,this._setShapesInProgress(t),t.repaintLayer("main")},e.prototype._updateInputEl=function(t,e){var n,i;return null==e&&(e=!1),this.inputEl?(n=this.currentShape.getBoundingRect(t.ctx,!0),this.inputEl.style.font=this.currentShape.font,this.inputEl.style.color=this.currentShape.color,this.inputEl.style.left=""+(t.position.x/t.backingScale+n.x*t.scale-4)+"px",this.inputEl.style.top=""+(t.position.y/t.backingScale+n.y*t.scale-4)+"px",e&&!this.currentShape.forcedWidth?this.inputEl.style.width=""+(n.width+10+this.currentShape.renderer.emDashWidth)+"px":this.inputEl.style.width=""+(n.width+12)+"px",e?this.inputEl.style.height=""+(n.height+10+this.currentShape.renderer.metrics.leading)+"px":this.inputEl.style.height=""+(n.height+10)+"px",i="scale("+t.scale+")",this.inputEl.style.transform=i,this.inputEl.style.webkitTransform=i,this.inputEl.style.MozTransform=i,this.inputEl.style.msTransform=i,this.inputEl.style.OTransform=i):void 0},e.prototype.optionsStyle="font",e}(r)},{"../core/shapes":13,"./base":44}],44:[function(t,e,n){var i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};o={},o.Tool=i=function(){function t(){}return t.prototype.name=null,t.prototype.iconName=null,t.prototype.usesSimpleAPI=!0,t.prototype.begin=function(t,e,n){},t.prototype["continue"]=function(t,e,n){},t.prototype.end=function(t,e,n){},t.prototype.optionsStyle=null,t.prototype.didBecomeActive=function(t){},t.prototype.willBecomeInactive=function(t){},t}(),o.ToolWithStroke=r=function(t){function e(t){this.strokeWidth=t.opts.defaultStrokeWidth}return a(e,t),e.prototype.optionsStyle="stroke-width",e}(i),e.exports=o},{}]},{},[18])(18)}); define('filter_poodll/owl_amd', ["jquery","core/log","filter_poodll/owl.carousel","filter_poodll/jquery.flip"],function(a,b,c,d){"use strict";return b.debug("Filter PoodLL: owl-carousel initialising"),{injectcss:function(a){var b=document.createElement("link");b.href=a,a.toLowerCase().lastIndexOf(".html")==a.length-5?b.rel="import":(b.type="text/css",b.rel="stylesheet"),document.getElementsByTagName("head")[0].appendChild(b)},loadowl:function(c){b.debug(c),c.CSS_INJECT&&(this.injectcss(c.CSS_OWL),this.injectcss(c.CSS_THEME));var d=a("#"+c.FLASHCARDS_ID+" .owl-carousel");d.owlCarousel({navigation:!0,slideSpeed:300,pagination:!1,autoHeight:c.AUTOHEIGHT,paginationSpeed:400,singleItem:c.SINGLEITEM}),a("#"+c.FLASHCARDS_ID+" .filter_poodll_flashcards_owl_previous").click(function(){d.trigger("owl.prev"),b.debug("right")}),a("#"+c.FLASHCARDS_ID+" .filter_poodll_flashcards_owl_next").click(function(){d.trigger("owl.next"),b.debug("left")}),a("#"+c.FLASHCARDS_ID+" .filter_poodll_flashcards_owl_onecard").flip()}}}); define('filter_poodll/reveal_amd', ["jquery","core/log","filter_poodll/reveal"],function(a,b,c){"use strict";return b.debug("Filter PoodLL: revealjs initialising"),{injectcss:function(a){var b=document.createElement("link");b.href=a,a.toLowerCase().lastIndexOf(".html")==a.length-5?b.rel="import":(b.type="text/css",b.rel="stylesheet"),document.getElementsByTagName("head")[0].appendChild(b)},loadrevealjs:function(c){b.debug(c),c.CSS_INJECT&&(this.injectcss(c.CSS_REVEAL),this.injectcss(c.CSS_THEME)),Reveal.initialize({embedded:!0,loop:!0,width:600,height:400,transition:"slide",flipped:!1}),a(".filter_poodll_revealjs_previous").click(function(){Reveal.right()}),a(".filter_poodll_revealjs_next").click(function(){Reveal.left()}),Reveal.addEventListener("click",function(){Reveal.flipped?(Reveal.up(),Reveal.flipped=!1,b.debug("up")):(Reveal.flipped=!0,Reveal.down(),b.debug("down"))},!1)}}}); !function(a){"function"==typeof define&&define.amd?define('filter_poodll/jquery.flip', ["jquery"],a):a(jQuery)}(function(a){var b=function(b,c){b.data("flipped",!0);var e="rotate"+b.data("axis");b.find(b.data("front")).css({transform:e+(b.data("reverse")?"(-180deg)":"(180deg)"),"z-index":"0"}),b.find(b.data("back")).css({transform:e+"(0deg)","z-index":"1"}),b.one(d(),function(){a(this).trigger("flip:done"),void 0!==c&&c.call(this)})},c=function(b,c){b.data("flipped",!1);var e="rotate"+b.data("axis");b.find(b.data("front")).css({transform:e+"(0deg)","z-index":"1"}),b.find(b.data("back")).css({transform:e+(b.data("reverse")?"(180deg)":"(-180deg)"),"z-index":"0"}),b.one(d(),function(){a(this).trigger("flip:done"),void 0!==c&&c.call(this)})},d=function(){var a,b=document.createElement("fakeelement"),c={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]};a.fn.flip=function(d,f){return"function"==typeof d&&(f=d),this.each(function(){var g=a(this);if(void 0===d||"boolean"!=typeof d&&"string"!=typeof d)if(g.data("initiated"))!d||void 0===d.axis&&void 0===d.reverse||e.call(this,d,function(){g.trigger("flip:change"),void 0!==f&&f.call(this)});else{g.data("initiated",!0);var h=a.extend({axis:"y",reverse:!1,trigger:"click",speed:500,forceHeight:!1,forceWidth:!1,autoSize:!0,front:"auto",back:"auto"},d);"auto"==h.front?h.front=g.find(".front").length>0?".front":"div:first-child":"autostrict"==h.front&&(h.front="div:first-child"),"auto"==h.back?h.back=g.find(".back").length>0?".back":"div:first-child + div":"autostrict"==h.back&&(h.back="div:first-child + div"),g.data("reverse",h.reverse),g.data("axis",h.axis),g.data("front",h.front),g.data("back",h.back);var i="rotate"+("x"==h.axis.toLowerCase()?"x":"y"),j=2*g["outer"+("rotatex"==i?"Height":"Width")]();g.find(g.data("back")).css({transform:i+"("+(h.reverse?"180deg":"-180deg")+")"}),g.css({perspective:j,position:"relative"});var k=h.speed/1e3||.5,l=g.find(h.front).add(h.back,g);if(h.forceHeight?l.outerHeight(g.height()):h.autoSize&&l.css({height:"100%"}),h.forceWidth?l.outerWidth(g.width()):h.autoSize&&l.css({width:"100%"}),l.css({"backface-visibility":"hidden","transform-style":"preserve-3d",position:"absolute","z-index":"1"}),l.find("*").css({"backface-visibility":"hidden"}),g.find(g.data("back")).css({transform:i+"("+(h.reverse?"180deg":"-180deg")+")","z-index":"0"}),(window.chrome||window.Intl&&Intl.v8BreakIterator)&&"CSS"in window&&g.css({"-webkit-transform-style":"preserve-3d"}),setTimeout(function(){l.css({transition:"all "+k+"s ease-out"}),void 0!==f&&f.call(this)},20),"click"==h.trigger.toLowerCase())g.on(a.fn.tap?"tap.flip":"click.flip",function(d){d||(d=window.event),g.find(a(d.target).closest('button, a, input[type="submit"]')).length||(g.data("flipped")?c(g):b(g))});else if("hover"==h.trigger.toLowerCase()){var m=function(){g.off("mouseleave.flip"),b(g),setTimeout(function(){g.on("mouseleave.flip",n),g.is(":hover")||c(g)},h.speed+150)},n=function(){c(g)};g.on("mouseenter.flip",m),g.on("mouseleave.flip",n)}}else"toggle"==d&&(d=!g.data("flipped")),d?b(g,f):c(g,f)}),this};var e=function(b,c){var d=!1;if(void 0!==b.axis&&a(this).data("axis")!=b.axis.toLowerCase()&&(a(this).data("axis",b.axis.toLowerCase()),d=!0),void 0!==b.reverse&&a(this).data("reverse")!=b.reverse&&(a(this).data("reverse",b.reverse),d=!0),d){var e=a(this).find(a(this).data("front")).add(a(this).data("back"),a(this)),f=e.css("transition");e.css({transition:"none"});var g="rotate"+a(this).data("axis");a(this).data("flipped")?a(this).find(a(this).data("front")).css({transform:g+(a(this).data("reverse")?"(-180deg)":"(180deg)"),"z-index":"0"}):a(this).find(a(this).data("back")).css({transform:g+"("+(a(this).data("reverse")?"180deg":"-180deg")+")","z-index":"0"}),setTimeout(function(){e.css({transition:f}),c.call(this)}.bind(this),0)}else setTimeout(c.bind(this),0)}}); define('tool_templatelibrary/display', ["jquery","core/ajax","core/log","core/notification","core/templates","core/config","core/str"],function(a,b,c,d,e,f,g){var h=function(a,b){var c="@template "+b,d=0,e=[];if(e=a.match(/{{!([\s\S]*?)}}/g),null!==e)for(d=0;d a",this.$body=a("body"),this.refresh(),this.process()}a(".h1").hide(),a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()});var e='[data-dismiss="alert"]',f=function(b){a(b).on("click",e,this.close)};f.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var g=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var c=a(this),d=c.data("alert");d||c.data("alert",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.alert.Constructor=f,a.fn.alert.noConflict=function(){return a.fn.alert=g,this},a(document).on("click.alert.data-api",e,f.prototype.close);var h=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};h.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},h.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var g=a.fn.button;a.fn.button=function(b){return this.each(function(){var c=a(this),d=c.data("button"),e="object"==typeof b&&b;d||c.data("button",d=new h(this,e)),"toggle"==b?d.toggle():b&&d.setState(b)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=h,a.fn.button.noConflict=function(){return a.fn.button=g,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")});var i=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};i.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var g=a.fn.carousel;a.fn.carousel=function(b){return this.each(function(){var c=a(this),d=c.data("carousel"),e=a.extend({},a.fn.carousel.defaults,"object"==typeof b&&b),f="string"==typeof b?b:e.slide;d||c.data("carousel",d=new i(this,e)),"number"==typeof b?d.to(b):f?d[f]():e.interval&&d.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=i,a.fn.carousel.noConflict=function(){return a.fn.carousel=g,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()});var j=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};j.prototype={constructor:j,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var g=a.fn.collapse;a.fn.collapse=function(b){return this.each(function(){var c=a(this),d=c.data("collapse"),e=a.extend({},a.fn.collapse.defaults,c.data(),"object"==typeof b&&b);d||c.data("collapse",d=new j(this,e)),"string"==typeof b&&d[b]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=j,a.fn.collapse.noConflict=function(){return a.fn.collapse=g,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)});var k="[data-toggle=dropdown]",l=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};l.prototype={constructor:l,toggle:function(d){var e,f,g=a(this);if(!g.is(".disabled, :disabled"))return e=c(g),f=e.hasClass("open"),b(),f||("ontouchstart"in document.documentElement&&a('