!function(a){if("function"==typeof require&&"object"==typeof exports&&"object"==typeof module){var b=require("jquery");module.exports=a(b)}else if("function"==typeof define&&define.amd)define(["jquery"],function(e){return a(e)});else{var c;try{c=eval("this")}catch(e){c=window}c.deparam=a(jQuery)}}(function(e){var t=function(e,l){var c={},p={true:!0,false:!1,null:null};return e.replace(/\+/g," ").split("&").forEach(function(e){var t,n=e.split("="),o=decodeURIComponent(n[0]),i=c,a=0,s=o.split("]["),r=s.length-1;if(r=/\[/.test(s[0])&&/\]$/.test(s[r])?(s[r]=s[r].replace(/\]$/,""),(s=s.shift().split("[").concat(s)).length-1):0,2===n.length)if(t=decodeURIComponent(n[1]),l&&(t=t&&!isNaN(t)&&+t+""===t?+t:"undefined"===t?void 0:void 0!==p[t]?p[t]:t),r)for(;a<=r;a++)i=i[o=""===s[a]?i.length:s[a]]=a>>4==(o&=15)&&i>>>4==(i&=15)&&a>>>4==(a&=15)&&o.toString(16)+i.toString(16)+a.toString(16)},"#HEXA":function(e,t){return t._formatColor("#rxgxbxax",e)},"#HEXA4":function(e,t){var n=x.colorpicker.writers.HEXA4(e,t);return!1!==n&&"#"+n},HEXA:function(e,t){return t._formatColor("rxgxbxax",e)},HEXA4:function(e,t){var n=Math.round(255*e.getAlpha());return n>>>4==(n&=15)&&x.colorpicker.writers.HEX3(e,t)+n.toString(16)},RGB:function(e,t){return 1<=e.getAlpha()&&t._formatColor("rgb(rd,gd,bd)",e)},RGBA:function(e,t){return t._formatColor("rgba(rd,gd,bd,af)",e)},"RGB%":function(e,t){return 1<=e.getAlpha()&&t._formatColor("rgb(rp%,gp%,bp%)",e)},"RGBA%":function(e,t){return t._formatColor("rgba(rp%,gp%,bp%,af)",e)},HSL:function(e,t){return 1<=e.getAlpha()&&t._formatColor("hsl(hd,sd,vd)",e)},HSLA:function(e,t){return t._formatColor("hsla(hd,sd,vd,af)",e)},"HSL%":function(e,t){return 1<=e.getAlpha()&&t._formatColor("hsl(hp%,sp%,vp%)",e)},"HSLA%":function(e,t){return t._formatColor("hsla(hp%,sp%,vp%,af)",e)},NAME:function(e,t){return t._closestName(e)},EXACT:function(e,t){return t._exactName(e)}},this.parsers={"":function(e){if(""===e)return new x.colorpicker.Color},NAME:function(e,t){var n=t._getSwatch(x.trim(e));if(n)return new x.colorpicker.Color(n.r,n.g,n.b)},RGBA:function(e){var t=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(e);if(t)return new x.colorpicker.Color(t[1]/255,t[2]/255,t[3]/255,parseFloat(t[4]))},"RGBA%":function(e){var t=/^rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(e);if(t)return new x.colorpicker.Color(t[1]/100,t[2]/100,t[3]/100,t[4]/100)},HSLA:function(e){var t=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(e);if(t)return(new x.colorpicker.Color).setHSL(t[1]/255,t[2]/255,t[3]/255).setAlpha(parseFloat(t[4]))},"HSLA%":function(e){var t=/^hsla?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/.exec(e);if(t)return(new x.colorpicker.Color).setHSL(t[1]/100,t[2]/100,t[3]/100).setAlpha(t[4]/100)},"#HEX":function(e){var t=/^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255)},"#HEX3":function(e){var t=/^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(String(t[1])+t[1],16)/255,parseInt(String(t[2])+t[2],16)/255,parseInt(String(t[3])+t[3],16)/255)},HEX:function(e){var t=/^([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255)},HEX3:function(e){var t=/^([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(String(t[1])+t[1],16)/255,parseInt(String(t[2])+t[2],16)/255,parseInt(String(t[3])+t[3],16)/255)},"#HEXA":function(e){var t=/^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,parseInt(t[4],16)/255)},"#HEXA4":function(e){var t=/^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(String(t[1])+t[1],16)/255,parseInt(String(t[2])+t[2],16)/255,parseInt(String(t[3])+t[3],16)/255,parseInt(String(t[4])+t[4],16)/255)},HEXA:function(e){var t=/^([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,parseInt(t[4],16)/255)},HEXA4:function(e){var t=/^([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(e);if(t)return new x.colorpicker.Color(parseInt(String(t[1])+t[1],16)/255,parseInt(String(t[2])+t[2],16)/255,parseInt(String(t[3])+t[3],16)/255,parseInt(String(t[4])+t[4],16)/255)}},this.partslists={full:["header","map","bar","hex","hsv","rgb","alpha","lab","cmyk","preview","swatches","footer"],popup:["map","bar","hex","hsv","rgb","alpha","preview","footer"],draggable:["header","map","bar","hex","hsv","rgb","alpha","preview","footer"],inline:["map","bar","hex","hsv","rgb","alpha","preview"]},this.limits={websafe:function(e){e.limit(6)},nibble:function(e){e.limit(16)},binary:function(e){e.limit(2)},name:function(e,t){var n=t._getSwatch(t._closestName(e));e.setRGB(n.r,n.g,n.b)}},this.parts={header:function(o){var i=null,a=function(e){e.preventDefault(),o.close(o.options.revert)};this.init=function(){var e;i=x((e=''+(o.options.title||o._getRegional("title"))+"",!o.inline&&o.options.showCloseButton&&(e+='close'),'
'+e+"
")).prependTo(o.dialog);var t=x(".ui-dialog-titlebar-close",i);if(o._hoverable(t),o._focusable(t),t.on("click",a),!o.inline&&o.options.draggable){var n={handle:i};o.options.containment&&(n.containment=o.options.containment),o.dialog.draggable(n)}},this.disable=function(e){x(".ui-dialog-titlebar-close",i)[e?"off":"on"]("click",a)}},map:function(l){var i,c,p,a,s,r,t,e,u=this,d=null,h={};a=function(e){if(l.opened){var t=h.p.offset(),n=e.pageX-t.left,o=e.pageY-t.top;0<=n&&n  '+(l.options.alpha?' ':"")+''},this.init=function(){(d=x(e()).appendTo(x(".ui-colorpicker-map-container",l.dialog))).on("mousedown",a),d.on("keydown",t),h[1]=x(".ui-colorpicker-map-layer-1",d),h[2]=x(".ui-colorpicker-map-layer-2",d),h.a=x(".ui-colorpicker-map-layer-alpha",d),h.p=x(".ui-colorpicker-map-layer-pointer",d),c=h.p.width(),p=h.p.height(),i=x(".ui-colorpicker-map-pointer",d)},this.update=function(){var e=65*(l.options.part.map.size||256)/64;switch(l.mode){case"h":h[1].css({"background-position":"0 0",opacity:""}).show(),h[2].hide();break;case"s":case"a":h[1].css({"background-position":"0 "+-e+"px",opacity:""}).show(),h[2].css({"background-position":"0 "+2*-e+"px",opacity:""}).show();break;case"v":d.css("background-color","black"),h[1].css({"background-position":"0 "+3*-e+"px",opacity:""}).show(),h[2].hide();break;case"r":h[1].css({"background-position":"0 "+4*-e+"px",opacity:""}).show(),h[2].css({"background-position":"0 "+5*-e+"px",opacity:""}).show();break;case"g":h[1].css({"background-position":"0 "+6*-e+"px",opacity:""}).show(),h[2].css({"background-position":"0 "+7*-e+"px",opacity:""}).show();break;case"b":h[1].css({"background-position":"0 "+8*-e+"px",opacity:""}).show(),h[2].css({"background-position":"0 "+9*-e+"px",opacity:""}).show()}u.repaint()},this.repaint=function(){var e=0,t=0;switch(l.mode){case"h":e=(n=l.color.getHSV()).s*c,t=(1-n.v)*c,d.css("background-color",l.color.copy().setHSV(null,1,1).toCSS());break;case"s":case"a":e=(n=l.color.getHSV()).h*c,t=(1-n.v)*c,h[2].css("opacity",1-n.s);break;case"v":var n;e=(n=l.color.getHSV()).h*c,t=(1-n.s)*c,h[1].css("opacity",n.v);break;case"r":e=(o=l.color.getRGB()).b*c,t=(1-o.g)*c,h[2].css("opacity",o.r);break;case"g":e=(o=l.color.getRGB()).b*c,t=(1-o.r)*c,h[2].css("opacity",o.g);break;case"b":var o;e=(o=l.color.getRGB()).r*c,t=(1-o.g)*c,h[2].css("opacity",o.b)}l.options.alpha&&h.a.css("opacity",1-l.color.getAlpha()),i.css({left:e-7,top:t-7})},this.disable=function(e){d[e?"off":"on"]("mousedown",a),d[e?"off":"on"]("keydown",t)}},bar:function(i){var o,a,s,r,l,c,t,e,p=this,u=null,d={};r=function(e){if(i.opened){var t=d.p.offset(),n=e.pageX-t.left,o=e.pageY-t.top;0<=n&&n    ';return i.options.alpha&&(e+='  '),e+=''},this.init=function(){(u=x(e()).appendTo(x(".ui-colorpicker-bar-container",i.dialog))).on("mousedown",r),u.on("keydown",t),d[1]=x(".ui-colorpicker-bar-layer-1",u),d[2]=x(".ui-colorpicker-bar-layer-2",u),d[3]=x(".ui-colorpicker-bar-layer-3",u),d[4]=x(".ui-colorpicker-bar-layer-4",u),d.a=x(".ui-colorpicker-bar-layer-alpha",u),d.ab=x(".ui-colorpicker-bar-layer-alphabar",u),d.p=x(".ui-colorpicker-bar-layer-pointer",u),a=d.p.width(),s=d.p.height(),o=x(".ui-colorpicker-bar-pointer",u)},this.update=function(){var e=65*(i.options.part.bar.size||256)/64;switch(i.mode){case"h":case"s":case"v":case"r":case"g":case"b":d.a.show(),d.ab.hide();break;case"a":d.a.hide(),d.ab.show()}switch(i.mode){case"h":d[1].css({"background-position":"0 0",opacity:""}).show(),d[2].hide(),d[3].hide(),d[4].hide();break;case"s":d[1].css({"background-position":"0 "+-e+"px",opacity:""}).show(),d[2].css({"background-position":"0 "+2*-e+"px",opacity:""}).show(),d[3].hide(),d[4].hide();break;case"v":d[1].css({"background-position":"0 "+2*-e+"px",opacity:""}).show(),d[2].hide(),d[3].hide(),d[4].hide();break;case"r":d[1].css({"background-position":"0 "+6*-e+"px",opacity:""}).show(),d[2].css({"background-position":"0 "+5*-e+"px",opacity:""}).show(),d[3].css({"background-position":"0 "+3*-e+"px",opacity:""}).show(),d[4].css({"background-position":"0 "+4*-e+"px",opacity:""}).show();break;case"g":d[1].css({"background-position":"0 "+10*-e+"px",opacity:""}).show(),d[2].css({"background-position":"0 "+9*-e+"px",opacity:""}).show(),d[3].css({"background-position":"0 "+7*-e+"px",opacity:""}).show(),d[4].css({"background-position":"0 "+8*-e+"px",opacity:""}).show();break;case"b":d[1].css({"background-position":"0 "+14*-e+"px",opacity:""}).show(),d[2].css({"background-position":"0 "+13*-e+"px",opacity:""}).show(),d[3].css({"background-position":"0 "+11*-e+"px",opacity:""}).show(),d[4].css({"background-position":"0 "+12*-e+"px",opacity:""}).show();break;case"a":d[1].hide(),d[2].hide(),d[3].hide(),d[4].hide()}p.repaint()},this.repaint=function(){var e=0;switch(i.mode){case"h":e=(1-i.color.getHSV().h)*s;break;case"s":var t=i.color.getHSV();e=(1-t.s)*s,d[2].css("opacity",1-t.v),u.css("background-color",i.color.copy().setHSV(null,1,null).toCSS());break;case"v":e=(1-i.color.getHSV().v)*s,u.css("background-color",i.color.copy().setHSV(null,null,1).toCSS());break;case"r":e=(1-(n=i.color.getRGB()).r)*s,d[2].css("opacity",Math.max(0,n.b-n.g)),d[3].css("opacity",Math.max(0,n.g-n.b)),d[4].css("opacity",Math.min(n.b,n.g));break;case"g":e=(1-(n=i.color.getRGB()).g)*s,d[2].css("opacity",Math.max(0,n.b-n.r)),d[3].css("opacity",Math.max(0,n.r-n.b)),d[4].css("opacity",Math.min(n.r,n.b));break;case"b":var n;e=(1-(n=i.color.getRGB()).b)*s,d[2].css("opacity",Math.max(0,n.r-n.g)),d[3].css("opacity",Math.max(0,n.g-n.r)),d[4].css("opacity",Math.min(n.r,n.g));break;case"a":e=(1-i.color.getAlpha())*s,u.css("background-color",i.color.copy().toCSS())}"a"!==i.mode&&d.a.css("opacity",1-i.color.getAlpha()),o.css("top",e-3)},this.disable=function(e){u[e?"off":"on"]("mousedown",r),u[e?"off":"on"]("keydown",t)}},preview:function(e){var t,n,o,i,a,s=null,r=function(){e.color=e.currentColor.copy(),e._change()};this.init=function(){s=x('
').appendTo(x(".ui-colorpicker-preview-container",e.dialog)),x(".ui-colorpicker-preview-initial",s).on("click",r),n=x(".ui-colorpicker-preview-initial",s),o=x(".ui-colorpicker-preview-initial-alpha",s),i=x(".ui-colorpicker-preview-current",s),a=x(".ui-colorpicker-preview-current-alpha",s),t=x(".ui-colorpicker-preview-initial-alpha, .ui-colorpicker-preview-current-alpha",s)},this.update=function(){t[e.options.alpha?"show":"hide"](),this.repaint()},this.repaint=function(){n.css("background-color",e.currentColor.set?e.currentColor.toCSS():"").attr("title",e.currentColor.set?e.currentColor.toCSS():""),o.css("opacity",1-e.currentColor.getAlpha()),i.css("background-color",e.color.set?e.color.toCSS():"").attr("title",e.color.set?e.color.toCSS():""),a.css("opacity",1-e.color.getAlpha())},this.disable=function(e){x(".ui-colorpicker-preview-initial",s)[e?"off":"on"]("click",r)}},hsv:function(t){var e,n=null,o={};e=function(){var e="";return t.options.hsv&&(e+='
°
%
%
'),'
'+e+"
"},this.init=function(){n=x(e()).appendTo(x(".ui-colorpicker-hsv-container",t.dialog)),x(".ui-colorpicker-mode",n).click(function(){t.mode=x(this).val(),t._updateAllParts()}),o.h=x(".ui-colorpicker-hsv-h .ui-colorpicker-number",n),o.s=x(".ui-colorpicker-hsv-s .ui-colorpicker-number",n),o.v=x(".ui-colorpicker-hsv-v .ui-colorpicker-number",n),x(".ui-colorpicker-number",n).on("change keyup",function(){t.color.setHSV(o.h.val()/360,o.s.val()/100,o.v.val()/100),t._change()})},this.repaint=function(){var e=t.color.getHSV();o.h.val(Math.round(360*e.h)),o.s.val(Math.round(100*e.s)),o.v.val(Math.round(100*e.v))},this.update=function(){x(".ui-colorpicker-mode",n).each(function(){var e=x(this);e.prop("checked",e.val()===t.mode)}),this.repaint()},this.disable=function(e){x(":input",n).prop("disabled",e)}},rgb:function(t){var e,n=null,o={};e=function(){var e="";return t.options.rgb&&(e+='
'),'
'+e+"
"},this.init=function(){n=x(e()).appendTo(x(".ui-colorpicker-rgb-container",t.dialog)),x(".ui-colorpicker-mode",n).click(function(){t.mode=x(this).val(),t._updateAllParts()}),o.r=x(".ui-colorpicker-rgb-r .ui-colorpicker-number",n),o.g=x(".ui-colorpicker-rgb-g .ui-colorpicker-number",n),o.b=x(".ui-colorpicker-rgb-b .ui-colorpicker-number",n),x(".ui-colorpicker-number",n).on("change keyup",function(){x(".ui-colorpicker-rgb-r .ui-colorpicker-number",n).val();t.color.setRGB(o.r.val()/255,o.g.val()/255,o.b.val()/255),t._change()})},this.repaint=function(){var e=t.color.getRGB();o.r.val(Math.round(255*e.r)),o.g.val(Math.round(255*e.g)),o.b.val(Math.round(255*e.b))},this.update=function(){x(".ui-colorpicker-mode",n).each(function(){var e=x(this);e.prop("checked",e.val()===t.mode)}),this.repaint()},this.disable=function(e){x(":input",n).prop("disabled",e)}},lab:function(t){var n=null,o={};this.init=function(){var e;n=x((e="",t.options.hsv&&(e+='
'),'
'+e+"
")).appendTo(x(".ui-colorpicker-lab-container",t.dialog)),o.l=x(".ui-colorpicker-lab-l .ui-colorpicker-number",n),o.a=x(".ui-colorpicker-lab-a .ui-colorpicker-number",n),o.b=x(".ui-colorpicker-lab-b .ui-colorpicker-number",n),x(".ui-colorpicker-number",n).on("change keyup",function(e){t.color.setLAB(parseInt(o.l.val(),10)/100,(parseInt(o.a.val(),10)+128)/255,(parseInt(o.b.val(),10)+128)/255),t._change()})},this.repaint=function(){var e=t.color.getLAB();o.l.val(Math.round(100*e.l)),o.a.val(Math.round(255*e.a)-128),o.b.val(Math.round(255*e.b)-128)},this.update=this.repaint,this.disable=function(e){x(":input",n).prop("disabled",e)}},cmyk:function(t){var n=null,o={};this.init=function(){var e;n=x((e="",t.options.hsv&&(e+='
%
%
%
%
'),'
'+e+"
")).appendTo(x(".ui-colorpicker-cmyk-container",t.dialog)),o.c=x(".ui-colorpicker-cmyk-c .ui-colorpicker-number",n),o.m=x(".ui-colorpicker-cmyk-m .ui-colorpicker-number",n),o.y=x(".ui-colorpicker-cmyk-y .ui-colorpicker-number",n),o.k=x(".ui-colorpicker-cmyk-k .ui-colorpicker-number",n),x(".ui-colorpicker-number",n).on("change keyup",function(e){t.color.setCMYK(parseInt(o.c.val(),10)/100,parseInt(o.m.val(),10)/100,parseInt(o.y.val(),10)/100,parseInt(o.k.val(),10)/100),t._change()})},this.repaint=function(){var e=t.color.getCMYK();o.c.val(Math.round(100*e.c)),o.m.val(Math.round(100*e.m)),o.y.val(Math.round(100*e.y)),o.k.val(Math.round(100*e.k))},this.update=this.repaint,this.disable=function(e){x(":input",n).prop("disabled",e)}},alpha:function(t){var n,o=null;this.init=function(){var e;o=x((e="",t.options.alpha&&(e+='
%
'),'
'+e+"
")).appendTo(x(".ui-colorpicker-alpha-container",t.dialog)),x(".ui-colorpicker-mode",o).click(function(){t.mode=x(this).val(),t._updateAllParts()}),n=x(".ui-colorpicker-a .ui-colorpicker-number",o),x(".ui-colorpicker-number",o).on("change keyup",function(){t.color.setAlpha(n.val()/100),t._change()})},this.update=function(){x(".ui-colorpicker-mode",o).each(function(){x(this).prop("checked",x(this).val()===t.mode)}),this.repaint()},this.repaint=function(){n.val(Math.round(100*t.color.getAlpha()))},this.disable=function(e){x(":input",o).prop("disabled",e)}},hex:function(o){var t=null,i={};this.init=function(){var e;t=x((e="",o.options.alpha&&(e+=''),'
'+(e+='')+"
")).appendTo(x(".ui-colorpicker-hex-container",o.dialog)),i.color=x(".ui-colorpicker-hex-input",t),i.alpha=x(".ui-colorpicker-hex-alpha",t),i.color.on("keydown keyup",function(e){return e.ctrlKey||s(e.which)||!a(e.which)}),i.color.on("change",function(){/[^a-fA-F0-9]/.test(i.color.val())&&i.color.val(i.color.val().replace(/[^a-fA-F0-9]/,""))}),i.color.on("change keyup",function(){var e,t,n;o.color=(e=i.color.val(),(n=/^#?([a-fA-F0-9]{1,3})$/.exec(e))?(t=parseInt(n[1],16),new x.colorpicker.Color((t>>8&15)/15,(t>>4&15)/15,(15&t)/15)):(n=/^#?([a-fA-F0-9]{1,6})$/.exec(e))?(t=parseInt(n[1],16),new x.colorpicker.Color((t>>16&255)/255,(t>>8&255)/255,(255&t)/255)):new x.colorpicker.Color).setAlpha(o.color.getAlpha()),o._change()}),i.alpha.on("keydown keyup",function(e){return e.ctrlKey||s(e.which)||!a(e.which)}),i.alpha.on("change",function(){/[^a-fA-F0-9]/.test(i.alpha)&&i.alpha.val(i.alpha.val().replace(/[^a-fA-F0-9]/,""))}),i.alpha.on("change keyup",function(){o.color.setAlpha(parseInt(i.alpha.val(),16)/255),o._change()})},this.repaint=function(){i.color.is(":focus")||i.color.val(o.color.toHex(!0)),i.alpha.is(":focus")||i.alpha.val(r(255*o.color.getAlpha()))},this.update=this.repaint,this.disable=function(e){x(":input",t).prop("disabled",e)}},swatches:function(e){var t=null,n=function(){e.color=e._parseColor(x(this).css("background-color"))||new x.colorpicker.Color,e._change()};this.init=function(){var o;t=x((o="",e._eachSwatch(function(e,t){var n=new x.colorpicker.Color(t.r,t.g,t.b).toCSS();o+='
'}),'
'+o+"
")),x(".ui-colorpicker-swatches-container",e.dialog).html(t),x(".ui-colorpicker-swatch",t).on("click",n)},this.disable=function(e){x(".ui-colorpicker-swatch",t)[e?"off":"on"]("click",n)}},footer:function(t){var n=null,o="ui-colorpicker-special-transparent-"+t.colorpicker_index,i="ui-colorpicker-special-none-"+t.colorpicker_index;this.init=function(){var e;n=x((e="",(t.options.alpha||!t.inline&&t.options.showNoneButton)&&(e+='
',t.options.alpha&&(e+='"),!t.inline&&t.options.showNoneButton&&(e+='"),e+="
"),t.inline||(e+='
',t.options.showCancelButton&&(e+='"),e+='",e+="
"),'
'+e+"
")).appendTo(t.dialog),x(".ui-colorpicker-ok",n).button().click(function(){t.close()}),x(".ui-colorpicker-cancel",n).button().click(function(){t.close(!0)}),x(".ui-colorpicker-buttonset",n)[x.fn.controlgroup?"controlgroup":"buttonset"](),x(".ui-colorpicker-special-color",n).click(function(){t._change()}),x("#"+i,n).click(function(){t.color.set=!1,t._change()}),x("#"+o,n).click(function(){t.color.setAlpha(0),t._change()})},this.repaint=function(){x(".ui-colorpicker-special-none",n).prop("checked",!t.color.set).button("refresh"),x(".ui-colorpicker-special-transparent",n).prop("checked",t.color.set&&0===t.color.getAlpha()).button("refresh"),x(".ui-colorpicker-ok",n).button(t.changed?"enable":"disable")},this.update=function(){},this.disable=function(e){x(":input, :button",n).button(e?"disable":"enable"),e||x(".ui-colorpicker-ok",n).button(t.changed?"enable":"disable")}}},this.Color=function(){var y={rgb:{r:0,g:0,b:0},hsv:{h:0,s:0,v:0},hsl:{h:0,s:0,l:0},lab:{l:0,a:0,b:0},cmyk:{c:0,m:0,y:0,k:1}},t=1,w=[.9504285,1,1.0889],e=arguments,_=function(e){return isNaN(e)||null===e?0:("string"==typeof e&&(e=parseInt(e,10)),Math.max(0,Math.min(e,1)))},n=function(e){var t="0123456789abcdef",n=(e=Math.round(e))%16;return t.charAt((e-n)/16)+t.charAt(n)},o=function(e){var t=.04045").attr({src:t.options.buttonImage,alt:e,title:e}),t.options.buttonClass&&t.image.attr("class",t.options.buttonClass),t._setImageBackground()),t.options.buttonImageOnly&&t.image?t.button=t.image:(t.button=x('').html(t.image||t.options.buttonText).button(),t.image=t.image?x("img",t.button).first():null),t.button.insertAfter(t.element).click(function(){t.opened&&/\bbutton|all|both\b/.test(t.options.hideOn)?t.close():t.open()})),/\balt|all|both\b/.test(t.options.showOn)&&x(t.options.altField).on("click",function(){t.opened&&/\balt|all|both\b/.test(t.options.hideOn)?t.close():t.open()}),t.options.autoOpen&&t.open()):(t.inline=!0,t._generate(),t.opened=!0),(t.element.is(":disabled")||t.options.disabled)&&t.disable(),this},_setOption:function(e,t){switch(e){case"disabled":this[t?"disable":"enable"]();break;case"swatches":this.options.swatches=t,this.parts.swatches.init()}x.Widget.prototype._setOption.apply(this,arguments)},enable:function(){this.element&&this.element.prop("disabled",!1),this.button&&this.button.prop("disabled",!1),this.dialog&&this.dialog.removeClass("ui-colorpicker-disabled"),this.options.disabled=!1,this.parts&&x.each(this.parts,function(e,t){t.disable&&t.disable(!1)})},disable:function(){this.element&&this.element.prop("disabled",!0),this.button&&this.button.prop("disabled",!0),this.dialog&&this.dialog.addClass("ui-colorpicker-disabled"),this.options.disabled=!0,this.parts&&x.each(this.parts,function(e,t){t.disable&&t.disable(!0)})},_setImageBackground:function(){this.image&&this.options.buttonColorize&&this.image.css("background-color",this.color.set?this._formatColor("RGBA",this.color):"")},_setAltField:function(){if(this.options.altOnChange&&this.options.altField&&this.options.altProperties){var e,t,n=this.options.altProperties.split(",");for(e=0;e<=n.length;++e)switch(t=x.trim(n[e])){case"color":case"fill":case"stroke":case"background-color":case"backgroundColor":case"outline-color":case"border-color":x(this.options.altField).css(t,this.color.set?this.color.toCSS():"")}this.options.altAlpha&&x(this.options.altField).css("opacity",this.color.set?this.color.getAlpha():"")}},_setColor:function(e){this.color=this._parseColor(e)||new x.colorpicker.Color,this.currentColor=this.color.copy(),this._setImageBackground(),this._setAltField()},setColor:function(e){this._setColor(e),this._change()},getColor:function(e){return this._formatColor(e||this.options.colorFormat,this.color)},_generateInline:function(){x(this.element).html(this.options.inlineFrame?'
':'
'),this.dialog=x(".ui-colorpicker",this.element)},_generatePopup:function(){var o=this;o.dialog=x('').appendTo("body"),null===o.events.document_click_html&&x(document).on("touchstart click","html",o.events.document_click_html=function(e){if(o.opened&&e.target!==o.element[0]&&!o.overlay)if(o.dialog.is(e.target)||0",o=0;o':m||(o+=1)}u+=""}return''+u+"
"}(n,function(e,t,n){return o=["ui-colorpicker-"+e.part+"-container"],0'})).appendTo(i.dialog),i.options.inlineFrame&&t.addClass("ui-dialog-content ui-widget-content"),i._initAllParts(),i._updateAllParts(),i.generated=!0)},_effectGeneric:function(e,t,n,o,i){var a=this;x.effects&&x.effects[a.options.showAnim]?e[t](a.options.showAnim,a.options.showOptions,a.options.duration,i):(e["slideDown"===a.options.showAnim?n:"fadeIn"===a.options.showAnim?o:t](a.options.showAnim?a.options.duration:null,i),a.options.showAnim&&a.options.duration||i())},_effectShow:function(e,t){this._effectGeneric(e,"show","slideDown","fadeIn",t)},_effectHide:function(e,t){this._effectGeneric(e,"hide","slideUp","fadeOut",t)},open:function(){var t,e,n,o=this;o.opened||(o._generate(),e=o.element.is(":hidden")?x("
").insertBefore(o.element):o.element,o.element.is(":hidden")&&e.remove(),t=0,x(o.element[0]).parents().each(function(){var e=x(this).css("z-index");if("number"!=typeof e&&"string"!=typeof e||""===e||isNaN(e))x(this).siblings().each(function(){var e=x(this).css("z-index");"number"!=typeof e&&"string"!=typeof e||""===e||isNaN(e)||t
').appendTo("body").css("z-index",t-1),null!==o.events.window_resize&&x(window).off("resize",o.events.window_resize),o.events.window_resize=function(){o.overlay&&(o.overlay.width(x(document).width()),o.overlay.height(x(document).height()))},x(window).on("resize",o.events.window_resize),o.events.window_resize()),o._effectShow(this.dialog),o.options.position?"element"===(n=x.extend({},o.options.position)).of&&(n.of=e):n={my:"left top",at:"left bottom",of:e,collision:"flip"},o.dialog.position(n),o.opened=!0,o._callback("open",!0),x(function(){o._repaintAllParts()}))},close:function(e){var t=this;t.opened&&(e?(t.color=t.currentColor.copy(),t._change(),t._callback("cancel",!0)):(t.currentColor=t.color.copy(),t._callback("ok",!0)),t.changed=!1,t.overlay&&(x(window).off("resize",t.events.window_resize),t.overlay.remove()),t._effectHide(t.dialog,function(){t.dialog.remove(),t.dialog=null,t.generated=!1,t.opened=!1,t._callback("close",!0)}))},destroy:function(){var e=this;null!==e.events.document_click_html&&x(document).off("touchstart click","html",e.events.document_click_html),null!==e.events.document_keydown&&x(document).off("keydown",e.events.document_keydown),null!==e.events.resizeOverlay&&x(window).off("resize",e.events.resizeOverlay),this.element.off(),this.overlay&&this.overlay.remove(),null!==this.dialog&&this.dialog.remove(),null!==this.image&&this.image.remove(),null!==this.button&&this.button.remove()},_callback:function(e,t){var n,o,i=this;return i.color.set?(n={formatted:i._formatColor(i.options.colorFormat,i.color),colorPicker:i},(o=i.color.getLAB()).a=2*o.a-1,o.b=2*o.b-1,!0===t&&(n.a=i.color.getAlpha(),n.rgb=i.color.getRGB(),n.hsv=i.color.getHSV(),n.cmyk=i.color.getCMYK(),n.hsl=i.color.getHSL(),n.lab=o),i._trigger(e,null,n)):i._trigger(e,null,{formatted:"",colorPicker:i})},_initAllParts:function(){x.each(this.parts,function(e,t){t.init&&t.init()})},_updateAllParts:function(){x.each(this.parts,function(e,t){t.update&&t.update()})},_repaintAllParts:function(){x.each(this.parts,function(e,t){t.repaint&&t.repaint()})},_change:function(e){this.color.set&&this.options.limit&&x.colorpicker.limits[this.options.limit]&&x.colorpicker.limits[this.options.limit](this.color,this),this.changed=!this.color.equals(this.currentColor),this.inline||(this.color.set?this.color.equals(this._parseColor(this.element.val()))||this.element.val(this._formatColor(this.options.colorFormat,this.color)).change():""!==this.element.val()&&this.element.val("").change(),this._setImageBackground()),this._setAltField(),this.options.color=this.color.set?this.color.toCSS():"",this.opened&&this._repaintAllParts(),this._callback("select"),(void 0===e||e)&&this._callback("stop")},_hoverable:function(e){e.hover(function(){e.addClass("ui-state-hover")},function(){e.removeClass("ui-state-hover")})},_focusable:function(e){e.focus(function(){e.addClass("ui-state-focus")}).blur(function(){e.removeClass("ui-state-focus")})},_getRegional:function(e){return void 0!==x.colorpicker.regional[this.options.regional][e]?x.colorpicker.regional[this.options.regional][e]:x.colorpicker.regional[""][e]},_getSwatches:function(){return"string"==typeof this.options.swatches?x.colorpicker.swatches[this.options.swatches]:x.isPlainObject(this.options.swatches)?this.options.swatches:x.colorpicker.swatches.html},_eachSwatch:function(n){var o,i=this._getSwatches();x.each(i,function(e,t){return o=x.isArray(i)?t.name:e,n(o,t)})},_getSwatch:function(n){var o=!1;return this._eachSwatch(function(e,t){if(e.toLowerCase()==n.toLowerCase())return o=t,!1}),o},_parseFormat:function(e,t){var n,o,i={x:function(){return"([0-9a-fA-F]{2})"},d:function(){return"([12]?[0-9]{1,2})"},f:function(){return"([0-9]*\\.?[0-9]*)"},p:function(){return"([0-9]*\\.?[0-9]*)"}},a={x:function(e){return parseInt(e,16)/255},d:function(e){return e/255},f:function(e){return e},p:function(e){return.01*e}},s={r:"setRGB",g:"setRGB",b:"setRGB",h:"setHSV",s:"setHSV",v:"setHSV",c:"setCMYK",m:"setCMYK",y:"setCMYK",k:"setCMYK",L:"setLAB",A:"setLAB",B:"setLAB"},r=[],l=[],c=null;if(o=(o=e.replace(/[()\\^$.|?*+[\]]/g,function(e){return"\\"+e})).replace(/\\?[argbhsvcmykLAB][xdfp]/g,function(e){if(e.match(/^\\/))return e.slice(1);var t=e.charAt(0),n=e.charAt(1);return r.push(t),l.push(a[n]),s[t]&&(c=s[t]),i[n]()}),c){var p=t.match(new RegExp(o));if(p){var u,d=[];p.shift(),x.each({setRGB:["r","g","b"],setHSV:["h","s","v"],setCMYK:["c","m","y","k"],setLAB:["L","A","B"]}[c],function(e,t){u=x.inArray(t,r),d[e]=l[u](p[u])}),(n=new x.colorpicker.Color)[c].apply(n,d)}}return n},_parseColor:function(n){var o,i=this,e=x.isArray(i.options.colorFormat)?i.options.colorFormat:[i.options.colorFormat];return x.each(e,function(e,t){if(o=x.colorpicker.parsers[t]?x.colorpicker.parsers[t](n,i):i._parseFormat(t,n))return!1}),o||x.each(x.colorpicker.parsers,function(e,t){if(o=t(n,i))return!1}),o||!1},_exactName:function(n){var o=!1;return this._eachSwatch(function(e,t){if(n.equals(new x.colorpicker.Color(t.r,t.g,t.b)))return o=e,!1}),o},_closestName:function(n){n.getRGB();var o,i=null,a=!1;return this._eachSwatch(function(e,t){if((o=n.distance(new x.colorpicker.Color(t.r,t.g,t.b)))'+n+" - "+m.options.l[n].id+"\n";var o='";if(o+='",m.options.m)for(var i=0;i",e+='",e+='',e+='',e+='',e+='',e+='',e+='',e+='',e+='',e+='',e+='",e+='',e+='',e+='',e+='\n',e+="";$("#markline_list").html(e),$(".markline-value").each(function(){var e=$(this).data("index"),t=$(this).data("option");"checkbox"===$(this).attr("type")?("true"===m.options.m[e][t]&&(m.options.m[e][t]=!0),"false"===m.options.m[e][t]&&(m.options.m[e][t]=!1),$(this).prop("checked",!!m.options.m[e][t])):$(this).val(m.options.m[e][t])}),$(".markline-color").colorpicker({colorFormat:"#HEX"}).on("change",function(){$(this).css({"background-color":$(this).val(),color:M($(this).val())})}).trigger("change"),$(".markline-remove").button({icons:{primary:"ui-icon-trash"},text:!1}).click(function(){if(m.options.m.length){var e=$(this).data("index");m.options.m.splice(e,1),v(),S(),w()}}).css({width:22,height:22}),$(".markline-select-dialog").button({text:!1,icons:{primary:"ui-icon-folder-open"}}).css({width:25,height:22}).click(function(){var o=$(this).data("index"),i=$(this).data("option");$("#dialog-select-member").selectId("show",m.options.m[o][i],{common:{custom:!1}},function(e,t,n){m.options.l[o][i]=e,$('.markline-value[data-index="'+o+'"][data-option="'+i+'"]').val(e).trigger("change")})})}else $(".markline-option").hide()},100)}function k(c){setTimeout(function(){for(var e="",t='\n',n='\n",o=0;o'+p[o]+"\n";var i=0;for(var a in settings.line)settings.line.hasOwnProperty(a)&&settings.line[a].enabled&&('\n",t+='"+_(settings.line[a].name)+"\n",i++);t+="";for(var s=0;s\n',settings.line)if(settings.line.hasOwnProperty(a)&&settings.line[a]&&settings.line[a].enabled)if(settings.line[a].style=settings.line[a].style||"",settings.line[a]._class=settings.line[a]._class||"","min"===a?r.min=void 0===r.min?"":r.min:"max"===a&&(r.max=void 0===r.max?"":r.max),"number"===a)e+=''+(s+1)+"\n";else if("idSelect"===a)e+='\n';else if("instance"===a)e+='\n";else if("offset"===a)e+='\n',e+='\n";else if("removeButton"===a)e+='\n';else if("extraOptions"===a)e+='\n';else{if(e+='\n',settings.line[a].values){e+='\n"}else e+='\n';e+="\n"}e+=""}$("#idslist").html(t+e),"de"===systemLang?$.colorpicker.regional={"":{ok:"OK",cancel:"Abbrechen",none:"Nichts",button:"Farbe",title:"Farbe wählen",transparent:"Transparent",hsvH:"H",hsvS:"S",hsvV:"V",rgbR:"R",rgbG:"G",rgbB:"B",labL:"L",labA:"a",labB:"b",hslH:"H",hslS:"S",hslL:"L",cmykC:"C",cmykM:"M",cmykY:"Y",cmykK:"K",alphaA:"A"}}:"ru"===systemLang&&($.colorpicker.regional={"":{ok:"OK",cancel:"Отмена",none:"Нет",button:"Цвет",title:"Выбрать цвет",transparent:"Прозрачность",hsvH:"H",hsvS:"S",hsvV:"V",rgbR:"R",rgbG:"G",rgbB:"B",labL:"L",labA:"a",labB:"b",hslH:"H",hslS:"S",hslL:"L",cmykC:"C",cmykM:"M",cmykY:"Y",cmykK:"K",alphaA:"A"}}),$(".input-color").colorpicker({colorFormat:"#HEX"}).on("change",function(){$(this).css({"background-color":$(this).val(),color:M($(this).val())})}).trigger("change"),$(".id-remove").button({icons:{primary:"ui-icon-trash"},text:!1}).click(function(){if(m.options.l.length){var e=$(this).data("index");m.options.l.splice(e,1),m.options.l.length||f(),k(),S(),w()}}).css({width:22,height:22}),$(".id-options").button({icons:{primary:"ui-icon-gear"},text:!1}).click(function(){!function(e){var t=m.options.l[e],n=$("#dialog-line-options");if(n.data("index",e),!n.data("inited")){n.data("inited",!0);var o=0,i="";for(var a in settings.extraOptions)if(settings.extraOptions.hasOwnProperty(a)){if(o++,i+="",i+='","offset"===a)i+='\n";else if(settings.extraOptions[a].values){i+='"}else i+='";i+=""}n.find("table").html(i),n.dialog({autoOpen:!1,modal:!0,width:430,resizable:!1,height:32*o+120,buttons:[{text:_("Ok"),click:function(){var e=$("#dialog-line-options"),t=e.data("index"),n=!1,o=m.options.l[t];e.find(".dialog-line-option").each(function(){var e=$(this).data("option");"checkbox"===$(this).attr("type")?$(this).prop("checked")!==o[e]&&(n=!0,o[e]=$(this).prop("checked")):$(this).val()!=o[e]&&(n=!0,o[e]=$(this).val())}),n&&x(),e.dialog("close")}},{text:_("Cancel"),click:function(){$("#dialog-line-options").dialog("close")}}]})}n.find(".dialog-line-option").each(function(){var e=$(this).data("option");"checkbox"===$(this).attr("type")?("true"===t[e]&&(t[e]=!0),"false"===t[e]&&(t[e]=!1),null===$(this).data("default")||void 0===$(this).data("default")||void 0!==t[e]&&""!==t[e]&&null!==t[e]||(t[e]="true"===$(this).data("default")),$(this).prop("checked",!0===t[e])):(null===$(this).data("default")||void 0===$(this).data("default")||void 0!==t[e]&&""!==t[e]&&null!==t[e]||(t[e]=$(this).data("default")),$(this).val(void 0===t[e]?"":t[e]))}),n.dialog("option","title",_("Edit options for line %s",e+1)),n.dialog("open")}($(this).data("index"))}).css({width:22,height:22}),$(".select-dialog").button({text:!1,icons:{primary:"ui-icon-folder-open"}}).css({width:25,height:22}).click(function(){var o=$(this).data("index"),e=$('[data-option="instance"][data-index="'+o+'"]').val();e||(e=u),$("#dialog-select-member").selectId("show",m.options.l[o].id,{common:{custom:e}},function(e,t,n){m.options.l[o].id=e,$('.ids[data-index="'+o+'"]').val(e).trigger("change"),n&&"boolean"===n.common.type&&($('select[data-option="aggregate"][data-index="'+o+'"]').val("onchange").trigger("change"),$('select[data-option="chartType"][data-index="'+o+'"]').val("steps").trigger("change"),$('input[data-option="min"][data-index="'+o+'"]').val(0).trigger("change"),$('input[data-option="max"][data-index="'+o+'"]').val(10).trigger("change")),k()})}),$(".options-lines").each(function(){var e=$(this),t=$(this).data("index"),n=$(this).data("option");void 0!==m.options.l[t][n]&&("checkbox"===e.attr("type")?("true"===m.options.l[t][n]&&(m.options.l[t][n]=!0),"false"===m.options.l[t][n]&&(m.options.l[t][n]=!1),e.prop("checked",!!m.options.l[t][n])):e.val(m.options.l[t][n]))}),$(".spinner-lines").attr("type","number"),"function"==typeof c&&c(),$(".toggleable").click(function(){var e=$(this).data("index"),t=$('col[data-index="'+e+'"]');t.data("width")||t.data("width",t.attr("width")),t.data("hidden")?(t.data("hidden",!1),t.attr("width",t.data("width")),$(this).css("width",t.data("width"))):(t.data("hidden",!0),t.attr("width","10px"),$(this).css("width","10px"))}),$('select[data-option="chartType"]').on("change",function(){"spline"===$(this).val()&&alert("Experimental")}),v()},100)}function y(){var e=JSON.parse(JSON.stringify(m.options));for(var t in e)e.hasOwnProperty(t)&&""===e[t]&&delete e[t];for(var n=0;n',e+='",e+=''+o.common.name+"",e+=''+a(o.native.url)+"",e+='',e+=""}var i=$("#presets_table");i.html(e),$(".presets-btn-load").button().click(function(){var e=$(this).data("name");F(e,function(){i.find("tr").removeClass("presets-selected"),i.find('tr[data-name="'+e+'"]').addClass("presets-selected")})}),$(".presets-btn-delete").button({icons:{secondary:"ui-icon-trash"},text:!1}).click(function(){var t=$(this).data("name");window.confirm(_("Are you sure?"))&&s.emit("delObject",t,function(e){delete l[t],L()})}).css({width:32,height:32}),$(".presets-btn-rename").button({icons:{secondary:"ui-icon-pencil"},text:!1}).click(function(){var a=$(this).data("name");$("#dialog-new-preset-name").val(l[a].common.name),$("#dialog-new-preset-info-tr").hide(),$("#dialog-new-preset").dialog({autoOpen:!0,modal:!0,title:_("Enter chart name"),width:430,resizable:!1,buttons:[{id:"dialog-new-preset-ok",text:_("Ok"),click:function(){var e,n,o,t=$("#dialog-new-preset-name").val(),i=O(t);l[i]&&!window.confirm(_("Overwrite existing?"))||(e=a,n=t,o=function(){$("#dialog-new-preset").dialog("close")},s.emit("getObject",e,function(e,t){s.emit("delObject",t._id,function(e){delete l[t._id],t.common.name=n,t._id=O(name),s.emit("setObject",t._id,t,function(e){l[t._id]=t,c=t._id,L(),o&&o()})})}))}},{text:_("Cancel"),click:function(){$("#dialog-new-preset").dialog("close")}}]})}).css({width:32,height:32})}function I(){$(".value").each(function(){var e=$(this),t=e.attr("id");void 0!==m.options[t]&&("checkbox"===e.attr("type")?("true"===m.options[t]&&(m.options[t]=!0),"false"===m.options[t]&&(m.options[t]=!1),e.prop("checked",!!m.options[t])):e.val(m.options[t]))}),(m.options.bg||0===m.options.bg)&&(m.options.bg&&m.options.bg.length<3&&parseInt(m.options.bg,10).toString()===m.options.bg.toString()?($("#bg").hide(),$("#bg_predefined").show().val(m.options.bg)):($("#bg_custom").prop("checked",!0),$("#bg").show(),$("#bg_predefined").hide()))}!function(){for(var e in console.log("Initialize..."),settings.maxLines<2&&$("#ids_add").hide(),settings)settings.hasOwnProperty(e)&&"object"==typeof settings[e]&&!1===settings[e].enabled&&$("."+e).remove();f();var t=location.href.split("?")[1];if(t&&t.match(/^preset=/)?(c=t.replace(/^preset=/,""),d=!0):b(location.href.split("?")[1]),"undefined"!=typeof sysLang&&(systemLang=sysLang||"en"),$("#dialog-select-member").selectId("init",{filter:{common:{custom:!0}},imgPath:"../lib/css/fancytree/",noMultiselect:!0,connCfg:{socketUrl:socketUrl,socketSession:socketSession,socketName:"flotEditDialog",upgrade:"undefined"!=typeof socketForceWebSockets?!socketForceWebSockets:void 0,rememberUpgrade:"undefined"!=typeof socketForceWebSockets?socketForceWebSockets:void 0,transports:"undefined"!=typeof socketForceWebSockets&&socketForceWebSockets?["websocket"]:void 0},columns:["name","role","room","value"],texts:{select:_("Select"),cancel:_("Cancel"),all:_("All"),id:_("ID"),name:_("Name"),role:_("Role"),room:_("Room"),value:_("Value"),selectid:_("Select ID"),from:_("From"),lc:_("Last changed"),ts:_("Time stamp"),wait:_("Processing..."),ack:_("Acknowledged")}}),"undefined"!=typeof Storage&&!c){var n=localStorage.getItem("yunkong2.Flot");if(n)try{n=JSON.parse(n);var o=document.location.href.split("?");o[1]?(n.options=m.options,m=n,S(),document.location.href=o[0]):n.options&&(m=n)}catch(e){console.log("Cannot parse stored settings")}}$("#autoUpdate").change(function(){m["auto-update"]=$(this).prop("checked")?"true":"false",x(),"true"===m["auto-update"]?$("#updatePreview").hide():$("#updatePreview").show()}).prop("checked","true"===m["auto-update"]),$("#arrangeBools").button().click(function(){for(var e=0,t=null,n=0;n");$("body").append(t[0]),t[0].id="temp_div",t.css({position:"absolute"}),t.css({top:e.position().top,left:0}),t.height(e.height()),t.width("100%")}}),window.onbeforeunload=function(e){return console.log("onbeforeunload"),d&&c&&y()!==l[c].native.url?(e.returnValue=_("You have unsaved settings. Discard?"),e.returnValue):null},I(),setTimeout(function(){console.log("Init connection..."),(s=io.connect(socketUrl,{query:{key:socketSession},reconnectionDelay:1e4,reconnectionAttempts:1/0,upgrade:"undefined"!=typeof socketForceWebSockets?!socketForceWebSockets:void 0,rememberUpgrade:"undefined"!=typeof socketForceWebSockets?socketForceWebSockets:void 0,transports:"undefined"!=typeof socketForceWebSockets&&socketForceWebSockets?["websocket"]:void 0})).on("connect",function(){console.log("Connected"),setTimeout(function(){s.emit("name","flotEdit")},50),setTimeout(function(){var a;a=function(){s.emit("getObject","system.config",function(e,t){t&&t.common&&(u=t.common.defaultHistory||"history.0"),s.emit("getObjectView","system","instance",{startkey:"system.adapter.",endkey:"system.adapter.香"},function(e,t){if(!e&&t&&t.rows&&0!==t.rows.length)for(var n=0;n";for(var t in l)e+='";$("#dialog-new-preset-info-tr").show(),$("#dialog-new-preset-into").html(e).val(c).unbind("change").bind("change",function(){var e=$(this).val();e?$("#dialog-new-preset-name-tr").hide():$("#dialog-new-preset-name-tr").show()}).trigger("change"),$("#dialog-new-preset").dialog({autoOpen:!0,modal:!0,title:_("Enter chart name"),width:430,resizable:!1,buttons:[{id:"dialog-new-preset-ok",text:_("Ok"),click:function(){var e=$("#dialog-new-preset-into").val(),t=e;(e||(e=$("#dialog-new-preset-name").val(),t=O(e),!l[t]||window.confirm(_("Overwrite existing?"))))&&B(t,e,function(){L(),$("#dialog-new-preset").dialog("close")})}},{text:_("Cancel"),click:function(){$("#dialog-new-preset").dialog("close")}}]})}}).css({"font-size":14,"white-space":"nowrap"}),t&&t.rows&&t.rows.length?c&&i.button("disable"):($("#accordion").tabs({active:1}),i.button("enable")),$("#dialog-new-preset-name").keyup(function(e){13===e.keyCode&&$("#dialog-new-preset-ok").trigger("click")}),a&&a()})},100)}),s.on("disconnect",function(){console.log("Lost connection")}),s.on("error",function(e){console.error("Socket error: "+e)}),s.on("connect_error",function(e){console.error("Socket error: "+e)})},200)}()}); //# sourceMappingURL=edit.js.map