PageSourceSearch

https://www.cccb.org/o/frontend-editor-ckeditor-web/__liferay__/ex…/@ckeditor$ckeditor5-undo$dist$index.js.js

js cccb.org collected 2026-09-24 07:58:26 UTC 17,287 bytes, 10 lines download raw bytes

1import{Accessibility as P,Command as M,CommandCollection as k,Context as O,ContextPlugin as v,EditingKeystrokeHandler as E,Editor as x,ElementApiMixin as F,MultiCommand as A,PendingActions as U,Plugin as m,_DEFAULT_ACCESSIBILITY_GROUP_ID as N,_getEditorUsageData as H,attachToForm as W,secureSourceElement as j}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-core$dist$index.js.js";import{AttributeOperation as Z,Batch as K,BubblingEmitterMixin as q,BubblingEventInfo as Y,ClickObserver as Q,CompositionObserver as J,Conversion as X,ConversionHelpers as $,DataController as ee,Differ as oe,DomEventObserver as te,DowncastHelpers as ne,EditingController as ie,EditingView as re,FakeSelectionObserver as ae,FocusObserver as se,History as ce,HtmlDataProcessor as le,InputObserver as de,InsertOperation as ue,KeyObserver as Ie,MarkerCollection as me,MarkerOperation as we,Matcher as pe,MergeOperation as he,Model as ge,ModelDocument as Ve,ModelDocumentFragment as _e,ModelDocumentSelection as Ce,ModelElement as be,ModelLivePosition as Me,ModelLiveRange as Be,ModelNode as Se,ModelNodeList as Le,ModelPosition as fe,ModelRange as ye,ModelRootElement as Te,ModelSchemaContext as De,ModelSelection as Re,ModelText as Pe,ModelTextProxy as ke,ModelTreeWalker as Oe,ModelTypeCheckable as ve,ModelWriter as Ee,MouseObserver as xe,MoveOperation as Fe,MutationObserver as Ae,NoOperation as B,Observer as Ue,OperationFactory as Ne,RenameOperation as He,RootAttributeOperation as We,RootOperation as je,SelectionObserver as ze,SplitOperation as Ge,StylesMap as Ze,StylesProcessor as Ke,TabObserver as qe,TouchObserver as Ye,UpcastHelpers as Qe,UpcastWriter as Je,ViewAttributeElement as Xe,ViewContainerElement as $e,ViewDataTransfer as eo,ViewDocument as oo,ViewDocumentDomEventData as to,ViewDocumentFragment as no,ViewDocumentSelection as io,ViewDomConverter as ro,ViewDowncastWriter as ao,ViewEditableElement as so,ViewElement as co,ViewEmptyElement as lo,ViewNode as uo,ViewPosition as Io,ViewRange as mo,ViewRawElement as wo,ViewRenderer as po,ViewRootEditableElement as ho,ViewSelection as go,ViewText as Vo,ViewTextProxy as _o,ViewTokenList as Co,ViewTreeWalker as bo,ViewTypeCheckable as Mo,ViewUIElement as Bo,ViewUpcastWriter as So,XmlDataProcessor as Lo,_DataProcessorBasicHtmlWriter as fo,_DetachOperation as yo,_MapperCache as To,_OperationReplayer as Do,_VIEW_BR_FILLER as Ro,_VIEW_INLINE_FILLER as Po,_VIEW_INLINE_FILLER_LENGTH as ko,_VIEW_MARKED_NBSP_FILLER as Oo,_VIEW_NBSP_FILLER as vo,_ViewElementConversionConsumables as Eo,_autoParagraphEmptyModelRoots as xo,_convertMapToStringifiedObject as Fo,_convertMapToTags as Ao,_deleteModelContent as Uo,_downcastCleanSelection as No,_downcastConvertCollapsedSelection as Ho,_downcastConvertRangeSelection as Wo,_downcastCreateViewElementFromDowncastHighlightDescriptor as jo,_downcastInsertAttributesAndChildren as zo,_downcastInsertElement as Go,_downcastInsertStructure as Zo,_downcastInsertText as Ko,_downcastInsertUIElement as qo,_downcastRemove as Yo,_downcastWrap as Qo,_dumpTrees as Jo,_getDataWithoutViewFiller as Xo,_getModelData as $o,_getModelNodeAfterPosition as et,_getModelNodeBeforePosition as ot,_getModelTextNodeAtPosition as tt,_getSelectedModelContent as nt,_getViewData as it,_initDocumentDumping as rt,_injectModelSelectionPostFixer as at,_injectViewQuirksHandling as st,_injectViewUIElementHandling as ct,_insertIntoModelNodeList as lt,_insertModelContent as dt,_insertModelObject as ut,_isInlineViewFiller as It,_isParagraphableModelNode as mt,_isViewPatternMatched as wt,_logDocument as pt,_mergeIntersectingModelRanges as ht,_modifyModelSelection as gt,_moveInModelNodeList as Vt,_normalizeConversionConsumables as _t,_normalizeInModelNodeList as Ct,_operationTransform as bt,_parseModel as Mt,_parseView as Bt,_removeFromModelNodeList as St,_setAttributeInModelNodeList as Lt,_setModelData as ft,_setViewData as yt,_startsWithViewFiller as Tt,_stringifyModel as Dt,_stringifyView as Rt,_tryFixingModelRange as Pt,_upcastConvertSelectionChange as kt,_upcastConvertText as Ot,_upcastConvertToModelFragment as vt,_wrapInModelParagraph as Et,addBackgroun
1dStylesRules as xt,addBorderStylesRules as Ft,addMarginStylesRules as At,addPaddingStylesRules as Ut,autoParagraphEmptyRoots as Nt,disableViewPlaceholder as Ht,enableViewPlaceholder as Wt,getBoxSidesStyleShorthandValue as jt,getBoxSidesStyleValueReducer as zt,getBoxSidesStyleValues as Gt,getPositionStyleShorthandNormalizer as Zt,getShorthandStylesValues as Kt,getViewFillerOffset as qt,hideViewPlaceholder as Yt,isAttachmentStyleValue as Qt,isColorStyleValue as Jt,isLengthStyleValue as Xt,isLineStyleValue as $t,isParagraphable as en,isPercentageStyleValue as on,isPositionStyleValue as tn,isRepeatStyleValue as nn,isURLStyleValue as rn,needsViewPlaceholder as an,showViewPlaceholder as sn,transformOperationSets as S,wrapInParagraph as cn}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-engine$dist$index.js.js";import{AccessibilityHelp as un,AccessibilityHelpContentView as In,AriaLiveAnnouncer as mn,AriaLiveAnnouncerPoliteness as wn,AriaLiveAnnouncerRegionView as pn,AriaLiveAnnouncerView as hn,AutocompleteView as gn,Badge as Vn,BalloonPanelView as _n,BalloonToolbar as Cn,BlockButtonView as bn,BlockToolbar as Mn,BodyCollection as Bn,BoxedEditorUIView as Sn,ButtonLabelView as Ln,ButtonLabelWithHighlightView as fn,ButtonView as L,CollapsibleView as yn,ColorGridView as Tn,ColorGridsFragmentView as Dn,ColorPickerFragmentView as Rn,ColorPickerInputRowView as Pn,ColorPickerView as kn,ColorSelectorView as On,ColorTileView as vn,ComponentFactory as En,ContextualBalloon as xn,CssTransitionDisablerMixin as Fn,DefaultMenuBarItems as An,Dialog as Un,DialogActionsView as Nn,DialogContentView as Hn,DialogView as Wn,DialogViewPosition as jn,DocumentColorCollection as zn,DraggableViewMixin as Gn,DropdownButtonView as Zn,DropdownMenuButtonView as Kn,DropdownMenuListItemButtonView as qn,DropdownMenuListItemView as Yn,DropdownMenuListView as Qn,DropdownMenuNestedMenuPanelView as Jn,DropdownMenuNestedMenuView as Xn,DropdownMenuPanelPositioningFunctions as $n,DropdownMenuRootListView as ei,DropdownPanelView as oi,DropdownView as ti,EditableUIView as ni,EditorUI as ii,EditorUIView as ri,EvaluationBadge as ai,FileDialogButtonView as si,FileDialogListItemButtonView as ci,FileDialogViewMixin as li,FocusCycler as di,FormHeaderView as ui,FormRowView as Ii,HighlightedTextView as mi,IconView as wi,IframeView as pi,InlineEditableUIView as hi,InputBase as gi,InputNumberView as Vi,InputTextView as _i,InputView as Ci,ItemsView as bi,LabelView as Mi,LabelWithHighlightView as Bi,LabeledFieldView as Si,LabeledInputView as Li,ListItemButtonView as fi,ListItemGroupView as yi,ListItemView as Ti,ListSeparatorView as Di,ListView as Ri,MenuBarMenuButtonView as Pi,MenuBarMenuListItemButtonView as f,MenuBarMenuListItemFileDialogButtonView as ki,MenuBarMenuListItemView as Oi,MenuBarMenuListView as vi,MenuBarMenuPanelView as Ei,MenuBarMenuView as xi,MenuBarView as Fi,NESTED_TOOLBAR_ICONS as Ai,Notification as Ui,PoweredBy as Ni,SearchInfoView as Hi,SearchResultsView as Wi,SearchTextView as ji,SliderView as zi,SpinnerView as Gi,SplitButtonView as Zi,StickyPanelView as Ki,SwitchButtonView as qi,Template as Yi,TextareaView as Qi,ToolbarLineBreakView as Ji,ToolbarSeparatorView as Xi,ToolbarView as $i,TooltipManager as er,UIModel as or,View as tr,ViewCollection as nr,ViewModel as ir,_CheckIconHolderView as rr,_CollapsibleView as ar,_ContextualBalloonRotatorView as sr,_DropdownMenuBehaviors as cr,_DropdownRootMenuBehaviors as lr,_MenuBarBehaviors as dr,_MenuBarMenuBehaviors as ur,_MenuBarMenuViewPanelPositioningFunctions as Ir,_SearchInfoView as mr,_SearchTextQueryView as wr,_TemplateBinding as pr,_TemplateIfBinding as hr,_TemplateToBinding as gr,_convertColor as Vr,_convertColorToHex as _r,_preventUiViewDefault as Cr,_processMenuBarConfig as br,_registerCustomElement as Mr,_tryNormalizeHexColor as Br,addKeyboardHandlingForGrid as Sr,addListToDropdown as Lr,addMenuToDropdown as fr,addToolbarToDropdown as yr,clickOutsideHandler as Tr,createDropdown as Dr,createLabeledDropdown as Rr,createLabeledInputNumber as Pr,createLabeledInputText as kr,createLabeledTextarea as Or,f
1ilterGroupAndItemNames as vr,focusChildOnDropdownOpen as Er,getLocalizedColorOptions as xr,isFocusable as Fr,isViewWithFocusCycler as Ar,normalizeColorOptions as Ur,normalizeMenuBarConfig as Nr,normalizeSingleColorDefinition as Hr,normalizeToolbarConfig as Wr,submitHandler as jr}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-ui$dist$index.js.js";import{IconAccessibility as Zr,IconAddComment as Kr,IconAlignBottom as qr,IconAlignCenter as Yr,IconAlignJustify as Qr,IconAlignLeft as Jr,IconAlignMiddle as Xr,IconAlignRight as $r,IconAlignTop as ea,IconArrowDown as oa,IconArrowUp as ta,IconBold as na,IconBookmark as ia,IconBookmarkInline as ra,IconBookmarkMedium as aa,IconBookmarkSmall as sa,IconBrowseFiles as ca,IconBulletedList as la,IconCancel as da,IconCaption as ua,IconCaseChange as Ia,IconCheck as ma,IconChevronDown as wa,IconChevronUp as pa,IconCkboxImageEdit as ha,IconCode as ga,IconCodeBlock as Va,IconCog as _a,IconColorPalette as Ca,IconColorTileCheck as ba,IconCommentsArchive as Ma,IconContentLock as Ba,IconContentUnlock as Sa,IconCopy as La,IconDragHandle as fa,IconDragIndicator as ya,IconDropbox as Ta,IconDropdownArrow as Da,IconEditComment as Ra,IconEmoji as Pa,IconEraser as ka,IconError as Oa,IconExportPdf as va,IconExportWord as Ea,IconFacebook as xa,IconFindReplace as Fa,IconFontBackground as Aa,IconFontColor as Ua,IconFontFamily as Na,IconFontSize as Ha,IconFullscreenEnter as Wa,IconFullscreenLeave as ja,IconGoogleDrive as za,IconGooglePhotos as Ga,IconHeading1 as Za,IconHeading2 as Ka,IconHeading3 as qa,IconHeading4 as Ya,IconHeading5 as Qa,IconHeading6 as Ja,IconHistory as Xa,IconHorizontalLine as $a,IconHtml as es,IconImage as os,IconImageAssetManager as ts,IconImageUpload as ns,IconImageUrl as is,IconImportExport as rs,IconImportWord as as,IconIndent as ss,IconInsertMergeField as cs,IconItalic as ls,IconLegalStyleList as ds,IconLineHeight as us,IconLink as Is,IconListStyleCircle as ms,IconListStyleDecimal as ws,IconListStyleDecimalLeadingZero as ps,IconListStyleDisc as hs,IconListStyleLowerLatin as gs,IconListStyleLowerRoman as Vs,IconListStyleSquare as _s,IconListStyleUpperLatin as Cs,IconListStyleUpperRoman as bs,IconLocal as Ms,IconLoupe as Bs,IconLowVision as Ss,IconMagicWand as Ls,IconMarker as fs,IconMedia as ys,IconMediaPlaceholder as Ts,IconMultiLevelList as Ds,IconNextArrow as Rs,IconNotification as Ps,IconNumberedList as ks,IconObjectCenter as Os,IconObjectFullWidth as vs,IconObjectInline as Es,IconObjectInlineLeft as xs,IconObjectInlineRight as Fs,IconObjectLeft as As,IconObjectRight as Us,IconObjectSizeCustom as Ns,IconObjectSizeFull as Hs,IconObjectSizeLarge as Ws,IconObjectSizeMedium as js,IconObjectSizeSmall as zs,IconOneDrive as Gs,IconOutdent as Zs,IconPageBreak as Ks,IconPaginationExample as qs,IconPaintRoller as Ys,IconPaintRollerCursorDefault as Qs,IconPaintRollerCursorText as Js,IconParagraph as Xs,IconPen as $s,IconPencil as ec,IconPilcrow as oc,IconPlay as tc,IconPlus as nc,IconPreviewMergeFields as ic,IconPreviousArrow as rc,IconPrint as ac,IconProjectLogo as sc,IconQuote as cc,IconRedo as V,IconRemove as lc,IconRemoveComment as dc,IconRemoveFormat as uc,IconReturnArrow as Ic,IconRevisionHistory as mc,IconRobotPencil as wc,IconSelectAll as pc,IconSettings as hc,IconShowBlocks as gc,IconSource as Vc,IconSpecialCharacters as _c,IconStrikethrough as Cc,IconSubmit as bc,IconSubscript as Mc,IconSuperscript as Bc,IconTable as Sc,IconTableCellProperties as Lc,IconTableColumn as fc,IconTableLayout as yc,IconTableMergeCell as Tc,IconTableOfContents as Dc,IconTableProperties as Rc,IconTableRow as Pc,IconTemplate as kc,IconTemplateGeneric as Oc,IconText as vc,IconTextAlternative as Ec,IconThreeVerticalDots as xc,IconTodoList as Fc,IconTrackChanges as Ac,IconTrackChangesAccept as Uc,IconTrackChangesDiscard as Nc,IconUnderline as Hc,IconUndo as _,IconUnlink as Wc,IconUploadcareImageEdit as jc,IconUploadcareImageUpload as zc,IconUploadcareLink as Gc,IconUser as Zc,IconWarning as Kc}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-icons$dist$index.js.js";var I=class extends M{_stack=[];_createdBatches=new WeakSet;constructor(e){super(e),this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",(o,t)=>{t[1]={...t[1]};let n=t[1];n.batchType||(n.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(e.data,"set",(o,t)=>{t[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){let o=this.editor.model.document.selection,t={ranges:o.hasOwnRange?Array.from(o.getRanges()):[],isBackward:o.isBackward};this._stack.push({batch:e,selection:t}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,o,t){let n=this.editor.model,r=n.document,i=[],l=e.map(s=>s.getTransformedByOperations(t)),d=l.flat();for(let s of l){let u=s.filter(c=>c.root!=r.graveyard).filter(c=>!T(c,d));u.length&&(y(u),i.push(u[0]))}i.length&&n.change(s=>{s.setSelection(i,{backward:o})})}_undo(e,o){let t=this.editor.model,n=t.document;this._createdBatches.add(o);let r=e.operations.slice().filter(i=>i.isDocumentOperation);r.reverse();for(let i of r){let l=i.baseVersion+1,d=Array.from(n.history.getOperations(l)),u=S([i.getReversed()],d,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let c of u){let b=c.affectedSelectable;b&&!t.canEditAt(b)&&(c=new B(c.baseVersion)),o.addOperation(c),t.applyOperation(c),n.history.setOperationAsUndone(i,c)}}}};function y(a){a.sort((e,o)=>e.start.isBefore(o.start)?-1:1);for(let e=1;e<a.length;e++){let t=a[e-1].getJoined(a[e],!0);t&&(e--,a.splice(e,2,t))}}function T(a,e){return e.some(o=>o!==a&&o.containsRange(a,!0))}var w=class extends I{execute(e=null){let o=e?this._stack.findIndex(r=>r.batch==e):this._stack.length-1,t=this._stack.splice(o,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,()=>
1{this._undo(t.batch,n);let r=this.editor.model.document.history.getOperations(t.batch.baseVersion);this._restoreSelection(t.selection.ranges,t.selection.isBackward,r)}),this.fire("revert",t.batch,n),this.refresh()}},p=class extends I{execute(){let e=this._stack.pop(),o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,()=>{let n=e.batch.operations[e.batch.operations.length-1].baseVersion+1,r=this.editor.model.document.history.getOperations(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,r),this._undo(e.batch,o)}),this.refresh()}},h=class extends m{_undoCommand;_redoCommand;_batchRegistry=new WeakSet;static get pluginName(){return"UndoEditing"}static get isOfficialPlugin(){return!0}init(){let e=this.editor,o=e.t;this._undoCommand=new w(e),this._redoCommand=new p(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(t,n)=>{let r=n[0];if(!r.isDocumentOperation)return;let i=r.batch,l=this._redoCommand.createdBatches.has(i),d=this._undoCommand.createdBatches.has(i);this._batchRegistry.has(i)||(this._batchRegistry.add(i),i.isUndoable&&(l?this._undoCommand.addBatch(i):d||(this._undoCommand.addBatch(i),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(t,n,r)=>{this._redoCommand.addBatch(r)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Undo"),keystroke:"CTRL+Z"},{label:o("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}},g=class extends m{static get pluginName(){return"UndoUI"}static get isOfficialPlugin(){return!0}init(){let e=this.editor,o=e.locale,t=e.t,n=o.uiLanguageDirection=="ltr"?_:V,r=o.uiLanguageDirection=="ltr"?V:_;this._addButtonsToFactory("undo",t("Undo"),"CTRL+Z",n),this._addButtonsToFactory("redo",t("Redo"),"CTRL+Y",r)}_addButtonsToFactory(e,o,t,n){let r=this.editor;r.ui.componentFactory.add(e,()=>{let i=this._createButton(L,e,o,t,n);return i.set({tooltip:!0}),i}),r.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(f,e,o,t,n))}_createButton(e,o,t,n,r){let i=this.editor,l=i.locale,d=i.commands.get(o),s=new e(l);return s.set({label:t,icon:r,keystroke:n}),s.bind("isEnabled").to(d,"isEnabled"),this.listenTo(s,"execute",()=>{i.execute(o),i.editing.view.focus()}),s}},C=class extends m{static get requires(){return[h,g]}static get pluginName(){return"Undo"}static get isOfficialPlugin(){return!0}};export{p as RedoCommand,C as Undo,w as UndoCommand,h as UndoEditing,I as UndoRedoBaseCommand,g as UndoUI};
2/*! Bundled license information:
3
4@ckeditor/ckeditor5-undo/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-undo$dist$index.js.(373GH4OQ).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.