(function(){"use strict";angular.module("easyzoom.common",["angularModalService"])})(),function(){"use strict";function n(n){function t(t,i,r){i.on("click",function(t){t.preventDefault();n.showModal({templateUrl:"/Scripts/common/lightbox/templates/lightbox.html",controller:"LightboxController",controllerAs:"lightbox"}).then(function(n){n.scope.lightbox.open(r.lightboxImg,r.lightboxTitle)})})}return{link:t,restrict:"A"}}angular.module("easyzoom.common").directive("lightbox",n);n.$inject=["ModalService"]}(),function(){"use strict";function n(n){function i(n,i){t.image={url:n,title:i};t.hasImage=!0;t.isOpen=!0}function r(n){t.video={url:n};t.hasImage=!1;t.isOpen=!0}function u(){t.isOpen=!1;n(null,200)}function f(){t.video={url:""}}var t=this;t.image={url:"",title:""};t.isOpen=!1;t.hasImage=!1;t.open=i;t.openYoutube=r;t.close=u;t.destroy=f}angular.module("easyzoom.common").controller("LightboxController",n);n.$inject=["close"]}(),function(){"use strict";function n(n){function u(t){t.$watch("model",function(u){if(u===""||typeof u=="undefined"||u===null){t.meta=null;return}u.indexOf("http://")<0&&u.indexOf("https://")<0&&(u="http://"+u);var f=u.match(r);f!==null?n.ParseLink(f[0],function(n){n.Url=f[0];f[0].match(i)&&(n.IsYoutube=!0);t.meta=n},function(){t.meta=null}):t.meta=null})}var t={link:u,restrict:"A",scope:{model:"=ngModel",meta:"="}},i=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*[^\w\s-])([\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,r=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/ig;return t}angular.module("easyzoom.common").directive("urlParser",n);n.$inject=["HttpService"]}(),function(){"use strict";function n(n){function t(t,i){i.find(".comment-link").on("click",function(i){if(t.meta.IsYoutube)return i.preventDefault(),t.lightbox===!0?n.showModal({templateUrl:"/Scripts/common/lightbox/templates/lightbox.html",controller:"LightboxController",controllerAs:"lightbox"}).then(function(n){n.scope.lightbox.openYoutube(t.meta.Url);n.close.then(function(){n.scope.lightbox.destroy()})}):t.$apply(function(){t.vm.showVideo=!0}),!1})}return{link:t,restrict:"E",replace:!0,controller:function(){var n=this;n.showVideo=!1},controllerAs:"vm",templateUrl:"/Scripts/common/templates/url-result.html",scope:{meta:"=",lightbox:"=useLightbox"}}}angular.module("easyzoom.common").directive("urlResult",n);n.$inject=["ModalService"]}(),function(){"use strict";angular.module("easyzoom.common").directive("ifClipboardSupported",function(){return{restrict:"A",link:function(n,t){window.ClipboardJS.isSupported()||t.hide()}}})}()