angular.module("ui.tinymce",[]).value("uiTinymceConfig",{}).directive("uiTinymce",["$rootScope","$compile","$timeout","$window","$sce","uiTinymceConfig","uiTinymceService",function(f,b,C,v,I,y,w){return(y=y||{}).baseUrl&&(tinymce.baseURL=y.baseUrl),{require:["ngModel","^?form"],priority:599,link:function(i,n,s,e){function o(e){e?(a(),t&&t.getBody().setAttribute("contenteditable",!1)):(a(),t&&!t.settings.readonly&&t.getDoc()&&t.getBody().setAttribute("contenteditable",!0))}function a(){t||(t=tinymce.get(s.id))}if(v.tinymce){var r,t,l=e[0],d=e[1]||null,c={debounce:!0},u=function(e){var o=e.getContent({format:c.format}).trim();o=I.trustAsHtml(o),l.$setViewValue(o),f.$$phase||i.$digest()},m=w.getUniqueId();s.$set("id",m),r={},angular.extend(r,i.$eval(s.uiTinymce));var p=function(o){C.cancel(g),g=C(function(){var e;(e=o).isDirty()&&(e.save(),u(e))},400)},h={setup:function(e){e.on("init",function(){l.$render(),l.$setPristine(),l.$setUntouched(),d&&d.$setPristine()}),e.on("ExecCommand change NodeChange ObjectResized",function(){return c.debounce?void p(e):(e.save(),void u(e))}),e.on("blur",function(){n[0].blur(),l.$setTouched(),f.$$phase||i.$digest()}),e.on("remove",function(){n.remove()}),y.setup&&y.setup(e,{updateView:u}),r.setup&&r.setup(e,{updateView:u})},format:r.format||"html",selector:"#"+s.id};angular.extend(c,y,r,h),C(function(){c.baseURL&&(tinymce.baseURL=c.baseURL);var e=tinymce.init(c);e&&"function"==typeof e.then?e.then(function(){o(i.$eval(s.ngDisabled))}):o(i.$eval(s.ngDisabled))}),l.$formatters.unshift(function(e){return e?I.trustAsHtml(e):""}),l.$parsers.unshift(function(e){return e?I.getTrustedHtml(e):""}),l.$render=function(){a();var e=l.$viewValue?I.getTrustedHtml(l.$viewValue):"";t&&t.getDoc()&&(t.setContent(e),t.fire("change"))},s.$observe("disabled",o),i.$on("$tinymce:refresh",function(e,o){var a=s.id;if(angular.isUndefined(o)||o===a){var r=n.parent(),t=n.clone();t.removeAttr("id"),t.removeAttr("style"),t.removeAttr("aria-hidden"),tinymce.execCommand("mceRemoveEditor",!1,a),r.append(b(t)(i))}}),i.$on("$destroy",function(){a(),t&&(t.remove(),t=null)})}var g}}}]).service("uiTinymceService",[function(){return new function(){var e=0;return{getUniqueId:function(){return"ui-tinymce-"+ ++e}}}}]),tinymce.addI18n("pt_PT",{Cut:"Cortar","Heading 5":"Título 5","Header 2":"Cabeçalho 2","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"O seu navegador não suporta acesso direto à área de transferência. Por favor use os atalhos Ctrl+X/C/V do seu teclado.","Heading 4":"Título 4",Div:"Div","Heading 2":"Título 2",Paste:"Colar",Close:"Fechar","Font Family":"Fonte",Pre:"Pre","Align right":"Alinhar à direita","New document":"Novo documento",Blockquote:"Citação em bloco","Numbered list":"Lista numerada","Heading 1":"Título 1",Headings:"Títulos","Increase indent":"Aumentar avanço",Formats:"Formatos",Headers:"Cabeçalhos","Select all":"Selecionar tudo","Header 3":"Cabeçalho 3",Blocks:"Blocos",Undo:"Desfazer",Strikethrough:"Rasurado","Bullet list":"Lista com marcadores","Header 1":"Cabeçalho 1",Superscript:"Superior à linha","Clear formatting":"Limpar formatação","Font Sizes":"Tamanhos",Subscript:"Inferior à linha","Header 6":"Cabeçalho 6",Redo:"Refazer",Paragraph:"Parágrafo",Ok:"Ok",Bold:"Negrito",Code:"Código",Italic:"Itálico","Align center":"Alinhar ao centro","Header 5":"Cabeçalho 5","Heading 6":"Título 6","Heading 3":"Título 3","Decrease indent":"Diminuir avanço","Header 4":"Cabeçalho 4","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"O comando colar está em modo de texto simples. O conteúdo será colado como texto simples até desativar esta opção.",Underline:"Sublinhado",Cancel:"Cancelar",Justify:"Justificado",Inline:"Na linha",Copy:"Copiar","Align left":"Alinhar à esquerda","Visual aids":"Ajuda visual","Lower Greek":"\\u03b1. \\u03b2. \\u03b3. ...",Square:"Quadrado",Default:"Padrão","Lower Alpha":"a. b. c. ...",Circle:"Círculo",Disc:"Disco","Upper Alpha":"A. B. C. ...","Upper Roman":"I. II. III. ...","Lower Roman":"i. ii. iii. ...","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"O ID deve começar com uma letra, seguido de apenas letras, números, pontos, dois pontos, traços ou subtraços.",Name:"Nome",Anchor:"Âncora",Id:"ID","You have unsaved changes are you sure you want to navigate away?":"Existem alterações que ainda não foram guardadas. Tem a certeza que pretende sair?","Restore last draft":"Restaurar o último rascunho","Special character":"Carácter especial","Source code":"Código fonte",Language:"Idioma","Insert/Edit code sample":"Inserir/editar amostra de código",B:"B",R:"R",G:"G",Color:"Cor","Right to left":"Da direita para a esquerda","Left to right":"Da esquerda para a direita",Emoticons:"Emoções",Robots:"Robôs","Document properties":"Propriedades do documento",Title:"Título",Keywords:"Palavras-chave",Encoding:"Codificação",Description:"Descrição",Author:"Autor",Fullscreen:"Ecrã completo","Horizontal line":"Linha horizontal","Horizontal space":"Espaçamento horizontal","Insert/edit image":"Inserir/editar imagem",General:"Geral",Advanced:"Avançado",Source:"Localização",Border:"Contorno","Constrain proportions":"Manter proporções","Vertical space":"Espaçamento vertical","Image description":"Descrição da imagem",Style:"Estilo",Dimensions:"Dimensões","Insert image":"Inserir imagem",Image:"Imagem","Zoom in":"Mais zoom",Contrast:"Contraste",Back:"Voltar",Gamma:"Gama","Flip horizontally":"Inverter horizontalmente",Resize:"Redimensionar",Sharpen:"Mais nitidez","Zoom out":"Menos zoom","Image options":"Opções de imagem",Apply:"Aplicar",Brightness:"Brilho","Rotate clockwise":"Rotação horária","Rotate counterclockwise":"Rotação anti-horária","Edit image":"Editar imagem","Color levels":"Níveis de cor",Crop:"Recortar",Orientation:"Orientação","Flip vertically":"Inverter verticalmente",Invert:"Inverter","Date/time":"Data/hora","Insert date/time":"Inserir data/hora","Remove link":"Remover ligação",Url:"URL","Text to display":"Texto a exibir",Anchors:"Âncora","Insert link":"Inserir ligação",Link:"Ligação","New window":"Nova janela",None:"Nenhum","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"O URL que indicou parece ser um endereço web. Quer adicionar o prefixo http:// tal como necessário?","Paste or type a link":"Copiar ou escrever uma hiperligação",Target:"Alvo","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"O URL que indicou parece ser um endereço de email. Quer adicionar o prefixo mailto: tal como necessário?","Insert/edit link":"Inserir/editar ligação","Insert/edit video":"Inserir/editar vídeo",Media:"Media","Alternative source":"Localização alternativa","Paste your embed code below:":"Colar código para embeber:","Insert video":"Inserir vídeo",Poster:"Autor","Insert/edit media":"Inserir/editar media",Embed:"Embeber","Nonbreaking space":"Espaço não quebrável","Page break":"Quebra de página","Paste as text":"Colar como texto",Preview:"Pré-visualizar",Print:"Imprimir",Save:"Guardar","Could not find the specified string.":"Não foi possível localizar o termo especificado.",Replace:"Substituir",Next:"Próximo","Whole words":"Palavras completas","Find and replace":"Pesquisar e substituir","Replace with":"Substituir por",Find:"Pesquisar","Replace all":"Substituir tudo","Match case":"Diferenciar maiúsculas e minúsculas",Prev:"Anterior",Spellcheck:"Corretor ortográfico",Finish:"Concluir","Ignore all":"Ignorar tudo",Ignore:"Ignorar","Add to Dictionary":"Adicionar ao dicionário","Insert row before":"Inserir linha antes",Rows:"Linhas",Height:"Altura","Paste row after":"Colar linha depois",Alignment:"Alinhamento","Border color":"Cor de contorno","Column group":"Agrupar coluna",Row:"Linha","Insert column before":"Inserir coluna antes","Split cell":"Dividir célula","Cell padding":"Espaçamento interno da célula","Cell spacing":"Espaçamento entre células","Row type":"Tipo de linha","Insert table":"Inserir tabela",Body:"Corpo",Caption:"Legenda",Footer:"Rodapé","Delete row":"Eliminar linha","Paste row before":"Colar linha antes",Scope:"Escopo","Delete table":"Eliminar tabela","H Align":"Alinhamento H",Top:"Superior","Header cell":"Célula de cabeçalho",Column:"Coluna","Row group":"Agrupar linha",Cell:"Célula",Middle:"Meio","Cell type":"Tipo de célula","Copy row":"Copiar linha","Row properties":"Propriedades da linha","Table properties":"Propriedades da tabela",Bottom:"Inferior","V Align":"Alinhamento V",Header:"Cabeçalho",Right:"Direita","Insert column after":"Inserir coluna depois",Cols:"Colunas","Insert row after":"Inserir linha depois",Width:"Largura","Cell properties":"Propriedades da célula",Left:"Esquerda","Cut row":"Cortar linha","Delete column":"Eliminar coluna",Center:"Centro","Merge cells":"Unir células","Insert template":"Inserir modelo",Templates:"Modelos","Background color":"Cor de fundo","Custom...":"Personalizada...","Custom color":"Cor personalizada","No color":"Sem cor","Text color":"Cor do texto","Table of Contents":"Índice","Show blocks":"Mostrar blocos","Show invisible characters":"Mostrar caracteres invisíveis","Words: {0}":"Palavras: {0}",Insert:"Inserir",File:"Ficheiro",Edit:"Editar","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"Caixa de texto formatado. Pressione ALT-F9 para exibir o menu. Pressione ALT-F10 para exibir a barra de ferramentas. Pressione ALT-0 para exibir a ajuda",Tools:"Ferramentas",View:"Ver",Table:"Tabela",Format:"Formatar"});