diff --git a/tinymce/dist/bundle.js b/tinymce/dist/bundle.js index 4dd9c16..0541015 100644 --- a/tinymce/dist/bundle.js +++ b/tinymce/dist/bundle.js @@ -1,70 +1,2 @@ -!function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=151)}([function(e,t,n){var a=n(6),r=n(26),i=n(19),o=n(20),s=n(27),l=function(e,t,n){var u,c,d,f,h=e&l.F,p=e&l.G,m=e&l.S,g=e&l.P,v=e&l.B,y=p?a:m?a[t]||(a[t]={}):(a[t]||{}).prototype,b=p?r:r[t]||(r[t]={}),_=b.prototype||(b.prototype={});for(u in p&&(n=t),n)d=((c=!h&&y&&void 0!==y[u])?y:n)[u],f=v&&c?s(d,a):g&&"function"==typeof d?s(Function.call,d):d,y&&o(y,u,d,e&l.U),b[u]!=d&&i(b,u,f),g&&_[u]!=d&&(_[u]=d)};a.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={TRANSPARENCY:!1,TRANSPARENCY_TYPE:"squares",LANG:"en",WIDTH:500,HEIGHT:500,visible_width:null,visible_height:null,COLOR:"#008000",ALPHA:255,ZOOM:1,pixabay_key:"3ca2cd8af3fde33af218bea02-9021417",layers:[],layer:null,need_render:!1,mouse:{},themes:["dark","light","green"],TOOLS:[{name:"select",title:"Select object tool",attributes:{auto_select:!0}},{name:"selection",title:"Selection",attributes:{},on_leave:"on_leave"},{name:"brush",title:"Brush",attributes:{size:4,smart_brush:!0}},{name:"pencil",title:"Pencil",on_update:"on_params_update",attributes:{antialiasing:!0,size:2}},{name:"pick_color",title:"Pick Color",attributes:{global:!1}},{name:"erase",title:"Erase",on_update:"on_params_update",attributes:{size:30,circle:!0,strict:!0}},{name:"magic_wand",title:"Magic Wand Tool",attributes:{power:15,anti_aliasing:!0,contiguous:!1}},{name:"fill",title:"Fill",attributes:{power:5,anti_aliasing:!1,contiguous:!1}},{name:"line",title:"Line",attributes:{size:1,type:{value:"Simple",values:["Simple","Arrow"]}}},{name:"rectangle",title:"Rectangle",attributes:{size:1,radius:0,fill:!0,square:!1}},{name:"circle",title:"Circle",attributes:{size:1,fill:!0,circle:!1}},{name:"media",title:"Search images",on_activate:"on_activate",attributes:{size:30}},{name:"text",title:"Text",attributes:{}},{name:"gradient",title:"Gradient",attributes:{color_1:"#008000",color_2:"#ffffff",alpha:0,radial:!1,radial_power:50}},{name:"clone",title:"Clone tool",attributes:{size:30,anti_aliasing:!0,source_layer:{value:"Current",values:["Current","Previous"]}}},{name:"crop",title:"Crop",on_update:"on_params_update",on_leave:"on_leave",attributes:{crop:!0}},{name:"blur",title:"Blur tool",attributes:{size:30,strength:1}},{name:"sharpen",title:"Sharpen tool",attributes:{size:30}},{name:"desaturate",title:"Desaturate",attributes:{size:50,anti_aliasing:!0}},{name:"bulge_pinch",title:"Bulge/Pinch tool",attributes:{radius:80,power:50,bulge:!0}},{name:"animation",title:"Play animation",on_update:"on_params_update",on_leave:"on_leave",attributes:{play:!1,delay:400}}]};a.TOOL=a.TOOLS[2],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n=0;o--){var s=r[o];this.ctx.globalAlpha=s.opacity/100,this.ctx.globalCompositeOperation=s.composition,this.render_object(this.ctx,s)}this.Base_gui.draw_grid(this.ctx),this.Base_selection.draw_selection(),this.render_preview(r),this.after_render(),this.last_zoom=i.default.ZOOM,this.Base_gui.GUI_details.render_details()}requestAnimationFrame((function(){t.render(e)}))}else i.default.need_render=!0}},{key:"render_preview",value:function(e){var t=this.Base_gui.GUI_preview.PREVIEW_SIZE.w,n=this.Base_gui.GUI_preview.PREVIEW_SIZE.h;this.ctx_preview.save(),this.ctx_preview.clearRect(0,0,t,n),this.ctx_preview.scale(t/i.default.WIDTH,n/i.default.HEIGHT);for(var a=e.length-1;a>=0;a--){var r=e[a];0!=r.visible&&(null!=r.type&&(this.ctx_preview.globalAlpha=r.opacity/100,this.ctx_preview.globalCompositeOperation=r.composition,this.render_object(this.ctx_preview,r)))}this.ctx_preview.restore(),this.Base_gui.GUI_preview.render_preview_active_zone()}},{key:"render_object",value:function(e,t){if(0!=t.visible&&null!=t.type){var n="";for(var a in t.filters){var r=t.filters[a];""!=n&&(n+=" "),n+=r.name+"("+r.params.value+")"}if(e.filter=""!=n?n:"none","image"==t.type){e.save(),e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),null!=t.link_canvas&&null!=t.link_canvas?e.drawImage(t.link_canvas,-t.width/2,-t.height/2,t.width,t.height):e.drawImage(t.link,-t.width/2,-t.height/2,t.width,t.height),e.restore()}else{var i=t.render_function[0],o=t.render_function[1];this.Base_gui.GUI_tools.tools_modules[i][o](e,t)}e.filter="none"}}},{key:"insert",value:(t=regeneratorRuntime.mark((function e(t){var n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this,e.abrupt("return",new Promise((function(e,o){var s=!1,l=!1,u={id:n.auto_increment,parent_id:0,name:n.Helper.ucfirst(i.default.TOOL.name)+" #"+n.auto_increment,type:null,link:null,x:0,y:0,width:0,width_original:null,height:0,height_original:null,visible:!0,is_vector:!1,opacity:100,order:n.auto_increment,composition:"source-over",rotate:0,data:null,params:{},status:null,color:i.default.COLOR,filters:[],render_function:null};for(var c in t)void 0!==u[c]?u[c]=t[c]:f.default.error("Error: wrong key: "+c);if("image"==u.type&&(u.name.toLowerCase().indexOf(".svg")==u.name.length-4&&(u.is_vector=!0),1==i.default.layers.length&&0==i.default.layer.width&&0==i.default.layer.height&&null==i.default.layer.data&&n.delete(i.default.layer.id,!0),null==u.link&&("object"==a(u.data)?(0==u.width&&(u.width=u.data.width),0==u.height&&(u.height=u.data.height),u.link=u.data.cloneNode(!0),u.link.onload=function(){i.default.need_render=!0},u.data=null,l=!0):"string"==typeof u.data?(s=!0,u.link=new Image,u.link.onload=function(){0==u.width&&(u.width=u.link.width),0==u.height&&(u.height=u.link.height),null==u.width_original&&(u.width_original=u.width),null==u.height_original&&(u.height_original=u.height),u.data=null,n.autoresize(u.width,u.height,u.id,r),n.render(),u.link.onload=function(){i.default.need_render=!0},e(!0)},u.link.src=u.data):f.default.error("Error: can not load image."))),null!=t&&i.default.layers.length>0&&0==i.default.layer.width&&0==i.default.layer.height&&null==i.default.layer.data&&"image"!=u.type&&!1!==r)for(var c in u)"id"!=c&&"name"!=c&&"order"!=c&&(i.default.layer[c]=u[c]);else i.default.layers.push(u),i.default.layer=n.get_layer(u.id),n.auto_increment++,null==i.default.layer&&(i.default.layer=i.default.layers[0]);u.id>=n.auto_increment&&(n.auto_increment=u.id+1),1==l&&n.autoresize(i.default.layer.width,i.default.layer.height),n.render(),n.Base_gui.GUI_layers.render_layers(),0==s&&e(!0)})));case 2:case"end":return e.stop()}}),e,this)})),n=function(){var e=t.apply(this,arguments);return new Promise((function(t,n){return function a(r,i){try{var o=e[r](i),s=o.value}catch(e){return void n(e)}if(!o.done)return Promise.resolve(s).then((function(e){a("next",e)}),(function(e){a("throw",e)}));t(s)}("next")}))},function(e){return n.apply(this,arguments)})},{key:"autoresize",value:function(e,t,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=this,o=!1;if(null==n&&(n=i.default.layer),e>i.default.WIDTH||t>i.default.HEIGHT){var s=document.getElementById("main_wrapper"),l=s.clientWidth,u=s.clientHeight;(e>l||t>u)&&(o=!0),e>i.default.WIDTH&&(i.default.WIDTH=parseInt(e)),t>i.default.HEIGHT&&(i.default.HEIGHT=parseInt(t))}if(1==i.default.layers.length&&!1!==a&&(e=0;t--)this.delete(i.default.layers[t].id,!0);if(this.auto_increment=1,null!=e&&!0===e){this.insert({})}this.render(),this.Base_gui.GUI_layers.render_layers()}},{key:"toggle_visibility",value:function(e){e=parseInt(e);var t=this.get_layer(e);0==t.visible?t.visible=!0:t.visible=!1,this.render(),this.Base_gui.GUI_layers.render_layers()}},{key:"refresh_gui",value:function(){this.Base_gui.GUI_layers.render_layers()}},{key:"select",value:function(e){e=parseInt(e),i.default.layer=this.get_layer(e),this.Base_selection.reset_selection(),this.render(),this.Base_gui.GUI_layers.render_layers()}},{key:"set_opacity",value:function(e,t){e=parseInt(e),((t=parseInt(t))<0||t>100)&&(t=100),this.get_layer(e).opacity=t}},{key:"layer_clear",value:function(e){e=parseInt(e);var t=this.get_layer(e);t.data=null,t.x=0,t.y=0,t.width=0,t.height=0}},{key:"move",value:function(e,t){e=parseInt(e);var n=this.get_layer(e);if(t<0)var a=this.find_previous(e);else a=this.find_next(e);if(null!=a){var r=n.order;n.order=a.order,a.order=r}this.render(),this.Base_gui.GUI_layers.render_layers()}},{key:"get_sorted_layers",value:function(){return i.default.layers.concat().sort((function(e,t){return t.order-e.order}))}},{key:"is_layer_empty",value:function(e){var t=this.get_layer(e);return 0==t.width&&0==t.height&&null==t.data}},{key:"find_next",value:function(e){e=parseInt(e);for(var t=this.get_layer(e),n=this.get_sorted_layers(),a=null,r=n.length-1;r>=0;r--){var i=n[r];if(null!=a&&a.id==t.id)return i;a=i}return null}},{key:"find_previous",value:function(e){e=parseInt(e);var t=this.get_layer(e),n=this.get_sorted_layers(),a=null;for(var r in n){var i=n[r];if(null!=a&&a.id==t.id)return i;a=i}return null}},{key:"get_world_coords",value:function(e,t){return c.default.toWorld(e,t)}},{key:"add_filter",value:function(e,t,n){null==e&&(e=i.default.layer.id);var a=this.get_layer(e),r={id:this.Helper.getRandomInt(1,999999999),name:t,params:n};a.filters.push(r),i.default.need_render=!0,this.Base_gui.GUI_layers.render_layers()}},{key:"delete_filter",value:function(e,t){null==e&&(e=i.default.layer.id);var n=this.get_layer(e);for(var a in n.filters)n.filters[a].id==t&&n.filters.splice(a,1);i.default.need_render=!0,this.Base_gui.GUI_layers.render_layers()}},{key:"convert_layers_to_canvas",value:function(e,t){for(var n=this.get_sorted_layers(),a=n.length-1;a>=0;a--){var r=n[a];0!=r.visible&&null!=r.type&&(null!=t&&r.id!=t||(e.globalAlpha=r.opacity/100,e.globalCompositeOperation=r.composition,this.render_object(e,r)))}}},{key:"convert_layer_to_canvas",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments[2];null==t&&(t=!1),null==e&&(e=i.default.layer.id);var a=this.get_layer(e),r=0,o=0,s=document.createElement("canvas");if(!0===t&&"image"==a.type?(s.width=a.width_original,s.height=a.height_original,n=!1):(s.width=Math.max(a.width,i.default.WIDTH),s.height=Math.max(a.height,i.default.HEIGHT)),!0===t&&"image"==a.type?s.getContext("2d").drawImage(a.link,0,0):this.render_object(s.getContext("2d"),a),(1==n||null==n)&&null!=a.type){var l=this.Image_trim.get_trim_info(e);if(l.left>0||l.top>0||l.right>0||l.bottom>0){r=l.left,o=l.top;var u=s.width-l.left-l.right,c=s.height-l.top-l.bottom;u>1&&c>1&&this.Helper.change_canvas_size(s,u,c,r,o)}}return s.dataset.x=r,s.dataset.y=o,s}},{key:"update_layer_image",value:function(e,t){null==t&&(t=i.default.layer.id);var n=this.get_layer(t);if("image"!=n.type)return f.default.error("Error: layer must be image."),null;0==this.Helper.is_edge_or_ie()?e.toBlob((function(e){n.link.src=window.URL.createObjectURL(e),i.default.need_render=!0}),"image/png"):n.link.src=e.toDataURL(),i.default.need_render=!0}},{key:"get_dimensions",value:function(){return{width:i.default.WIDTH,height:i.default.HEIGHT}}}]),e}();t.default=m},function(e,t,n){var a;/*! alertifyjs - v1.11.4 - Mohammad Younes (http://alertifyjs.com) */!function(n){"use strict";function r(e,t){e.className+=" "+t}function i(e,t){for(var n=e.className.split(" "),a=t.split(" "),r=0;r-1&&n.splice(i,1)}e.className=n.join(" ")}function o(){return"rtl"===n.getComputedStyle(document.body).direction}function s(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}function l(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}function u(e){for(;e.lastChild;)e.removeChild(e.lastChild)}function c(e){if(null===e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n0){for(var n=[],a=0;a=0?(i(document.body,ye.noOverflow),w(!1)):e>0&&document.body.className.indexOf(ye.noOverflow)<0&&(w(!0),r(document.body,ye.noOverflow))}function w(e){P.defaults.preventBodyShift&&(e&&document.documentElement.scrollHeight>document.documentElement.clientHeight?(_e=he,be=n.getComputedStyle(document.body).top,r(document.body,ye.fixed),document.body.style.top=-he+"px"):e||(he=_e,document.body.style.top=be,i(document.body,ye.fixed),a()))}function S(e,t){for(var n=x.indexOf(t)+1;n200&&(xe=e.timeStamp)&&!we){var n=e.srcElement||e.target;return!0===t.get("closableByDimmer")&&n===t.elements.modal&&T(t),we=!1,!1}}function N(e,t){if(Date.now()-Ae>200&&(Ae=Date.now()))for(var n=0;n-1?(N(t,(function(e){return e.key===n})),!1):void 0}ke=!1}function U(e){var t=x[x.length-1],n=e.keyCode;if(n===b||n===_){for(var a=t.__internal.buttons,r=0;rv-1&&pe.indexOf(n)>-1)return e.preventDefault(),e.stopPropagation(),N(t,(function(e){return e.key===n})),!1}function W(e,t){if(t)t.focus();else{var n=e.__internal.focus,a=n.element;switch(typeof n.element){case"number":e.__internal.buttons.length>n.element&&(a=!0===e.get("basic")?e.elements.reset[0]:e.__internal.buttons[n.element].element);break;case"string":a=e.elements.body.querySelector(n.element);break;case"function":a=n.element.call(e)}null!=a||0!==e.__internal.buttons.length||(a=e.elements.reset[0]),a&&a.focus&&(a.focus(),n.select&&a.select&&a.select())}}function V(e,t){if(!t)for(var n=x.length-1;n>-1;n-=1)if(x[n].isModal()){t=x[n];break}if(t&&t.isModal()){var a,r=e.srcElement||e.target,i=r===t.elements.reset[1]||0===t.__internal.buttons.length&&r===document.body;i&&(t.get("maximizable")?a=t.elements.commands.maximize:t.get("closable")&&(a=t.elements.commands.close)),void 0===a&&("number"==typeof t.__internal.focus.element?r===t.elements.reset[0]?a=t.elements.buttons.auxiliary.firstChild||t.elements.buttons.primary.firstChild:i&&(a=t.elements.reset[0]):r===t.elements.reset[0]&&(a=t.elements.buttons.primary.lastChild||t.elements.buttons.auxiliary.lastChild)),W(t,a)}}function q(e,t){clearTimeout(t.__internal.timerIn),W(t),a(),ke=!1,p("onfocus",t),k(t.elements.dialog,C.type,t.__internal.transitionInHandler),i(t.elements.root,ye.animationIn)}function Y(e,t){clearTimeout(t.__internal.timerOut),k(t.elements.dialog,C.type,t.__internal.transitionOutHandler),$(t),ae(t),t.isMaximized()&&!t.get("startMaximized")&&j(t),P.defaults.maintainFocus&&t.__internal.activeElement&&(t.__internal.activeElement.focus(),t.__internal.activeElement=null),"function"==typeof t.__internal.destroy&&t.__internal.destroy.apply(t)}function Q(e,t){var n=e[Pe]-Se,a=e[Ie]-Ee;Oe&&(a-=document.body.scrollTop),t.style.left=n+"px",t.style.top=a+"px"}function Z(e,t){var n=e[Pe]-Se,a=e[Ie]-Ee;Oe&&(a-=document.body.scrollTop),t.style.left=Math.min(Te.maxLeft,Math.max(Te.minLeft,n))+"px",t.style.top=Oe?Math.min(Te.maxTop,Math.max(Te.minTop,a))+"px":Math.max(Te.minTop,a)+"px"}function J(e,t){if(null===Me&&!t.isMaximized()&&t.get("movable")){var n,a=0,i=0;if("touchstart"===e.type?(e.preventDefault(),n=e.targetTouches[0],Pe="clientX",Ie="clientY"):0===e.button&&(n=e),n){var o=t.elements.dialog;if(r(o,ye.capture),o.style.left&&(a=parseInt(o.style.left,10)),o.style.top&&(i=parseInt(o.style.top,10)),Se=n[Pe]-a,Ee=n[Ie]-i,t.isModal()?Ee+=t.elements.modal.scrollTop:t.isPinned()&&(Ee-=document.body.scrollTop),t.get("moveBounded")){var s=o,l=-a,u=-i;do{l+=s.offsetLeft,u+=s.offsetTop}while(s=s.offsetParent);Te={maxLeft:l,minLeft:-l,maxTop:document.documentElement.clientHeight-o.clientHeight-u,minTop:-u},Be=Z}else Te=null,Be=Q;return p("onmove",t),Oe=!t.isModal()&&t.isPinned(),Ce=t,Be(n,o),r(document.body,ye.noSelection),!1}}}function X(e){var t;Ce&&("touchmove"===e.type?(e.preventDefault(),t=e.targetTouches[0]):0===e.button&&(t=e),t&&Be(t,Ce.elements.dialog))}function K(){if(Ce){var e=Ce;Ce=Te=null,i(document.body,ye.noSelection),i(e.elements.dialog,ye.capture),p("onmoved",e)}}function $(e){Ce=null;var t=e.elements.dialog;t.style.left=t.style.top=""}function ee(e,t){var n;if(!t.isMaximized()&&("touchstart"===e.type?(e.preventDefault(),n=e.targetTouches[0]):0===e.button&&(n=e),n)){p("onresize",t),Me=t,Le=t.elements.resizeHandle.offsetHeight/2;var a=t.elements.dialog;return r(a,ye.capture),Re=parseInt(a.style.left,10),a.style.height=a.offsetHeight+"px",a.style.minHeight=t.elements.header.offsetHeight+t.elements.footer.offsetHeight+"px",a.style.width=(je=a.offsetWidth)+"px","none"!==a.style.maxWidth&&(a.style.minWidth=(De=a.offsetWidth)+"px"),a.style.maxWidth="none",r(document.body,ye.noSelection),!1}}function te(e){var t;Me&&("touchmove"===e.type?(e.preventDefault(),t=e.targetTouches[0]):0===e.button&&(t=e),t&&function(e,t,n){var a,r,i=t,s=0,l=0;do{s+=i.offsetLeft,l+=i.offsetTop}while(i=i.offsetParent);!0===n?(a=e.pageX,r=e.pageY):(a=e.clientX,r=e.clientY);var u=o();if(u&&(a=document.body.offsetWidth-a,isNaN(Re)||(s=document.body.offsetWidth-s-t.offsetWidth)),t.style.height=r-l+Le+"px",t.style.width=a-s+Le+"px",!isNaN(Re)){var c=.5*Math.abs(t.offsetWidth-je);u&&(c*=-1),t.offsetWidth>je?t.style.left=Re+c+"px":t.offsetWidth>=De&&(t.style.left=Re-c+"px")}}(t,Me.elements.dialog,!Me.get("modal")&&!Me.get("pinned")))}function ne(){if(Me){var e=Me;Me=null,i(document.body,ye.noSelection),i(e.elements.dialog,ye.capture),we=!0,p("onresized",e)}}function ae(e){Me=null;var t=e.elements.dialog;"none"===t.style.maxWidth&&(t.style.maxWidth=t.style.minWidth=t.style.width=t.style.height=t.style.minHeight=t.style.left="",Re=Number.Nan,je=De=Le=0)}function re(){for(var e=0;e-1&&n.navigator.userAgent.indexOf("Chrome")<0,ve={dimmer:'
',modal:'
',dialog:'
',reset:'',commands:'
',header:'
',body:'
',content:'
',footer:'',buttons:{primary:'
',auxiliary:'
'},button:'',resizeHandle:'
'},ye={animationIn:"ajs-in",animationOut:"ajs-out",base:"alertify",basic:"ajs-basic",capture:"ajs-capture",closable:"ajs-closable",fixed:"ajs-fixed",frameless:"ajs-frameless",hidden:"ajs-hidden",maximize:"ajs-maximize",maximized:"ajs-maximized",maximizable:"ajs-maximizable",modeless:"ajs-modeless",movable:"ajs-movable",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",pin:"ajs-pin",pinnable:"ajs-pinnable",prefix:"ajs-",resizable:"ajs-resizable",restore:"ajs-restore",shake:"ajs-shake",unpinned:"ajs-unpinned"},be="",_e=0,we=!1,xe=0,Ae=0,ke=!1,Ce=null,Se=0,Ee=0,Pe="pageX",Ie="pageY",Te=null,Oe=!1,Be=null,Me=null,Re=Number.Nan,je=0,De=0,Le=0;return{__init:e,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(ye.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(ye.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(ye.unpinned)<0},maximize:function(){return this.isMaximized()||R(this),this},restore:function(){return this.isMaximized()&&j(this),this},pin:function(){return this.isPinned()||B(this),this},unpin:function(){return this.isPinned()&&M(this),this},bringToFront:function(){return S(0,this),this},moveTo:function(e,t){if(!isNaN(e)&&!isNaN(t)){p("onmove",this);var n=this.elements.dialog,a=n,r=0,i=0;n.style.left&&(r-=parseInt(n.style.left,10)),n.style.top&&(i-=parseInt(n.style.top,10));do{r+=a.offsetLeft,i+=a.offsetTop}while(a=a.offsetParent);var s=e-r,l=t-i;o()&&(s*=-1),n.style.left=s+"px",n.style.top=l+"px",p("onmoved",this)}return this},resizeTo:function(e,t){var n=parseFloat(e),a=parseFloat(t),r=/(\d*\.\d+|\d+)%/;if(!isNaN(n)&&!isNaN(a)&&!0===this.get("resizable")){p("onresize",this),(""+e).match(r)&&(n=n/100*document.documentElement.clientWidth),(""+t).match(r)&&(a=a/100*document.documentElement.clientHeight);var i=this.elements.dialog;"none"!==i.style.maxWidth&&(i.style.minWidth=(De=i.offsetWidth)+"px"),i.style.maxWidth="none",i.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",i.style.width=n+"px",i.style.height=a+"px",p("onresized",this)}return this},setting:function(e,t){var n=this,a=I(this,this.__internal.options,(function(e,t,a){E(n,e,t,a)}),e,t);if("get"===a.op)return a.found?a.value:void 0!==this.settings?I(this,this.settings,this.settingUpdated||function(){},e,t).value:void 0;if("set"===a.op){if(a.items.length>0)for(var r=this.settingUpdated||function(){},i=0;i0){var t=this;this.__internal.timer=setTimeout((function(){t.dismiss()}),1e3*this.__internal.delay)}return this},setContent:function(e){if("string"==typeof e?(u(this.element),this.element.innerHTML=e):e instanceof n.HTMLElement&&this.element.firstChild!==e&&(u(this.element),this.element.appendChild(e)),this.__internal.closeButton){var t=document.createElement("span");r(t,d.close),t.setAttribute("data-close",!0),this.element.appendChild(t)}return this},dismissOthers:function(){return E.dismissAll(this),this}})}var l,c=[],d={base:"alertify-notifier",message:"ajs-message",top:"ajs-top",right:"ajs-right",bottom:"ajs-bottom",left:"ajs-left",center:"ajs-center",visible:"ajs-visible",hidden:"ajs-hidden",close:"ajs-close"};return{setting:function(t,n){if(e(this),void 0===n)return this.__internal[t];switch(t){case"position":this.__internal.position=n,o(this);break;case"delay":this.__internal.delay=n}return this},set:function(e,t){return this.setting(e,t),this},get:function(e){return this.setting(e)},create:function(t,n){e(this);var a=document.createElement("div");return a.className=d.message+("string"==typeof t&&""!==t?" ajs-"+t:""),s(a,n)},dismissAll:function(e){for(var t=c.slice(0),n=0;n',t+='',t+='
',t+='\t',t+='\t',t+="
",t+=""),n+=this.generateParamsHtml(),document.getElementById("popup").innerHTML='\n\t\n\t
\n\t\n\t\n\t
\n\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t\n\t
\n',document.getElementById("pretitle_area").innerHTML=e,document.getElementById("popup_title").innerHTML=this.title,document.getElementById("popup_comment").innerHTML=this.comment,document.getElementById("preview_content").innerHTML=t,document.getElementById("params_content").innerHTML=n,0!=this.onfinish?document.getElementById("popup_cancel").style.display="":document.getElementById("popup_cancel").style.display="none",document.getElementById("popup").style.display="block",document.getElementById("popup").className=this.className;var a=this;document.getElementById("popup_ok").addEventListener("click",(function(e){a.save()})),document.getElementById("popup_cancel").addEventListener("click",(function(e){a.hide(!1)})),document.getElementById("popup_close").addEventListener("click",(function(e){a.hide(!1)}));for(var i=document.querySelectorAll("#popup input"),o=0;o',"Error"!=s&&null!=n.title&&(e+=''+n.title+""),null!=n.name){if(null!=n.values)if(n.values.length>10||"select"==n.type){e+='"}else{e+='',n.values.length>2&&(e+='
');a=0;for(var r in n.values){var o="";n.value==n.values[r]&&(o='checked="checked"'),null==n.value&&0==a&&(o='checked="checked"');var s=n.values[r],l=n.values[r].split(" - ");l.length>1&&(s=l[0]+' - '+l[1]+""),e+='',e+='",n.values.length>2&&(e+="
"),a++}n.values.length>2&&(e+="
"),e+=""}else if(null!=n.value){var u=1;if(null!=n.step&&(u=n.step),null!=n.range)e+='',e+=''+n.value+"";else if("color"==n.type)e+='';else if("boolean"==typeof n.value){var c="";!0===n.value&&(c="checked"),e+=' '}else if(null==n.placeholder&&(n.placeholder=""),"textarea"==n.type)e+='";else{var d="text";null==n.placeholder||""==n.placeholder||isNaN(n.placeholder)||(d="number"),null!=n.value&&"number"==typeof n.value&&(d="number"),e+=''}}}else if(null!=n.function){e+=''+n.function()+""}else if(null!=n.html)e+=''+n.html+"";else if(null==n.title)e+='';else{var f=""+n.value,h=n.title.toLowerCase().replace(/[^\w]+/g,"").replace(/ +/g,"-");h=h.substring(0,10),e+=f.length<40?'
'+n.value+"
":'"}e+=""}return e+=""}},{key:"validate",value:function(e){for(var t in this.parameters){var n=this.parameters[t];if("pop_data_"+n.name==e.id&&null!=n.range){if("-"==e.value||""==e.value)return!0;var a=parseFloat(e.value);(isNaN(a)||a!=e.value)&&(e.value=n.value),an.range[1]&&(e.value=n.range[1])}}}},{key:"onkeyup",value:function(e){"13"==e.keyCode&&this.save()}},{key:"get_dimensions",value:function(){var e,t;return window.innerWidth?e=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&(e=document.body.clientWidth),window.innerHeight?t=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?t=document.documentElement.clientHeight:document.body&&(t=document.body.clientHeight),[e,t]}},{key:"getRandomInt",value:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}},{key:"strpos",value:function(e,t,n){var a=(e+"").indexOf(t,n||0);return-1!==a&&a}},{key:"draw_background",value:function(e,t,n,a,i){if(0==r.default.TRANSPARENCY&&null==i)return e.beginPath(),e.rect(0,0,t,n),e.fillStyle="#ffffff",e.fill(),!1;null==a&&(a=10);for(var o=!0,s=0;s-1||(e[t]=this.Base_gui.modules[t]);return e}},{key:"render_effect_browser",value:function(){if(0==this.effects)return"";var e="",t=this.get_effects_list(),n=!1;for(var a in this.ef_index=null,this.ef_next_index=null,this.ef_prev_index=null,t){if(1==n){this.ef_next_index=a;break}(r=this.get_filter_title(a)).toLowerCase()!=this.title.toLowerCase()?this.ef_prev_index=a:(this.ef_index=a,n=!0)}for(var a in e+='',e+=' ',e+='",e+=' ',e+=""}},{key:"add_effects_browser_events",value:function(){if(0!=this.effects){var e=this,t=this.get_effects_list(),n=this.ef_prev_index,a=this.ef_next_index;document.getElementById("previous_filter").disabled=!1,document.getElementById("next_filter").disabled=!1,null==n&&(document.getElementById("previous_filter").disabled=!0),null==a&&(document.getElementById("next_filter").disabled=!0),document.getElementById("previous_filter").addEventListener("click",(function(a){e.hide(!1);var r=n.toLowerCase().replace(/ /g,"_").replace("effects/","");t[n][r]()})),document.getElementById("next_filter").addEventListener("click",(function(n){e.hide(!1);var r=a.toLowerCase().replace(/ /g,"_").replace("effects/","");t[a][r]()}));var r=document.getElementById("effect_browser");r.addEventListener("change",(function(n){e.hide(!1);var a=r.options[r.selectedIndex].value,i=a.toLowerCase().replace(/ /g,"_").replace("effects/","");t[a][i]()}))}}},{key:"get_filter_title",value:function(e){var t=e.replace("effects/","").replace(/_/g," ");return"negative"==t&&(t="invert"),t}}]),e}();t.default=c},function(e,t,n){var a=n(9);e.exports=function(e){if(!a(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0){var t=document.cookie.indexOf(e+"=");if(-1!=t){t+=e.length+1;var n=document.cookie.indexOf(";",t);return-1==n&&(n=document.cookie.length),document.cookie.substring(t,n)}}return""}},{key:"_setCookie",value:function(e,t,n){null==n&&(n=180);var a=new Date;a.setTime(a.getTime()+24*n*3600*1e3),document.cookie=e+"="+t+(null==n?"":"; expires="+a.toGMTString())}},{key:"delCookie",value:function(e){this.getCookie(e)&&(document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT")}},{key:"getRandomInt",value:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}},{key:"font_pixel_to_height",value:function(e){return Math.round(.75*e)}},{key:"rgbToHex",value:function(e,t,n){if(e>255||t>255||n>255)throw"Invalid color component";return"#"+("000000"+(e<<16|t<<8|n).toString(16)).slice(-6)}},{key:"rgb2hex_all",value:function(e){return e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),"#"+this.hex(e[1])+this.hex(e[2])+this.hex(e[3])}},{key:"hex",value:function(e){return("0"+(e=parseInt(e)).toString(16)).slice(-2)}},{key:"hex2rgb",value:function(e){if("#"==e[0]&&(e=e.substr(1)),3==e.length){var t=e;e="",t=/^([a-f0-9])([a-f0-9])([a-f0-9])$/i.exec(t).slice(1);for(var n=0;n<3;n++)e+=t[n]+t[n]}var a=/^([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i.exec(e).slice(1);return{r:parseInt(a[0],16),g:parseInt(a[1],16),b:parseInt(a[2],16),a:255}}},{key:"remove_selection",value:function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()}},{key:"darkenColor",value:function(e,t){e.length>6&&(e=e.substring(1,e.length));var n=parseInt(e,16),a=Math.abs((n>>16&255)+t);a>255&&(a-=a-255);var r=Math.abs((n>>8&255)+t);r>255&&(r-=r-255);var i=Math.abs((255&n)+t);return i>255&&(i-=i-255),1==(a=Number(a<0||isNaN(a))?0:(a>255?255:a).toString(16)).length&&(a="0"+a),1==(r=Number(r<0||isNaN(r))?0:(r>255?255:r).toString(16)).length&&(r="0"+r),1==(i=Number(i<0||isNaN(i))?0:(i>255?255:i).toString(16)).length&&(i="0"+i),"#"+a+r+i}},{key:"number_format",value:function(e,t,n,a){t=isNaN(t=Math.abs(t))?2:t,a=null==a?".":a,n=null==n?",":n;var r=e<0?"-":"",i=parseInt(e=Math.abs(+e||0).toFixed(t))+"",o=(o=i.length)>3?o%3:0;return r+(o?i.substr(0,o)+n:"")+i.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+n)+(t?a+Math.abs(e-i).toFixed(t).slice(2):"")}},{key:"check_input_color_support",value:function(){var e=document.createElement("input");return e.setAttribute("type","color"),"text"!==e.type}},{key:"b64toBlob",value:function(e,t,n){t=t||"",n=n||512;for(var a=atob(e),r=[],i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}},{key:"isNumeric",value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},{key:"hslToRgb",value:function(e,t,n){var a,r,i;if(0==t)a=r=i=n;else{var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;a=this.hue2rgb(s,o,e+1/3),r=this.hue2rgb(s,o,e),i=this.hue2rgb(s,o,e-1/3)}return[Math.round(255*a),Math.round(255*r),Math.round(255*i)]}},{key:"hue2rgb",value:function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}},{key:"rgbToHsl",value:function(e,t,n){e/=255,t/=255,n/=255;var a,r,i=Math.max(e,t,n),o=Math.min(e,t,n),s=(i+o)/2;if(i==o)a=r=0;else{var l=i-o;switch(r=s>.5?l/(2-i-o):l/(i+o),i){case e:a=(t-n)/l+(t6&&void 0!==arguments[6]&&arguments[6],s=document.createElement("canvas");s.width=a,s.height=r;var l=Math.round(a/2),u=Math.round(r/2),c=s.getContext("2d"),d=s.width,f=s.height,h=t-l,p=n-u;c.clearRect(0,0,d,f),c.save(),c.putImageData(i,0,0),c.globalCompositeOperation="destination-in";var m=c.createRadialGradient(l,u,0,l,u,l);m.addColorStop(0,"#ffffff"),1==o?m.addColorStop(.8,"#ffffff"):m.addColorStop(.99,"#ffffff"),m.addColorStop(1,"rgba(255,255,255,0"),c.fillStyle=m,c.beginPath(),c.ellipse(l,u,2*a,2*r,0,0,2*Math.PI),c.fill(),e.drawImage(s,0,0,a,r,h,p,a,r),c.restore(),c.clearRect(0,0,d,f)}},{key:"is_edge_or_ie",value:function(){return!window.ActiveXObject&&"ActiveXObject"in window||-1!=navigator.userAgent.indexOf("Edge/")}}]),e}();t.default=r},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var a=n(64)("wks"),r=n(44),i=n(6).Symbol,o="function"==typeof i;(e.exports=function(e){return a[e]||(a[e]=o&&i[e]||(o?i:r)("Symbol."+e))}).store=a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n15?i+=2:i-=2,i=Math.max(0,i),i=Math.min(30,i)}},{key:"get_params_hash",value:function(){var e=[this.getParams(),r.default.COLOR,r.default.ALPHA];return JSON.stringify(e)}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"show_mouse_cursor",value:function(e,t,n,a){var i=this.Base_layers.get_world_coords(0,0);e-=i.x,t-=i.y;var o=document.getElementById("mouse");n*=r.default.ZOOM,e*=r.default.ZOOM,t*=r.default.ZOOM,n<5?o.className="":(o.style.width=n+"px",o.style.height=n+"px",o.style.left=e-Math.ceil(n/2)+"px",o.style.top=t-Math.ceil(n/2)+"px",o.className="",o.classList.add(a))}},{key:"getParams",value:function(){return r.default.TOOL.attributes}},{key:"adaptSize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"width";return null==r.default.layer.width_original?e:"width"===t?e/(r.default.layer.width/r.default.layer.width_original):e/(r.default.layer.height/r.default.layer.height_original)}}]),t}();t.default=s}).call(this,n(42))},function(e,t,n){e.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var a=n(5),r=n(111),i=n(30),o=Object.defineProperty;t.f=n(12)?Object.defineProperty:function(e,t,n){if(a(e),t=i(t,!0),a(n),r)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var a=n(32),r=Math.min;e.exports=function(e){return e>0?r(a(e),9007199254740991):0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r={};r.utils={initSampleCanvas:function(){var e=document.createElement("canvas"),t=e.getContext("2d");e.width=0,e.height=0,this.getSampleCanvas=function(){return e},this.getSampleContext=function(){return t},this.createImageData=t.createImageData?function(e,n){return t.createImageData(e,n)}:function(e,t){return new ImageData(e,t)}},getSampleCanvas:function(){return this.initSampleCanvas(),this.getSampleCanvas()},getSampleContext:function(){return this.initSampleCanvas(),this.getSampleContext()},createImageData:function(e,t){return this.initSampleCanvas(),this.createImageData(e,t)},clamp:function(e){return e>255?255:e<0?0:e},buildMap:function(e){for(var t,n=[],a=0;a<256;a+=1)n[a]=(t=e(a))>255?255:t<0?0:0|t;return n},applyMap:function(e,t,n){for(var a=0,r=e.length;a=n||t<0||t>=a)switch(r){case 1:e=e<0?0:e>=n?n-1:e,t=t<0?0:t>=a?a-1:t;break;case 2:e=(e%=n)<0?e+n:e,t=(t%=a)<0?t+a:t;break;default:return null}return t*n+e<<2},getPixel:function(e,t,n,a,r,i){if(t<0||t>=a||n<0||n>=r)switch(i){case 1:t=t<0?0:t>=a?a-1:t,n=n<0?0:n>=r?r-1:n;break;case 2:t=(t%=a)<0?t+a:t,n=(n%=r)<0?n+r:n;break;default:return 0}var o=n*a+t<<2;return e[o+3]<<24|e[o]<<16|e[o+1]<<8|e[o+2]},getPixelByIndex:function(e,t){return e[t+3]<<24|e[t]<<16|e[t+1]<<8|e[t+2]},copyBilinear:function(e,t,n,a,r,i,o,s){var l,u,c,d,f,h,p,m=t<0?t-1|0:0|t,g=n<0?n-1|0:0|n,v=t-m,y=n-g,b=0,_=0,w=0,x=0;if(m>=0&&m=0&&g>16&255,i[o+1]=b>>8&255,i[o+2]=255&b,void(i[o+3]=b>>24&255);_=this.getPixel(e,m+1,g,a,r,s),w=this.getPixel(e,m,g+1,a,r,s),x=this.getPixel(e,m+1,g+1,a,r,s)}d=((b>>16&255)*(u=1-v)+(_>>16&255)*v)*(c=1-y)+((w>>16&255)*u+(x>>16&255)*v)*y,f=((b>>8&255)*u+(_>>8&255)*v)*c+((w>>8&255)*u+(x>>8&255)*v)*y,h=((255&b)*u+(255&_)*v)*c+((255&w)*u+(255&x)*v)*y,p=((b>>24&255)*u+(_>>24&255)*v)*c+((w>>24&255)*u+(x>>24&255)*v)*y,i[o]=d>255?255:d<0?0:0|d,i[o+1]=f>255?255:f<0?0:0|f,i[o+2]=h>255?255:h<0?0:0|h,i[o+3]=p>255?255:p<0?0:0|p},rgbToHsl:function(e,t,n){n/=255;var a=(e/=255)>(t/=255)?e>n?e:n:t>n?t:n,r=e.5?i/(2-a-r):i/(a+r)),[o,s,l]},hslToRgb:function(e,t,n){var a,r,i,o,s,l=[];if(0===t)l=[o=s=255*n+.5|0,o,s];else{var u;a=2*n-(r=n<=.5?n*(t+1):n+t-n*t),i=e+1/3;for(var c=0;c<3;c+=1)i<0?i+=1:i>1&&(i-=1),u=6*i<1?a+(r-a)*i*6:2*i<1?r:3*i<2?a+(r-a)*(2/3-i)*6:a,l[c]=255*u+.5|0,i-=1/3}return l}},r.Translate=function(e,t,n,a){},r.Scale=function(e,t,n,a){},r.Rotate=function(e,t,n,a,r,i){},r.Affine=function(e,t,n,a){},r.UnsharpMask=function(e,t){},r.ConvolutionFilter=function(e,t,n,a,r,i,o,s,l,u){var c=e.data,d=e.width,f=e.height,h=(c.length,this.utils.createImageData(d,f)),p=h.data;r=r||1,i=i||0,!1!==o&&(o=!0),!1!==s&&(s=!0);for(var m=0,g=t>>1,v=n>>1,y=(l=l||0)>>16&255,b=l>>8&255,_=255&l,w=255*(u=u||0),x=0;x255?255:k<0?0:0|k,p[m+1]=(k=S/r+i)>255?255:k<0?0:0|k,p[m+2]=(k=E/r+i)>255?255:k<0?0:0|k,p[m+3]=o?c[m+3]:(k=P/r+i)>255?255:k<0?0:0|k}return h},r.Binarize=function(e,t){var n=e.data,a=e.width,r=e.height,i=n.length,o=this.utils.createImageData(a,r),s=o.data;isNaN(t)&&(t=.5),t*=255;for(var l=0;l255?255:r,c[f+1]=(r=i[f+1]+d[f+1])>255?255:r,c[f+2]=(r=i[f+2]+d[f+2])>255?255:r,c[f+3]=255;return u},r.BlendSubtract=function(e,t,n,a){for(var r,i=e.data,o=e.width,s=e.height,l=i.length,u=this.utils.createImageData(o,s),c=u.data,d=t.data,f=0;fw&&(v=w),(y=m-r)<0&&(y=0),f=x+y<<2,i+=e[d=x+v<<2]-e[f],o+=e[d+1]-e[f+1],s+=e[d+2]-e[f+2],l+=e[d+3]-e[f+3],u+=a;x+=n}},function(e,t,n,r){for(var i=e.data,o=e.width,s=e.height,l=(i.length,this.utils.createImageData(o,s)),u=l.data,c=this.utils.createImageData(o,s).data,d=0;d>V,D[c+1]=h*W>>V,D[c+2]=p*W>>V,D[c+3]=m*W>>V,f-=g,h-=v,p-=y,m-=b,g-=I.r,v-=I.g,y-=I.b,b-=I.a,l=d+((l=i+r+1)>V,D[l+1]=h*W>>V,D[l+2]=p*W>>V,D[l+3]=m*W>>V,f-=g,h-=v,p-=y,m-=b,g-=I.r,v-=I.g,y-=I.b,b-=I.a,l=i+((l=o+N)255?255:e})),i},r.BrightnessContrastGimp=function(e,t,n){var a=e.data,r=e.width,i=e.height,o=a.length,s=this.utils.createImageData(r,i),l=s.data,u=Math.PI/4;t/=100,n*=.99,n/=100,n=Math.tan((n+1)*u);for(var c=0,d=0;d>16;return c/=o/4,this.utils.mapRGB(a,l,(function(e){return t<0?e*=1+t:t>0&&(e+=(255-e)*t),0!==n&&(e=(e-c)*n+c),e+.5|0})),s},r.BrightnessContrastPhotoshop=function(e,t,n){var a=e.data,r=e.width,i=e.height,o=(a.length,this.utils.createImageData(r,i)),s=o.data;return t=(t+100)/100,n=(n+100)/100,this.utils.mapRGB(a,s,(function(e){return(e=((e*=t)-127.5)*n+127.5)+.5|0})),o},r.Channels=function(e,t){var n;switch(t){case 2:n=[0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0];break;case 3:n=[0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0];break;default:n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0]}return this.ColorMatrixFilter(e,n)},r.Clone=function(e){return this.Copy(e,this.utils.createImageData(e.width,e.height))},r.CloneBuiltin=function(e){var t,n=e.width,a=e.height,r=this.utils.getSampleCanvas(),i=this.utils.getSampleContext();return r.width=n,r.height=a,i.putImageData(e,0,0),t=i.getImageData(0,0,n,a),r.width=0,r.height=0,t},r.ColorMatrixFilter=function(e,t){var n,a,r,i,o,s,l=e.data,u=e.width,c=e.height,d=l.length,f=this.utils.createImageData(u,c),h=f.data,p=t[0],m=t[1],g=t[2],v=t[3],y=t[4],b=t[5],_=t[6],w=t[7],x=t[8],A=t[9],k=t[10],C=t[11],S=t[12],E=t[13],P=t[14],I=t[15],T=t[16],O=t[17],B=t[18],M=t[19];for(a=0;a255?255:n<0?0:0|n,h[a+1]=(n=r*b+i*_+o*w+s*x+A)>255?255:n<0?0:0|n,h[a+2]=(n=r*k+i*C+o*S+s*E+P)>255?255:n<0?0:0|n,h[a+3]=(n=r*I+i*T+o*O+s*B+M)>255?255:n<0?0:0|n;return f},r.ColorTransformFilter=function(e,t,n,a,r,i,o,s,l){var u,c,d=e.data,f=e.width,h=e.height,p=d.length,m=this.utils.createImageData(f,h),g=m.data;for(u=0;u255?255:c<0?0:c,g[u+1]=(c=d[u+1]*n+o)>255?255:c<0?0:c,g[u+2]=(c=d[u+2]*a+s)>255?255:c<0?0:c,g[u+3]=(c=d[u+3]*r+l)>255?255:c<0?0:c;return m},r.Copy=function(e,t){for(var n=e.data,a=n.length,r=t.data;a--;)r[a]=n[a];return t},r.Crop=function(e,t,n,a,r){var i,o,s,l,u=e.data,c=e.width,d=e.height,f=(u.length,this.utils.createImageData(a,r)),h=f.data,p=Math.max(t,0),m=Math.max(n,0),g=Math.min(t+a,c),v=Math.min(n+r,d),y=p-t;for(i=m,dstRow=m-n;iu?l>c?l:c:u>c?u:c)+(l=C||w>=S?g=m:(y=_+((k[(v=(w-a)*x+(_-n)<<2)+i]-128)*s>>8),b=w+((k[v+o]-128)*l>>8),null===(g=r.utils.getPixelIndex(y+.5|0,b+.5|0,d,f,u))&&(g=m)),p[m]=c[g],p[m+1]=c[g+1],p[m+2]=c[g+2],p[m+3]=c[g+3];return h},r.Dither=function(e,t){var n,a,r=e.width,i=e.height,o=this.Clone(e),s=o.data,l=[],u=(t=t<2?2:t>255?255:t)-1,c=0,d=0;for(a=0;a255&&(d-=255,c+=1),n}));var f,h,p,m,g,v,y,b,_,w,x,A,k,C,S,E=r-1,P=i-1,I=7/16,T=3/16,O=5/16,B=1/16;for(h=0;h255?255:k<0?0:0|k,s[p+1]=C>255?255:C<0?0:0|C,s[p+2]=S>255?255:S<0?0:0|S),p+=r-2<<2,f>0&&h255?255:k<0?0:0|k,s[p+1]=C>255?255:C<0?0:0|C,s[p+2]=S>255?255:S<0?0:0|S),p+=4,h255?255:k<0?0:0|k,s[p+1]=C>255?255:C<0?0:0|C,s[p+2]=S>255?255:S<0?0:0|S),p+=4,f255?255:k<0?0:0|k,s[p+1]=C>255?255:C<0?0:0|C,s[p+2]=S>255?255:S<0?0:0|S);return o},r.Edge=function(e){return this.ConvolutionFilter(e,3,3,[-1,-1,-1,-1,8,-1,-1,-1,-1])},r.Emboss=function(e){return this.ConvolutionFilter(e,3,3,[-2,-1,0,-1,1,1,0,1,2])},r.Enrich=function(e){return this.ConvolutionFilter(e,3,3,[0,-2,0,-2,20,-2,0,-2,0],10,-40)},r.Flip=function(e,t){var n,a,r,i,o=e.data,s=e.width,l=e.height,u=(o.length,this.utils.createImageData(s,l)),c=u.data;for(a=0;a255?255:e+.5|0})),i},r.GrayScale=function(e){for(var t=e.data,n=e.width,a=e.height,r=t.length,i=this.utils.createImageData(n,a),o=i.data,s=0;s>16;o[s]=o[s+1]=o[s+2]=l,o[s+3]=t[s+3]}return i},r.HSLAdjustment=function(e,t,n,a){var r=e.data,i=e.width,o=e.height,s=r.length,l=this.utils.createImageData(i,o),u=l.data;t/=360,n/=100,a/=100;var c,d,f,h,p,m,g=this.utils.rgbToHsl,v=this.utils.hslToRgb;for(m=0;m1;)c-=1;(d=h[1]+h[1]*n)<0?d=0:d>1&&(d=1),f=h[2],a>0?f+=(1-f)*a:a<0&&(f+=f*a),p=v(c,d,f),u[m]=p[0],u[m+1]=p[1],u[m+2]=p[2],u[m+3]=r[m+3]}return l},r.Invert=function(e){var t=e.data,n=e.width,a=e.height,r=(t.length,this.utils.createImageData(n,a)),i=r.data;return this.utils.mapRGB(t,i,(function(e){return 255-e})),r},r.Mosaic=function(e,t){var n,a,r,i,o,s,l,u,c,d,f,h,p,m,g,v=e.data,y=e.width,b=e.height,_=(v.length,this.utils.createImageData(y,b)),w=_.data,x=Math.ceil(y/t),A=Math.ceil(b/t);for(n=0;nb&&(s=b),a=0;ay&&(i=y),h=p=m=g=0,f=(i-r)*(s-o),u=o;u=A))for(c=l*x,s=-t;s<=t;s+=1)(u=a+s)<0||u>=x||(f=w[d=c+u<<2],g=(h=w[d+1])*n>>8,v=(p=w[d+2])*n>>8,T[m=f*n>>8]+=f,O[g]+=h,B[v]+=p,E[m]+=1,P[g]+=1,I[v]+=1);for(y=b=_=0,i=1;iE[y]&&(y=i),P[i]>P[b]&&(b=i),I[i]>I[_]&&(_=i);C[S]=T[y]/E[y]|0,C[S+1]=O[b]/P[b]|0,C[S+2]=B[_]/I[_]|0,C[S+3]=w[S+3],S+=4}return k},r.OpacityFilter=function(e,t){for(var n=e.data,a=e.width,r=e.height,i=n.length,o=this.utils.createImageData(a,r),s=o.data,l=0;l255?255:t)-1,c=0,d=0;for(n=0;n255&&(d-=255,c+=1),n})),o},r.Rescale=function(e,t){var n=e.data,a=e.width,r=e.height,i=(n.length,this.utils.createImageData(a,r)),o=i.data;return this.utils.mapRGB(n,o,(function(e){return(e*=t)>255?255:e+.5|0})),i},r.ResizeNearestNeighbor=function(e,t,n){var a,r,i,o,s=e.data,l=e.width,u=e.height,c=(s.length,this.utils.createImageData(t,n)),d=c.data,f=l/t,h=u/n,p=0;for(i=0;i255?255:i<0?0:i+.5|0,d[r+1]=(i=.349*t+.686*n+.168*a)>255?255:i<0?0:i+.5|0,d[r+2]=(i=.272*t+.534*n+.131*a)>255?255:i<0?0:i+.5|0,d[r+3]=o[r+3];return c},r.Sharpen=function(e,t){return this.ConvolutionFilter(e,3,3,[-t/16,-t/8,-t/16,-t/8,.75*t+1,-t/8,-t/16,-t/8,-t/16])},r.Solarize=function(e){var t=e.data,n=e.width,a=e.height,r=(t.length,this.utils.createImageData(n,a)),i=r.data;return this.utils.mapRGB(t,i,(function(e){return e>127?2*(e-127.5):2*(127.5-e)})),r},r.Transpose=function(e){var t,n,a=e.data,r=e.width,i=e.height,o=(a.length,this.utils.createImageData(i,r)),s=o.data;for(y=0;yw?(d[x]=s[x],d[x+1]=s[x+1],d[x+2]=s[x+2],d[x+3]=s[x+3]):(g=Math.sqrt(g),v=Math.atan2(m,p)+r*(a-g)/a,y=t+g*Math.cos(v),b=n+g*Math.sin(v),o?this.utils.copyBilinear(s,y,b,l,u,d,x,i):(_=(b+.5|0)*l+(y+.5|0)<<2,d[x]=s[_],d[x+1]=s[_+1],d[x+2]=s[_+2],d[x+3]=s[_+3])),x+=4;return c},t.default=r},function(e,t,n){var a=n(31);e.exports=function(e){return Object(a(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=0;s--)if(!(this.common_dimensions[s][0]>t||this.common_dimensions[s][1]>n)){r.default.WIDTH=parseInt(this.common_dimensions[s][0]),r.default.HEIGHT=parseInt(this.common_dimensions[s][1]),a=!0;break}0==a&&(r.default.WIDTH=parseInt(t)-5,r.default.HEIGHT=parseInt(n)-10,t<585&&(r.default.HEIGHT=r.default.HEIGHT-15))}}},{key:"render_canvas_background",value:function(e,t){null==t&&(t=10);var n=document.getElementById(e+"_background");if(0==r.default.TRANSPARENCY)return n.className="transparent-grid white",!1;n.className="transparent-grid "+r.default.TRANSPARENCY_TYPE,n.style.backgroundSize=2*t+"px auto"}},{key:"draw_grid",value:function(e){if(0!=this.grid){var t=this.grid_size[0],n=this.grid_size[1],a=r.default.WIDTH,i=r.default.HEIGHT;null!=t&&null!=n?this.grid_size=[t,n]:(t=this.grid_size[0],n=this.grid_size[1]),t=parseInt(t),n=parseInt(n),e.lineWidth=1,e.beginPath(),t<2&&(t=2),n<2&&(n=2);for(var o=t;o"+r+""};e.exports=function(e,t){var n={};n[e]=t(s),a(a.P+a.F*r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var a=n(60),r=n(31);e.exports=function(e){return a(r(e))}},function(e,t,n){var a=n(61),r=n(43),i=n(23),o=n(30),s=n(22),l=n(111),u=Object.getOwnPropertyDescriptor;t.f=n(12)?u:function(e,t){if(e=i(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return r(!a.f.call(e,t),e[t])}},function(e,t,n){var a=n(22),r=n(16),i=n(83)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),a(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var a=n(18);e.exports=function(e,t,n){if(a(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,a){return e.call(t,n,a)};case 3:return function(n,a,r){return e.call(t,n,a,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var a=n(7);e.exports=function(e,t){return!!e&&a((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var a=n(9);e.exports=function(e,t){if(!a(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!a(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!a(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!a(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,a=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?a:n)(e)}},function(e,t,n){var a=n(0),r=n(26),i=n(7);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],o={};o[e]=t(n),a(a.S+a.F*i((function(){n(1)})),"Object",o)}},function(e,t,n){var a=n(27),r=n(60),i=n(16),o=n(14),s=n(100);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,d=6==e,f=5==e||d,h=t||s;return function(t,s,p){for(var m,g,v=i(t),y=r(v),b=a(s,p,3),_=o(y.length),w=0,x=n?h(t,_):l?h(t,0):void 0;_>w;w++)if((f||w in y)&&(g=b(m=y[w],w,v),e))if(n)x[w]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:x.push(m)}else if(c)return!1;return d?-1:u||c?c:x}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t,n){return Math.max(e,Math.min(t,n))}function t(e){return{_:e,loadContentsOf:function(e){H=this._.gl,this._.loadContentsOf(e)},destroy:function(){H=this._.gl,this._.destroy()}}}function n(e){return t(F.fromElement(e))}function a(e,t){var n=H.UNSIGNED_BYTE;if(H.getExtension("OES_texture_float")&&H.getExtension("OES_texture_float_linear")){var a=new F(100,100,H.RGBA,H.FLOAT);try{a.drawTo((function(){n=H.FLOAT}))}catch(e){}a.destroy()}this._.texture&&this._.texture.destroy(),this._.spareTexture&&this._.spareTexture.destroy(),this.width=e,this.height=t,this._.texture=new F(e,t,H.RGBA,n),this._.spareTexture=new F(e,t,H.RGBA,n),this._.extraTexture=this._.extraTexture||new F(0,0,H.RGBA,n),this._.flippedShader=this._.flippedShader||new N(null,"uniform sampler2D texture;varying vec2 texCoord;void main(){gl_FragColor=texture2D(texture,vec2(texCoord.x,1.0-texCoord.y));}"),this._.isInitialized=!0}function r(e,t,n){return this._.isInitialized&&e._.width==this.width&&e._.height==this.height||a.call(this,t||e._.width,n||e._.height),e._.use(),this._.texture.drawTo((function(){N.getDefaultShader().drawRect()})),this}function i(){return this._.texture.use(),this._.flippedShader.drawRect(),this}function o(e,t,n,a){(n||this._.texture).use(),this._.spareTexture.drawTo((function(){e.uniforms(t).drawRect()})),this._.spareTexture.swapWith(a||this._.texture)}function s(e){return e.parentNode.insertBefore(this,e),e.parentNode.removeChild(e),this}function l(){var e=new F(this._.texture.width,this._.texture.height,H.RGBA,H.UNSIGNED_BYTE);return this._.texture.use(),e.drawTo((function(){N.getDefaultShader().drawRect()})),t(e)}function u(){var e=this._.texture.width,t=this._.texture.height,n=new Uint8Array(4*e*t);return this._.texture.drawTo((function(){H.readPixels(0,0,e,t,H.RGBA,H.UNSIGNED_BYTE,n)})),n}function c(e){return function(){return H=this._.gl,e.apply(this,arguments)}}function d(e,t,n,a,r,i,o,s){var l,u,c=a-i,d=s-i,f=(u=n-r)*d-(l=o-r)*c;return[n-e+(l=((r=e-n+r-o)*d-l*(i=t-a+i-s))/f)*n,a-t+l*a,l,o-e+(u=(u*i-r*c)/f)*o,s-t+u*s,u,e,t,1]}function f(e){var t=e[0],n=e[1],a=e[2],r=e[3],i=e[4],o=e[5],s=e[6],l=e[7],u=t*i*(e=e[8])-t*o*l-n*r*e+n*o*s+a*r*l-a*i*s;return[(i*e-o*l)/u,(a*l-n*e)/u,(n*o-a*i)/u,(o*s-r*e)/u,(t*e-a*s)/u,(a*r-t*o)/u,(r*l-i*s)/u,(n*s-t*l)/u,(t*i-n*r)/u]}function h(e){var t=e.length;this.xa=[],this.ya=[],this.u=[],this.y2=[],e.sort((function(e,t){return e[0]-t[0]}));for(var n=0;n0.0){color.rgb=(color.rgb-0.5)/(1.0-contrast)+0.5;}else{color.rgb=(color.rgb-0.5)*(1.0+contrast)+0.5;}gl_FragColor=color;}"),o.call(this,H.brightnessContrast,{brightness:e(-1,t,1),contrast:e(-1,n,1)}),this}function g(t){t=new h(t);for(var n=[],a=0;256>a;a++)n.push(e(0,Math.floor(256*t.interpolate(a/255)),255));return n}function v(e,t,n){e=g(e),1==arguments.length?t=n=e:(t=g(t),n=g(n));for(var a=[],r=0;256>r;r++)a.splice(a.length,0,e[r],t[r],n[r],255);return this._.extraTexture.initFromBytes(256,1,a),this._.extraTexture.use(1),H.curves=H.curves||new N(null,"uniform sampler2D texture;uniform sampler2D map;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);color.r=texture2D(map,vec2(color.r)).r;color.g=texture2D(map,vec2(color.g)).g;color.b=texture2D(map,vec2(color.b)).b;gl_FragColor=color;}"),H.curves.textures({map:1}),o.call(this,H.curves,{}),this}function y(e){H.denoise=H.denoise||new N(null,"uniform sampler2D texture;uniform float exponent;uniform float strength;uniform vec2 texSize;varying vec2 texCoord;void main(){vec4 center=texture2D(texture,texCoord);vec4 color=vec4(0.0);float total=0.0;for(float x=-4.0;x<=4.0;x+=1.0){for(float y=-4.0;y<=4.0;y+=1.0){vec4 sample=texture2D(texture,texCoord+vec2(x,y)/texSize);float weight=1.0-abs(dot(sample.rgb-center.rgb,vec3(0.25)));weight=pow(weight,exponent);color+=sample*weight;total+=weight;}}gl_FragColor=color/total;}");for(var t=0;2>t;t++)o.call(this,H.denoise,{exponent:Math.max(0,e),texSize:[this.width,this.height]});return this}function b(t,n){return H.hueSaturation=H.hueSaturation||new N(null,"uniform sampler2D texture;uniform float hue;uniform float saturation;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float angle=hue*3.14159265;float s=sin(angle),c=cos(angle);vec3 weights=(vec3(2.0*c,-sqrt(3.0)*s-c,sqrt(3.0)*s-c)+1.0)/3.0;float len=length(color.rgb);color.rgb=vec3(dot(color.rgb,weights.xyz),dot(color.rgb,weights.zxy),dot(color.rgb,weights.yzx));float average=(color.r+color.g+color.b)/3.0;if(saturation>0.0){color.rgb+=(average-color.rgb)*(1.0-1.0/(1.001-saturation));}else{color.rgb+=(average-color.rgb)*(-saturation);}gl_FragColor=color;}"),o.call(this,H.hueSaturation,{hue:e(-1,t,1),saturation:e(-1,n,1)}),this}function _(t){return H.noise=H.noise||new N(null,"uniform sampler2D texture;uniform float amount;varying vec2 texCoord;float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){vec4 color=texture2D(texture,texCoord);float diff=(rand(texCoord)-0.5)*amount;color.r+=diff;color.g+=diff;color.b+=diff;gl_FragColor=color;}"),o.call(this,H.noise,{amount:e(0,t,1)}),this}function w(t){return H.sepia=H.sepia||new N(null,"uniform sampler2D texture;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float r=color.r;float g=color.g;float b=color.b;color.r=min(1.0,(r*(1.0-(0.607*amount)))+(g*(0.769*amount))+(b*(0.189*amount)));color.g=min(1.0,(r*0.349*amount)+(g*(1.0-(0.314*amount)))+(b*0.168*amount));color.b=min(1.0,(r*0.272*amount)+(g*0.534*amount)+(b*(1.0-(0.869*amount))));gl_FragColor=color;}"),o.call(this,H.sepia,{amount:e(0,t,1)}),this}function x(e,t){return H.unsharpMask=H.unsharpMask||new N(null,"uniform sampler2D blurredTexture;uniform sampler2D originalTexture;uniform float strength;uniform float threshold;varying vec2 texCoord;void main(){vec4 blurred=texture2D(blurredTexture,texCoord);vec4 original=texture2D(originalTexture,texCoord);gl_FragColor=mix(blurred,original,1.0+strength);}"),this._.extraTexture.ensureFormat(this._.texture),this._.texture.use(),this._.extraTexture.drawTo((function(){N.getDefaultShader().drawRect()})),this._.extraTexture.use(1),this.triangleBlur(e),H.unsharpMask.textures({originalTexture:1}),o.call(this,H.unsharpMask,{strength:t}),this._.extraTexture.unuse(1),this}function A(t){return H.vibrance=H.vibrance||new N(null,"uniform sampler2D texture;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float average=(color.r+color.g+color.b)/3.0;float mx=max(color.r,max(color.g,color.b));float amt=(mx-average)*(-amount*3.0);color.rgb=mix(color.rgb,vec3(mx),amt);gl_FragColor=color;}"),o.call(this,H.vibrance,{amount:e(-1,t,1)}),this}function k(t,n){return H.vignette=H.vignette||new N(null,"uniform sampler2D texture;uniform float size;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float dist=distance(texCoord,vec2(0.5,0.5));color.rgb*=smoothstep(0.8,size*0.799,dist*(amount+size));gl_FragColor=color;}"),o.call(this,H.vignette,{size:e(0,t,1),amount:e(0,n,1)}),this}function C(t,n,a){H.lensBlurPrePass=H.lensBlurPrePass||new N(null,"uniform sampler2D texture;uniform float power;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);color=pow(color,vec4(power));gl_FragColor=vec4(color);}");var r="uniform sampler2D texture0;uniform sampler2D texture1;uniform vec2 delta0;uniform vec2 delta1;uniform float power;varying vec2 texCoord;"+G+"vec4 sample(vec2 delta){float offset=random(vec3(delta,151.7182),0.0);vec4 color=vec4(0.0);float total=0.0;for(float t=0.0;t<=30.0;t++){float percent=(t+offset)/30.0;color+=texture2D(texture0,texCoord+delta*percent);total+=1.0;}return color/total;}";H.lensBlur0=H.lensBlur0||new N(null,r+"void main(){gl_FragColor=sample(delta0);}"),H.lensBlur1=H.lensBlur1||new N(null,r+"void main(){gl_FragColor=(sample(delta0)+sample(delta1))*0.5;}"),H.lensBlur2=H.lensBlur2||new N(null,r+"void main(){vec4 color=(sample(delta0)+2.0*texture2D(texture1,texCoord))/3.0;gl_FragColor=pow(color,vec4(power));}").textures({texture1:1});r=[];for(var i=0;3>i;i++){var s=a+2*i*Math.PI/3;r.push([t*Math.sin(s)/this.width,t*Math.cos(s)/this.height])}return t=Math.pow(10,e(-1,n,1)),o.call(this,H.lensBlurPrePass,{power:t}),this._.extraTexture.ensureFormat(this._.texture),o.call(this,H.lensBlur0,{delta0:r[0]},this._.texture,this._.extraTexture),o.call(this,H.lensBlur1,{delta0:r[1],delta1:r[2]},this._.extraTexture,this._.extraTexture),o.call(this,H.lensBlur0,{delta0:r[1]}),this._.extraTexture.use(1),o.call(this,H.lensBlur2,{power:1/t,delta0:r[2]}),this}function S(e,t,n,a,r,i){H.tiltShift=H.tiltShift||new N(null,"uniform sampler2D texture;uniform float blurRadius;uniform float gradientRadius;uniform vec2 start;uniform vec2 end;uniform vec2 delta;uniform vec2 texSize;varying vec2 texCoord;"+G+"void main(){vec4 color=vec4(0.0);float total=0.0;float offset=random(vec3(12.9898,78.233,151.7182),0.0);vec2 normal=normalize(vec2(start.y-end.y,end.x-start.x));float radius=smoothstep(0.0,1.0,abs(dot(texCoord*texSize-start,normal))/gradientRadius)*blurRadius;for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec4 sample=texture2D(texture,texCoord+delta/texSize*percent*radius);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}");var s=n-e,l=a-t,u=Math.sqrt(s*s+l*l);return o.call(this,H.tiltShift,{blurRadius:r,gradientRadius:i,start:[e,t],end:[n,a],delta:[s/u,l/u],texSize:[this.width,this.height]}),o.call(this,H.tiltShift,{blurRadius:r,gradientRadius:i,start:[e,t],end:[n,a],delta:[-l/u,s/u],texSize:[this.width,this.height]}),this}function E(e){return H.triangleBlur=H.triangleBlur||new N(null,"uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;"+G+"void main(){vec4 color=vec4(0.0);float total=0.0;float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec4 sample=texture2D(texture,texCoord+delta*percent);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}"),o.call(this,H.triangleBlur,{delta:[e/this.width,0]}),o.call(this,H.triangleBlur,{delta:[0,e/this.height]}),this}function P(e,t,n){return H.zoomBlur=H.zoomBlur||new N(null,"uniform sampler2D texture;uniform vec2 center;uniform float strength;uniform vec2 texSize;varying vec2 texCoord;"+G+"void main(){vec4 color=vec4(0.0);float total=0.0;vec2 toCenter=center-texCoord*texSize;float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=0.0;t<=40.0;t++){float percent=(t+offset)/40.0;float weight=4.0*(percent-percent*percent);vec4 sample=texture2D(texture,texCoord+toCenter*percent*strength/texSize);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}"),o.call(this,H.zoomBlur,{center:[e,t],strength:n,texSize:[this.width,this.height]}),this}function I(e,t,n,a){return H.colorHalftone=H.colorHalftone||new N(null,"uniform sampler2D texture;uniform vec2 center;uniform float angle;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;float pattern(float angle){float s=sin(angle),c=cos(angle);vec2 tex=texCoord*texSize-center;vec2 point=vec2(c*tex.x-s*tex.y,s*tex.x+c*tex.y)*scale;return(sin(point.x)*sin(point.y))*4.0;}void main(){vec4 color=texture2D(texture,texCoord);vec3 cmy=1.0-color.rgb;float k=min(cmy.x,min(cmy.y,cmy.z));cmy=(cmy-k)/(1.0-k);cmy=clamp(cmy*10.0-3.0+vec3(pattern(angle+0.26179),pattern(angle+1.30899),pattern(angle)),0.0,1.0);k=clamp(k*10.0-5.0+pattern(angle+0.78539),0.0,1.0);gl_FragColor=vec4(1.0-cmy-k,color.a);}"),o.call(this,H.colorHalftone,{center:[e,t],angle:n,scale:Math.PI/a,texSize:[this.width,this.height]}),this}function T(e,t,n,a){return H.dotScreen=H.dotScreen||new N(null,"uniform sampler2D texture;uniform vec2 center;uniform float angle;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;float pattern(){float s=sin(angle),c=cos(angle);vec2 tex=texCoord*texSize-center;vec2 point=vec2(c*tex.x-s*tex.y,s*tex.x+c*tex.y)*scale;return(sin(point.x)*sin(point.y))*4.0;}void main(){vec4 color=texture2D(texture,texCoord);float average=(color.r+color.g+color.b)/3.0;gl_FragColor=vec4(vec3(average*10.0-5.0+pattern()),color.a);}"),o.call(this,H.dotScreen,{center:[e,t],angle:n,scale:Math.PI/a,texSize:[this.width,this.height]}),this}function O(e){return H.edgeWork1=H.edgeWork1||new N(null,"uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;"+G+"void main(){vec2 color=vec2(0.0);vec2 total=vec2(0.0);float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec3 sample=texture2D(texture,texCoord+delta*percent).rgb;float average=(sample.r+sample.g+sample.b)/3.0;color.x+=average*weight;total.x+=weight;if(abs(t)<15.0){weight=weight*2.0-1.0;color.y+=average*weight;total.y+=weight;}}gl_FragColor=vec4(color/total,0.0,1.0);}"),H.edgeWork2=H.edgeWork2||new N(null,"uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;"+G+"void main(){vec2 color=vec2(0.0);vec2 total=vec2(0.0);float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec2 sample=texture2D(texture,texCoord+delta*percent).xy;color.x+=sample.x*weight;total.x+=weight;if(abs(t)<15.0){weight=weight*2.0-1.0;color.y+=sample.y*weight;total.y+=weight;}}float c=clamp(10000.0*(color.y/total.y-color.x/total.x)+0.5,0.0,1.0);gl_FragColor=vec4(c,c,c,1.0);}"),o.call(this,H.edgeWork1,{delta:[e/this.width,0]}),o.call(this,H.edgeWork2,{delta:[0,e/this.height]}),this}function B(e,t,n){return H.hexagonalPixelate=H.hexagonalPixelate||new N(null,"uniform sampler2D texture;uniform vec2 center;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;void main(){vec2 tex=(texCoord*texSize-center)/scale;tex.y/=0.866025404;tex.x-=tex.y*0.5;vec2 a;if(tex.x+tex.y-floor(tex.x)-floor(tex.y)<1.0)a=vec2(floor(tex.x),floor(tex.y));else a=vec2(ceil(tex.x),ceil(tex.y));vec2 b=vec2(ceil(tex.x),floor(tex.y));vec2 c=vec2(floor(tex.x),ceil(tex.y));vec3 TEX=vec3(tex.x,tex.y,1.0-tex.x-tex.y);vec3 A=vec3(a.x,a.y,1.0-a.x-a.y);vec3 B=vec3(b.x,b.y,1.0-b.x-b.y);vec3 C=vec3(c.x,c.y,1.0-c.x-c.y);float alen=length(TEX-A);float blen=length(TEX-B);float clen=length(TEX-C);vec2 choice;if(alen0.0){coord*=mix(1.0,smoothstep(0.0,radius/distance,percent),strength*0.75);}else{coord*=mix(1.0,pow(percent,1.0+strength*0.75)*radius/distance,1.0-percent);}}coord+=center;"),o.call(this,H.bulgePinch,{radius:a,strength:e(-1,r,1),center:[t,n],texSize:[this.width,this.height]}),this}function j(e,t,n){if(H.matrixWarp=H.matrixWarp||p("uniform mat3 matrix;uniform bool useTextureSpace;","if(useTextureSpace)coord=coord/texSize*2.0-1.0;vec3 warp=matrix*vec3(coord,1.0);coord=warp.xy/warp.z;if(useTextureSpace)coord=(coord*0.5+0.5)*texSize;"),4==(e=Array.prototype.concat.apply([],e)).length)e=[e[0],e[1],0,e[2],e[3],0,0,0,1];else if(9!=e.length)throw"can only warp with 2x2 or 3x3 matrix";return o.call(this,H.matrixWarp,{matrix:t?f(e):e,texSize:[this.width,this.height],useTextureSpace:0|n}),this}function D(e,t){var n=d.apply(null,t),a=d.apply(null,e);n=f(n);return this.matrixWarp([n[0]*a[0]+n[1]*a[3]+n[2]*a[6],n[0]*a[1]+n[1]*a[4]+n[2]*a[7],n[0]*a[2]+n[1]*a[5]+n[2]*a[8],n[3]*a[0]+n[4]*a[3]+n[5]*a[6],n[3]*a[1]+n[4]*a[4]+n[5]*a[7],n[3]*a[2]+n[4]*a[5]+n[5]*a[8],n[6]*a[0]+n[7]*a[3]+n[8]*a[6],n[6]*a[1]+n[7]*a[4]+n[8]*a[7],n[6]*a[2]+n[7]*a[5]+n[8]*a[8]])}function L(e,t,n,a){return H.swirl=H.swirl||p("uniform float radius;uniform float angle;uniform vec2 center;","coord-=center;float distance=length(coord);if(distance>1;this.xa[a]>e?n=a:t=a}a=this.xa[n]-this.xa[t];var r=(this.xa[n]-e)/a;return e=(e-this.xa[t])/a,r*this.ya[t]+e*this.ya[n]+((r*r*r-r)*this.y2[t]+(e*e*e-e)*this.y2[n])*a*a/6};var F=function(){function e(e,t,n,a){this.gl=H,this.id=H.createTexture(),this.width=e,this.height=t,this.format=n,this.type=a,H.bindTexture(H.TEXTURE_2D,this.id),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_MAG_FILTER,H.LINEAR),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_MIN_FILTER,H.LINEAR),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_WRAP_S,H.CLAMP_TO_EDGE),H.texParameteri(H.TEXTURE_2D,H.TEXTURE_WRAP_T,H.CLAMP_TO_EDGE),e&&t&&H.texImage2D(H.TEXTURE_2D,0,this.format,e,t,0,this.format,this.type,null)}function t(e){return null==n&&(n=document.createElement("canvas")),n.width=e.width,n.height=e.height,(e=n.getContext("2d")).clearRect(0,0,n.width,n.height),e}e.fromElement=function(t){var n=new e(0,0,H.RGBA,H.UNSIGNED_BYTE);return n.loadContentsOf(t),n},e.prototype.loadContentsOf=function(e){this.width=e.width||e.videoWidth,this.height=e.height||e.videoHeight,H.bindTexture(H.TEXTURE_2D,this.id),H.texImage2D(H.TEXTURE_2D,0,this.format,this.format,this.type,e)},e.prototype.initFromBytes=function(e,t,n){this.width=e,this.height=t,this.format=H.RGBA,this.type=H.UNSIGNED_BYTE,H.bindTexture(H.TEXTURE_2D,this.id),H.texImage2D(H.TEXTURE_2D,0,H.RGBA,e,t,0,H.RGBA,this.type,new Uint8Array(n))},e.prototype.destroy=function(){H.deleteTexture(this.id),this.id=null},e.prototype.use=function(e){H.activeTexture(H.TEXTURE0+(e||0)),H.bindTexture(H.TEXTURE_2D,this.id)},e.prototype.unuse=function(e){H.activeTexture(H.TEXTURE0+(e||0)),H.bindTexture(H.TEXTURE_2D,null)},e.prototype.ensureFormat=function(e,t,n,a){if(1==arguments.length){var r=arguments[0];e=r.width,t=r.height,n=r.format,a=r.type}e==this.width&&t==this.height&&n==this.format&&a==this.type||(this.width=e,this.height=t,this.format=n,this.type=a,H.bindTexture(H.TEXTURE_2D,this.id),H.texImage2D(H.TEXTURE_2D,0,this.format,e,t,0,this.format,this.type,null))},e.prototype.drawTo=function(e){if(H.framebuffer=H.framebuffer||H.createFramebuffer(),H.bindFramebuffer(H.FRAMEBUFFER,H.framebuffer),H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,H.TEXTURE_2D,this.id,0),H.checkFramebufferStatus(H.FRAMEBUFFER)!==H.FRAMEBUFFER_COMPLETE)throw Error("incomplete framebuffer");H.viewport(0,0,this.width,this.height),e(),H.bindFramebuffer(H.FRAMEBUFFER,null)};var n=null;return e.prototype.fillUsingCanvas=function(e){return e(t(this)),this.format=H.RGBA,this.type=H.UNSIGNED_BYTE,H.bindTexture(H.TEXTURE_2D,this.id),H.texImage2D(H.TEXTURE_2D,0,H.RGBA,H.RGBA,H.UNSIGNED_BYTE,n),this},e.prototype.toImage=function(e){this.use(),N.getDefaultShader().drawRect();var a=4*this.width*this.height,r=new Uint8Array(a),i=t(this),o=i.createImageData(this.width,this.height);H.readPixels(0,0,this.width,this.height,H.RGBA,H.UNSIGNED_BYTE,r);for(var s=0;sn;)r[n]=t[n++];return r},Ie=function(e,t,n){F(e,t,{get:function(){return this._d[n]}})},Te=function(e){var t,n,a,r,i,o,s=x(e),l=arguments.length,c=l>1?arguments[1]:void 0,d=void 0!==c,f=E(s);if(null!=f&&!A(f)){for(o=f.call(s),a=[],t=0;!(i=o.next()).done;t++)a.push(i.value);s=a}for(d&&l>2&&(c=u(c,arguments[2],2)),t=0,n=m(s.length),r=Se(this,n);n>t;t++)r[t]=d?c(s[t],t):s[t];return r},Oe=function(){for(var e=0,t=arguments.length,n=Se(this,t);t>e;)n[e]=arguments[e++];return n},Be=!!V&&i((function(){he.call(new V(1))})),Me=function(){return he.apply(Be?de.call(Ce(this)):Ce(this),arguments)},Re={copyWithin:function(e,t){return H.call(Ce(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return K(Ce(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return L.apply(Ce(this),arguments)},filter:function(e){return Ee(this,J(Ce(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return $(Ce(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Ce(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Z(Ce(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ce(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Ce(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(Ce(this),arguments)},lastIndexOf:function(e){return oe.apply(Ce(this),arguments)},map:function(e){return we(Ce(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Ce(this),arguments)},reduceRight:function(e){return le.apply(Ce(this),arguments)},reverse:function(){for(var e,t=Ce(this).length,n=Math.floor(t/2),a=0;a1?arguments[1]:void 0)},sort:function(e){return ce.call(Ce(this),e)},subarray:function(e,t){var n=Ce(this),a=n.length,r=v(e,a);return new(B(n,n[ve]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,m((void 0===t?a:v(t,a))-r))}},je=function(e,t){return Ee(this,de.call(Ce(this),e,t))},De=function(e){Ce(this);var t=ke(arguments[1],1),n=this.length,a=x(e),r=m(a.length),i=0;if(r+t>n)throw U("Wrong length!");for(;i255?255:255&a),r.v[h](n*t+r.o,a,xe)}(this,n,e)},enumerable:!0})};b?(p=n((function(e,n,a,r){c(e,p,u,"_d");var i,o,s,l,d=0,h=0;if(w(n)){if(!(n instanceof Y||"ArrayBuffer"==(l=_(n))||"SharedArrayBuffer"==l))return be in n?Pe(p,n):Te.call(p,n);i=n,h=ke(a,t);var v=n.byteLength;if(void 0===r){if(v%t)throw U("Wrong length!");if((o=v-h)<0)throw U("Wrong length!")}else if((o=m(r)*t)+h>v)throw U("Wrong length!");s=o/t}else s=g(n),i=new Y(o=s*t);for(f(e,"_d",{b:i,o:h,l:o,e:s,v:new Q(i)});d0&&t-1 in e)}A.fn=A.prototype={jquery:"3.4.1",constructor:A,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=A.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return A.each(this,e)},map:function(e){return this.pushStack(A.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+L+")"+L+"*"),V=new RegExp(L+"|>"),q=new RegExp(N),Y=new RegExp("^"+H+"$"),Q={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),TAG:new RegExp("^("+H+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Z=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ne=function(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},ae=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){f()},oe=_e((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{M.apply(T=R.call(w.childNodes),w.childNodes),T[w.childNodes.length].nodeType}catch(e){M={apply:T.length?function(e,t){B.apply(e,R.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function se(e,t,a,r){var i,s,u,c,d,p,v,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(a=a||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return a;if(!r&&((t?t.ownerDocument||t:w)!==h&&f(t),t=t||h,m)){if(11!==x&&(d=$.exec(e)))if(i=d[1]){if(9===x){if(!(u=t.getElementById(i)))return a;if(u.id===i)return a.push(u),a}else if(y&&(u=y.getElementById(i))&&b(t,u)&&u.id===i)return a.push(u),a}else{if(d[2])return M.apply(a,t.getElementsByTagName(e)),a;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return M.apply(a,t.getElementsByClassName(i)),a}if(n.qsa&&!E[e+" "]&&(!g||!g.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===x&&V.test(e)){for((c=t.getAttribute("id"))?c=c.replace(ae,re):t.setAttribute("id",c=_),s=(p=o(e)).length;s--;)p[s]="#"+c+" "+be(p[s]);v=p.join(","),y=ee.test(e)&&ve(t.parentNode)||t}try{return M.apply(a,y.querySelectorAll(v)),a}catch(t){E(e,!0)}finally{c===_&&t.removeAttribute("id")}}}return l(e.replace(G,"$1"),t,a,r)}function le(){var e=[];return function t(n,r){return e.push(n+" ")>a.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ue(e){return e[_]=!0,e}function ce(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),r=n.length;r--;)a.attrHandle[n[r]]=t}function fe(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ue((function(t){return t=+t,ue((function(n,a){for(var r,i=e([],n.length,t),o=i.length;o--;)n[r=i[o]]&&(n[r]=!(a[r]=n[r]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Z.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,r,o=e?e.ownerDocument||e:w;return o!==h&&9===o.nodeType&&o.documentElement?(p=(h=o).documentElement,m=!i(h),w!==h&&(r=h.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ie,!1):r.attachEvent&&r.attachEvent("onunload",ie)),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(h.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=_,!h.getElementsByName||!h.getElementsByName(_).length})),n.getById?(a.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(a.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,a,r,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(r=t.getElementsByName(e),a=0;i=r[a++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),a.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,a=[],r=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[r++];)1===n.nodeType&&a.push(n);return a}return i},a.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=K.test(h.querySelectorAll))&&(ce((function(e){p.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+L+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+L+"*(?:value|"+D+")"),e.querySelectorAll("[id~="+_+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||g.push(".#.+[+~]")})),ce((function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+L+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=K.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",N)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=K.test(p.compareDocumentPosition),b=t||K.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,a=t&&t.parentNode;return e===a||!(!a||1!==a.nodeType||!(n.contains?n.contains(a):e.compareDocumentPosition&&16&e.compareDocumentPosition(a)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},P=t?function(e,t){if(e===t)return d=!0,0;var a=!e.compareDocumentPosition-!t.compareDocumentPosition;return a||(1&(a=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===a?e===h||e.ownerDocument===w&&b(w,e)?-1:t===h||t.ownerDocument===w&&b(w,t)?1:c?j(c,e)-j(c,t):0:4&a?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,a=0,r=e.parentNode,i=t.parentNode,o=[e],s=[t];if(!r||!i)return e===h?-1:t===h?1:r?-1:i?1:c?j(c,e)-j(c,t):0;if(r===i)return fe(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[a]===s[a];)a++;return a?fe(o[a],s[a]):o[a]===w?-1:s[a]===w?1:0},h):h},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&f(e),n.matchesSelector&&m&&!E[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var a=y.call(e,t);if(a||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return a}catch(e){E(t,!0)}return se(t,h,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==h&&f(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==h&&f(e);var r=a.attrHandle[t.toLowerCase()],i=r&&I.call(a.attrHandle,t.toLowerCase())?r(e,t,!m):void 0;return void 0!==i?i:n.attributes||!m?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(ae,re)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,a=[],r=0,i=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(P),d){for(;t=e[i++];)t===e[i]&&(r=a.push(i));for(;r--;)e.splice(a[r],1)}return c=null,e},r=se.getText=function(e){var t,n="",a=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[a++];)n+=r(t);return n},(a=se.selectors={cacheLength:50,createPseudo:ue,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+L+")"+e+"("+L+"|$)"))&&k(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(a){var r=se.attr(a,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(F," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,a,r){var i="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===a&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,h,p,m=i!==o?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(i){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?g.firstChild:g.lastChild],o&&y){for(b=(h=(u=(c=(d=(f=g)[_]||(f[_]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===x&&u[1])&&u[2],f=h&&g.childNodes[h];f=++h&&f&&f[m]||(b=h=0)||p.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[x,h,b];break}}else if(y&&(b=h=(u=(c=(d=(f=t)[_]||(f[_]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===x&&u[1]),!1===b)for(;(f=++h&&f&&f[m]||(b=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++b||(y&&((c=(d=f[_]||(f[_]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[x,b]),f!==t)););return(b-=r)===a||b%a==0&&b/a>=0}}},PSEUDO:function(e,t){var n,r=a.pseudos[e]||a.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return r[_]?r(t):r.length>1?(n=[e,e,"",t],a.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,n){for(var a,i=r(e,t),o=i.length;o--;)e[a=j(e,i[o])]=!(n[a]=i[o])})):function(e){return r(e,0,n)}):r}},pseudos:{not:ue((function(e){var t=[],n=[],a=s(e.replace(G,"$1"));return a[_]?ue((function(e,t,n,r){for(var i,o=a(e,null,r,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))})):function(e,r,i){return t[0]=e,a(t,null,i,n),t[0]=null,!n.pop()}})),has:ue((function(e){return function(t){return se(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||r(t)).indexOf(e)>-1}})),lang:ue((function(e){return Y.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!a.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;nt?t:n;--a>=0;)e.push(a);return e})),gt:ge((function(e,t,n){for(var a=n<0?n+t:n;++a1?function(t,n,a){for(var r=e.length;r--;)if(!e[r](t,n,a))return!1;return!0}:e[0]}function xe(e,t,n,a,r){for(var i,o=[],s=0,l=e.length,u=null!=t;s-1&&(i[u]=!(o[u]=d))}}else v=xe(v===o?v.splice(p,v.length):v),r?r(null,o,v,l):M.apply(o,v)}))}function ke(e){for(var t,n,r,i=e.length,o=a.relative[e[0].type],s=o||a.relative[" "],l=o?1:0,c=_e((function(e){return e===t}),s,!0),d=_e((function(e){return j(t,e)>-1}),s,!0),f=[function(e,n,a){var r=!o&&(a||n!==u)||((t=n).nodeType?c(e,n,a):d(e,n,a));return t=null,r}];l1&&we(f),l>1&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(G,"$1"),n,l0,r=e.length>0,i=function(i,o,s,l,c){var d,p,g,v=0,y="0",b=i&&[],_=[],w=u,A=i||r&&a.find.TAG("*",c),k=x+=null==w?1:Math.random()||.1,C=A.length;for(c&&(u=o===h||o||c);y!==C&&null!=(d=A[y]);y++){if(r&&d){for(p=0,o||d.ownerDocument===h||(f(d),s=!m);g=e[p++];)if(g(d,o||h,s)){l.push(d);break}c&&(x=k)}n&&((d=!g&&d)&&v--,i&&b.push(d))}if(v+=y,n&&y!==v){for(p=0;g=t[p++];)g(b,_,o,s);if(i){if(v>0)for(;y--;)b[y]||_[y]||(_[y]=O.call(l));_=xe(_)}M.apply(l,_),c&&!i&&_.length>0&&v+t.length>1&&se.uniqueSort(l)}return c&&(x=k,u=w),b};return n?ue(i):i}(i,r))).selector=e}return s},l=se.select=function(e,t,n,r){var i,l,u,c,d,f="function"==typeof e&&e,h=!r&&o(e=f.selector||e);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&m&&a.relative[l[1].type]){if(!(t=(a.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(i=Q.needsContext.test(e)?0:l.length;i--&&(u=l[i],!a.relative[c=u.type]);)if((d=a.find[c])&&(r=d(u.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(i,1),!(e=r.length&&be(l)))return M.apply(n,r),n;break}}return(f||s(e,h))(r,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=_.split("").sort(P).join("")===_,n.detectDuplicates=!!d,f(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(D,(function(e,t,n){var a;if(!n)return!0===e[t]?t.toLowerCase():(a=e.getAttributeNode(t))&&a.specified?a.value:null})),se}(n);A.find=S,A.expr=S.selectors,A.expr[":"]=A.expr.pseudos,A.uniqueSort=A.unique=S.uniqueSort,A.text=S.getText,A.isXMLDoc=S.isXML,A.contains=S.contains,A.escapeSelector=S.escape;var E=function(e,t,n){for(var a=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&A(e).is(n))break;a.push(e)}return a},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},I=A.expr.match.needsContext;function T(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function B(e,t,n){return y(t)?A.grep(e,(function(e,a){return!!t.call(e,a,e)!==n})):t.nodeType?A.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?A.grep(e,(function(e){return d.call(t,e)>-1!==n})):A.filter(t,e,n)}A.filter=function(e,t,n){var a=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===a.nodeType?A.find.matchesSelector(a,e)?[a]:[]:A.find.matches(e,A.grep(t,(function(e){return 1===e.nodeType})))},A.fn.extend({find:function(e){var t,n,a=this.length,r=this;if("string"!=typeof e)return this.pushStack(A(e).filter((function(){for(t=0;t1?A.uniqueSort(n):n},filter:function(e){return this.pushStack(B(this,e||[],!1))},not:function(e){return this.pushStack(B(this,e||[],!0))},is:function(e){return!!B(this,"string"==typeof e&&I.test(e)?A(e):e||[],!1).length}});var M,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(e,t,n){var a,r;if(!e)return this;if(n=n||M,"string"==typeof e){if(!(a="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:R.exec(e))||!a[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(a[1]){if(t=t instanceof A?t[0]:t,A.merge(this,A.parseHTML(a[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),O.test(a[1])&&A.isPlainObject(t))for(a in t)y(this[a])?this[a](t[a]):this.attr(a,t[a]);return this}return(r=o.getElementById(a[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(A):A.makeArray(e,this)}).prototype=A.fn,M=A(o);var j=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function L(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}A.fn.extend({has:function(e){var t=A(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&A.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?A.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?d.call(A(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),A.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return E(e,"parentNode")},parentsUntil:function(e,t,n){return E(e,"parentNode",n)},next:function(e){return L(e,"nextSibling")},prev:function(e){return L(e,"previousSibling")},nextAll:function(e){return E(e,"nextSibling")},prevAll:function(e){return E(e,"previousSibling")},nextUntil:function(e,t,n){return E(e,"nextSibling",n)},prevUntil:function(e,t,n){return E(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(T(e,"template")&&(e=e.content||e),A.merge([],e.childNodes))}},(function(e,t){A.fn[e]=function(n,a){var r=A.map(this,t,n);return"Until"!==e.slice(-5)&&(a=n),a&&"string"==typeof a&&(r=A.filter(a,r)),this.length>1&&(D[e]||A.uniqueSort(r),j.test(e)&&r.reverse()),this.pushStack(r)}}));var H=/[^\x20\t\r\n\f]+/g;function z(e){return e}function N(e){throw e}function F(e,t,n,a){var r;try{e&&y(r=e.promise)?r.call(e).done(t).fail(n):e&&y(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(a))}catch(e){n.apply(void 0,[e])}}A.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return A.each(e.match(H)||[],(function(e,n){t[n]=!0})),t}(e):A.extend({},e);var t,n,a,r,i=[],o=[],s=-1,l=function(){for(r=r||e.once,a=t=!0;o.length;s=-1)for(n=o.shift();++s-1;)i.splice(n,1),n<=s&&s--})),this},has:function(e){return e?A.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return r=o=[],i=n="",this},disabled:function(){return!i},lock:function(){return r=o=[],n||t||(i=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!a}};return u},A.extend({Deferred:function(e){var t=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],a="pending",r={state:function(){return a},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return A.Deferred((function(n){A.each(t,(function(t,a){var r=y(e[a[4]])&&e[a[4]];i[a[1]]((function(){var e=r&&r.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[a[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,a,r){var i=0;function o(e,t,a,r){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e=i&&(a!==N&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),n.setTimeout(c))}}return A.Deferred((function(n){t[0][3].add(o(0,n,y(r)?r:z,n.notifyWith)),t[1][3].add(o(0,n,y(e)?e:z)),t[2][3].add(o(0,n,y(a)?a:N))})).promise()},promise:function(e){return null!=e?A.extend(e,r):r}},i={};return A.each(t,(function(e,n){var o=n[2],s=n[5];r[n[1]]=o.add,s&&o.add((function(){a=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(n[3].fire),i[n[0]]=function(){return i[n[0]+"With"](this===i?void 0:this,arguments),this},i[n[0]+"With"]=o.fireWith})),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,a=Array(n),r=l.call(arguments),i=A.Deferred(),o=function(e){return function(n){a[e]=this,r[e]=arguments.length>1?l.call(arguments):n,--t||i.resolveWith(a,r)}};if(t<=1&&(F(e,i.done(o(n)).resolve,i.reject,!t),"pending"===i.state()||y(r[n]&&r[n].then)))return i.then();for(;n--;)F(r[n],o(n),i.reject);return i.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&G.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},A.readyException=function(e){n.setTimeout((function(){throw e}))};var U=A.Deferred();function W(){o.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),A.ready()}A.fn.ready=function(e){return U.then(e).catch((function(e){A.readyException(e)})),this},A.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==e&&--A.readyWait>0||U.resolveWith(o,[A]))}}),A.ready.then=U.then,"complete"===o.readyState||"loading"!==o.readyState&&!o.documentElement.doScroll?n.setTimeout(A.ready):(o.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var V=function(e,t,n,a,r,i,o){var s=0,l=e.length,u=null==n;if("object"===x(n))for(s in r=!0,n)V(e,t,s,n[s],!0,i,o);else if(void 0!==a&&(r=!0,y(a)||(o=!0),u&&(o?(t.call(e,a),t=null):(u=t,t=function(e,t,n){return u.call(A(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){$.remove(this,e)}))}}),A.extend({queue:function(e,t,n){var a;if(e)return t=(t||"fx")+"queue",a=K.get(e,t),n&&(!a||Array.isArray(n)?a=K.access(e,t,A.makeArray(n)):a.push(n)),a||[]},dequeue:function(e,t){t=t||"fx";var n=A.queue(e,t),a=n.length,r=n.shift(),i=A._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),a--),r&&("fx"===t&&n.unshift("inprogress"),delete i.stop,r.call(e,(function(){A.dequeue(e,t)}),i)),!a&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:A.Callbacks("once memory").add((function(){K.remove(e,[t+"queue",n])}))})}}),A.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i,ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T(e,t)?A.merge([e],n):n}function _e(e,t){for(var n=0,a=e.length;n-1)r&&r.push(i);else if(u=se(i),o=be(d.appendChild(i),"script"),u&&_e(o),n)for(c=0;i=o[c++];)ve.test(i.type||"")&&n.push(i);return d}we=o.createDocumentFragment().appendChild(o.createElement("div")),(xe=o.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),we.appendChild(xe),v.checkClone=we.cloneNode(!0).cloneNode(!0).lastChild.checked,we.innerHTML="",v.noCloneChecked=!!we.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function Pe(){return!0}function Ie(){return!1}function Te(e,t){return e===function(){try{return o.activeElement}catch(e){}}()==("focus"===t)}function Oe(e,t,n,a,r,i){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(a=a||n,n=void 0),t)Oe(e,s,n,a,t[s],i);return e}if(null==a&&null==r?(r=n,a=n=void 0):null==r&&("string"==typeof n?(r=a,a=void 0):(r=a,a=n,n=void 0)),!1===r)r=Ie;else if(!r)return e;return 1===i&&(o=r,(r=function(e){return A().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=A.guid++)),e.each((function(){A.event.add(this,t,r,a,n)}))}function Be(e,t,n){n?(K.set(e,t,!1),A.event.add(e,t,{namespace:!1,handler:function(e){var a,r,i=K.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(A.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=l.call(arguments),K.set(this,t,i),a=n(this,t),this[t](),i!==(r=K.get(this,t))||a?K.set(this,t,!1):r={},i!==r)return e.stopImmediatePropagation(),e.preventDefault(),r.value}else i.length&&(K.set(this,t,{value:A.event.trigger(A.extend(i[0],A.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===K.get(e,t)&&A.event.add(e,t,Pe)}A.event={global:{},add:function(e,t,n,a,r){var i,o,s,l,u,c,d,f,h,p,m,g=K.get(e);if(g)for(n.handler&&(n=(i=n).handler,r=i.selector),r&&A.find.matchesSelector(oe,r),n.guid||(n.guid=A.guid++),(l=g.events)||(l=g.events={}),(o=g.handle)||(o=g.handle=function(t){return void 0!==A&&A.event.triggered!==t.type?A.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(H)||[""]).length;u--;)h=m=(s=Ee.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h&&(d=A.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=A.event.special[h]||{},c=A.extend({type:h,origType:m,data:a,handler:n,guid:n.guid,selector:r,needsContext:r&&A.expr.match.needsContext.test(r),namespace:p.join(".")},i),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,a,p,o)||e.addEventListener&&e.addEventListener(h,o,{passive:true})),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,c):f.push(c),A.event.global[h]=!0)},remove:function(e,t,n,a,r){var i,o,s,l,u,c,d,f,h,p,m,g=K.hasData(e)&&K.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(H)||[""]).length;u--;)if(h=m=(s=Ee.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=A.event.special[h]||{},f=l[h=(a?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=i=f.length;i--;)c=f[i],!r&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||a&&a!==c.selector&&("**"!==a||!c.selector)||(f.splice(i,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));o&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||A.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)A.event.remove(e,h+t[u],n,a,!0);A.isEmptyObject(l)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,a,r,i,o,s=A.event.fix(e),l=new Array(arguments.length),u=(K.get(this,"events")||{})[s.type]||[],c=A.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(i=[],o={},n=0;n-1:A.find(r,this,null,[u]).length),o[r]&&i.push(a);i.length&&s.push({elem:u,handlers:i})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Re=/\s*$/g;function Le(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&A(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ze(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ne(e,t){var n,a,r,i,o,s,l,u;if(1===t.nodeType){if(K.hasData(e)&&(i=K.access(e),o=K.set(t,i),u=i.events))for(r in delete o.handle,o.events={},u)for(n=0,a=u[r].length;n1&&"string"==typeof p&&!v.checkClone&&je.test(p))return e.each((function(r){var i=e.eq(r);m&&(t[0]=p.call(this,r,i.html())),Ge(i,t,n,a)}));if(f&&(i=(r=ke(t,e[0].ownerDocument,!1,e,a)).firstChild,1===r.childNodes.length&&(r=i),i||a)){for(s=(o=A.map(be(r,"script"),He)).length;d")},clone:function(e,t,n){var a,r,i,o,s=e.cloneNode(!0),l=se(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||A.isXMLDoc(e)))for(o=be(s),a=0,r=(i=be(e)).length;a0&&_e(o,!l&&be(e,"script")),s},cleanData:function(e){for(var t,n,a,r=A.event.special,i=0;void 0!==(n=e[i]);i++)if(J(n)){if(t=n[K.expando]){if(t.events)for(a in t.events)r[a]?A.event.remove(n,a):A.removeEvent(n,a,t.handle);n[K.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),A.fn.extend({detach:function(e){return Ue(this,e,!0)},remove:function(e){return Ue(this,e)},text:function(e){return V(this,(function(e){return void 0===e?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ge(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return Ge(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(A.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return A.clone(this,e,t)}))},html:function(e){return V(this,(function(e){var t=this[0]||{},n=0,a=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Re.test(e)&&!ye[(ge.exec(e)||["",""])[1].toLowerCase()]){e=A.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-l-s-.5))||0),l}function it(e,t,n){var a=Ve(e),r=(!v.boxSizingReliable()||n)&&"border-box"===A.css(e,"boxSizing",!1,a),i=r,o=Ye(e,t,a),s="offset"+t[0].toUpperCase()+t.slice(1);if(We.test(o)){if(!n)return o;o="auto"}return(!v.boxSizingReliable()&&r||"auto"===o||!parseFloat(o)&&"inline"===A.css(e,"display",!1,a))&&e.getClientRects().length&&(r="border-box"===A.css(e,"boxSizing",!1,a),(i=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+rt(e,t,n||(r?"border":"content"),i,a,o)+"px"}function ot(e,t,n,a,r){return new ot.prototype.init(e,t,n,a,r)}A.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,a){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,i,o,s=Z(t),l=et.test(t),u=e.style;if(l||(t=Ke(s)),o=A.cssHooks[t]||A.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(r=o.get(e,!1,a))?r:u[t];"string"===(i=typeof n)&&(r=re.exec(n))&&r[1]&&(n=de(e,t,r),i="number"),null!=n&&n==n&&("number"!==i||l||(n+=r&&r[3]||(A.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,a))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,a){var r,i,o,s=Z(t);return et.test(t)||(t=Ke(s)),(o=A.cssHooks[t]||A.cssHooks[s])&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=Ye(e,t,a)),"normal"===r&&t in nt&&(r=nt[t]),""===n||n?(i=parseFloat(r),!0===n||isFinite(i)?i||0:r):r}}),A.each(["height","width"],(function(e,t){A.cssHooks[t]={get:function(e,n,a){if(n)return!$e.test(A.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,a):ce(e,tt,(function(){return it(e,t,a)}))},set:function(e,n,a){var r,i=Ve(e),o=!v.scrollboxSize()&&"absolute"===i.position,s=(o||a)&&"border-box"===A.css(e,"boxSizing",!1,i),l=a?rt(e,t,a,s,i):0;return s&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-rt(e,t,"border",!1,i)-.5)),l&&(r=re.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=A.css(e,t)),at(0,n,l)}}})),A.cssHooks.marginLeft=Qe(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-ce(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(e,t){A.cssHooks[e+t]={expand:function(n){for(var a=0,r={},i="string"==typeof n?n.split(" "):[n];a<4;a++)r[e+ie[a]+t]=i[a]||i[a-2]||i[0];return r}},"margin"!==e&&(A.cssHooks[e+t].set=at)})),A.fn.extend({css:function(e,t){return V(this,(function(e,t,n){var a,r,i={},o=0;if(Array.isArray(t)){for(a=Ve(e),r=t.length;o1)}}),A.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,n,a,r,i){this.elem=e,this.prop=n,this.easing=r||A.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=a,this.unit=i||(A.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.options.duration?this.pos=t=A.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=A.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){A.fx.step[e.prop]?A.fx.step[e.prop](e):1!==e.elem.nodeType||!A.cssHooks[e.prop]&&null==e.elem.style[Ke(e.prop)]?e.elem[e.prop]=e.now:A.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},A.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},A.fx=ot.prototype.init,A.fx.step={};var st,lt,ut=/^(?:toggle|show|hide)$/,ct=/queueHooks$/;function dt(){lt&&(!1===o.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(dt):n.setTimeout(dt,A.fx.interval),A.fx.tick())}function ft(){return n.setTimeout((function(){st=void 0})),st=Date.now()}function ht(e,t){var n,a=0,r={height:e};for(t=t?1:0;a<4;a+=2-t)r["margin"+(n=ie[a])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function pt(e,t,n){for(var a,r=(mt.tweeners[t]||[]).concat(mt.tweeners["*"]),i=0,o=r.length;i1)},removeAttr:function(e){return this.each((function(){A.removeAttr(this,e)}))}}),A.extend({attr:function(e,t,n){var a,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?A.prop(e,t,n):(1===i&&A.isXMLDoc(e)||(r=A.attrHooks[t.toLowerCase()]||(A.expr.match.bool.test(t)?gt:void 0)),void 0!==n?null===n?void A.removeAttr(e,t):r&&"set"in r&&void 0!==(a=r.set(e,n,t))?a:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(a=r.get(e,t))?a:null==(a=A.find.attr(e,t))?void 0:a)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&T(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,a=0,r=t&&t.match(H);if(r&&1===e.nodeType)for(;n=r[a++];)e.removeAttribute(n)}}),gt={set:function(e,t,n){return!1===t?A.removeAttr(e,n):e.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=vt[t]||A.find.attr;vt[t]=function(e,t,a){var r,i,o=t.toLowerCase();return a||(i=vt[o],vt[o]=r,r=null!=n(e,t,a)?o:null,vt[o]=i),r}}));var yt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;function _t(e){return(e.match(H)||[]).join(" ")}function wt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(H)||[]}A.fn.extend({prop:function(e,t){return V(this,A.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[A.propFix[e]||e]}))}}),A.extend({prop:function(e,t,n){var a,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&A.isXMLDoc(e)||(t=A.propFix[t]||t,r=A.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(a=r.set(e,n,t))?a:e[t]=n:r&&"get"in r&&null!==(a=r.get(e,t))?a:e[t]},propHooks:{tabIndex:{get:function(e){var t=A.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(e){var t,n,a,r,i,o,s,l=0;if(y(e))return this.each((function(t){A(this).addClass(e.call(this,t,wt(this)))}));if((t=xt(e)).length)for(;n=this[l++];)if(r=wt(n),a=1===n.nodeType&&" "+_t(r)+" "){for(o=0;i=t[o++];)a.indexOf(" "+i+" ")<0&&(a+=i+" ");r!==(s=_t(a))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,a,r,i,o,s,l=0;if(y(e))return this.each((function(t){A(this).removeClass(e.call(this,t,wt(this)))}));if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)for(;n=this[l++];)if(r=wt(n),a=1===n.nodeType&&" "+_t(r)+" "){for(o=0;i=t[o++];)for(;a.indexOf(" "+i+" ")>-1;)a=a.replace(" "+i+" "," ");r!==(s=_t(a))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,a="string"===n||Array.isArray(e);return"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):y(e)?this.each((function(n){A(this).toggleClass(e.call(this,n,wt(this),t),t)})):this.each((function(){var t,r,i,o;if(a)for(r=0,i=A(this),o=xt(e);t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=wt(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,a=0;for(t=" "+e+" ";n=this[a++];)if(1===n.nodeType&&(" "+_t(wt(n))+" ").indexOf(t)>-1)return!0;return!1}});var At=/\r/g;A.fn.extend({val:function(e){var t,n,a,r=this[0];return arguments.length?(a=y(e),this.each((function(n){var r;1===this.nodeType&&(null==(r=a?e.call(this,n,A(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=A.map(r,(function(e){return null==e?"":e+""}))),(t=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=A.valHooks[r.type]||A.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(At,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(e){var t=A.find.attr(e,"value");return null!=t?t:_t(A.text(e))}},select:{get:function(e){var t,n,a,r=e.options,i=e.selectedIndex,o="select-one"===e.type,s=o?null:[],l=o?i+1:r.length;for(a=i<0?l:o?i:0;a-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=A.inArray(A(e).val(),t)>-1}},v.checkOn||(A.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in n;var kt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};A.extend(A.event,{trigger:function(e,t,a,r){var i,s,l,u,c,d,f,h,m=[a||o],g=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(s=h=l=a=a||o,3!==a.nodeType&&8!==a.nodeType&&!kt.test(g+A.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[A.expando]?e:new A.Event(g,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=a),t=null==t?[e]:A.makeArray(t,[e]),f=A.event.special[g]||{},r||!f.trigger||!1!==f.trigger.apply(a,t))){if(!r&&!f.noBubble&&!b(a)){for(u=f.delegateType||g,kt.test(u+g)||(s=s.parentNode);s;s=s.parentNode)m.push(s),l=s;l===(a.ownerDocument||o)&&m.push(l.defaultView||l.parentWindow||n)}for(i=0;(s=m[i++])&&!e.isPropagationStopped();)h=s,e.type=i>1?u:f.bindType||g,(d=(K.get(s,"events")||{})[e.type]&&K.get(s,"handle"))&&d.apply(s,t),(d=c&&s[c])&&d.apply&&J(s)&&(e.result=d.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,r||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(m.pop(),t)||!J(a)||c&&y(a[g])&&!b(a)&&((l=a[c])&&(a[c]=null),A.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,Ct),a[g](),e.isPropagationStopped()&&h.removeEventListener(g,Ct),A.event.triggered=void 0,l&&(a[c]=l)),e.result}},simulate:function(e,t,n){var a=A.extend(new A.Event,n,{type:e,isSimulated:!0});A.event.trigger(a,null,t)}}),A.fn.extend({trigger:function(e,t){return this.each((function(){A.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return A.event.trigger(e,t,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){A.event.simulate(t,e.target,A.event.fix(e))};A.event.special[t]={setup:function(){var a=this.ownerDocument||this,r=K.access(a,t);r||a.addEventListener(e,n,!0),K.access(a,t,(r||0)+1)},teardown:function(){var a=this.ownerDocument||this,r=K.access(a,t)-1;r?K.access(a,t,r):(a.removeEventListener(e,n,!0),K.remove(a,t))}}}));var St=n.location,Et=Date.now(),Pt=/\?/;A.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||A.error("Invalid XML: "+e),t};var It=/\[\]$/,Tt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Bt=/^(?:input|select|textarea|keygen)/i;function Mt(e,t,n,a){var r;if(Array.isArray(t))A.each(t,(function(t,r){n||It.test(e)?a(e,r):Mt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,a)}));else if(n||"object"!==x(t))a(e,t);else for(r in t)Mt(e+"["+r+"]",t[r],n,a)}A.param=function(e,t){var n,a=[],r=function(e,t){var n=y(t)?t():t;a[a.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!A.isPlainObject(e))A.each(e,(function(){r(this.name,this.value)}));else for(n in e)Mt(n,e[n],t,r);return a.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=A.prop(this,"elements");return e?A.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!A(this).is(":disabled")&&Bt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!me.test(e))})).map((function(e,t){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}})):{name:t.name,value:n.replace(Tt,"\r\n")}})).get()}});var Rt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,zt=/^\/\//,Nt={},Ft={},Gt="*/".concat("*"),Ut=o.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var a,r=0,i=t.toLowerCase().match(H)||[];if(y(n))for(;a=i[r++];)"+"===a[0]?(a=a.slice(1)||"*",(e[a]=e[a]||[]).unshift(n)):(e[a]=e[a]||[]).push(n)}}function Vt(e,t,n,a){var r={},i=e===Ft;function o(s){var l;return r[s]=!0,A.each(e[s]||[],(function(e,s){var u=s(t,n,a);return"string"!=typeof u||i||r[u]?i?!(l=u):void 0:(t.dataTypes.unshift(u),o(u),!1)})),l}return o(t.dataTypes[0])||!r["*"]&&o("*")}function qt(e,t){var n,a,r=A.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:a||(a={}))[n]=t[n]);return a&&A.extend(!0,e,a),e}Ut.href=St.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Gt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,A.ajaxSettings),t):qt(A.ajaxSettings,e)},ajaxPrefilter:Wt(Nt),ajaxTransport:Wt(Ft),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var a,r,i,s,l,u,c,d,f,h,p=A.ajaxSetup({},t),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?A(m):A.event,v=A.Deferred(),y=A.Callbacks("once memory"),b=p.statusCode||{},_={},w={},x="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Lt.exec(i);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?i:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return a&&a.abort(t),C(0,t),this}};if(v.promise(k),p.url=((e||p.url||St.href)+"").replace(zt,St.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(H)||[""],null==p.crossDomain){u=o.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Ut.protocol+"//"+Ut.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=A.param(p.data,p.traditional)),Vt(Nt,p,t,k),c)return k;for(f in(d=A.event&&p.global)&&0==A.active++&&A.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ht.test(p.type),r=p.url.replace(jt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Rt,"+")):(h=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(Pt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Dt,"$1"),h=(Pt.test(r)?"&":"?")+"_="+Et+++h),p.url=r+h),p.ifModified&&(A.lastModified[r]&&k.setRequestHeader("If-Modified-Since",A.lastModified[r]),A.etag[r]&&k.setRequestHeader("If-None-Match",A.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Gt+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(m,k,p)||c))return k.abort();if(x="abort",y.add(p.complete),k.done(p.success),k.fail(p.error),a=Vt(Ft,p,t,k)){if(k.readyState=1,d&&g.trigger("ajaxSend",[k,p]),c)return k;p.async&&p.timeout>0&&(l=n.setTimeout((function(){k.abort("timeout")}),p.timeout));try{c=!1,a.send(_,C)}catch(e){if(c)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,o,s){var u,f,h,_,w,x=t;c||(c=!0,l&&n.clearTimeout(l),a=void 0,i=s||"",k.readyState=e>0?4:0,u=e>=200&&e<300||304===e,o&&(_=function(e,t,n){for(var a,r,i,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===a&&(a=e.mimeType||t.getResponseHeader("Content-Type"));if(a)for(r in s)if(s[r]&&s[r].test(a)){l.unshift(r);break}if(l[0]in n)i=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){i=r;break}o||(o=r)}i=i||o}if(i)return i!==l[0]&&l.unshift(i),n[i]}(p,k,o)),_=function(e,t,n,a){var r,i,o,s,l,u={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!l&&a&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=i,i=c.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(!(o=u[l+" "+i]||u["* "+i]))for(r in u)if((s=r.split(" "))[1]===i&&(o=u[l+" "+s[0]]||u["* "+s[0]])){!0===o?o=u[r]:!0!==u[r]&&(i=s[0],c.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+i}}}return{state:"success",data:t}}(p,_,k,u),u?(p.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(A.lastModified[r]=w),(w=k.getResponseHeader("etag"))&&(A.etag[r]=w)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=_.state,f=_.data,u=!(h=_.error))):(h=x,!e&&x||(x="error",e<0&&(e=0))),k.status=e,k.statusText=(t||x)+"",u?v.resolveWith(m,[f,x,k]):v.rejectWith(m,[k,x,h]),k.statusCode(b),b=void 0,d&&g.trigger(u?"ajaxSuccess":"ajaxError",[k,p,u?f:h]),y.fireWith(m,[k,x]),d&&(g.trigger("ajaxComplete",[k,p]),--A.active||A.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return A.get(e,t,n,"json")},getScript:function(e,t){return A.get(e,void 0,t,"script")}}),A.each(["get","post"],(function(e,t){A[t]=function(e,n,a,r){return y(n)&&(r=r||a,a=n,n=void 0),A.ajax(A.extend({url:e,type:t,dataType:r,data:n,success:a},A.isPlainObject(e)&&e))}})),A._evalUrl=function(e,t){return A.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){A.globalEval(e,t)}})},A.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=A(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){A(this).wrapInner(e.call(this,t))})):this.each((function(){var t=A(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){A(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(e){return!A.expr.pseudos.visible(e)},A.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=A.ajaxSettings.xhr();v.cors=!!Qt&&"withCredentials"in Qt,v.ajax=Qt=!!Qt,A.ajaxTransport((function(e){var t,a;if(v.cors||Qt&&!e.crossDomain)return{send:function(r,i){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];for(o in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=a=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),a=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=a:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&a()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),A.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return A.globalEval(e),e}}}),A.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),A.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(a,r){t=A(" - - - - -
- + + + + Sketch & Save + + + + + + + + + +
+ - - -
-
-
-
- -
- Your browser does not support canvas or JavaScript is not enabled. -
-
+
+ + +
+
+
+
+ +
+ Your browser does not support canvas or JavaScript is not enabled. +
+
+
-
- + +
- - -
+
+
-