Submit
Path:
~
/
home
/
getwphos
/
public_html
/
organizedproductivity
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
File Content:
text-path.e17f48a91199337badc8.bundle.js
/*! elementor - v3.12.2 - 23-04-2023 */ "use strict"; (self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["text-path"],{ /***/ "../modules/shapes/assets/js/frontend/handlers/text-path.js": /*!******************************************************************!*\ !*** ../modules/shapes/assets/js/frontend/handlers/text-path.js ***! \******************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _utils = __webpack_require__(/*! elementor-frontend/utils/utils */ "../assets/dev/js/frontend/utils/utils.js"); class TextPathHandler extends elementorModules.frontend.handlers.Base { getDefaultSettings() { return { selectors: { pathContainer: '.e-text-path', svg: '.e-text-path > svg' } }; } getDefaultElements() { const { selectors } = this.getSettings(); const element = this.$element[0]; return { widgetWrapper: element, pathContainer: element.querySelector(selectors.pathContainer), svg: element.querySelector(selectors.svg), textPath: element.querySelector(selectors.textPath) }; } /** * Initialize the object. * * @return {void} */ onInit() { this.elements = this.getDefaultElements(); this.fetchSVG().then(() => { // Generate unique IDs using the wrapper's `data-id`. this.pathId = `e-path-${this.elements.widgetWrapper.dataset.id}`; this.textPathId = `e-text-path-${this.elements.widgetWrapper.dataset.id}`; if (!this.elements.svg) { return; } this.initTextPath(); }); } /** * Fetch & Inject the SVG markup. * * @return {Promise} success */ fetchSVG() { const { url } = this.elements.pathContainer.dataset; if (!url || !url.endsWith('.svg')) { return Promise.reject(url); } return fetch(url).then(res => res.text()).then(svg => { this.elements.pathContainer.innerHTML = svg; // Re-initialize the elements, so the SVG tag will be added. this.elements = this.getDefaultElements(); }); } /** * Gets a text offset (relative to the starting point) as a string or int, and set it as percents to the * `startOffset` attribute of the `<textPath>` element. * * @param {string|number} offset The text start offset. * * @return {void} */ setOffset(offset) { if (!this.elements.textPath) { return; } if (this.isRTL()) { offset = 100 - parseInt(offset); } this.elements.textPath.setAttribute('startOffset', offset + '%'); } /** * Handle element settings changes. * * @param {Object} setting The settings object from the editor. * * @return {void} */ onElementChange(setting) { const { start_point: startPoint, text } = this.getElementSettings(); switch (setting) { case 'start_point': this.setOffset(startPoint.size); break; case 'text': this.setText(text); break; case 'text_path_direction': this.setOffset(startPoint.size); this.setText(text); break; default: break; } } /** * Attach a unique ID to the `path` element in the SVG, based on the container's ID. * This function selects the first `path` with a `data-path-anchor` attribute, or defaults to the first `path` element. * * @return {void} */ attachIdToPath() { // Prioritize the custom `data` attribute over the `path` element, and fallback to the first `path`. const path = this.elements.svg.querySelector('[data-path-anchor]') || this.elements.svg.querySelector('path'); path.id = this.pathId; } /** * Initialize & build the SVG markup of the widget using the settings from the panel. * * @return {void} */ initTextPath() { const { start_point: startPoint } = this.getElementSettings(); const text = this.elements.pathContainer.dataset.text; this.attachIdToPath(); // Generate the `textPath` element with its settings. this.elements.svg.innerHTML += ` <text> <textPath id="${this.textPathId}" href="#${this.pathId}"></textPath> </text> `; // Regenerate the elements object to have access to `this.elements.textPath`. this.elements.textPath = this.elements.svg.querySelector(`#${this.textPathId}`); this.setOffset(startPoint.size); this.setText(text); } /** * Sets the text on the SVG path, including the link (if set) and its properties. * * @param {string} newText The new text to put in the text path. * * @return {void} */ setText(newText) { const { is_external: isExternal, nofollow } = this.getElementSettings().link; const { linkUrl: url } = this.elements.pathContainer.dataset; const target = isExternal ? '_blank' : '', rel = nofollow ? 'nofollow' : ''; // Add link attributes. if (url) { newText = `<a href="${(0, _utils.escapeHTML)(url)}" rel="${rel}" target="${target}">${(0, _utils.escapeHTML)(newText)}</a>`; } // Set the text. this.elements.textPath.innerHTML = newText; // Remove the cloned element if exists. const existingClone = this.elements.svg.querySelector(`#${this.textPathId}-clone`); if (existingClone) { existingClone.remove(); } // Reverse the text if needed. if (this.shouldReverseText()) { // Keep an invisible selectable copy of original element for better a11y. const clone = this.elements.textPath.cloneNode(); clone.id += '-clone'; clone.classList.add('elementor-hidden'); clone.textContent = newText; this.elements.textPath.parentNode.appendChild(clone); this.reverseToRTL(); } } /** * Determine if the text direction of the widget should be RTL or not, based on the site direction and the widget's settings. * * @return {boolean} is RTL */ isRTL() { const { text_path_direction: direction } = this.getElementSettings(); let isRTL = elementorFrontend.config.is_rtl; if (direction) { isRTL = 'rtl' === direction; } return isRTL; } /** * Determine if it should RTL the text (reversing it, etc.). * * @return {boolean} should RTL */ shouldReverseText() { if (!this.isRTL()) { return false; } const isFirefox = elementorFrontend.utils.environment.firefox; if (isFirefox) { return false; } const isChromium = elementorFrontend.utils.environment.blink; if (isChromium) { return !this.isFixedChromiumVersion(); } return true; } /** * Chromium >= 96 fixed the issue with RTL text in SVG. * * @see https://chromium-review.googlesource.com/c/chromium/src/+/3159942 * @see https://chromium.googlesource.com/chromium/src/+/4f1bc7d6ff8bfbf6348613bdb970fcdc2a706b5a/chrome/VERSION */ isFixedChromiumVersion() { const FIXED_CHROMIUM_VERSION = 96; const currentChromiumVersion = parseInt(navigator.userAgent.match(/(?:Chrom(?:e|ium)|Edg)\/([0-9]+)\./)[1]); return currentChromiumVersion >= FIXED_CHROMIUM_VERSION; } /** * Reverse the text path to support RTL. * * @return {void} */ reverseToRTL() { // Make sure to use the inner `a` tag if exists. let parentElement = this.elements.textPath; parentElement = parentElement.querySelector('a') || parentElement; // Catch all RTL chars and reverse their order. const pattern = /([\u0591-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC\s$&+,:;=?@#|'<>.^*()%!-]+)/ig; // Reverse the text. parentElement.textContent = parentElement.textContent.replace(pattern, word => { return word.split('').reverse().join(''); }); // Add a11y attributes. parentElement.setAttribute('aria-hidden', true); } } exports["default"] = TextPathHandler; /***/ }) }]); //# sourceMappingURL=text-path.e17f48a91199337badc8.bundle.js.map
Submit
FILE
FOLDER
Name
Size
Permission
Action
packages
---
0755
1be27d786af272b43945.bundle.js
19636 bytes
0644
1bef795bdeaafc779b19.bundle.min.js
59816 bytes
0644
41242dd2abc7917a4e40.bundle.js
10792 bytes
0644
468f41fa91dee0f38b7d.bundle.js
52176 bytes
0644
62aed6374b1561fb5fd8.bundle.js
272188 bytes
0644
765551b6f9005a42004c.bundle.js
64597 bytes
0644
82916c9aba5712bca47c.bundle.js
12354 bytes
0644
acc61395c1134c30c981.bundle.min.js
3966 bytes
0644
accordion.8799675460c73eb48972.bundle.min.js
3743 bytes
0644
accordion.d0e98fa492444fcce9f9.bundle.js
7529 bytes
0644
adadcfdaada40ff3919c.bundle.min.js
23248 bytes
0644
admin-feedback.js
4640 bytes
0644
admin-feedback.min.js
1976 bytes
0644
admin-modules.js
18122 bytes
0644
admin-modules.min.js
6458 bytes
0644
admin-top-bar.js
65923 bytes
0644
admin-top-bar.min.js
10819 bytes
0644
admin.js
86522 bytes
0644
admin.min.js
39088 bytes
0644
alert.5c23f364fd0f1ece78ac.bundle.js
1140 bytes
0644
alert.cbc2a0fee74ee3ed0419.bundle.min.js
624 bytes
0644
announcements-app.js
97452 bytes
0644
announcements-app.min.js
25515 bytes
0644
announcements-app.min.js.LICENSE.txt
149 bytes
0644
app-loader.js
263851 bytes
0644
app-loader.min.js
91253 bytes
0644
app-packages.js
357043 bytes
0644
app-packages.min.js
122338 bytes
0644
app-packages.min.js.LICENSE.txt
149 bytes
0644
app.js
809054 bytes
0644
app.min.js
294309 bytes
0644
app.min.js.LICENSE.txt
637 bytes
0644
beta-tester.js
23185 bytes
0644
beta-tester.min.js
9448 bytes
0644
common-modules.js
299096 bytes
0644
common-modules.min.js
104444 bytes
0644
common.js
424851 bytes
0644
common.min.js
158788 bytes
0644
common.min.js.LICENSE.txt
149 bytes
0644
container-converter.js
55125 bytes
0644
container-converter.min.js
19228 bytes
0644
container.0fe1d3abe4a4fd76f033.bundle.min.js
2977 bytes
0644
container.ce4736775f29926cf0bb.bundle.js
5551 bytes
0644
counter.02cef29c589e742d4c8c.bundle.min.js
912 bytes
0644
counter.6e06639071a3da2a8059.bundle.js
1628 bytes
0644
dev-tools.js
24531 bytes
0644
dev-tools.min.js
7689 bytes
0644
df16c9d56464dd4f0800.bundle.min.js
13480 bytes
0644
editor-document.js
75168 bytes
0644
editor-document.min.js
27131 bytes
0644
editor-loader-v1.js
393 bytes
0644
editor-loader-v1.min.js
88 bytes
0644
editor-loader-v2.js
963 bytes
0644
editor-loader-v2.min.js
512 bytes
0644
editor-modules.js
105023 bytes
0644
editor-modules.min.js
42690 bytes
0644
editor.js
2625168 bytes
0644
editor.min.js
1085545 bytes
0644
editor.min.js.LICENSE.txt
149 bytes
0644
elementor-admin-bar.js
19798 bytes
0644
elementor-admin-bar.min.js
7536 bytes
0644
f44354f947a948ef36c9.bundle.min.js
4251 bytes
0644
frontend-modules.js
147851 bytes
0644
frontend-modules.min.js
42288 bytes
0644
frontend.js
103111 bytes
0644
frontend.min.js
40591 bytes
0644
gutenberg.js
6089 bytes
0644
gutenberg.min.js
2974 bytes
0644
image-carousel.624de4dfcf054f3ddaa7.bundle.min.js
3388 bytes
0644
image-carousel.a3907df0152c390cff84.bundle.js
6905 bytes
0644
import-export-admin.js
15537 bytes
0644
import-export-admin.min.js
6328 bytes
0644
kit-elements-defaults-editor.js
92561 bytes
0644
kit-elements-defaults-editor.min.js
36253 bytes
0644
kit-elements-defaults-editor.min.js.LICENSE.txt
149 bytes
0644
kit-library.1101176ec8af9d357159.bundle.js
232033 bytes
0644
kit-library.9b6fdf0970e61d76a49f.bundle.min.js
90403 bytes
0644
lightbox.10bc81bc33e5bd8f8073.bundle.min.js
30017 bytes
0644
lightbox.d1807324971bbc117b97.bundle.js
52361 bytes
0644
nested-elements.js
20986 bytes
0644
nested-elements.min.js
6379 bytes
0644
nested-tabs.js
29893 bytes
0644
nested-tabs.min.js
12625 bytes
0644
nested-tabs.min.js.LICENSE.txt
149 bytes
0644
new-template.js
15880 bytes
0644
new-template.min.js
6841 bytes
0644
notes.js
26295 bytes
0644
notes.min.js
9750 bytes
0644
onboarding.3e3dea382a15b3aaa603.bundle.min.js
52722 bytes
0644
onboarding.9ee547c8074641c253ee.bundle.js
120313 bytes
0644
preloaded-modules.js
84527 bytes
0644
preloaded-modules.min.js
44791 bytes
0644
progress.ca55d33bb06cee4e6f02.bundle.min.js
655 bytes
0644
progress.ddc47ad5120f8813e430.bundle.js
1239 bytes
0644
responsive-bar.js
26758 bytes
0644
responsive-bar.min.js
11998 bytes
0644
tabs.c2af5be7f9cb3cdcf3d5.bundle.min.js
3705 bytes
0644
tabs.dc22ac11bf840003dd7f.bundle.js
7456 bytes
0644
text-editor.2c35aafbe5bf0e127950.bundle.min.js
1360 bytes
0644
text-editor.904ef93cc88acb021fdd.bundle.js
2800 bytes
0644
text-path.b50b3e74488a4e302613.bundle.min.js
3255 bytes
0644
text-path.e17f48a91199337badc8.bundle.js
8100 bytes
0644
toggle.29e5a34bb6e51dab4600.bundle.js
7560 bytes
0644
toggle.31881477c45ff5cf9d4d.bundle.min.js
3770 bytes
0644
video.82d55b692da440a65954.bundle.js
7010 bytes
0644
video.d86bfd0676264945e968.bundle.min.js
3499 bytes
0644
web-cli.js
510382 bytes
0644
web-cli.min.js
177943 bytes
0644
web-cli.min.js.LICENSE.txt
149 bytes
0644
webpack.runtime.js
15384 bytes
0644
webpack.runtime.min.js
4958 bytes
0644
wp-audio.4368a4a260548f3c083a.bundle.js
781 bytes
0644
wp-audio.75f0ced143febb8cd31a.bundle.min.js
349 bytes
0644
N4ST4R_ID | Naxtarrr