text: !function(o,e,t){"use strict";var r=tinycolor,l={hue:{getColorByPoint:function(o,e){var t=this.getImageData(o,e);return this.setMarkerCenter(e),new r({r:t[0],g:t[1],b:t[2]}).toHsl().h},draw:function(){this.$element.css({height:this.height+"px"}),this.canvas.height=this.height,this.canvas.width=this.height;var o=this.context.createLinearGradient(90,0,90,this.height);o.addColorStop(.01,"rgba(255, 0, 0, 1.000)"),o.addColorStop(.167,"rgba(255, 0, 255, 1.000)"),o.addColorStop(.333,"rgba(0, 0, 255, 1.000)"),o.addColorStop(.5,"rgba(0, 255, 255, 1.000)"),o.addColorStop(.666,"rgba(0, 255, 0, 1.000)"),o.addColorStop(.828,"rgba(255, 255, 0, 1.000)"),o.addColorStop(.999,"rgba(255, 0, 0, 1.000)"),this.context.fillStyle=o,this.context.fillRect(0,0,this.canvas.width,this.height)}},alpha:{getColorByPoint:function(o,e){var t=this.getImageData(o,e);return this.setMarkerCenter(e),t[3]/255},draw:function(){this.$element.css({height:this.height+"px"}),this.canvas.height=this.height,this.canvas.width=this.height;var o=this.context.createLinearGradient(90,0,90,this.height);o.addColorStop(.01,"rgba("+this.currentColor.r+","+this.currentColor.g+","+this.currentColor.b+", 1.000)"),o.addColorStop(.99,"rgba("+this.currentColor.r+","+this.currentColor.g+","+this.currentColor.b+", 0.000)"),this.context.fillStyle=o,this.context.fillRect(-1,-1,this.canvas.width+2,this.height+2)},extra:function(){this.$scope.$on("mdColorPicker:spectrumColorChange",e.bind(this,function(o,e){this.currentColor=e.color,this.draw()}))}},spectrum:{getColorByPoint:function(o,e){var t=this.getImageData(o,e);return this.setMarkerCenter(o,e),{r:t[0],g:t[1],b:t[2]}},draw:function(){this.canvas.height=this.height,this.canvas.width=this.height,this.context.clearRect(0,0,this.canvas.width,this.canvas.height);var o=this.context.createLinearGradient(0,0,this.canvas.width,0);o.addColorStop(.01,"rgba(255, 255, 255, 1.000)"),o.addColorStop(.99,"rgba(255, 255, 255, 0.000)");var e=this.context.createLinearGradient(0,0,0,this.canvas.height);e.addColorStop(.01,"rgba(0, 0, 0, 0.000)"),e.addColorStop(.99,"rgba(0, 0, 0, 1.000)"),this.context.fillStyle="hsl( "+this.currentHue+", 100%, 50%)",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle=o,this.context.fillRect(-1,-1,this.canvas.width+2,this.canvas.height+2),this.context.fillStyle=e,this.context.fillRect(-1,-1,this.canvas.width+2,this.canvas.height+2)},extra:function(){this.$scope.$on("mdColorPicker:spectrumHueChange",e.bind(this,function(o,e){this.currentHue=e.hue,this.draw();var t=this.getMarkerCenter(),r=this.getColorByPoint(t.x,t.y);this.setColor(r)}))}}};function a(o,t){this.type=o,this.restrictX=t,this.offset={x:null,y:null},this.height=255,this.$scope=null,this.$element=null,this.get=e.bind(this,function(o,t){this.$scope=o,this.$element=t,this.canvas=this.$element.children()[0],this.marker=this.$element.children()[1],this.context=this.canvas.getContext("2d"),this.currentColor=this.$scope.color.toRgb(),this.currentHue=this.$scope.color.toHsv().h,this.$element.on("touchstart mousedown",e.bind(this,this.onMouseDown)),this.$scope.$on("mdColorPicker:colorSet",e.bind(this,this.onColorSet)),this.extra&&this.extra(),this.draw()})}a.prototype.$window=e.element(o),a.prototype.getColorByMouse=function(o){var e=o.touches&&o.touches[0],t=e&&e.pageX||o.pageX,r=e&&e.pageY||o.pageY,l=Math.round(t-this.offset.x),a=Math.round(r-this.offset.y);return this.getColorByPoint(l,a)},a.prototype.setMarkerCenter=function(o,t){var r,l,a,i,n=-1*this.marker.offsetWidth/2,d=-1*this.marker.offsetHeight/2;void 0===t?(a=o+d,i=Math.round(Math.max(Math.min(this.height-1+d,a),d)),l=0):(r=o+n,a=t+d,l=Math.floor(Math.max(Math.min(this.height+n,r),n)),i=Math.floor(Math.max(Math.min(this.height+d,a),d))),e.element(this.marker).css({left:l+"px"}),e.element(this.marker).css({top:i+"px"})},a.prototype.getMarkerCenter=function(){return{x:this.marker.offsetLeft+Math.floor(this.marker.offsetWidth/2),y:this.marker.offsetTop+Math.floor(this.marker.offsetHeight/2)}},a.prototype.getImageData=function(o,e){return o=Math.max(0,Math.min(o,this.canvas.width-1)),e=Math.max(0,Math.min(e,this.canvas.height-1)),this.context.getImageData(o,e,1,1).data},a.prototype.onMouseDown=function(o){o.preventDefault(),o.stopImmediatePropagation(),this.$scope.previewUnfocus(),this.$element.css({cursor:"none"}),this.offset.x=this.canvas.getBoundingClientRect().left,this.offset.y=this.canvas.getBoundingClientRect().top;var t=e.bind(this,function(o){switch(this.type){case"hue":var e=this.getColorByMouse(o);this.$scope.$broadcast("mdColorPicker:spectrumHueChange",{hue:e});break;case"alpha":var t=this.getColorByMouse(o);this.$scope.color.setAlpha(t),this.$scope.alpha=t,this.$scope.$apply();break;case"spectrum":var r=this.getColorByMouse(o);this.setColor(r)}});this.$window.on("touchmove mousemove",t),this.$window.one("touchend mouseup",e.bind(this,function(){this.$window.off("touchmove mousemove",t),this.$element.css({cursor:"crosshair"})})),t(o)},a.prototype.setColor=function(o){this.$scope.color._r=o.r,this.$scope.color._g=o.g,this.$scope.color._b=o.b,this.$scope.$apply(),this.$scope.$broadcast("mdColorPicker:spectrumColorChange",{color:o})},a.prototype.onColorSet=function(o,e){var t;switch(this.type){case"hue":t=this.$scope.color.toHsv(),this.setMarkerCenter(this.canvas.height-this.canvas.height*(t.h/360));break;case"alpha":this.currentColor=e.color.toRgb(),this.draw();var r=e.color.getAlpha(),l=this.canvas.height-this.canvas.height*r;this.setMarkerCenter(l);break;case"spectrum":t=e.color.toHsv(),this.currentHue=t.h,this.draw();var a=this.canvas.width*t.s,i=this.canvas.height-this.canvas.height*t.v;this.setMarkerCenter(a,i)}},e.module("mdColorPicker",["ngMaterial","ngMessages"]).run(["$templateCache",function(o){var e={clear:'<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>',gradient:'<path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"/>',tune:'<path d="M13 21v-2h8v-2h-8v-2h-2v6h2zM3 17v2h6v-2H3z"/><path d="M21 13v-2H11v2h10zM7 9v2H3v2h4v2h2V9H7z"/><path d="M15 9h2V7h4V5h-4V3h-2v6zM3 5v2h10V5H3z"/>',view_module:'<path d="M4 11h5V5H4v6z"/><path d="M4 18h5v-6H4v6z"/><path d="M10 18h5v-6h-5v6z"/><path d="M16 18h5v-6h-5v6z"/><path d="M10 11h5V5h-5v6z"/><path d="M16 5v6h5V5h-5z"/>',view_headline:'<path d="M4 15h17v-2H4v2z"/><path d="M4 19h17v-2H4v2z"/><path d="M4 11h17V9H4v2z"/><path d="M4 5v2h17V5H4z"/>',history:'<path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"/><path d="M12 8v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>',clear_all:'<path d="M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"/>'};for(var t in e)e.hasOwnProperty(t)&&o.put([t,"svg"].join("."),['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">',e[t],"</svg>"].join(""))}]).factory("mdColorGradientCanvas",function(){return function(o){var t=new a(o,"spectrum"!==o);return{template:'<canvas width="100%" height="100%"></canvas><div class="md-color-picker-marker"></div>',link:(t=e.merge(t,l[o])).get,controller:function(){}}}}).factory("mdColorPickerHistory",["$injector",function(o){var e=[],t=[],r=!1;try{r=o.get("$cookies")}catch(o){}if(r)for(var l=r.getObject("mdColorPickerHistory")||[],a=0;a<l.length;a++)e.push(tinycolor(l[a])),t.push(l[a]);var i=40;return{length:function(){if(!arguments[0])return e.length;i=arguments[0]},add:function(o){for(var l=0;l<e.length;l++)e[l].toRgbString()===o.toRgbString()&&(e.splice(l,1),t.splice(l,1));e.unshift(o),t.unshift(o.toRgbString()),e.length>i&&(e.pop(),t.pop()),r&&r.putObject("mdColorPickerHistory",t)},get:function(){return e},reset:function(){e=[],t=[],r&&r.putObject("mdColorPickerHistory",t)}}}]).directive("mdColorPicker",["$timeout","mdColorPickerHistory",function(){return{templateUrl:"views/mdColorPicker.tpl.html",require:"^ngModel",scope:{options:"=mdColorPicker",type:"@",label:"@?",icon:"@?",random:"@?",default:"@?",openOnInput:"=?",hasBackdrop:"=?",clickOutsideToClose:"=?",skipHide:"=?",preserveScope:"=?",mdColorClearButton:"=?",mdColorPreview:"=?",mdColorAlphaChannel:"=?",mdColorSpectrum:"=?",mdColorSliders:"=?",mdColorGenericPalette:"=?",mdColorMaterialPalette:"=?",mdColorHistory:"=?",mdColorHex:"=?",mdColorRgb:"=?",mdColorHsl:"=?",mdColorDefaultTab:"=?"},controller:["$scope","$element","$attrs","$mdDialog","$mdColorPicker",function(o,e,t,r,l){if(void 0!==o.options)for(var a in o.options){var i;if(o.options.hasOwnProperty(a))i=a,o.hasOwnProperty("mdColor"+a.slice(0,1).toUpperCase()+a.slice(1))&&(i="mdColor"+a.slice(0,1).toUpperCase()+a.slice(1)),!i||void 0!==o[i]&&""!==o[i]||(o[i]=o.options[a])}var n=e.controller("ngModel"),d=function(e){o.value=e||n.$viewValue||""};o.mdColorClearButton=void 0===o.mdColorClearButton||o.mdColorClearButton,o.mdColorPreview=void 0===o.mdColorPreview||o.mdColorPreview,o.mdColorAlphaChannel=void 0===o.mdColorAlphaChannel||o.mdColorAlphaChannel,o.mdColorSpectrum=void 0===o.mdColorSpectrum||o.mdColorSpectrum,o.mdColorSliders=void 0===o.mdColorSliders||o.mdColorSliders,o.mdColorGenericPalette=void 0===o.mdColorGenericPalette||o.mdColorGenericPalette,o.mdColorMaterialPalette=void 0===o.mdColorMaterialPalette||o.mdColorMaterialPalette,o.mdColorHistory=void 0===o.mdColorHistory||o.mdColorHistory,o.mdColorHex=void 0===o.mdColorHex||o.mdColorHex,o.mdColorRgb=void 0===o.mdColorRgb||o.mdColorRgb,o.mdColorHsl=void 0===o.mdColorHsl||o.mdColorHsl,d(),o.$watch(function(){return n.$modelValue},function(o){d(o)}),o.$watch("value",function(e,t){""!==e&&void 0!==e&&e||o.clearValue(),e!==t&&n.$setViewValue(e)}),o.clearValue=function(){n.$setViewValue("")},o.showColorPicker=function(e){l.show({value:o.value,defaultValue:o.default,random:o.random,clickOutsideToClose:o.clickOutsideToClose,hasBackdrop:o.hasBackdrop,skipHide:o.skipHide,preserveScope:o.preserveScope,mdColorAlphaChannel:o.mdColorAlphaChannel,mdColorSpectrum:o.mdColorSpectrum,mdColorSliders:o.mdColorSliders,mdColorGenericPalette:o.mdColorGenericPalette,mdColorMaterialPalette:o.mdColorMaterialPalette,mdColorHistory:o.mdColorHistory,mdColorHex:o.mdColorHex,mdColorRgb:o.mdColorRgb,mdColorHsl:o.mdColorHsl,mdColorDefaultTab:o.mdColorDefaultTab,$event:e}).then(function(e){o.value=e})}}],compile:function(o,e){e.type=void 0!==e.type?e.type:0}}}]).directive("mdColorPickerContainer",["$compile","$timeout","$mdColorPalette","mdColorPickerHistory",function(o,t,l,a){return{templateUrl:"views/mdColorPickerContainer.tpl.html",scope:{value:"=?",default:"@",random:"@",ok:"=?",mdColorAlphaChannel:"=",mdColorSpectrum:"=",mdColorSliders:"=",mdColorGenericPalette:"=",mdColorMaterialPalette:"=",mdColorHistory:"=",mdColorHex:"=",mdColorRgb:"=",mdColorHsl:"=",mdColorDefaultTab:"="},controller:["$scope","$element",function(o,i){var n=e.element(i[0].querySelector(".md-color-picker-preview-input")),d=["toHexString","toRgbString","toHslString"];o.default=o.default?o.default:o.random?tinycolor.random():"rgb(255,255,255)",o.value.search("#")>=0?o.type=0:o.value.search("rgb")>=0?o.type=1:o.value.search("hsl")>=0&&(o.type=2),o.color=new r(o.value||o.default),o.alpha=o.color.getAlpha(),o.history=a,o.materialFamily=[],o.whichPane=function(e){var t=0;if(e&&"string"==typeof e){for(var r="mdColor"+e.slice(0,1).toUpperCase()+e.slice(1),l=["mdColorSpectrum","mdColorSliders","mdColorGenericPalette","mdColorMaterialPalette","mdColorHistory"],a=0;a<l.length;a++)if(l[a]===r&&o[r]){t=a;break}}else e&&"number"==typeof e&&(t=e);return t}(o.mdColorDefaultTab),o.inputFocus=!1,o.palette=[["rgb(255, 204, 204)","rgb(255, 230, 204)","rgb(255, 255, 204)","rgb(204, 255, 204)","rgb(204, 255, 230)","rgb(204, 255, 255)","rgb(204, 230, 255)","rgb(204, 204, 255)","rgb(230, 204, 255)","rgb(255, 204, 255)"],["rgb(255, 153, 153)","rgb(255, 204, 153)","rgb(255, 255, 153)","rgb(153, 255, 153)","rgb(153, 255, 204)","rgb(153, 255, 255)","rgb(153, 204, 255)","rgb(153, 153, 255)","rgb(204, 153, 255)","rgb(255, 153, 255)"],["rgb(255, 102, 102)","rgb(255, 179, 102)","rgb(255, 255, 102)","rgb(102, 255, 102)","rgb(102, 255, 179)","rgb(102, 255, 255)","rgb(102, 179, 255)","rgb(102, 102, 255)","rgb(179, 102, 255)","rgb(255, 102, 255)"],["rgb(255, 51, 51)","rgb(255, 153, 51)","rgb(255, 255, 51)","rgb(51, 255, 51)","rgb(51, 255, 153)","rgb(51, 255, 255)","rgb(51, 153, 255)","rgb(51, 51, 255)","rgb(153, 51, 255)","rgb(255, 51, 255)"],["rgb(255, 0, 0)","rgb(255, 128, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 128)","rgb(0, 255, 255)","rgb(0, 128, 255)","rgb(0, 0, 255)","rgb(128, 0, 255)","rgb(255, 0, 255)"],["rgb(245, 0, 0)","rgb(245, 123, 0)","rgb(245, 245, 0)","rgb(0, 245, 0)","rgb(0, 245, 123)","rgb(0, 245, 245)","rgb(0, 123, 245)","rgb(0, 0, 245)","rgb(123, 0, 245)","rgb(245, 0, 245)"],["rgb(214, 0, 0)","rgb(214, 108, 0)","rgb(214, 214, 0)","rgb(0, 214, 0)","rgb(0, 214, 108)","rgb(0, 214, 214)","rgb(0, 108, 214)","rgb(0, 0, 214)","rgb(108, 0, 214)","rgb(214, 0, 214)"],["rgb(163, 0, 0)","rgb(163, 82, 0)","rgb(163, 163, 0)","rgb(0, 163, 0)","rgb(0, 163, 82)","rgb(0, 163, 163)","rgb(0, 82, 163)","rgb(0, 0, 163)","rgb(82, 0, 163)","rgb(163, 0, 163)"],["rgb(92, 0, 0)","rgb(92, 46, 0)","rgb(92, 92, 0)","rgb(0, 92, 0)","rgb(0, 92, 46)","rgb(0, 92, 92)","rgb(0, 46, 92)","rgb(0, 0, 92)","rgb(46, 0, 92)","rgb(92, 0, 92)"],["rgb(255, 255, 255)","rgb(205, 205, 205)","rgb(178, 178, 178)","rgb(153, 153, 153)","rgb(127, 127, 127)","rgb(102, 102, 102)","rgb(76, 76, 76)","rgb(51, 51, 51)","rgb(25, 25, 25)","rgb(0, 0, 0)"]],o.materialPalette=l,o.isDark=function(o){return e.isArray(o)?tinycolor({r:o[0],g:o[1],b:o[2]}).isDark():tinycolor(o).isDark()},o.previewFocus=function(){o.inputFocus=!0,t(function(){n[0].setSelectionRange(0,n[0].value.length)})},o.previewUnfocus=function(){o.inputFocus=!1,n[0].blur()},o.previewBlur=function(){o.inputFocus=!1,o.setValue()},o.previewKeyDown=function(t){13===t.keyCode&&e.isFunction(o.ok)&&o.ok()},o.setPaletteColor=function(e){t(function(){o.color=tinycolor(e.target.style.backgroundColor)})},o.setValue=function(){o.color&&o.color&&d[o.type]&&"rgba(0, 0, 0, 0)"!==o.color.toRgbString()&&(o.value=o.color[d[o.type]]())},o.changeValue=function(){o.color=tinycolor(o.value),o.$broadcast("mdColorPicker:colorSet",{color:o.color})},o.$watch("color._a",function(e){o.color.setAlpha(e)},!0),o.$watch("whichPane",function(){o.$broadcast("mdColorPicker:colorSet",{color:o.color})}),o.$watch("type",function(){n.removeClass("switch"),t(function(){n.addClass("switch")})}),o.$watchGroup(["color.toRgbString()","type"],function(){o.inputFocus||o.setValue()}),t(function(){o.$broadcast("mdColorPicker:colorSet",{color:o.color}),n.focus(),o.previewFocus()})}],link:function(o,r){t(function(){var t,l,a,i,n,d;t=e.element(r[0].querySelector(".md-color-picker-palette")),l=e.element(r[0].querySelector(".md-color-picker-material-palette")),a=e.element('<div class="flex-15 layout-fill layout-row layout-align-space-between" layout-align="space-between" layout="row" layout-fill"></div>'),i=e.element('<div class="flex-10"></div>'),n=e.element('<div class="md-color-picker-material-title"></div>'),d=e.element('<div class="md-color-picker-with-label"></div>'),e.forEach(o.palette,function(r){var l=a.clone();e.forEach(r,function(e){var t=i.clone();t.css({height:"25.5px",backgroundColor:e}),t.bind("click",o.setPaletteColor),l.append(t)}),t.append(l)}),e.forEach(o.materialPalette,function(t,r){var a=n.clone();a.html("<span>"+r.replace("-"," ")+"</span>"),a.css({height:"75px",backgroundColor:"rgb("+t[500].value[0]+","+t[500].value[1]+","+t[500].value[2]+")"}),o.isDark(t[500].value)&&a.addClass("dark"),l.append(a),e.forEach(t,function(e,t){var r=d.clone();r.css({height:"33px",backgroundColor:"rgb("+e.value[0]+","+e.value[1]+","+e.value[2]+")"}),o.isDark(e.value)&&r.addClass("dark"),r.html("<span>"+t+"</span>"),r.bind("click",o.setPaletteColor),l.append(r)})})})}}}]).directive("mdColorPickerHue",["mdColorGradientCanvas",function(o){return new o("hue")}]).directive("mdColorPickerAlpha",["mdColorGradientCanvas",function(o){return new o("alpha")}]).directive("mdColorPickerSpectrum",["mdColorGradientCanvas",function(o){return new o("spectrum")}]).factory("$mdColorPicker",["$q","$mdDialog","mdColorPickerHistory",function(o,e,t){var l;return{show:function(o){return void 0===o&&(o={}),o.hasBackdrop=void 0===o.hasBackdrop||o.hasBackdrop,o.clickOutsideToClose=void 0===o.clickOutsideToClose||o.clickOutsideToClose,o.defaultValue=void 0===o.defaultValue?"#FFFFFF":o.defaultValue,o.focusOnOpen=void 0!==o.focusOnOpen&&o.focusOnOpen,o.preserveScope=void 0===o.preserveScope||o.preserveScope,o.skipHide=void 0===o.skipHide||o.skipHide,o.mdColorAlphaChannel=void 0!==o.mdColorAlphaChannel&&o.mdColorAlphaChannel,o.mdColorSpectrum=void 0===o.mdColorSpectrum||o.mdColorSpectrum,o.mdColorSliders=void 0===o.mdColorSliders||o.mdColorSliders,o.mdColorGenericPalette=void 0===o.mdColorGenericPalette||o.mdColorGenericPalette,o.mdColorMaterialPalette=void 0===o.mdColorMaterialPalette||o.mdColorMaterialPalette,o.mdColorHistory=void 0===o.mdColorHistory||o.mdColorHistory,o.mdColorRgb=void 0===o.mdColorRgb||o.mdColorRgb,o.mdColorHsl=void 0===o.mdColorHsl||o.mdColorHsl,o.mdColorHex=void 0===o.mdColorHex||!o.mdColorRgb&&!o.mdColorHsl||o.mdColorHex,o.mdColorAlphaChannel=!(!o.mdColorRgb&&!o.mdColorHsl)&&o.mdColorAlphaChannel,(l=e.show({templateUrl:"views/mdColorPickerDialog.tpl.html",hasBackdrop:o.hasBackdrop,clickOutsideToClose:o.clickOutsideToClose,controller:["$scope","options",function(o,t){o.close=function(){e.cancel()},o.ok=function(){e.hide(o.value)},o.hide=o.ok,o.value=t.value,o.default=t.defaultValue,o.random=t.random,o.mdColorAlphaChannel=t.mdColorAlphaChannel,o.mdColorSpectrum=t.mdColorSpectrum,o.mdColorSliders=t.mdColorSliders,o.mdColorGenericPalette=t.mdColorGenericPalette,o.mdColorMaterialPalette=t.mdColorMaterialPalette,o.mdColorHistory=t.mdColorHistory,o.mdColorHex=t.mdColorHex,o.mdColorRgb=t.mdColorRgb,o.mdColorHsl=t.mdColorHsl,o.mdColorDefaultTab=t.mdColorDefaultTab}],locals:{options:o},preserveScope:o.preserveScope,skipHide:o.skipHide,targetEvent:o.$event,focusOnOpen:o.focusOnOpen,autoWrap:!1,onShowing:function(){},onComplete:function(){}})).then(function(o){t.add(new r(o))},function(){}),l},hide:function(){return l.hide()},cancel:function(){return l.cancel()}}}])}(window,window.angular),angular.module("mdColorPicker").run(["$templateCache",function(o){"use strict";o.put("views/mdColorPicker.tpl.html",'<div class=md-color-picker-input-container layout=row> <div class="md-color-picker-preview md-color-picker-checkered-bg" ng-click=showColorPicker($event) ng-if=mdColorPreview> <div class=md-color-picker-result ng-style="{background: value}"> </div> </div> <md-input-container flex> <label> <md-icon ng-if=icon>{{icon}}</md-icon> <span translate="">{{label}}</span> </label> <input type=input ng-model=value class=md-color-picker-input ng-mousedown="(openOnInput || !mdColorPreview) && showColorPicker($event)"> </md-input-container> <md-button class="md-icon-button md-color-picker-clear" ng-if="mdColorClearButton && value" ng-click=clearValue(); aria-label="Clear Color"> <md-icon md-svg-icon=clear.svg></md-icon> </md-button> </div>'),o.put("views/mdColorPickerContainer.tpl.html",'<div class="md-color-picker-container in" layout=column> <div class=md-color-picker-arrow ng-style="{\'border-bottom-color\': color.toRgbString() }"></div> <div class="md-color-picker-preview md-color-picker-checkered-bg" ng-class="{\'dark\': !color.isDark() || color.getAlpha() < .45}" flex=1 layout=column> <div class=md-color-picker-result ng-style="{\'background\': color.toRgbString()}" flex=100 layout=column layout-fill layout-align="center center" ng-click="focusPreviewInput( $event )">  <div flex layout=row layout-align="center center"> <input class=md-color-picker-preview-input ng-model=value ng-focus=previewFocus($event); ng-blur=previewBlur() ng-change=changeValue() ng-keypress=previewKeyDown($event) layout-fill> </div> <div class=md-color-picker-tabs style="width: 100%"> <md-tabs md-selected=type md-stretch-tabs=always md-no-bar md-no-ink md-no-pagination=true> <md-tab ng-if=mdColorHex label=Hex ng-disabled="color.getAlpha() !== 1" md-ink-ripple=#ffffff></md-tab> <md-tab ng-if=mdColorRgb label=RGB></md-tab> <md-tab ng-if=mdColorHsl label=HSL></md-tab>  </md-tabs> </div> </div> </div> <div class="md-color-picker-tabs md-color-picker-colors"> <md-tabs md-stretch-tabs=always md-align-tabs=bottom md-selected=whichPane md-no-pagination> <md-tab ng-if=mdColorSpectrum> <md-tab-label> <md-icon md-svg-icon=gradient.svg></md-icon> </md-tab-label> <md-tab-body> <div layout=row layout-align=space-between style="height: 255px"> <div md-color-picker-spectrum></div> <div md-color-picker-hue ng-class="{\'md-color-picker-wide\': !mdColorAlphaChannel}"></div> <div md-color-picker-alpha class=md-color-picker-checkered-bg ng-if=mdColorAlphaChannel></div> </div> </md-tab-body> </md-tab> <md-tab ng-if=mdColorSliders> <md-tab-label> <md-icon md-svg-icon=tune.svg></md-icon> </md-tab-label> <md-tab-body> <div layout=column flex=100 layout-fill layout-align="space-between start center" class=md-color-picker-sliders> <div layout=row layout-align="start center" layout-wrap flex layout-fill> <div flex=10 layout layout-align="center center"> <span class=md-body-1>R</span> </div> <md-slider flex=65 min=0 max=255 ng-model=color._r aria-label=red class=red-slider></md-slider> <span flex></span> <div flex=20 layout layout-align="center center"> <input style="width: 100%" min=0 max=255 type=number ng-model=color._r aria-label=red aria-controls=red-slider> </div> </div> <div layout=row layout-align="start center" layout-wrap flex layout-fill> <div flex=10 layout layout-align="center center"> <span class=md-body-1>G</span> </div> <md-slider flex=65 min=0 max=255 ng-model=color._g aria-label=green class=green-slider></md-slider> <span flex></span> <div flex=20 layout layout-align="center center"> <input style="width: 100%" min=0 max=255 type=number ng-model=color._g aria-label=green aria-controls=green-slider> </div> </div> <div layout=row layout-align="start center" layout-wrap flex layout-fill> <div flex=10 layout layout-align="center center"> <span class=md-body-1>B</span> </div> <md-slider flex=65 min=0 max=255 ng-model=color._b aria-label=blue class=blue-slider></md-slider> <span flex></span> <div flex=20 layout layout-align="center center"> <input style="width: 100%" min=0 max=255 type=number ng-model=color._b aria-label=blue aria-controls=blue-slider> </div> </div> <div layout=row layout-align="start center" layout-wrap flex layout-fill ng-if=!mdColorAlphaChannel> <div flex=10 layout layout-align="center center"> <span class=md-body-1>A</span> </div> <md-slider flex=65 min=0 max=1 step=.01 ng-model=color._a aria-label=alpha class=md-primary></md-slider> <span flex></span> <div flex=20 layout layout-align="center center"> <input style="width: 100%" min=0 max=1 step=.01 type=number ng-model=color._a aria-label=alpha aria-controls=alpha-slider> </div> </div> </div> </md-tab-body> </md-tab> <md-tab ng-if=mdColorGenericPalette> <md-tab-label> <md-icon md-svg-icon=view_module.svg></md-icon> </md-tab-label> <md-tab-body> <div layout=column layout-align="space-between start center" flex class=md-color-picker-palette> </div> </md-tab-body> </md-tab> <md-tab ng-if=mdColorMaterialPalette> <md-tab-label> <md-icon md-svg-icon=view_headline.svg></md-icon> </md-tab-label> <md-tab-body> <div layout=column layout-fill flex class=md-color-picker-material-palette> </div> </md-tab-body> </md-tab> <md-tab ng-if=mdColorHistory> <md-tab-label> <md-icon md-svg-icon=history.svg></md-icon> </md-tab-label> <md-tab-body layout=row layout-fill> <div layout=column flex layout-align="space-between start" layout-wrap layout-fill class=md-color-picker-history> <div layout=row flex=80 layout-align="space-between start start" layout-wrap layout-fill> <div flex=10 ng-repeat="historyColor in history.get() track by $index"> <div ng-style="{\'background\': historyColor.toRgbString()}" ng-click=setPaletteColor($event)></div> </div> </div> <md-button flex-end ng-click=history.reset() class=md-mini aria-label="Clear History"> <md-icon md-svg-icon=clear_all.svg></md-icon> </md-button> </div> </md-tab-body> </md-tab> </md-tabs> </div> </div>'),o.put("views/mdColorPickerDialog.tpl.html",'<md-dialog class=md-color-picker-dialog> <div md-color-picker-container value=value default random={{random}} ok=ok md-color-alpha-channel=mdColorAlphaChannel md-color-spectrum=mdColorSpectrum md-color-sliders=mdColorSliders md-color-generic-palette=mdColorGenericPalette md-color-material-palette=mdColorMaterialPalette md-color-history=mdColorHistory md-color-hex=mdColorHex md-color-rgb=mdColorRgb md-color-hsl=mdColorHsl md-color-default-tab=mdColorDefaultTab></div> <md-actions layout=row> <md-button class=md-mini ng-click=close() style="width: 50%">Cancel</md-button> <md-button class=md-mini ng-click=ok() style="width: 50%">Select</md-button> </md-actions> </md-dialog>')}]);