PageSourceSearch

https://sesilab.com.br/o/frontend-editor-ckeditor-web/__liferay__/…ckeditor$ckeditor5-minimap$dist$index.js.js

js sesilab.com.br collected 2026-10-04 15:01:01 UTC 9,564 bytes, 62 lines download raw bytes

1var S=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var O=(o,t)=>{for(var e in t)S(o,e,{get:t[e],enumerable:!0})},v=(o,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of I(t))!A.call(o,n)&&n!==e&&S(o,n,{get:()=>t[n],enumerable:!(i=H(t,n))||i.enumerable});return o},h=(o,t,e)=>(v(o,t,"default"),e&&v(e,t,"default"));var k={};O(k,{Minimap:()=>T,_MinimapIframeView:()=>w,_MinimapPositionTrackerView:()=>b,_MinimapView:()=>y,_cloneMinimapEditingViewDomRoot:()=>x,_getMinimapClientHeight:()=>D,_getMinimapDomElementRect:()=>f,_getMinimapPageStyles:()=>E,_getMinimapScrollable:()=>R});var u={};h(u,Y);import*as Y from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-core$dist$index.js.js";var r={};h(r,U);import*as U from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-utils$dist$index.js.js";var l={};h(l,z);import*as z from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-ui$dist$index.js.js";var m={};h(m,N);import*as N from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-engine$dist$index.js.js";var C=(0,r.toUnit)("px"),w=class extends l.IframeView{_options;constructor(t,e){super(t);let i=this.bindTemplate;this.set("top",0),this.set("height",0),this._options=e,this.extendTemplate({attributes:{tabindex:-1,"aria-hidden":"true",class:["ck-minimap__iframe"],style:{top:i.to("top",n=>C(n)),height:i.to("height",n=>C(n))}}})}render(){return super.render().then(()=>{this._prepareDocument()})}setHeight(t){this.height=t}setTopOffset(t){this.top=t}_prepareDocument(){let t=this.element.contentWindow.document,e=t.adoptNode(this._options.domRootClone),i=this._options.useSimplePreview?`
2			.ck.ck-editor__editable_inline img {
3				filter: contrast( 0 );
4			}
5
6			p, li, a, figcaption, span {
7				background: hsl(0, 0%, 80%) !important;
8				color: hsl(0, 0%, 80%) !important;
9			}
10
11			h1, h2, h3, h4 {
12				background: hsl(0, 0%, 60%) !important;
13				color: hsl(0, 0%, 60%) !important;
14			}
15		`:"",s=`<!DOCTYPE html><html lang="en">
16			<head>
17				<meta charset="utf-8">
18				<meta name="viewport" content="width=device-width, initial-scale=1">
19				${this._options.pageStyles.map(a=>typeof a=="string"?`<style>${a}</style>`:`<link rel="stylesheet" type="text/css" href="${a.href}">`).join(`
20`)}
21				<style>
22					html, body {
23						margin: 0 !important;
24						padding: 0 !important;
25					}
26
27					html {
28						overflow: hidden;
29					}
30
31					body {
32						transform: scale( ${this._options.scaleRatio} );
33						transform-origin: 0 0;
34						overflow: visible;
35					}
36
37					.ck.ck-editor__editable_inline {
38						margin: 0 !important;
39						border-color: transparent !important;
40						outline-color: transparent !important;
41						box-shadow: none !important;
42					}
43
44					.ck.ck-content {
45						background: white;
46					}
47
48					${i}
49				</style>
50			</head>
51			<body class="${this._options.extraClasses||""}"></body>
52		</html>`;t.open(),t.write(s),t.close(),t.body.appendChild(e)}},P=(0,r.toUnit)("px"),b=class extends l.View{constructor(t){super(t);let e=this.bindTemplate;this.set("height",0),this.set("top",0),this.set("scrollProgress",0),this.set("_isDragging",!1),this.setTemplate({tag:"div",attributes:{class:["ck","ck-minimap__position-tracker",e.if("_isDragging","ck-minimap__position-tracker_dragging")],style:{top:e.to("top",i=>P(i)),height:e.to("height",i=>P(i))},"data-progress":e.to("scrollProgress")},on:{mousedown:e.to(()=>{this._isDragging=!0})}})}render(){super.render(),this.listenTo(r.global.document,"mousemove",(t,e)=>{this._isDragging&&this.fire("drag",e.movementY)},{useCapture:!0}),this.listenTo(r.global.document,"mouseup",()=>{this._isDragging=!1},{useCapture:!0})}setHeight(t){this.height=t}setTopOffset(t){this.top=t}setScrollProgress(t){this.scrollProgress=t}},y=class extends l.View{_positionTrackerView;_scaleRatio;_minimapIframeView;constructor({locale:t,scaleRatio:e,pageStyles:i,extraClasses:n,useSimplePreview:s,domRootClone:a}){super(t);let g=this.bindTemplate;this._positionTrackerView=new b(t),this._positionTrackerView.delegate("drag").to(this),this._scaleRatio=e,this._minimapIframeView=new w(t,{useSimplePreview:s,pageStyles:i,extraClasse
52s:n,scaleRatio:e,domRootClone:a}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-minimap"]},children:[this._positionTrackerView],on:{click:g.to(this._handleMinimapClick.bind(this)),wheel:g.to(this._handleMinimapMouseWheel.bind(this))}})}destroy(){this._minimapIframeView.destroy(),super.destroy()}get height(){return new r.Rect(this.element).height}get scrollHeight(){return Math.max(0,Math.min(this.height,this._minimapIframeView.height)-this._positionTrackerView.height)}render(){super.render(),this._minimapIframeView.render(),this.element.appendChild(this._minimapIframeView.element)}setContentHeight(t){this._minimapIframeView.setHeight(t*this._scaleRatio)}setScrollProgress(t){let e=this._minimapIframeView,i=this._positionTrackerView;if(e.height<this.height)e.setTopOffset(0),i.setTopOffset((e.height-i.height)*t);else{let n=e.height-this.height;e.setTopOffset(-n*t),i.setTopOffset((this.height-i.height)*t)}i.setScrollProgress(Math.round(t*100))}setPositionTrackerHeight(t){this._positionTrackerView.setHeight(t*this._scaleRatio)}_handleMinimapClick(t){let e=this._positionTrackerView;if(t.target===e.element)return;let i=new r.Rect(e.element),s=(t.clientY-i.top-i.height/2)/this._minimapIframeView.height;this.fire("click",s)}_handleMinimapMouseWheel(t){this.fire("drag",t.deltaY*this._scaleRatio)}};function x(o,t){let e=o.editing.view.document,i=e.getRoot(t),n=new m.ViewDomConverter(e),s=new m.ViewRenderer(n,e.selection),a=o.editing.view.getDomRoot().cloneNode();return n.bindElements(a,i),s.markToSync("children",i),s.markToSync("attributes",i),i.on("change:children",(g,p)=>s.markToSync("children",p)),i.on("change:attributes",(g,p)=>s.markToSync("attributes",p)),i.on("change:text",(g,p)=>s.markToSync("text",p)),s.render(),o.editing.view.on("render",()=>s.render()),o.on("destroy",()=>{n.unbindDomElement(a)}),a}function E(){return Array.from(r.global.document.styleSheets).map(o=>o.href&&!o.href.startsWith(r.global.window.location.origin)?{href:o.href}:Array.from(o.cssRules).filter(t=>!(t instanceof CSSMediaRule)).map(t=>t.cssText).join(` 
53`))}function f(o){return new r.Rect(o===r.global.document.body?r.global.window:o)}function D(o){return o===r.global.document.body?r.global.window.innerHeight:o.clientHeight}function R(o){return o===r.global.document.body?r.global.window:o}var T=class extends u.Plugin{static get pluginName(){return"Minimap"}static get isOfficialPlugin(){return!0}_minimapView;_scrollableRootAncestor;_editingRootElement;init(){let t=this.editor;this._minimapView=null,this._scrollableRootAncestor=null,this.listenTo(t.ui,"ready",this._onUiReady.bind(this))}destroy(){super.destroy(),this._minimapView.destroy(),this._minimapView.element.remove()}_onUiReady(){let t=this.editor,e=this._editingRootElement=t.ui.getEditableElement();if(this._scrollableRootAncestor=(0,r.findClosestScrollableAncestor)(e),!e.ownerDocument.body.contains(e)){t.ui.once("update",this._onUiReady.bind(this));return}this._initializeMinimapView(),this.listenTo(t.editing.view,"render",()=>{t.state==="ready"&&this._syncMinimapToEditingRootScrollPosition()}),this._syncMinimapToEditingRootScrollPosition()}_initializeMinimapView(){let t=this.editor,e=t.locale,i=t.config.get("minimap.useSimplePreview"),n=t.config.get("minimap.container"),s=this._scrollableRootAncestor,a=f(this._editingRootElement).width,p=f(n).width/a,c=this._minimapView=new y({locale:e,scaleRatio:p,pageStyles:E(),extraClasses:t.config.get("minimap.extraClasses"),useSimplePreview:i,domRootClone:x(t)});c.render(),c.listenTo(r.global.document,"scroll",(V,d)=>{if(s===r.global.document.body){if(d.target!==r.global.document)return}else if(d.target!==s)return;this._syncMinimapToEditingRootScrollPosition()},{useCapture:!0,usePassive:!0}),c.listenTo(r.global.window,"resize",()=>{this._syncMinimapToEditingRootScrollPosition()}),c.on("drag",(V,d)=>{let _;c.scrollHeight===0?_=0:_=d/c.scrollHeight;let M=_*(s.scrollHeight-D(s));R(s).scrollBy(0,Math.round(M))}),c.on("click",(V,d)=>{let _=d*s.scrollHeight;R(s).scrollBy(0,Math.round(_))}),n.appendChild(c.element)}_syncMinimapToEditingRootScrollPosition(){let t=this._editingRootElement,e=this._minimapView;e.setContentHeight(t.offsetHeight);let i=f(t),n=f(this._scrollableRootAncestor),s;n.getIntersection(i)&&(n.contains(i)||i.top>n.top?s=0:(s=(i.top-n.top)/(n.height-i.height),s=Math.max(0,Math.min(s,1))),e.setPositionTrackerHeight(n.getIntersection(i).height),e.setScrollProgress(s))}};var{Minimap:G,_MinimapIframeView:J,_MinimapPositionTrackerView:K,_MinimapView:L,_cloneMinimapEditingViewDomRoot:Q,_getMinimapClientHeight:X,_getMinimapDomElementRect:Z,_getMinimapPageStyles:tt,_getMinimapScrollable:et,__esModule:it}=k;export{G as Minimap,J as _MinimapIframeView,K as _MinimapPositionTrackerView,L as _MinimapView,it as __esMo
53dule,Q as _cloneMinimapEditingViewDomRoot,X as _getMinimapClientHeight,Z as _getMinimapDomElementRect,tt as _getMinimapPageStyles,et as _getMinimapScrollable};
54/*! Bundled license information:
55
56@ckeditor/ckeditor5-minimap/dist/index.js:
57  (**
58   * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
59   * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
60   *)
61*/
62//# sourceMappingURL=@ckeditor$ckeditor5-minimap$dist$index.js.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.