// Generated by CoffeeScript 1.11.1
(function() {
  var DOMPurify, SQ, canRequire, closest, fakeEl, matches,
    indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

  canRequire = (typeof module !== "undefined" && module !== null) && module.exports;

  if (canRequire) {
    SQ = require('squire');
    try {
      DOMPurify = require('dompurify');
    } catch (error) {
      DOMPurify = null;
    }
    module.exports = 'angular-squire';
  } else {
    SQ = window.Squire;
    DOMPurify = window.DOMPurify || null;
  }

  if (typeof SQ !== "function") {
    throw new Error("angular-squire requires squire-rte script to be loaded before it." + "Get it from https://github.com/neilj/Squire");
  }

  matches = window.Element.prototype.matches || window.Element.prototype.webkitMatchesSelector || window.Element.prototype.mozMatchesSelector || window.Element.prototype.msMatchesSelector || window.Element.prototype.oMatchesSelector;

  fakeEl = angular.element();

  closest = function(el, selector) {
    if (el[0].nodeName === "HTML") {
      return fakeEl;
    } else if (el[0].nodeType === 3) {
      return closest(angular.element(el[0].parentNode), selector);
    } else if (matches.apply(el[0], [selector])) {
      return el;
    } else {
      return closest(el.parent(), selector);
    }
  };

  (canRequire ? require('angular') : window.angular).module("angular-squire", []).directive("squire", [
    'squireService', function(squireService) {
      return {
        restrict: 'E',
        require: "ngModel",
        scope: {
          height: '@',
          width: '@',
          body: '=',
          purifyPaste: '=',
          placeholder: '@',
          editorClass: '@',
          buttons: '@',
          theme: '=',
          chromeOnHoverAndFocus: '=',
          heightWrapContent: '=',
          focusExpand: '=?',
          openMenu: '<'
        },
        replace: true,
        transclude: true,
        templateUrl: "angular-squire-main-template.html",
        controller: [
          '$scope', function($scope) {
            var buttons, editorVisible;
            buttons = {};
            if ($scope.buttons) {
              buttons = $scope.$eval($scope.buttons) || {};
            }
            $scope.buttonVis = Object.assign({}, squireService.getButtonDefaults(), buttons);
            editorVisible = true;
            $scope.isEditorVisible = function() {
              return editorVisible;
            };
            $scope.editorVisibility = this.editorVisibility = function(vis) {
              var ref;
              if (arguments.length === 1) {
                if (editorVisible !== vis) {
                  if ((ref = $scope.editor) != null) {
                    ref.focus();
                  }
                }
                editorVisible = vis;
              }
              return editorVisible;
            };
          }
        ],
        link: function(scope, element, attrs, ngModel) {
          var HEADER_CLASS, LINK_DEFAULT, editor, getLinkAtCursor, hasVisibleElements, haveInteraction, initialContent, menubar, opts, setActive, themeClass, updateModel;
          LINK_DEFAULT = "http://";
          HEADER_CLASS = 'h4';
          themeClass = attrs.theme ? 'angular-squire-theme-' + attrs.theme : '';
          setActive = function() {
            var hasDirtyElements, isChildElement;
            isChildElement = element[0].contains(document.activeElement) || element[0] === document.activeElement;
            hasDirtyElements = element[0].getElementsByClassName('ng-dirty').length > 0 || element[0].classList.contains('ng-dirty');
            if (isChildElement || hasDirtyElements) {
              if (!element[0].classList.contains('input-focus')) {
                return element[0].classList.add("input-focus");
              }
            } else {
              return element[0].classList.remove("input-focus");
            }
          };
          if (scope.focusExpand) {
            element[0].classList.add("input-focus-expanding");
            element[0].addEventListener('blur', setActive, true);
            element[0].addEventListener('focus', setActive, true);
          }
          editor = scope.editor = null;
          scope.data = {
            link: LINK_DEFAULT
          };
          updateModel = function(value) {
            return scope.$evalAsync(function() {
              ngModel.$setViewValue(value);
              if (ngModel.$isEmpty(value)) {
                element.removeClass('squire-has-value');
                if (scope.focusExpand) {
                  return element[0].classList.remove("ng-dirty");
                }
              } else {
                return element.addClass('squire-has-value');
              }
            });
          };
          ngModel.$render = function() {
            return editor != null ? editor.setHTML(ngModel.$viewValue || '') : void 0;
          };
          ngModel.$isEmpty = function(value) {
            if (angular.isString(value)) {
              return angular.element("<div>" + value + "</div>").text().trim().length === 0;
            } else {
              return !value;
            }
          };
          hasVisibleElements = function() {
            var ref;
            return (ref = ngModel.$viewValue) != null ? ref.match(/<(ul|ol)>|(&nbsp;)/g) : void 0;
          };
          getLinkAtCursor = function() {
            if (!editor) {
              return LINK_DEFAULT;
            }
            return closest(angular.element(editor.getSelection().commonAncestorContainer), "a").attr("href");
          };
          scope.canRemoveLink = function() {
            var href;
            href = getLinkAtCursor();
            return href && href !== LINK_DEFAULT;
          };
          scope.canAddLink = function() {
            return scope.data.link && scope.data.link !== LINK_DEFAULT;
          };
          scope.$on('$destroy', function() {
            return editor != null ? editor.destroy() : void 0;
          });
          scope.showPlaceholder = function() {
            return ngModel.$isEmpty(ngModel.$viewValue) && !hasVisibleElements();
          };
          scope.popoverHide = function(e, name) {
            var hide;
            hide = function() {
              closest(angular.element(e.target), ".popover-visible").removeClass("popover-visible");
              return scope.action(name);
            };
            if (e.keyCode) {
              if (e.keyCode === 13) {
                hide();
                return e.preventDefault();
              }
            } else {
              return hide();
            }
          };
          scope.popoverShow = function(e) {
            var linkElement, popover;
            linkElement = angular.element(e.currentTarget);
            if (closest(angular.element(e.target), ".squire-popover").length) {
              return;
            }
            if (linkElement.hasClass("popover-visible")) {
              return;
            }
            linkElement.addClass("popover-visible");
            if (/>A\b/.test(editor.getPath()) || editor.hasFormat('A')) {
              scope.data.link = getLinkAtCursor();
            } else {
              scope.data.link = LINK_DEFAULT;
            }
            popover = angular.element(element[0].querySelector(".squire-popover input")).focus();
            popover.css({
              left: -1 * (popover.width() / 2) + linkElement.width() / 2 + 2
            });
          };
          menubar = angular.element(element[0].querySelector('.menu'));
          haveInteraction = false;
          ngModel.$setPristine();
          editor = scope.editor = new SQ(element[0].querySelector('.angular-squire-wrapper'), {
            blockTag: 'P'
          });
          initialContent = scope.body || ngModel.$viewValue;
          if (initialContent) {
            editor.setHTML(initialContent);
            updateModel(initialContent);
            haveInteraction = true;
          }
          element.addClass(themeClass);
          editor.addEventListener("input", function() {
            var html;
            if (haveInteraction) {
              html = editor.getHTML();
              return updateModel(html);
            }
          });
          if (DOMPurify && scope.purifyPaste) {
            if (!DOMPurify.addedHrefTargetHook) {
              DOMPurify.addedHrefTargetHook = true;
              DOMPurify.addHook('afterSanitizeAttributes', function(node) {
                if (indexOf.call(node, 'target') >= 0) {
                  return node.setAttribute('target', '_blank');
                }
              });
            }
            if (typeof scope.purifyPaste === 'boolean') {
              opts = {
                RETURN_DOM_FRAGMENT: true,
                FORBID_ATTR: ['style'],
                FORBID_TAGS: ['style', 'script', 'blink', 'pre', 'code'],
                ALLOW_DATA_ATTR: false,
                SAFE_FOR_TEMPLATES: true,
                SAFE_FOR_JQUERY: true
              };
            } else {
              opts = scope.purifyPaste;
              opts.RETURN_DOM_FRAGMENT = true;
            }
            editor.addEventListener('willPaste', function(event) {
              var div;
              div = document.createElement('div');
              div.appendChild(event.fragment);
              event.fragment = DOMPurify.sanitize(div.innerHTML, opts);
            });
          }
          editor.addEventListener("focus", function() {
            element.addClass('focus').triggerHandler('focus');
            scope.editorVisibility(true);
            return haveInteraction = true;
          });
          editor.addEventListener("blur", function() {
            element.removeClass('focus').triggerHandler('blur');
            if (ngModel.$pristine && !ngModel.$isEmpty(ngModel.$viewValue)) {
              ngModel.$setTouched();
            }
            return haveInteraction = true;
          });
          editor.addEventListener("pathChange", function() {
            var p;
            p = editor.getPath();
            if (/>A\b/.test(p) || editor.hasFormat('A')) {
              angular.element(element[0].querySelector('.add-link')).addClass('active');
            } else {
              angular.element(element[0].querySelector('.add-link')).removeClass('active');
            }
            return menubar.attr("class", "menu " + p.replace(/>|\.|div/ig, ' ').replace(RegExp(HEADER_CLASS, 'g'), 'size').toLowerCase());
          });
          editor.alignRight = function() {
            return editor.setTextAlignment("right");
          };
          editor.alignCenter = function() {
            return editor.setTextAlignment("center");
          };
          editor.alignLeft = function() {
            return editor.setTextAlignment("left");
          };
          editor.alignJustify = function() {
            return editor.setTextAlignment("justify");
          };
          editor.makeHeading = function() {
            var create;
            create = !menubar.hasClass('size');
            editor.forEachBlock(function(block) {
              if (create) {
                return angular.element(block).addClass(HEADER_CLASS);
              } else {
                return angular.element(block).removeClass(HEADER_CLASS);
              }
            }, true);
            return editor.focus();
          };
          SQ.prototype.testPresenceinSelection = function(name, action, format, validation) {
            var p, test;
            p = this.getPath();
            test = validation.test(p) | this.hasFormat(format);
            return name === action && test;
          };
          return scope.action = function(action) {
            var linky, node, range, selection, test;
            if (!editor) {
              return;
            }
            test = {
              value: action,
              testBold: editor.testPresenceinSelection("bold", action, "B", />B\b/),
              testItalic: editor.testPresenceinSelection("italic", action, "I", />I\b/),
              testUnderline: editor.testPresenceinSelection("underline", action, "U", />U\b/),
              testOrderedList: editor.testPresenceinSelection("makeOrderedList", action, "OL", />OL\b/),
              testUnorderedList: editor.testPresenceinSelection("makeUnorderedList", action, "UL", />UL\b/),
              testLink: editor.testPresenceinSelection("removeLink", action, "A", />A\b/),
              testQuote: editor.testPresenceinSelection("increaseQuoteLevel", action, "blockquote", />blockquote\b/),
              testCode: editor.testPresenceinSelection('code', action, "CODE", />CODE\b/),
              isNotValue: function(a) {
                return a === action && this.value !== "";
              }
            };
            if (test.testBold || test.testItalic || test.testUnderline || test.testOrderedList || test.testUnorderedList || test.testQuote || test.testCode || test.testLink) {
              if (test.testBold) {
                editor.removeBold();
              }
              if (test.testItalic) {
                editor.removeItalic();
              }
              if (test.testUnderline) {
                editor.removeUnderline();
              }
              if (test.testOrderedList) {
                editor.removeList();
              }
              if (test.testUnorderedList) {
                editor.removeList();
              }
              if (test.testQuote) {
                editor.decreaseQuoteLevel();
              }
              if (test.testCode) {
                editor.removeCode();
                // editor.toggleCode();
              }
              if (test.testLink) {
                editor.removeLink();
                return editor.focus();
              }
            } else if (test.isNotValue("removeLink")) {

            } else if (action === 'makeLink') {
              if (!scope.canAddLink()) {
                return;
              }
              node = closest(angular.element(editor.getSelection().commonAncestorContainer), "a")[0];
              if (node) {
                range = document.createRange();
                range.selectNodeContents(node);
                selection = window.getSelection();
                selection.removeAllRanges();
                selection.addRange(range);
              }
              if (scope.data.link.match(/^\s*?javascript:/i)) {
                linky = LINK_DEFAULT;
              } else {
                linky = scope.data.link;
              }
              editor.makeLink(linky, {
                target: '_blank',
                title: linky,
                rel: "nofollow"
              });
              scope.data.link = LINK_DEFAULT;
              return editor.focus();
            } else {
              editor[action]();
              return editor.focus();
            }
          };
        }
      };
    }
  ]).directive("squireCover", function() {
    return {
      restrict: 'E',
      replace: true,
      transclude: true,
      require: "^squire",
      template: "<ng-transclude ng-show=\"isCoverVisible()\"\n    ng-click='hideCover()'\n    class=\"angular-squire-cover\">\n</ng-transclude>",
      link: function(scope, element, attrs, editorCtrl) {
        var showingCover;
        showingCover = true;
        scope.isCoverVisible = function() {
          return showingCover;
        };
        scope.hideCover = function() {
          showingCover = false;
          return editorCtrl.editorVisibility(true);
        };
        editorCtrl.editorVisibility(!showingCover);
        return scope.$watch(function() {
          return editorCtrl.editorVisibility();
        }, function(val) {
          return showingCover = !val;
        });
      }
    };
  }).directive("squireControls", function() {
    return {
      restrict: 'E',
      scope: false,
      replace: true,
      transclude: true,
      require: "^squire",
      template: "<ng-transclude ng-show=\"isControlsVisible()\"\n    class=\"angular-squire-controls\">\n</ng-transclude>",
      link: function(scope, element, attrs, editorCtrl) {
        return scope.isControlsVisible = function() {
          return editorCtrl.editorVisibility();
        };
      }
    };
  }).provider("squireService", [
    function() {
      var obj;
      this.buttonDefaults = {
        bold: true,
        italic: true,
        underline: true,
        link: true,
        ol: true,
        ul: true,
        quote: false,
        code: false,
        header: false,
        alignRight: false,
        alignLeft: false,
        alignCenter: false,
        undo: false,
        redo: false
      };
      obj = {
        setButtonDefaults: (function(_this) {
          return function(obj) {
            return _this.buttonDefaults = obj;
          };
        })(this),
        getButtonDefaults: (function(_this) {
          return function() {
            return _this.buttonDefaults;
          };
        })(this)
      };
      this.$get = function() {
        return obj;
      };
      return this;
    }
  ]);

}).call(this);
// Generated by CoffeeScript 1.11.1
(function() {
  ((typeof module !== "undefined" && module !== null) && module.exports ? require('angular') : window.angular).module("angular-squire").run([
    "$templateCache", function($templateCache) {
      $templateCache.put('angular-squire-icon-attachment', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z\"/></svg>");
      $templateCache.put('angular-squire-icon-bold', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>");
      $templateCache.put('angular-squire-icon-quote', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>");
      $templateCache.put('angular-squire-icon-align-left', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>");
      $templateCache.put('angular-squire-icon-align-right', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>");
      $templateCache.put('angular-squire-icon-align-center', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>");
      $templateCache.put('angular-squire-icon-italic', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"/></svg>");
      $templateCache.put('angular-squire-icon-ul', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z\"/><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/></svg>");
      $templateCache.put('angular-squire-icon-ol', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>");
      $templateCache.put('angular-squire-icon-title', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M5 4v3h5.5v12h3V7H19V4z\"/><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/></svg>");
      $templateCache.put('angular-squire-icon-undo', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>");
      $templateCache.put('angular-squire-icon-redo', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"/></svg>");
      $templateCache.put('angular-squire-icon-code', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z\"/></svg>");
      return $templateCache.put('angular-squire-icon-underline', "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"/></svg>");
    }
  ]);

}).call(this);
// Generated by CoffeeScript 1.11.1
(function() {
  ((typeof module !== "undefined" && module !== null) && module.exports ? require("angular") : window.angular).module("angular-squire").run([
    "$templateCache", function($templateCache) {
      return $templateCache.put("angular-squire-main-template.html", "<div class=\"angular-squire\" ng-class=\"{'angular-squire-chrome-on-focus': chromeOnHoverAndFocus, 'angular-squire-wrap-contents': heightWrapContent}\"><div ng-class=\"{'editor-hide': !isEditorVisible()}\" class=\"editor-container\"><div class=\"menu\" ng-if=\"openMenu\"><div title=\"Header\" ng-click=\"action('makeHeading')\" ng-show=\"buttonVis.header\" class=\"item header\" ng-include=\"'angular-squire-icon-title'\"></div><div title=\"Bold\" ng-click=\"action('bold')\" ng-show=\"buttonVis.bold\" class=\"item bold\" ng-include=\"'angular-squire-icon-bold'\"></div><div title=\"Italic\" ng-click=\"action('italic')\" ng-show=\"buttonVis.italic\" class=\"item italic\" ng-include=\"'angular-squire-icon-italic'\"></div><div title=\"Underline\" ng-click=\"action('underline')\" ng-show=\"buttonVis.underline\" class=\"item underline\" ng-include=\"'angular-squire-icon-underline'\"></div><div title=\"Insert Numbered List\" ng-click=\"action('makeOrderedList')\" ng-show=\"buttonVis.ol\" class=\"item olist\" ng-include=\"'angular-squire-icon-ol'\"></div><div title=\"Insert List\" ng-click=\"action('makeUnorderedList')\" ng-show=\"buttonVis.ul\" class=\"item ulist\" ng-include=\"'angular-squire-icon-ul'\"></div><div title=\"Code\" ng-click=\"action('code')\" ng-show=\"buttonVis.code\" class=\"item code\" ng-include=\"'angular-squire-icon-code'\"></div><div title=\"Quote\" ng-click=\"action('increaseQuoteLevel')\" ng-show=\"buttonVis.quote\" class=\"item quote\" ng-include=\"'angular-squire-icon-quote'\"></div><div title=\"Insert Link\" class=\"item add-link\" ng-show=\"buttonVis.link\" ng-click=\"popoverShow($event)\"><span ng-include=\"'angular-squire-icon-attachment'\"></span><div class=\"squire-popover\"><svg class=\"squire-arrow\"><polygon points=\"0,15 15,0 30,15\"/></svg><div class=\"content\"><div class=\"title\">Insert Link</div><input type=\"text\" id=\"edit-link\" placeholder=\"Link URL\" ng-model=\"data.link\" ng-keydown=\"popoverHide($event, 'makeLink')\"><div class=\"button-row\"><button type=\"button\" class=\"double r\" ng-show=\"canRemoveLink()\" ng-click=\"popoverHide($event, 'removeLink')\"><span class=\"fa fa-remove\"></span> Remove Link</button> <button type=\"button\" class=\"double l\" ng-show=\"canRemoveLink()\" ng-class=\"{disabled: !canAddLink()}\" ng-click=\"popoverHide($event, 'makeLink')\"><span class=\"fa fa-edit\"></span> Update Link</button> <button type=\"button\" ng-hide=\"canRemoveLink()\" ng-class=\"{disabled: !canAddLink()}\" ng-click=\"popoverHide($event, 'makeLink')\"><span class=\"fa fa-plus\"></span> Insert Link</button></div></div><div class=\"squire-popover-overlay\" ng-click=\"popoverHide($event, 'makeLink')\"></div></div></div><div title=\"Align Left\" ng-click=\"action('alignLeft')\" ng-show=\"buttonVis.alignLeft\" class=\"item aleft\" ng-include=\"'angular-squire-icon-align-left'\"></div><div title=\"Align Center\" ng-click=\"action('alignCenter')\" ng-show=\"buttonVis.alignCenter\" class=\"item acenter\" ng-include=\"'angular-squire-icon-align-center'\"></div><div title=\"Align Right\" ng-click=\"action('alignRight')\" ng-show=\"buttonVis.alignRight\" class=\"item aright\" ng-include=\"'angular-squire-icon-align-right'\"></div><div title=\"Undo\" ng-click=\"action('undo')\" ng-show=\"buttonVis.undo\" class=\"item\" ng-include=\"'angular-squire-icon-undo'\"></div><div title=\"Redo\" ng-click=\"action('redo')\" ng-show=\"buttonVis.redo\" class=\"item\" ng-include=\"'angular-squire-icon-redo'\"></div></div><div class=\"angular-squire-container\"><div class=\"placeholder\" ng-show=\"showPlaceholder()\" ng-bind-html=\"placeholder\"></div><div class=\"angular-squire-wrapper\" ng-style=\"{width: width, height: height}\"></div></div></div><ng-transclude></ng-transclude></div>");
    }
  ]);

}).call(this);
