/*! * AngularJS Material Design * https://github.com/angular/material * @license MIT * v1.1.18-master-97a1616 */ !function(e,y){"use strict";function t(e,t,a){return{restrict:"E",link:function(o,i){i.addClass("_md"),t(i),e(function(){var e,t=i[0].querySelector("md-dialog-content");function n(){i.toggleClass("md-content-overflow",t.scrollHeight>t.clientHeight)}t&&(e=t.getElementsByTagName("img"),n(),y.element(e).on("load",n)),o.$on("$destroy",function(){a.destroy(i)})})}}}function n(e){var b,$;return n.$inject=["$mdDialog","$mdConstant"],o.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming","$interpolate","$mdInteraction"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","multiple"],options:o}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:t}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:t}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css","required"],options:t});function t(){return{template:['',' ','

{{ dialog.title }}

','
','
',"

{{::dialog.mdTextContent}}

","
",' ',' '," ","
"," ",' '," {{ dialog.cancel }}"," ",' '," {{ dialog.ok }}"," "," ","
"].join("").replace(/\s\s+/g,""),controller:n,controllerAs:"dialog",bindToController:!0}}function n(o,i){this.$onInit=function(){var n="prompt"==this.$type;n&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){o.hide(!n||this.result)},this.abort=function(){o.cancel()},this.keypress=function(e){var t=n&&this.required&&!y.isDefined(this.result);e.keyCode!==i.KEY_CODE.ENTER||t||o.hide(this.result)}}}function o(u,l,g,f,a,d,p,r,s,c,t,m,h){return{hasBackdrop:!0,isolateScope:!0,onCompiling:function(e){e.defaultTheme=t.defaultTheme(),function(t){var e;t.targetEvent&&t.targetEvent.target&&(e=y.element(t.targetEvent.target));var n=e&&e.controller("mdTheme");if(t.hasTheme=!!n,!t.hasTheme)return;t.themeWatch=n.$shouldWatch;var o=t.theme||n.$mdTheme;o&&(t.scope.theme=o);var i=n.registerChanges(function(e){t.scope.theme=e,t.themeWatch||i()})}(e)},onShow:function(e,t,n,o){y.element(d[0].body).addClass("md-dialog-is-showing");var i=t.find("md-dialog");if(i.hasClass("ng-cloak")){s.warn("$mdDialog: using `` will affect the dialog opening animations.",t[0])}return function(e){e.origin=y.extend({element:null,bounds:null,focus:y.noop},e.origin||{}),e.parent=n(e.parent,r),e.closeTo=t(n(e.closeTo)),e.openFrom=t(n(e.openFrom)),e.targetEvent&&(e.origin=t(e.targetEvent.target,e.origin),e.originInteraction=h.getLastInteractionType());function t(e,t){var n=y.element(e||{});if(n&&n.length){var o=y.isFunction(n[0].getBoundingClientRect);return y.extend(t||{},{element:o?n:void 0,bounds:o?n[0].getBoundingClientRect():y.extend({},{top:0,left:0,height:0,width:0},n[0]),focus:y.bind(n,n.focus)})}}function n(e,t){return y.isString(e)&&(e=d[0].querySelector(e)),y.element(e||t)}}(n),function(e,t){var n="alert"===t.$type?"alertdialog":"dialog",o=e.find("md-dialog-content"),i=e.attr("id"),a="dialogContent_"+(i||g.nextUid());e.attr({role:n,tabIndex:"-1"}),0===o.length&&(o=e,i&&(a=i));o.attr("id",a),e.attr("aria-describedby",a),t.ariaLabel?l.expect(e,"aria-label",t.ariaLabel):l.expectAsync(e,"aria-label",function(){if(t.title)return t.title;var e=o.text().split(/\s+/);return 3."),function(){if(n.focusOnOpen){(g.findFocusTarget(t)||t[0].querySelector(".dialog-close, md-dialog-actions button:last-child")||i).focus()}}()})},onShowing:function(e,t,n,o){if(o){var i=o.htmlContent||n.htmlContent||"",a=o.textContent||n.textContent||o.content||n.content||"";if(i&&!c.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(i&&a)throw Error("md-dialog cannot have both `htmlContent` and `textContent`");o.mdHtmlContent=i,o.mdTextContent=a}},onRemove:function(e,t,n){n.deactivateListeners(),n.unlockScreenReader(),n.hideBackdrop(n.$destroy),b&&b.parentNode&&b.parentNode.removeChild(b);$&&$.parentNode&&$.parentNode.removeChild($);return n.$destroy?o():function(e,t){return t.reverseAnimate().then(function(){t.contentElement&&t.clearAnimate()})}(0,n).then(o);function o(){y.element(d[0].body).removeClass("md-dialog-is-showing"),n.contentElement&&n.reverseContainerStretch(),n.cleanupElement(),n.$destroy||"keyboard"!==n.originInteraction||n.origin.focus()}},clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){var n,o=m.startSymbol(),i=m.endSymbol(),a=o+(t.themeWatch?"":"::")+"theme"+i;return'
"+(n=e,t.autoWrap&&!/<\/md-dialog>/g.test(n)?""+(n||"")+"":n||"")+"
"}};function v(e,t){var n="fixed"==p.getComputedStyle(d[0].body).position,o=t.backdrop?p.getComputedStyle(t.backdrop[0]):null,i=o?Math.min(d[0].body.clientHeight,Math.ceil(Math.abs(parseInt(o.height,10)))):0,a={top:e.css("top"),height:e.css("height")},r=Math.abs(t.parent[0].getBoundingClientRect().top);return e.css({top:(n?r:0)+"px",height:i?i+"px":"100%"}),function(){e.css(a)}}function C(e,t){if(-1!==t.indexOf(e.nodeName))return!0}}}t.$inject=["$$rAF","$mdTheming","$mdDialog"],n.$inject=["$$interimElementProvider"],y.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",t).provider("$mdDialog",n)}(window,window.angular);