PageSourceSearch

https://fgc.org.br/o/frontend-editor-ckeditor-web/__liferay__/expo…ditor$ckeditor5-autoformat$dist$index.js.js

js fgc.org.br collected 2026-10-02 08:18:54 UTC 13,077 bytes, 10 lines download raw bytes

1import{Accessibility as B,Command as N,CommandCollection as $,Context as H,ContextPlugin as W,EditingKeystrokeHandler as U,Editor as q,ElementApiMixin as z,MultiCommand as j,PendingActions as K,Plugin as v,_DEFAULT_ACCESSIBILITY_GROUP_ID as Q,_getEditorUsageData as G,attachToForm as X,secureSourceElement as Y}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-core$dist$index.js.js";import{Delete as x,DeleteCommand as ee,Input as te,InsertTextCommand as oe,TextTransformation as ie,TextWatcher as ne,TwoStepCaretMovement as se,Typing as re,TypingChangeBuffer as ae,_DeleteObserver as le,findAttributeRange as de,findAttributeRangeBound as ce,getLastTextLine as ge,inlineHighlight as ue}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-typing$dist$index.js.js";import{AttributeOperation as fe,Batch as _e,BubblingEmitterMixin as pe,BubblingEventInfo as be,ClickObserver as Ee,CompositionObserver as Ce,Conversion as we,ConversionHelpers as Me,DataController as ye,Differ as Se,DomEventObserver as Ve,DowncastHelpers as Ae,EditingController as ve,EditingView as xe,FakeSelectionObserver as Re,FocusObserver as Le,History as Te,HtmlDataProcessor as Pe,InputObserver as Ie,InsertOperation as De,KeyObserver as ke,MarkerCollection as Oe,MarkerOperation as Fe,Matcher as Be,MergeOperation as Ne,Model as $e,ModelDocument as He,ModelDocumentFragment as We,ModelDocumentSelection as Ue,ModelElement as qe,ModelLivePosition as ze,ModelLiveRange as R,ModelNode as je,ModelNodeList as Ke,ModelPosition as Qe,ModelRange as Ge,ModelRootElement as Xe,ModelSchemaContext as L,ModelSelection as Ye,ModelText as Je,ModelTextProxy as Ze,ModelTreeWalker as et,ModelTypeCheckable as tt,ModelWriter as ot,MouseObserver as it,MoveOperation as nt,MutationObserver as st,NoOperation as rt,Observer as at,OperationFactory as lt,RenameOperation as dt,RootAttributeOperation as ct,RootOperation as gt,SelectionObserver as ut,SplitOperation as mt,StylesMap as ht,StylesProcessor as ft,TabObserver as _t,TouchObserver as pt,UpcastHelpers as bt,UpcastWriter as Et,ViewAttributeElement as Ct,ViewContainerElement as wt,ViewDataTransfer as Mt,ViewDocument as yt,ViewDocumentDomEventData as St,ViewDocumentFragment as Vt,ViewDocumentSelection as At,ViewDomConverter as vt,ViewDowncastWriter as xt,ViewEditableElement as Rt,ViewElement as Lt,ViewEmptyElement as Tt,ViewNode as Pt,ViewPosition as It,ViewRange as Dt,ViewRawElement as kt,ViewRenderer as Ot,ViewRootEditableElement as Ft,ViewSelection as Bt,ViewText as Nt,ViewTextProxy as $t,ViewTokenList as Ht,ViewTreeWalker as Wt,ViewTypeCheckable as Ut,ViewUIElement as qt,ViewUpcastWriter as zt,XmlDataProcessor as jt,_DataProcessorBasicHtmlWriter as Kt,_DetachOperation as Qt,_MapperCache as Gt,_OperationReplayer as Xt,_VIEW_BR_FILLER as Yt,_VIEW_INLINE_FILLER as Jt,_VIEW_INLINE_FILLER_LENGTH as Zt,_VIEW_MARKED_NBSP_FILLER as eo,_VIEW_NBSP_FILLER as to,_ViewElementConversionConsumables as oo,_autoParagraphEmptyModelRoots as io,_convertMapToStringifiedObject as no,_convertMapToTags as so,_deleteModelContent as ro,_downcastCleanSelection as ao,_downcastConvertCollapsedSelection as lo,_downcastConvertRangeSelection as co,_downcastCreateViewElementFromDowncastHighlightDescriptor as go,_downcastInsertAttributesAndChildren as uo,_downcastInsertElement as mo,_downcastInsertStructure as ho,_downcastInsertText as fo,_downcastInsertUIElement as _o,_downcastRemove as po,_downcastWrap as bo,_dumpTrees as Eo,_getDataWithoutViewFiller as Co,_getModelData as wo,_getModelNodeAfterPosition as Mo,_getModelNodeBeforePosition as yo,_getModelTextNodeAtPosition as So,_getSelectedModelContent as Vo,_getViewData as Ao,_initDocumentDumping as vo,_injectModelSelectionPostFixer as xo,_injectViewQuirksHandling as Ro,_injectViewUIElementHandling as Lo,_insertIntoModelNodeList as To,_insertModelContent as Po,_insertModelObject as Io,_isInlineViewFiller as Do,_isParagraphableModelNode as ko,_isViewPatternMatched as Oo,_logDocument as Fo,_mergeIntersectingModelRanges as Bo,_modifyModelSelection as No,_moveInModelNodeList as $o,_normalizeConversionConsumables as Ho,_normalizeInModelNodeList as Wo,_operationTransform as Uo,_parseModel as qo,_parseView as zo,_removeFromModelNodeList as jo,_setAttributeInModelNodeList as Ko,_setModelData as Qo,_setVie
1wData as Go,_startsWithViewFiller as Xo,_stringifyModel as Yo,_stringifyView as Jo,_tryFixingModelRange as Zo,_upcastConvertSelectionChange as ei,_upcastConvertText as ti,_upcastConvertToModelFragment as oi,_wrapInModelParagraph as ii,addBackgroundStylesRules as ni,addBorderStylesRules as si,addMarginStylesRules as ri,addPaddingStylesRules as ai,autoParagraphEmptyRoots as li,disableViewPlaceholder as di,enableViewPlaceholder as ci,getBoxSidesStyleShorthandValue as gi,getBoxSidesStyleValueReducer as ui,getBoxSidesStyleValues as mi,getPositionStyleShorthandNormalizer as hi,getShorthandStylesValues as fi,getViewFillerOffset as _i,hideViewPlaceholder as pi,isAttachmentStyleValue as bi,isColorStyleValue as Ei,isLengthStyleValue as Ci,isLineStyleValue as wi,isParagraphable as Mi,isPercentageStyleValue as yi,isPositionStyleValue as Si,isRepeatStyleValue as Vi,isURLStyleValue as Ai,needsViewPlaceholder as vi,showViewPlaceholder as xi,transformOperationSets as Ri,wrapInParagraph as Li}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-engine$dist$index.js.js";import{CKEditorError as Ii,Collection as Di,Config as ki,DOCUMENTATION_URL as Oi,DomEmitterMixin as Fi,ElementReplacer as Bi,EmitterMixin as Ni,EventInfo as $i,FocusTracker as Hi,KeystrokeHandler as Wi,Locale as Ui,ObservableMixin as qi,Rect as zi,ResizeObserver as ji,_clearTranslations as Ki,_getEmitterId as Qi,_getEmitterListenedTo as Gi,_getUserAgent as Xi,_isAndroid as Yi,_isBlink as Ji,_isGecko as Zi,_isMac as en,_isMediaForcedColors as tn,_isMotionReduced as on,_isRegExpUnicodePropertySupported as nn,_isSafari as sn,_isWindows as rn,_isiOS as an,_setEmitterId as ln,_translate as dn,_unifyTranslations as cn,abortableDebounce as gn,add as un,areConnectedThroughProperties as mn,collectStylesheets as hn,compareArrays as fn,count as _n,crc32 as pn,createElement as bn,delay as En,diff as Cn,diffToChanges as wn,env as Mn,exponentialDelay as yn,fastDiff as Sn,findClosestScrollableAncestor as Vn,first as T,formatHtml as An,getAncestors as vn,getBorderWidths as xn,getCode as Rn,getCommonAncestor as Ln,getDataFromElement as Tn,getEnvKeystrokeText as Pn,getLanguageDirection as In,getLocalizedArrowKeyCodeDirection as Dn,getOptimalPosition as kn,getPositionedAncestor as On,getRangeFromMouseEvent as Fn,getVisualViewportOffset as Bn,global as Nn,indexOf as $n,insertAt as Hn,insertToPriorityArray as Wn,isArrowKeyCode as Un,isCombiningMark as qn,isComment as zn,isForwardArrowKeyCode as jn,isHighSurrogateHalf as Kn,isInsideCombinedSymbol as Qn,isInsideEmojiSequence as Gn,isInsideSurrogatePair as Xn,isIterable as Yn,isLowSurrogateHalf as Jn,isNode as Zn,isRange as es,isText as ts,isValidAttributeName as os,isViewWithFocusTracker as is,isVisible as ns,isWindow as ss,keyCodes as rs,logError as as,logWarning as ls,mapsEqual as ds,nth as cs,objectToMap as gs,parseBase64EncodedObject as us,parseKeystroke as ms,priorities as hs,releaseDate as fs,remove as _s,retry as ps,scrollAncestorsToShowTarget as bs,scrollViewportToShowTarget as Es,setDataInElement as Cs,spliceArray as ws,spy as Ms,toArray as ys,toMap as Ss,toUnit as Vs,uid as As,version as vs,wait as xs}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-utils$dist$index.js.js";function u(o,e,t,n){let l,i=null;typeof n=="function"?l=n:(i=o.commands.get(n),l=()=>{o.execute(n)}),o.model.document.on("change:data",(m,d)=>{if(i&&!i.isEnabled||!e.isEnabled)return;let r=T(o.model.document.selection.getRanges());if(!r.isCollapsed||d.isUndo||!d.isLocal)return;let h=Array.from(o.model.document.differ.getChanges()),a=h[0];if(h.length!=1||a.type!=="insert"||a.name!="$text"||a.length!=1)return;let s=a.position.parent;if(s.is("element","codeBlock")||s.is("element","listItem")&&typeof n!="function"&&!["numberedList","bulletedList","todoList"].includes(n)||i&&i.value===!0)return;let g=s.getChild(0),_=o.model.createRangeOn(g);if(!_.containsRange(r)&&!r.end.isEqual(_.end))return;let p=t.exec(g.data.substr(0,r.end.offset));p&&o.model.enqueueChange(c=>{let f=o.model.document.selection,w=c.createPositionAt(s,0),M=c.createPositionAt(s,p[0].length),E=new R(w,M);if(l({match:p})!==!1){let C=Array.from(f.getAttributes());c.remove(E);
1let V=f.getFirstRange(),A=c.createRangeIn(s);s.isEmpty&&!A.isEqual(V)&&!A.containsRange(V,!0)&&c.remove(s),D(c,f,C)}E.detach(),o.model.enqueueChange(()=>{o.plugins.get("Delete").requestUndoOnBackspace()})})})}function D(o,e,t){let n=o.model.schema,l=e.getFirstPosition(),i=new L(l);n.checkChild(i,"$text")&&(i=i.push("$text"));for(let[m,d]of t)n.checkAttribute(i,m)&&o.setSelectionAttribute(m,d)}function b(o,e,t,n){let l,i;t instanceof RegExp?l=t:i=t,i=i||(m=>{let d,r=[],h=[];for(;(d=l.exec(m))!==null&&!(d&&d.length<4);){let{index:a,"1":s,"2":g,"3":_}=d,p=s+g+_;a+=d[0].length-p.length;let c=[a,a+s.length],f=[a+s.length+g.length,a+s.length+g.length+_.length];r.push(c),r.push(f),h.push([a+s.length,a+s.length+g.length])}return{remove:r,format:h}}),o.model.document.on("change:data",(m,d)=>{if(d.isUndo||!d.isLocal||!e.isEnabled)return;let r=o.model,h=r.document.selection;if(!h.isCollapsed)return;let a=Array.from(r.document.differ.getChanges()),s=a[0];if(a.length!=1||s.type!=="insert"||s.name!="$text"||s.length!=1)return;let g=h.focus,_=g.parent,{text:p,range:c}=k(r.createRange(r.createPositionAt(_,0),g),r),f=i(p),w=P(c.start,f.format,r),M=P(c.start,f.remove,r);w.length&&M.length&&r.enqueueChange(E=>{if(n(E,w)!==!1){for(let C of M.reverse())E.remove(C);r.enqueueChange(()=>{o.plugins.get("Delete").requestUndoOnBackspace()})}})})}function P(o,e,t){return e.filter(n=>n[0]!==void 0&&n[1]!==void 0).map(n=>t.createRange(o.getShiftedBy(n[0]),o.getShiftedBy(n[1])))}function k(o,e){let t=o.start;return{text:Array.from(o.getItems()).reduce((l,i)=>!(i.is("$text")||i.is("$textProxy"))||i.getAttribute("code")?(t=e.createPositionAfter(i),""):l+i.data,""),range:e.createRange(t,o.end)}}var S=class extends v{static get requires(){return[x]}static get pluginName(){return"Autoformat"}static get isOfficialPlugin(){return!0}afterInit(){let e=this.editor,t=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){let e=this.editor.commands;e.get("bulletedList")&&u(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&u(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&u(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&u(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){let e=this.editor.commands;if(e.get("bold")){let t=y(this.editor,"bold");b(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,t),b(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,t)}if(e.get("italic")){let t=y(this.editor,"italic");b(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,t),b(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,t)}if(e.get("code")){let t=y(this.editor,"code");b(this.editor,this,/(`)([^`]+)(`)$/g,t)}if(e.get("strikethrough")){let t=y(this.editor,"strikethrough");b(this.editor,this,/(~~)([^~]+)(~~)$/g,t)}}_addHeadingAutoformats(){let e=this.editor.commands.get("heading");e&&e.modelElements.filter(t=>t.match(/^heading[1-6]$/)).forEach(t=>{let n=t[7],l=new RegExp(`^(#{${n}})\\s$`);u(this.editor,this,l,()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&u(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){let e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&u(e,this,/^```$/,()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&u(this.editor,this,/^---$/,"horizontalLine")}};function y(o,e){return(t,n)=>{if(!o.commands.get(e).isEnabled)return!1;let i=o.model.schema.getValidRanges(n,e);for(let m of i)t.setAttribute(e,!0,m);t.removeSelectionAttribute(e)}}export{S as Autoformat,u as blockAutoformatEditing,b as inlineAutoformatEditing};
2/*! Bundled license information:
3
4@ckeditor/ckeditor5-autoformat/dist/index.js:
5  (**
6   * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
7   * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8   *)
9*/
10//# sourceMappingURL=@ckeditor$ckeditor5-autoformat$dist$index.js.(CRBZWGWM).js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.