PageSourceSearch

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

js cccb.org collected 2026-09-24 07:58:06 UTC 57,260 bytes, 10 lines download raw bytes

1import{Accessibility as Ct,Command as Z,CommandCollection as Et,Context as Pt,ContextPlugin as St,EditingKeystrokeHandler as At,Editor as Bt,ElementApiMixin as Dt,MultiCommand as Mt,PendingActions as Rt,Plugin as x,_DEFAULT_ACCESSIBILITY_GROUP_ID as Ft,_getEditorUsageData as Ot,attachToForm as Ht,secureSourceElement as Ut}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-core$dist$index.js.js";import{Delete as Ie,DeleteCommand as zt,Input as _e,InsertTextCommand as jt,TextTransformation as Kt,TextWatcher as Ve,TwoStepCaretMovement as ee,Typing as qt,TypingChangeBuffer as Gt,_DeleteObserver as $t,findAttributeRange as y,findAttributeRangeBound as Xt,getLastTextLine as Le,inlineHighlight as ve}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-typing$dist$index.js.js";import{Clipboard as Qt,ClipboardMarkersUtils as Zt,ClipboardObserver as eo,ClipboardPipeline as ye,DragDrop as to,DragDropBlockToolbar as oo,DragDropTarget as io,PastePlainText as ro,_ClipboardLineVie
1w as no,_DragDrop as so,_DragDropBlockToolbar as lo,_DragDropTarget as ao,_normalizeClipboardData as co,plainTextToHtml as mo,viewToPlainText as uo}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-clipboard$dist$index.js.js";import{CKEditorError as ho,Collection as te,Config as go,DOCUMENTATION_URL as wo,DomEmitterMixin as ko,ElementReplacer as bo,EmitterMixin as xo,EventInfo as Io,FocusTracker as T,KeystrokeHandler as C,Locale as _o,ObservableMixin as Te,Rect as Vo,ResizeObserver as Lo,_clearTranslations as vo,_getEmitterId as yo,_getEmitterListenedTo as To,_getUserAgent as Co,_isAndroid as Eo,_isBlink as Po,_isGecko as So,_isMac as Ao,_isMediaForcedColors as Bo,_isMotionReduced as Do,_isRegExpUnicodePropertySupported as Mo,_isSafari as Ro,_isWindows as Fo,_isiOS as Oo,_setEmitterId as Ho,_translate as Uo,_unifyTranslations as No,abortableDebounce as Wo,add as zo,areConnectedThroughProperties as jo,collectStylesheets as Ko,compareArrays as qo,count as Go,crc32 as $o,createElement as Xo,delay as Yo,diff as Ce,diffToChanges as Jo,env as Ee,exponentialDelay as Qo,fastDiff as Zo,findClosestScrollableAncestor as ei,first as oe,formatHtml as ti,getAncestors as oi,getBorderWidths as ii,getCode as ri,getCommonAncestor as ni,getDataFromElement as si,getEnvKeystrokeText as li,getLanguageDirection as ai,getLocalizedArrowKeyCodeDirection as ci,getOptimalPosition as di,getPositionedAncestor as mi,getRangeFromMouseEvent as ui,getVisualViewportOffset as fi,global as pi,indexOf as hi,insertAt as gi,insertToPriorityArray as wi,isArrowKeyCode as ki,isCombiningMark as bi,isComment as xi,isForwardArrowKeyCode as Ii,isHighSurrogateHalf as _i,isInsideCombinedSymbol as Vi,isInsideEmojiSequence as Li,isInsideSurrogatePair as vi,isIterable as yi,isLowSurrogateHalf as Ti,isNode as Ci,isRange as Ei,isText as Pi,isValidAttributeName as Si,isViewWithFocusTracker as Ai,isVisible as Bi,isWindow as Di,keyCodes as Pe,logError as Mi,logWarning as Ri,mapsEqual as Fi,nth as Oi,objectToMap as Hi,parseBase64EncodedObject as Ui,parseKeystroke as Ni,priorities as Wi,releaseDate as zi,remove as ji,retry as Ki,scrollAncestorsToShowTarget as qi,scrollViewportToShowTarget as Gi,setDataInElement as $i,spliceArray as Xi,spy as Yi,toArray as Ji,toMap as E,toUnit as Qi,uid as Zi,version as er,wait as tr}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-utils$dist$index.js.js";import{AttributeOperation as rr,Batch as nr,BubblingEmitterMixin as sr,BubblingEventInfo as lr,ClickObserver as Se,CompositionObserver as ar,Conversion as cr,ConversionHelpers as dr,DataController as mr,Differ as ur,DomEventObserver as fr,DowncastHelpers as pr,EditingController as hr,EditingView as gr,FakeSelectionObserver as wr,FocusObserver as kr,History as br,HtmlDataProcessor as xr,InputObserver as Ir,InsertOperation as _r,KeyObserver as Vr,MarkerCollection as Lr,MarkerOperation as vr,Matcher as Ae,MergeOperation as yr,Model as Tr,ModelDocument as Cr,ModelDocumentFragment as Er,ModelDocumentSelection as Pr,ModelElement as Sr,ModelLivePosition as ie,ModelLiveRange as Ar,ModelNode as Br,ModelNodeList as Dr,ModelPosition as Mr,ModelRange as Rr,ModelRootElement as Fr,ModelSchemaContext as Or,ModelSelection as Hr,ModelText as Ur,ModelTextProxy as Nr,ModelTreeWalker as Wr,ModelTypeCheckable as zr,ModelWriter as jr,MouseObserver as Kr,MoveOperation as qr,MutationObserver as Gr,NoOperation as $r,Observer as Xr,OperationFactory as Yr,RenameOperation as Jr,RootAttributeOperation as Qr,RootOperation as Zr,SelectionObserver as en,SplitOperation as tn,StylesMap as on,StylesProcessor as rn,TabObserver as nn,TouchObserver as sn,UpcastHelpers as ln,UpcastWriter as an,ViewAttributeElement as cn,ViewContainerElement as dn,ViewDataTransfer as mn,ViewDocument as un,ViewDocumentDomEventData as fn,ViewDocumentFragment as pn,ViewDocumentSelection as hn,ViewDomConverter as gn,ViewDowncastWriter as wn,ViewEditableElement as kn,ViewElement as bn,ViewEmptyElement as xn,ViewNode as In,ViewPosition as _n,ViewRange as Vn,ViewRawElement as Ln,ViewRenderer as vn,ViewRootEditableElement as yn,ViewSelection as Tn,ViewText as Cn,ViewTextProxy as En,ViewTokenList as Pn,ViewTreeWalker as Sn,ViewTypeCheckable as An,ViewUIElement as Bn,ViewUpcastWriter as Dn,XmlDataProcessor as Mn,_DataProcessorBasicHtmlWriter as Rn,_DetachOperation as Fn,_MapperCache as On,_OperationReplayer as Hn,_VIEW_BR_FILLER as Un,_VIEW_INLINE_FILLER as Nn,_VIEW_INLINE_FILLER_LENGTH as Wn,_VIEW_MARKED_NBSP_FILLER as zn,_VIEW_NBSP_FILLER as jn,_ViewElementConversionConsumables as Kn,_autoParagraphEmptyModelRoots as qn,_convertMapToStringifiedObject as Gn,_convertMapToTags as $n,_deleteModelContent as Xn,_downcastCleanSelection as Yn,_downcastConvertCollapsedSelection as Jn,_downcastConvertRangeSelection as Qn,_downcastCreateViewElementFromDowncastHighlightDescriptor as Zn,_downcastInsertAttributesAndChildren as es,_downcastInsertElement as ts,_downcastInsertStructure as os,_downcastInsertText as is,_downcastInsertUIElement as rs,_downcastRemove as ns,_downcastWrap as ss,_dumpTrees as ls,_getDataWithoutViewFiller as as,_getModelData as cs,_getModelNodeAfterPosition as ds,_getModelNodeBeforePosition as ms,_getModelTextNodeAtPosition as us,_getSelectedModelContent as fs,_getViewData as ps,_initDocumentDumping as hs,_injectModelSelectionPostFixer as gs,_injectViewQuirksHandling as ws,_injectViewUIElementHandling as ks,_insertIntoModelNodeList as bs,_insertModelContent as xs,_insertModelObject as Is,_isInlineViewFiller as _s,_isParagraphableModelNode as Vs,_isViewPatternMatched as Ls,_logDocument as vs,_mergeIntersectingModelRanges as ys,_modifyModelSelection as Ts,_moveInModelNodeList as Cs,_normalizeConversionConsumables as Es,_normalizeInModelNodeList as Ps,_operationTransform as Ss,_parseModel as As,_parseView as Bs,_removeFromModelNodeList as Ds,_setAttributeInModelNodeList as Ms,_setModelData as Rs,_setVie
1wData as Fs,_startsWithViewFiller as Os,_stringifyModel as Hs,_stringifyView as Us,_tryFixingModelRange as Ns,_upcastConvertSelectionChange as Ws,_upcastConvertText as zs,_upcastConvertToModelFragment as js,_wrapInModelParagraph as Ks,addBackgroundStylesRules as qs,addBorderStylesRules as Gs,addMarginStylesRules as $s,addPaddingStylesRules as Xs,autoParagraphEmptyRoots as Ys,disableViewPlaceholder as Js,enableViewPlaceholder as Qs,getBoxSidesStyleShorthandValue as Zs,getBoxSidesStyleValueReducer as el,getBoxSidesStyleValues as tl,getPositionStyleShorthandNormalizer as ol,getShorthandStylesValues as il,getViewFillerOffset as rl,hideViewPlaceholder as nl,isAttachmentStyleValue as sl,isColorStyleValue as ll,isLengthStyleValue as al,isLineStyleValue as cl,isParagraphable as dl,isPercentageStyleValue as ml,isPositionStyleValue as ul,isRepeatStyleValue as fl,isURLStyleValue as pl,needsViewPlaceholder as hl,showViewPlaceholder as gl,transformOperationSets as wl,wrapInParagraph as kl}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-engine$dist$index.js.js";function re(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(re).join(",");let e=String(n);return e==="0"&&Object.is(Number(n),-0)?"-0":e}function Be(n){return n.substring(0,1).toUpperCase()+n.substring(1)}function ne(n){return Be(re(n))}import{IconAccessibility as Cl,IconAddComment as El,IconAlignBottom as Pl,IconAlignCenter as Sl,IconAlignJustify as Al,IconAlignLeft as Bl,IconAlignMiddle as Dl,IconAlignRight as Ml,IconAlignTop as Rl,IconArrowDown as Fl,IconArrowUp as Ol,IconBold as Hl,IconBookmark as Ul,IconBookmarkInline as Nl,IconBookmarkMedium as Wl,IconBookmarkSmall as zl,IconBrowseFiles as jl,IconBulletedList as Kl,IconCancel as ql,IconCaption as Gl,IconCaseChange as $l,IconCheck as Xl,IconChevronDown as Yl,IconChevronUp as Jl,IconCkboxImageEdit as Ql,IconCode as Zl,IconCodeBlock as ea,IconCog as ta,IconColorPalette as oa,IconColorTileCheck as ia,IconCommentsArchive as ra,IconContentLock as na,IconContentUnlock as sa,IconCopy as la,IconDragHandle as aa,IconDragIndicator as ca,IconDropbox as da,IconDropdownArrow as ma,IconEditComment as ua,IconEmoji as fa,IconEraser as pa,IconError as ha,IconExportPdf as ga,IconExportWord as wa,IconFacebook as ka,IconFindReplace as ba,IconFontBackground as xa,IconFontColor as Ia,IconFontFamily as _a,IconFontSize as Va,IconFullscreenEnter as La,IconFullscreenLeave as va,IconGoogleDrive as ya,IconGooglePhotos as Ta,IconHeading1 as Ca,IconHeading2 as Ea,IconHeading3 as Pa,IconHeading4 as Sa,IconHeading5 as Aa,IconHeading6 as Ba,IconHistory as Da,IconHorizontalLine as Ma,IconHtml as Ra,IconImage as Fa,IconImageAssetManager as Oa,IconImageUpload as Ha,IconImageUrl as Ua,IconImportExport as Na,IconImportWord as Wa,IconIndent as za,IconInsertMergeField as ja,IconItalic as Ka,IconLegalStyleList as qa,IconLineHeight as Ga,IconLink as se,IconListStyleCircle as $a,IconListStyleDecimal as Xa,IconListStyleDecimalLeadingZero as Ya,IconListStyleDisc as Ja,IconListStyleLowerLatin as Qa,IconListStyleLowerRoman as Za,IconListStyleSquare as ec,IconListStyleUpperLatin as tc,IconListStyleUpperRoman as oc,IconLocal as ic,IconLoupe as rc,IconLowVision as nc,IconMagicWand as sc,IconMarker as lc,IconMedia as ac,IconMediaPlaceholder as cc,IconMultiLevelList as dc,IconNextArrow as De,IconNotification as mc,IconNumberedList as uc,IconObjectCenter as fc,IconObjectFullWidth as pc,IconObjectInline as hc,IconObjectInlineLeft as gc,IconObjectInlineRight as wc,IconObjectLeft as kc,IconObjectRight as bc,IconObjectSizeCustom as xc,IconObjectSizeFull as Ic,IconObjectSizeLarge as _c,IconObjectSizeMedium as Vc,IconObjectSizeSmall as Lc,IconOneDrive as vc,IconOutdent as yc,IconPageBreak as Tc,IconPaginationExample as Cc,IconPaintRoller as Ec,IconPaintRollerCursorDefault as Pc,IconPaintRollerCursorText as Sc,IconParagraph as Ac,IconPen as Bc,IconPencil as Me,IconPilcrow as Dc,IconPlay as Mc,IconPlus as Rc,IconPreviewMergeFields as Fc,IconPreviousArrow as V,IconPrint as Oc,IconProjectLogo as Hc,IconQuote as Uc,IconRedo as Nc,IconRemove as Wc,IconRemoveComment as zc,IconRemoveFormat as jc,IconReturnArrow as Kc,IconRevisionHistory as qc,IconRobotPencil as Gc,IconSelectAll as $c,IconSettings as Re,IconShowBlocks as Xc,IconSource as Yc,IconSpecialCharacters as Jc,IconStrikethrough as Qc,IconSubmit as Zc,IconSubscript as ed,IconSuperscript as td,IconTable as od,IconTableCellProperties as id,IconTableColumn as rd,IconTableLayout as nd,IconTableMergeCell as sd,IconTableOfContents as ld,IconTableProperties as ad,IconTableRow as cd,IconTemplate as dd,IconTemplateGeneric as md,IconText as ud,IconTextAlternative as fd,IconThreeVerticalDots as pd,IconTodoList as hd,IconTrackChanges as gd,IconTrackChangesAccept as wd,IconTrackChangesDiscard as kd,IconUnderline as bd,IconUndo as xd,IconUnlink as Fe,IconUploadcareImageEdit as Id,IconUploadcareImageUpload as _d,IconUploadcareLink as Vd,IconUser as Ld,IconWarning as vd}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-icons$dist$index.js.js";import{AccessibilityHelp as Cd,AccessibilityHelpContentView as Ed,AriaLiveAnnouncer as Pd,AriaLiveAnnouncerPoliteness as Sd,AriaLiveAnnouncerRegionView as Ad,AriaLiveAnnouncerView as Bd,AutocompleteView as Dd,Badge as Md,BalloonPanelView as Rd,BalloonToolbar as Fd,BlockButtonView as Od,BlockToolbar as Hd,BodyCollection as Ud,BoxedEditorUIView as Nd,ButtonLabelView as Wd,ButtonLabelWithHighlightView as zd,ButtonView as w,CollapsibleView as jd,ColorGridView as Kd,ColorGridsFragmentView as qd,ColorPickerFragmentView as Gd,ColorPickerInputRowView as $d,ColorPickerView as Xd,ColorSelectorView as Yd,ColorTileView as Jd,ComponentFactory as Qd,ContextualBalloon as le,CssTransitionDisablerMixin as ae,DefaultMenuBarItems as Zd,Dialog as em,DialogActionsView as tm,DialogContentView as om,DialogView as im,DialogViewPosition as rm,DocumentColorCollection as nm,DraggableViewMixin as sm,DropdownButtonView as lm,DropdownMenuButtonView as am,DropdownMenuListItemButtonView as cm,DropdownMenuListItemView as dm,DropdownMenuListView as mm,DropdownMenuNestedMenuPanelView as um,DropdownMenuNestedMenuView as fm,DropdownMenuPanelPositioningFunctions as pm,DropdownMenuRootListView as hm,DropdownPanelView as gm,DropdownView as wm,EditableUIView as km,EditorUI as bm,EditorUIView as xm,EvaluationBadge as Im,FileDialogButtonView as _m,FileDialogListItemButtonView as Vm,FileDialogViewMixin as Lm,FocusCycler as P,FormHeaderView as S,FormRowView as ce,HighlightedTextView as vm,IconView as Oe,IframeView as ym,InlineEditableUIView as Tm,InputBase as Cm,InputNumberView as Em,InputTextView as Pm,InputView as Sm,ItemsView as Am,LabelView as Bm,LabelWithHighlightView as Dm,LabeledFieldView as de,LabeledInputVie
1w as Mm,ListItemButtonView as Rm,ListItemGroupView as Fm,ListItemView as A,ListSeparatorView as Om,ListView as B,MenuBarMenuButtonView as Hm,MenuBarMenuListItemButtonView as He,MenuBarMenuListItemFileDialogButtonView as Um,MenuBarMenuListItemView as Nm,MenuBarMenuListView as Wm,MenuBarMenuPanelView as zm,MenuBarMenuView as jm,MenuBarView as Km,NESTED_TOOLBAR_ICONS as qm,Notification as Gm,PoweredBy as $m,SearchInfoView as Xm,SearchResultsView as Ym,SearchTextView as Jm,SliderView as Qm,SpinnerView as Zm,SplitButtonView as eu,StickyPanelView as tu,SwitchButtonView as Ue,Template as ou,TextareaView as iu,ToolbarLineBreakView as ru,ToolbarSeparatorView as nu,ToolbarView as Ne,TooltipManager as su,UIModel as lu,View as L,ViewCollection as D,ViewModel as au,_CheckIconHolderView as cu,_CollapsibleView as du,_ContextualBalloonRotatorView as mu,_DropdownMenuBehaviors as uu,_DropdownRootMenuBehaviors as fu,_MenuBarBehaviors as pu,_MenuBarMenuBehaviors as hu,_MenuBarMenuViewPanelPositioningFunctions as gu,_SearchInfoView as wu,_SearchTextQueryView as ku,_TemplateBinding as bu,_TemplateIfBinding as xu,_TemplateToBinding as Iu,_convertColor as _u,_convertColorToHex as Vu,_preventUiViewDefault as Lu,_processMenuBarConfig as vu,_registerCustomElement as yu,_tryNormalizeHexColor as Tu,addKeyboardHandlingForGrid as Cu,addListToDropdown as Eu,addMenuToDropdown as Pu,addToolbarToDropdown as Su,clickOutsideHandler as We,createDropdown as Au,createLabeledDropdown as Bu,createLabeledInputNumber as Du,createLabeledInputText as me,createLabeledTextarea as Mu,filterGroupAndItemNames as Ru,focusChildOnDropdownOpen as Fu,getLocalizedColorOptions as Ou,isFocusable as Hu,isViewWithFocusCycler as Uu,normalizeColorOptions as Nu,normalizeMenuBarConfig as Wu,normalizeSingleColorDefinition as zu,normalizeToolbarConfig as ju,submitHandler as ze}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-ui$dist$index.js.js";import{WIDGET_CLASS_NAME as Gu,WIDGET_SELECTED_CLASS_NAME as $u,Widget as Xu,WidgetHighlightStack as Yu,WidgetResize as Ju,WidgetResizeState as Qu,WidgetResizer as Zu,WidgetToolbarRepository as ef,WidgetTypeAround as tf,_WIDGET_TYPE_AROUND_SELECTION_ATTRIBUTE as of,_WidgetSizeView as rf,_getClosestWidgetTypeAroundDomButton as nf,_getClosestWidgetViewElement as sf,_getWidgetTypeAroundButtonPosition as lf,_getWidgetTypeAroundFakeCaretPosition as af,calculateResizeHostAncestorWidth as cf,calculateResizeHostPercentageWidth as df,findOptimalInsertionRange as mf,getLabel as uf,isTypeAroundWidget as ff,isWidget as je,setHighlightHandling as pf,setLabel as hf,toWidget as gf,toWidgetEditable as wf,verticalWidgetNavigationHandler as kf,viewToModelPositionOutsideModelElement as bf}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-widget$dist$index.js.js";var M=class{_definitions=new Set;get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(t=>this._definitions.add(t)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(t,o,i)=>{if(!i.consumable.test(o.item,"attribute:linkHref")||!(o.item.is("selection")||i.schema.isInline(o.item)))return;let r=i.writer,s=r.document.selection;for(let a of this._definitions){let l=r.createAttributeElement("a",a.attributes,{priority:5});a.classes&&r.addClass(a.classes,l);for(let c in a.styles)r.setStyle(c,a.styles[c],l);r.setCustomProperty("link",!0,l),a.callback(o.attributeNewValue)?o.item.is("selection")?r.wrap(s.getFirstRange(),l):r.wrap(i.mapper.toViewRange(o.range),l):r.unwrap(i.mapper.toViewRange(o.range),l)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(t,o,{writer:i,mapper:r})=>{let s=r.toViewElement(o.item),a=Array.from(s.getChildren()).find(l=>l.is("element","a"));if(a)for(let l of this._definitions){let c=E(l.attributes);if(l.callback(o.attributeNewValue)){for(let[m,u]of c)m==="class"?i.addClass(u,a):i.setAttribute(m,u,a);l.classes&&i.addClass(l.classes,a);for(let m in l.styles)i.setStyle(m,l.styles[m],a)}else{for(let[m,u]of c)m==="class"?i.removeClass(u,a):i.removeAttribute(m,a);l.classes&&i.removeClass(l.classes,a);for(let m in l.styles)i.removeStyle(m,a)}}})}}},ot=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,it="^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))",rt=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,nt=/^((\w+:(\/{2,})?)|(\W))/i,st=["https?","ftps?","mailto"],I="Ctrl+K";function Ge(n){return n.is("attributeElement")&&!!n.getCustomProperty("link")}function fe(n,{writer:e}){let t=e.createAttributeElement("a",{href:n},{priority:5});return e.setCustomProperty("link",!0,t),t}function X(n,e=st){let t=String(n),o=e.join("|"),i=new RegExp(`${it.replace("<protocols>",o)}`,"i");return lt(t,i)?t:"#"}function lt(n,e){return!!n.replace(ot,"").match(e)}function $e(n,e){let t={"Open in a new tab":n("Open in a new tab"),Downloadable:n("Downloadable")};return e.forEach(o=>("label"in o&&t[o.label]&&(o.label=t[o.label]),o)),e}function Xe(n){let e=[];
1if(n)for(let[t,o]of Object.entries(n)){let i=Object.assign({},o,{id:`link${ne(t)}`});e.push(i)}return e}function R(n,e){return n?e.checkAttribute(n.name,"linkHref"):!1}function Ye(n){return rt.test(n)}function Y(n,e){let t=Ye(n)?"mailto:":e,o=!!t&&!ge(n);return n&&o?t+n:n}function ge(n){return nt.test(n)}function Je(n){window.open(n,"_blank","noopener")}function F(n){let e="";for(let t of n.getItems()){if(!t.is("$text")&&!t.is("$textProxy"))return;e+=t.data}return e}var O=class extends Z{manualDecorators=new te;automaticDecorators=new M;restoreManualDecoratorStates(){for(let e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){let e=this.editor.model,t=e.document.selection,o=t.getSelectedElement()||oe(t.getSelectedBlocks());R(o,e.schema)?(this.value=o.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(o,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(let i of this.manualDecorators)i.value=this._getDecoratorStateFromModel(i.id)}execute(e,t={},o){let i=this.editor.model,r=i.document.selection,s=[],a=[];for(let l in t)t[l]?s.push(l):a.push(l);i.change(l=>{let c=d=>
1{l.setAttribute("linkHref",e,d),s.forEach(f=>l.setAttribute(f,!0,d)),a.forEach(f=>l.removeAttribute(f,d))},m=(d,f)=>{let h=F(d);if(!h)return d;let g=o;if(g||(g=f&&f==h?e:h),g!=h){let J=at(h,g),p=0;for(let{offset:_,actual:Q,expected:we}of J){let ke=_+p,be=l.createRange(d.start.getShiftedBy(ke),d.start.getShiftedBy(ke+Q.length)),Ze=ct(be,d).getAttributes(),et=Array.from(Ze).filter(([tt])=>i.schema.getAttributeProperties(tt).isFormatting),xe=l.createText(we,et);c(xe),i.insertContent(xe,be),p+=we.length}return l.createRange(d.start,d.start.getShiftedBy(g.length))}},u=d=>{let{plugins:f}=this.editor;if(l.setSelection(d.end),f.has("TwoStepCaretMovement"))f.get("TwoStepCaretMovement")._handleForwardMovement();else for(let h of["linkHref",...s,...a])l.removeSelectionAttribute(h)};if(r.isCollapsed){let d=r.getFirstPosition();if(r.hasAttribute("linkHref")){let f=r.getAttribute("linkHref"),h=y(d,"linkHref",f,i),g=m(h,f);c(g||h),g&&u(g)}else if(e!==""){let f=E(r.getAttributes());f.set("linkHref",e),s.forEach(g=>{f.set(g,!0)});let h=i.insertContent(l.createText(o||e,f),d);u(h)}}else{let d=Array.from(r.getRanges()),f=i.schema.getValidRanges(d,"linkHref"),h=[];for(let p of r.getSelectedBlocks())i.schema.checkAttribute(p,"linkHref")&&h.push(l.createRangeOn(p));let g=h.slice();for(let p of f)this._isRangeToUpdate(p,h)&&g.push(p);let J=d.map(p=>({start:ie.fromPosition(p.start,"toPrevious"),end:ie.fromPosition(p.end,"toNext")}));for(let p of g){let _=(p.start.textNode||p.start.nodeAfter).getAttribute("linkHref");p=m(p,_)||p,c(p)}l.setSelection(J.map(p=>{let _=p.start.toPosition(),Q=p.end.toPosition();return p.start.detach(),p.end.detach(),i.createRange(_,Q)}))}})}_getDecoratorStateFromModel(e){let t=this.editor.model,o=t.document.selection,i=o.getSelectedElement();return R(i,t.schema)?i.getAttribute(e):o.getAttribute(e)}_isRangeToUpdate(e,t){for(let o of t)if(o.containsRange(e))return!1;return!0}};function at(n,e){let t=Ce(n,e),o={equal:0,insert:0,delete:0},i=[],r="",s="";for(let a of[...t,null])a=="insert"?s+=e[o.equal+o.insert]:a=="delete"?r+=n[o.equal+o.delete]:(r.length||s.length)&&(i.push({offset:o.equal,actual:r,expected:s}),r="",s=""),a&&o[a]++;return i}function ct(n,e){if(!n.isCollapsed)return oe(n.getItems());let t=n.start;return t.textNode?t.textNode:!t.nodeBefore||t.isEqual(e.start)?t.nodeAfter:t.nodeBefore}var H=class extends Z{refresh(){let e=this.editor.model,t=e.document.selection,o=t.getSelectedElement();R(o,e.schema)?this.isEnabled=e.schema.checkAttribute(o,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){let e=this.editor,t=this.editor.model,o=t.document.selection,i=e.commands.get("link");t.change(r=>{let s=o.isCollapsed?[y(o.getFirstPosition(),"linkHref",o.getAttribute("linkHref"),t)]:t.schema.getValidRanges(o.getRanges(),"linkHref");for(let a of s)if(r.removeAttribute("linkHref",a),i)for(let l of i.manualDecorators)r.removeAttribute(l.id,a)})}},U=class extends Te(){id;defaultValue;label;attributes;classes;styles;constructor({id:e,label:t,attributes:o,classes:i,styles:r,defaultValue:s}){super(),this.id=e,this.set("value",void 0),this.defaultValue=s,this.label=t,this.attributes=o,this.classes=i,this.styles=r}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}},dt="ck-link_selected",Ke="automatic",mt="manual",ut=/^(https?:)?\/\//,b=class extends x{_linkOpeners=[];static get pluginName(){return"LinkEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[ee,_e,ye]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1,toolbar:["linkPreview","|","editLink","linkProperties","unlink"]})}init(){let e=this.editor,t=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:fe}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(r,s)=>fe(X(r,t),s)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:r=>r.getAttribute("href")}}),e.commands.add("link",new O(e)),e.commands.add("unlink",new H(e));let o=$e(e.t,Xe(e.config.get("link.decorators")));this._enableAutomaticDecorators(o.filter(r=>r.mode===Ke)),this._enableManualDecorators(o.filter(r=>r.mode===mt)),e.plugins.get(ee).registerAttribute("linkHref"),ve(e,"linkHref","a",dt),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_registerLinkOpener(e){this._linkOpeners.push(e)}_enableAutomaticDecorators(e){let t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:Ke,callback:r=>!!r&&ut.test(r),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;let t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach(r=>{t.model.schema.extend("$text",{allowAttributes:r.id});let s=new U(r);i.add(s),t.conversion.for("downcast").attributeToElement({model:s.id,view:(a,{writer:l,schema:c},{item:m})=>
1{if((m.is("selection")||c.isInline(m))&&a){let u=l.createAttributeElement("a",s.attributes,{priority:5});s.classes&&l.addClass(s.classes,u);for(let d in s.styles)l.setStyle(d,s.styles[d],u);return l.setCustomProperty("link",!0,u),u}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...s._createPattern()},model:{key:s.id}})})}_enableLinkOpen(){let e=this.editor,o=e.editing.view.document,i=r=>{this._linkOpeners.some(s=>s(r))||Je(r)};this.listenTo(o,"click",(r,s)=>{if(!(Ee.isMac?s.domEvent.metaKey:s.domEvent.ctrlKey))return;let l=s.domTarget;if(l.tagName.toLowerCase()!="a"&&(l=l.closest("a")),!l)return;let c=l.getAttribute("href");c&&(r.stop(),s.preventDefault(),i(c))},{context:"$capture"}),this.listenTo(o,"keydown",(r,s)=>{let l=e.commands.get("link").value;l&&s.keyCode===Pe.enter&&s.altKey&&(r.stop(),i(l))})}_enableSelectionAttributesFixer(){let t=this.editor.model,o=t.document.selection;this.listenTo(o,"change:attribute",(i,{attributeKeys:r})=>{!r.includes("linkHref")||o.hasAttribute("linkHref")||t.change(s=>{ft(s,pt(t.schema))})})}_enableClipboardIntegration(){let e=this.editor,t=e.model,o=this.editor.config.get("link.defaultProtocol");o&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",(i,r)=>{t.change(s=>{let a=s.createRangeIn(r.content);for(let l of a.getItems())if(l.hasAttribute("linkHref")){let c=Y(l.getAttribute("linkHref"),o);s.setAttribute("linkHref",c,l)}})})}};function ft(n,e){n.removeSelectionAttribute("linkHref");for(let t of e)n.removeSelectionAttribute(t)}function pt(n){return n.getDefinition("$text").allowAttributes.filter(t=>t.startsWith("link"))}var N=class extends w{constructor(e){super(e);let t=this.bindTemplate;this.set({href:void 0,withText:!0}),this.extendTemplate({attributes:{class:["ck-link-toolbar__preview"],href:t.to("href"),target:"_blank",rel:"noopener noreferrer"},on:{click:t.to(o=>{if(this.href){let i=()=>o.preventDefault();this.fire("navigate",this.href,i)}})}}),this.template.tag="a"}},W=class extends L{focusTracker=new T;keystrokes=new C;backButtonView;saveButtonView;
1displayedTextInputView;urlInputView;children;providersListChildren;_validators;_focusables=new D;_focusCycler;constructor(e,t){super(e),this._validators=t,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.displayedTextInputView=this._createDisplayedTextInput(),this.urlInputView=this._createUrlInput(),this.providersListChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView()]),this._createFormChildren(),this.listenTo(this.providersListChildren,"add",()=>{this.stopListening(this.providersListChildren,"add"),this.children.add(this._createProvidersListView())}),this._focusCycler=new P({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-link-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),ze({view:this}),[this.urlInputView,this.saveButtonView,...this.providersListChildren,this.backButtonView,this.displayedTextInputView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(let e of this._validators){let t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createBackButton(){let e=this.locale.t,t=new w(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:V,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){let e=this.locale.t,t=new w(this.locale);return t.set({label:e("Insert"),tooltip:!1,withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){let e=this.locale.t,t=new S(this.locale,{label:e("Link")});return t.children.add(this.backButtonView,0),t}_createProvidersListView(){let e=new B(this.locale);return e.extendTemplate({attributes:{class:["ck-link-form__providers-list"]}}),e.items.bindTo(this.providersListChildren).using(t=>{let o=new A(this.locale);return o.children.add(t),o}),e}_createDisplayedTextInput(){let e=this.locale.t,t=new de(this.locale,me);return t.label=e("Displayed text"),t.class="ck-labeled-field-view_full-width",t}_createUrlInput(){let e=this.locale.t,t=new de(this.locale,me);return t.fieldView.inputMode="url",t.label=e("Link URL"),t.class="ck-labeled-field-view_full-width",t}_createFormChildren(){this.children.add(new ce(this.locale,{children:[this.displayedTextInputView],class:["ck-form__row_large-top-padding"]})),this.children.add(new ce(this.locale,{children:[this.urlInputView,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding","ck-form__row_large-bottom-padding"]}))}get url(){let{element:e}=this.urlInputView.fieldView;return e?e.value.trim():null}},z=class extends L{focusTracker=new T;keystrokes=new C;backButtonView;listView;listChildren;emptyListInformation;children;_focusables=new D;_focusCycler;constructor(e){super(e),this.listChildren=this.createCollection(),this.backButtonView=this._createBackButton(),this.listView=this._createListView(),this.emptyListInformation=this._createEmptyLinksListItemView(),this.children=this.createCollection([this._createHeaderView(),this.emptyListInformation]),this.set("title",""),this.set("emptyListPlaceholder",""),this.set("hasItems",!1),this.listenTo(this.listChildren,"change",()=>{this.hasItems=this.listChildren.length>0}),this.on("change:hasItems",(t,o,i)=>{i?(this.children.remove(this.emptyListInformation),this.children.add(this.listView)):(this.children.remove(this.listView),this.children.add(this.emptyListInformation))}),this.keystrokes.set("Esc",(t,o)=>{this.fire("cancel"),o()}),this._focusCycler=new P({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-providers"],tabindex:"-1"},children:this.children})}render(){super.render(),[this.listView,this.backButtonView].forEac
1h(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createListView(){let e=new B(this.locale);return e.extendTemplate({attributes:{class:["ck-link-providers__list"]}}),e.items.bindTo(this.listChildren).using(t=>{let o=new A(this.locale);return o.children.add(t),o}),e}_createBackButton(){let e=this.locale.t,t=new w(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:V,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createHeaderView(){let e=new S(this.locale);return e.bind("label").to(this,"title"),e.children.add(this.backButtonView,0),e}_createEmptyLinksListItemView(){let e=new L(this.locale);return e.setTemplate({tag:"p",attributes:{class:["ck","ck-link__empty-list-info"]},children:[{text:this.bindTemplate.to("emptyListPlaceholder")}]}),e}},j=class extends L{focusTracker=new T;keystrokes=new C;backButtonView;children;listChildren;_focusables=new D;_focusCycler;constructor(e){super(e),this.backButtonView=this._createBackButton(),this.listChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView(),this._createListView()]),this._focusCycler=new P({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-properties"],tabindex:"-1"},children:this.children}),this.keystrokes.set("Esc",(t,o)=>{this.fire("back"),o()})}render(){super.render(),[...this.listChildren,this.backButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBackButton(){let e=this.locale.t,t=new w(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:V,tooltip:!0}),t.delegate("execute").to(this,"back"),t}_createHeaderView(){let e=this.locale.t,t=new S(this.locale,{label:e("Link properties")});return t.children.add(this.backButtonView,0),t}_createListView(){let e=new B(this.locale);return e.extendTemplate({attributes:{class:["ck-link__list"]}}),e.items.bindTo(this.listChildren).using(t=>{let o=new A(this.locale);return o.children.add(t),o}),e}},K=class extends w{arrowView;constructor(e){super(e),this.set({withText:!0}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-link__button"]}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){let e=new Oe;return e.content=De,e}},k="link-ui",v=class extends x{toolbarView=null;formView=null;linkProviderItemsView=null;propertiesView=null;_balloon;_linksProviders=new te;static get requires(){return[le,b]}static get pluginName(){return"LinkUI"}static get isOfficialPlugin(){return!0}init(){let e=this.editor,t=this.editor.t;this.set("selectedLinkableText",void 0),e.editing.view.addObserver(Se),this._balloon=e.plugins.get(le),this._registerComponents(),this._registerEditingOpeners(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:k,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:k,view:(o,{writer:i})=>{if(!o.markerRange.isCollapsed)return null;let r=i.createUIElement("span");return i.addClass(["ck-fake-link-selection","ck-fake-link-selection_collapsed"],r),r}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Create link"),keystroke:I},{label:t("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.propertiesView&&this.propertiesView.destroy(),this.formView&&this.formView.destroy(),this.toolbarView&&this.toolbarView.destroy(),this.linkProviderItemsView&&this.linkProviderItemsView.destroy()}registerLinksListProvider(e){let t=this._linksProviders.filter(o=>(o.order||0)<=(e.order||0)).length;this._linksProviders.add(e,t)}_createViews(){let e=this.editor.commands.get("link");this.toolbarView=this._createToolbarView(),this.formView=this._createFormView(),e.manualDecorators.length&&(this.propertiesView=this._createPropertiesView()),this._enableUserBalloonInteractions()}_createToolbarView(){let e=this.editor,t=new Ne(e.locale),o=e.commands.get("link");t.class="ck-link-toolbar";let i=e.config.get("link.toolbar");return o.manualDecorators.length||(i=i.filter(r=>r!=="linkProperties")),t.fillFromConfig(i,e.ui.componentFactory),t.keystrokes.set("Esc",(r,s)=>{this._hideUI(),s()}),t.keystrokes.set(I,(r,s)=>{this._addFormView(),s()}),e.ui.addToolbar(t,{isContextual:!0,beforeFocus:()=>{this._getSelectedLinkElement()&&!this._isToolbarVisible&&this._showUI(!0)},afterBlur:()=>{this._hideUI(!1)}}),t}_createFormView(){let e=this.editor,t=e.locale.t,o=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),r=new(ae(W))(e.locale,ht(e));return r.displayedTextInputView.bind("isEnabled").to(this,"selectedLinkableText",s=>s!==void 0),r.urlInputView.bind("isEnabled").to(o,"isEnabled"),r.saveButtonView.bind("isEnabled").to(o,"isEnabled"),r.saveButtonView.bind("label").to(o,"value",s=>t(s?"Update":"Insert")),this.listenTo(r,"submit",()=>{if(r.isValid()){let s=r.urlInputView.fieldView.element.value,a=Y(s,i),l=r.displayedTextInputView.fieldView.element.value;e.execute("link",a,this._getDecoratorSwitchesState(),l!==this.selectedLinkableText?l:void 0),this._closeFormView()}}),this.listenTo(r.urlInputView,"change:errorText",()=>{e.ui.update()}),this.listenTo(r,"cancel",()=>{this._closeFormView()}
1),r.keystrokes.set("Esc",(s,a)=>{this._closeFormView(),a()}),r.providersListChildren.bindTo(this._linksProviders).using(s=>this._createLinksListProviderButton(s)),r}_createLinkProviderListView(e){return e.getListItems().map(({href:t,label:o,icon:i})=>{let r=new w;return r.set({label:o,icon:i,tooltip:!1,withText:!0}),r.on("execute",()=>{this.formView.resetFormStatus(),this.formView.urlInputView.fieldView.value=t,this.editor.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),r})}_createLinkProviderItemsView(e){let t=this.editor,o=t.locale.t,i=new z(t.locale),{emptyListPlaceholder:r,label:s}=e;return i.emptyListPlaceholder=r||o("No links available"),i.title=s,this.listenTo(i,"cancel",()=>{t.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),i}_createPropertiesView(){let e=this.editor,t=this.editor.commands.get("link"),o=new(ae(j))(e.locale);return this.listenTo(o,"back",()=>{e.editing.view.focus(),this._removePropertiesView()}),o.listChildren.bindTo(t.manualDecorators).using(i=>{let r=new Ue(e.locale);return r.set({label:i.label,withText:!0}),r.bind("isOn").toMany([i,t],"value",(s,a)=>a===void 0&&s===void 0?!!i.defaultValue:!!s),r.on("execute",()=>{i.set("value",!r.isOn),e.execute("link",t.value,this._getDecoratorSwitchesState())}),r}),o}_getDecoratorSwitchesState(){let e=this.editor.commands.get("link");return Array.from(e.manualDecorators).reduce((t,o)=>{let i=e.value===void 0&&o.value===void 0?o.defaultValue:o.value;return{...t,[o.id]:!!i}},{})}_registerEditingOpeners(){this.editor.plugins.get(b)._registerLinkOpener(t=>{let o=this._getLinkProviderLinkByHref(t);if(!o)return!1;let{item:i,provider:r}=o;return r.navigate?r.navigate(i):!1})}_registerComponents(){let e=this.editor;e.ui.componentFactory.add("link",()=>{let t=this._createButton(w);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:link",()=>{let t=this._createButton(He);return t.set({role:"menuitemcheckbox"}),t}),e.ui.componentFactory.add("linkPreview",t=>{let o=new N(t),i=e.config.get("link.allowedProtocols"),r=e.commands.get("link"),s=t.t;o.bind("isEnabled").to(r,"value",l=>!!l),o.bind("href").to(r,"value",l=>l&&X(l,i));let a=l=>{if(!l){o.label=void 0,o.icon=void 0,o.tooltip=s("Open link in new tab");return}let c=this._getLinkProviderLinkByHref(l);if(c){let{label:m,tooltip:u,icon:d}=c.item;o.label=m,o.tooltip=u||!1,o.icon=d}else o.label=l,o.icon=void 0,o.tooltip=s("Open link in new tab")};return a(r.value),this.listenTo(r,"change:value",(l,c,m)=>{a(m)}),this.listenTo(o,"navigate",(l,c,m)=>{let u=this._getLinkProviderLinkByHref(c);if(!u)return;let{provider:d,item:f}=u,{navigate:h}=d;h&&h(f)&&(l.stop(),m())}),o}),e.ui.componentFactory.add("unlink",t=>{let o=e.commands.get("unlink"),i=new w(t),r=t.t;return i.set({label:r("Unlink"),icon:Fe,tooltip:!0}),i.bind("isEnabled").to(o),this.listenTo(i,"execute",()=>{e.execute("unlink"),this._hideUI()}),i}),e.ui.componentFactory.add("editLink",t=>{let o=e.commands.get("link"),i=new w(t),r=t.t;return i.set({label:r("Edit link"),icon:Me,tooltip:!0}),i.bind("isEnabled").to(o),this.listenTo(i,"execute",()=>{this._addFormView()}),i}),e.ui.componentFactory.add("linkProperties",t=>{let o=e.commands.get("link"),i=new w(t),r=t.t;return i.set({label:r("Link properties"),icon:Re,tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled",o,"value",o,"manualDecorators",(s,a,l)=>s&&!!a&&l.length>0),this.listenTo(i,"execute",()=>{this._addPropertiesView()}),i})}_createLinksListProviderButton(e){let t=this.editor.locale,o=new K(t);return o.set({label:e.label}),this.listenTo(o,"execute",()=>{this._showLinksProviderView(e)}),o}_createButton(e){let t=this.editor,o=t.locale,i=t.commands.get("link"),r=new e(t.locale),s=o.t;return r.set({label:s("Link"),icon:se,keystroke:I,isToggleable:!0}),r.bind("isEnabled").to(i,"isEnabled"),r.bind("isOn").to(i,"value",a=>!!a),this.listenTo(r,"execute",()=>{t.editing.view.scrollToTheSelection(),this._showUI(!0),this._getSelectedLinkElement()&&this._addFormView()}),r}_enableBalloonActivators(){let e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),e.keystrokes.set(I,(o,i)=>{i(),e.commands.get("link").isEnabled&&(e.editing.view.scrollToTheSelection(),this._showUI(!0))})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(e,t)=>{this._isToolbarVisible&&!this.toolbarView.focusTracker.isFocused&&(this.toolbarView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),We({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>{this._hideUI(!1)}})}_addToolbarView(){this.toolbarView||this._createViews(),!this._isToolbarInPanel&&this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;let e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this.formView.backButtonView.isVisible=e.isEnabled&&!!e.value,this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.selectedLinkableText=this._getSelectedLinkableText(),this.formView.displayedTextInputView.fieldView.value=this.selectedLinkableText||"",this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_addPropertiesView(){this.propertiesView||this._createViews(),!this._arePropertiesInPanel&&(this.propertiesView.disableCssTransitions(),this._balloon.add({view:this.propertiesView,position:this._getBalloonPositionData()}),this.propertiesView.enableCssTransitions(),this.propertiesView.focus())}_showLinksProviderView(e){this.linkProviderItemsView&&this._removeLinksProviderView(),this.linkProviderItemsView=this._createLinkProviderItemsView(e),this._addLinkProviderItemsView(e)}_addLinkProviderItemsView(e){this.linkProviderItemsView.listChildren.clear(),this.linkProviderItemsView.listChildren.addMany(this._createLinkProviderListView(e)),this._balloon.add({view:this.linkProviderItemsView,position:this._getBalloonPositionData()}),this.linkProviderItemsView.focus()}_closeFormView(){let e=this.editor.commands.get("link");this.selectedLinkableText=void 0,e.value!==void 0?this._removeFormView():this._hideUI()}_removePropertiesView(){this._arePropertiesInPanel&&this._balloon.remove(this.propertiesView)}_removeLinksProviderView(){this._isLinksListInPanel&&this._balloon.remove(this.linkProviderItemsView)}_removeFormView(e=!0){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.displayedTextInputView.fieldView.reset(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),e&&this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._isToolbarVisible?this._addFormView():this._addToolbarView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addToolbarView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpd
1atingUI()}_hideUI(e=!0){let t=this.editor;this._isUIInPanel&&(this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e&&t.editing.view.focus(),this._removeLinksProviderView(),this._removePropertiesView(),this._removeFormView(e),this._isToolbarInPanel&&this._balloon.remove(this.toolbarView),this._hideFakeVisualSelection())}_startUpdatingUI(){let e=this.editor,t=e.editing.view.document,o=this._getSelectedLinkElement(),i=s(),r=()=>{let a=this._getSelectedLinkElement(),l=s();o&&!a||!o&&l!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),o=a,i=l};function s(){return t.selection.focus.getAncestors().reverse().find(a=>a.is("element"))}this.listenTo(e.ui,"update",r),this.listenTo(this._balloon,"change:visibleView",r)}get _arePropertiesInPanel(){return!!this.propertiesView&&this._balloon.hasView(this.propertiesView)}get _isLinksListInPanel(){return!!this.linkProviderItemsView&&this._balloon.hasView(this.linkProviderItemsView)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _isToolbarInPanel(){return!!this.toolbarView&&this._balloon.hasView(this.toolbarView)}get _isPropertiesVisible(){return!!this.propertiesView&&this._balloon.visibleView===this.propertiesView}get _isFormVisible(){return!!this.formView&&this._balloon.visibleView==this.formView}get _isToolbarVisible(){return!!this.toolbarView&&this._balloon.visibleView===this.toolbarView}get _isUIInPanel(){return this._arePropertiesInPanel||this._isLinksListInPanel||this._isFormInPanel||this._isToolbarInPanel}get _isUIVisible(){return this._isPropertiesVisible||this._isLinksListInPanel||this._isFormVisible||this._isToolbarVisible}_getBalloonPositionData(){let e=this.editor.editing.view,t=e.document;if(this.editor.model.markers.has(k)){let i=this.editor.editing.mapper.markerNameToElements(k);if(i){let r=Array.from(i),s=e.createRange(e.createPositionBefore(r[0]),e.createPositionAfter(r[r.length-1]));return{target:e.domConverter.viewRangeToDom(s)}}}return{target:()=>{let i=this._getSelectedLinkElement();return i?e.domConverter.mapViewToDom(i):e.domConverter.viewRangeToDom(t.selection.getFirstRange())}}}_getSelectedLinkElement(){let e=this.editor.editing.view,t=e.document.selection,o=t.getSelectedElement();if(t.isCollapsed||o&&je(o))return ue(t.getFirstPosition());{let i=t.getFirstRange().getTrimmed(),r=ue(i.start),s=ue(i.end);return!r||r!=s?null:e.createRangeIn(r).getTrimmed().isEqual(i)?r:null}}_getSelectedLinkableText(){let e=this.editor.model,t=this.editor.editing,o=this._getSelectedLinkElement();if(!o)return F(e.document.selection.getFirstRange());let i=t.view.createRangeOn(o),r=t.mapper.toModelRange(i);return F(r)}_getLinkProviderLinkByHref(e){if(!e)return null;for(let t of this._linksProviders){let o=t.getItem?t.getItem(e):t.getListItems().find(i=>i.href===e);if(o)return{provider:t,item:o}}return null}_showFakeVisualSelection(){let e=this.editor.model;e.change(t=>{let o=e.document.selection.getFirstRange();if(e.markers.has(k))t.updateMarker(k,{range:o});else if(o.start.isAtEnd){let i=o.start.getLastMatchingPosition(({item:r})=>!e.schema.isContent(r),{boundaries:o});t.addMarker(k,{usingOperation:!1,affectsData:!1,range:t.createRange(i,o.end)})}else t.addMarker(k,{usingOperation:!1,affectsData:!1,range:o})})}_hideFakeVisualSelection(){let e=this.editor.model;e.markers.has(k)&&e.change(t=>{t.removeMarker(k)})}};function ue(n){return n.getAncestors().find(e=>Ge(e))||null}function ht(n){let e=n.t,t=n.config.get("link.allowCreatingEmptyLinks");return[o=>{if(!t&&!o.url.length)return e("Link URL must not be empty.")}]}var gt=4,Qe=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63}))|localhost)(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i"),wt=2,q=class extends x{static get requires(){return[Ie,b]}static get pluginName(){return"AutoLink"}static get isOfficialPlugin(){return!0}init(){let t=this.editor.model.document.selection;t.on("change:range",()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?y(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){let i=this.editor.model,r=i.document.selection,s=r.getFirstPosition(),a=r.getLastPosition(),l=t.getJoined(this._expandLinkRange(i,s)||t);l&&(l=l.getJoined(this._expandLinkRange(i,a)||t)),l&&(l.start.isBefore(s)||l.end.isAfter(a))&&e.setSelection(l)}_enablePasteLinking(){let e=this.editor,t=e.model,o=t.document.selection,i=e.plugins.get("ClipboardPipeline"),r=e.commands.get("link");i.on("inputTransformation",(s,a)=>
1{if(!this.isEnabled||!r.isEnabled||o.isCollapsed||a.method!=="paste"||o.rangeCount>1)return;let l=o.getFirstRange(),c=a.dataTransfer.getData("text/plain");if(!c)return;let m=c.match(Qe);m&&m[2]===c&&(t.change(u=>{this._selectEntireLinks(u,l),r.execute(c)}),s.stop())},{priority:"high"})}_enableTypingHandling(){let e=this.editor,t=new Ve(e.model,o=>{let i=o;if(!kt(i))return;i=i.slice(0,-1),"!.:,;?".includes(i[i.length-1])&&(i=i.slice(0,-1));let r=qe(i);if(r)return{url:r,removedTrailingCharacters:o.length-i.length}});t.on("matched:data",(o,i)=>{let{batch:r,range:s,url:a,removedTrailingCharacters:l}=i;if(!r.isTyping)return;let c=s.end.getShiftedBy(-l),m=c.getShiftedBy(-a.length),u=e.model.createRange(m,c);this._applyAutoLink(a,u)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){let e=this.editor,t=e.model,o=e.commands.get("enter");o&&o.on("execute",()=>{let i=t.document.selection.getFirstPosition(),r;i.parent.previousSibling?.is("element")?r=t.createRangeIn(i.parent.previousSibling):r=t.createRange(t.createPositionAt(i.parent,0),i),this._checkAndApplyAutoLinkOnRange(r)})}_enableShiftEnterHandling(){let e=this.editor,t=e.model,o=e.commands.get("shiftEnter");o&&o.on("execute",()=>{let i=t.document.selection.getFirstPosition(),r=t.createRange(t.createPositionAt(i.parent,0),i.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(r)})}_checkAndApplyAutoLinkOnRange(e){let t=this.editor.model,{text:o,range:i}=Le(e,t),r=qe(o);if(r){let s=t.createRange(i.end.getShiftedBy(-r.length),i.end);this._applyAutoLink(r,s)}}_applyAutoLink(e,t){let o=this.editor.model,i=this.editor.config.get("link.defaultProtocol"),r=Y(e,i);!this.isEnabled||!bt(t,o)||!ge(r)||xt(t)||this._persistAutoLink(r,t)}_persistAutoLink(e,t){let o=this.editor.model,i=this.editor.plugins.get("Delete");o.enqueueChange(r=>{r.setAttribute("linkHref",e,t),o.enqueueChange(()=>{i.requestUndoOnBackspace()})})}};function kt(n){return n.length>gt&&n[n.length-1]===" "&&n[n.length-2]!==" "}function qe(n){let e=Qe.exec(n);return e?e[wt]:null}function bt(n,e){return e.schema.checkAttributeInSelection(e.createSelection(n),"linkHref")}function xt(n){let e=n.start.nodeAfter;return!!e&&e.hasAttribute("linkHref")}var pe=class extends x{static get requires(){return[b,v,q]}static get pluginName(){return"Link"}static get isOfficialPlugin(){return!0}},G=class extends x{static get requires(){return["ImageEditing","ImageUtils",b]}static get pluginName(){return"LinkImageEditing"}static get isOfficialPlugin(){return!0}afterInit(){let e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(It(e)),e.conversion.for("downcast").add(_t(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){let e=this.editor,o=e.commands.get("link").automaticDecorators;o.length&&e.conversion.for("downcast").add(o.getDispatcherForLinkedImage())}_enableManualDecorators(){let e=this.editor,t=e.commands.get("link");for(let o of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:o.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:o.id}),e.conversion.for("downcast").add(Vt(o)),e.conversion.for("upcast").add(Lt(e,o))}};function It(n){let e=n.plugins.has("ImageInlineEditing"),t=n.plugins.get("ImageUtils");return o=>{o.on("element:a",(i,r,s)=>{let a=r.viewItem,l=t.findViewImgElement(a);if(!l)return;let c=l.findAncestor(f=>t.isBlockImageView(f));if(e&&!c)return;let m={attributes:["href"]};if(!s.consumable.consume(a,m))return;let u=a.getAttribute("href");if(!u)return;let d=r.modelCursor.parent;if(!d.is("element","imageBlock")){let f=s.convertItem(l,r.modelCursor);r.modelRange=f.modelRange,r.modelCursor=f.modelCursor,d=r.modelCursor.nodeBefore}d&&d.is("element","imageBlock")&&s.writer.setAttribute("linkHref",u,d)},{priority:"high"})}}function _t(n){let e=n.plugins.get("ImageUtils");return t=>{t.on("attribute:linkHref:imageBlock",(o,i,r)=>{if(!r.consumable.consume(i.item,o.name))return;let s=r.mapper.toViewElement(i.item),a=r.writer,l=Array.from(s.getChildren()).find(u=>
1u.is("element","a")),c=e.findViewImgElement(s),m=c.parent.is("element","picture")?c.parent:c;if(l)i.attributeNewValue?a.setAttribute("href",i.attributeNewValue,l):(a.move(a.createRangeOn(m),a.createPositionAt(s,0)),a.remove(l));else{let u=a.createContainerElement("a",{href:i.attributeNewValue});a.insert(a.createPositionAt(s,0),u),a.move(a.createRangeOn(m),a.createPositionAt(u,0))}},{priority:"high"})}}function Vt(n){return e=>{e.on(`attribute:${n.id}:imageBlock`,(t,o,i)=>{let r=i.mapper.toViewElement(o.item),s=Array.from(r.getChildren()).find(a=>a.is("element","a"));if(s){if(n.value===void 0){for(let a in n.attributes)i.writer.removeAttribute(a,s);n.classes&&i.writer.removeClass(n.classes,s);for(let a in n.styles)i.writer.removeStyle(a,s);return}for(let[a,l]of E(n.attributes))i.writer.setAttribute(a,l,s);n.classes&&i.writer.addClass(n.classes,s);for(let a in n.styles)i.writer.setStyle(a,n.styles[a],s)}})}}function Lt(n,e){let t=n.plugins.has("ImageInlineEditing"),o=n.plugins.get("ImageUtils");return i=>{i.on("element:a",(r,s,a)=>{let l=s.viewItem,c=o.findViewImgElement(l);if(!c)return;let m=c.findAncestor(h=>o.isBlockImageView(h));if(t&&!m)return;let d=new Ae(e._createPattern()).match(l);if(!d||!a.consumable.consume(l,d.match))return;let f=s.modelCursor.nodeBefore||s.modelCursor.parent;a.writer.setAttribute(e.id,!0,f)},{priority:"high"})}}var $=class extends x{static get requires(){return[b,v,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}static get isOfficialPlugin(){return!0}init(){let e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(o,i)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(i.preventDefault(),o.stop())},{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){let e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",o=>{let i=new w(o),r=e.plugins.get("LinkUI"),s=e.commands.get("link");return i.set({isEnabled:!0,label:t("Link image"),icon:se,keystroke:I,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(s,"isEnabled"),i.bind("isOn").to(s,"value",a=>!!a),this.listenTo(i,"execute",()=>{this._isSelectedLinkedImage(e.model.document.selection)?r._addToolbarView():r._showUI(!0)}),i})}_isSelectedLinkedImage(e){let t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}},he=class extends x{static get requires(){return[G,$]}static get pluginName(){return"LinkImage"}static get isOfficialPlugin(){return!0}};export{q as AutoLink,M as AutomaticLinkDecorators,pe as Link,O as LinkCommand,b as LinkEditing,W as LinkFormView,he as LinkImage,G as LinkImageEditing,$ as LinkImageUI,U as LinkManualDecorator,j as LinkPropertiesView,z as LinkProviderItemsView,v as LinkUI,H as UnlinkCommand,I as _LINK_KEYSTROKE,K as _LinkButtonView,N as _LinkPreviewButtonView,fe as _createLinkElement,X as _ensureSafeLinkUrl,F as _extractTextFromLinkRange,$e as _getLocalizedLinkDecorators,ge as _hasLinkProtocol,Ye as _isEmailLink,Xe as _normalizeLinkDecorators,Je as _openLink,Y as addLinkProtocolIfApplicable,X as ensureSafeUrl,Ge as isLinkElement,R as isLinkableElement};
2/*! Bundled license information:
3
4@ckeditor/ckeditor5-link/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-link$dist$index.js.(YTUMFURA).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.