4401function t_forms__showWrongPageUrlMessage(canonicalUrl) {4402if (!canonicalUrl) {4403return;4404}44054406const popupId = 'tildaforms-origin-url-popup-notification';44074408const existingPopup = document.getElementById(popupId);44094410if (existingPopup) {4411show(existingPopup);4412return;
} const html = ` <div id="${popupId}" class="t-form-success-popup t-form-success-popup_new" role="dialog" aria-modal="true" tabindex="-1" aria-label="Wrong Page URL"> <div class="t-form-success-popup__wrapper"> <button type="button" class="t-form-success-popup__close-icon" aria-label="Закрыть диалоговое окно"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none"> <path fill="#000" fill-rule="evenodd" d="M7 5.863 1.138 0 0 1.138 5.862 7 0 12.862 1.137 14 7 8.137 12.863 14 14 12.862 8.138 7 14 1.138 12.863 0 7.001 5.863Z" clip-rule="evenodd" opacity=".4"></path> </svg> </button> <svg class="t-form-success-popup__content-icon" xmlns="http://www.w3.org/2000/svg" width="41" height="41" viewBox="0 0 21 21" fill="none" data-app="Xyris"> <circle cx="10.5" cy="10.5" r="10.5" fill="#F87A61"/> <path d="M10.0781 13.1562L9.64844 7.08594V4.54688H11.3906V7.08594L10.9844 13.1562H10.0781ZM9.71094 16V14.3984H11.3281V16H9.71094Z" fill="white"/> </svg> <div class="t-form-success-popup__title t-title">${t_forms__getMsg('cached_page_popup_title')}</div> <div class="t-form-success-popup__text t-text">${t_forms__getMsg('cached_page_popup_text')}</div> <a href="${canonicalUrl}" class="t-form-success-popup__button t-btn">${t_forms__getMsg('cached_page_popup_btn')}</a> </div> </div> `; document.body.insertAdjacentHTML('beforeend', html); const popup = document.getElementById(popupId); const closeButton = popup.querySelector('.t-form-success-popup__close-icon'); t_addEventListener(popup, 'click', function (event) { const clickEvent = event || window.event; const target = clickEvent.target || clickEvent.srcElement; if (target === this) { hide(popup); } }); t_addEventListener(closeButton, 'click', function () { hide(popup); }); show(popup); function show(popup) { t_fadeIn(popup); t_addClass(document.body, 't-body_success-popup-showed'); if (t_forms__isIOS()) { setTimeout(function () { window.tildaForm.lockBodyScroll(); }, 500); } t_forms__trapFocus(popup); } function hide(popup) { t_removeClass(document.body, 't-body_success-popup-showed'); if (t_forms__isIOS()) { window.tildaForm.unlockBodyScroll(); } t_fadeOut(popup); }}/** * Обработчик урла и его query-параметров, который проставляет * значения на существующие поля форм на странице. * @param {event | {}} event */function t_forms__processGetParameters(event = {}) { if (!window.URLSearchParams || t_forms__getTildaMode() !== 'published') return; const params = new URLSearchParams(window.location.search); if (!params?.size) return; const { currentTarget } = event; let inputSelectors = [ '.t-select', '.t-input', '.t-rate', '.t-radio', '.t-checkbox', '.t-img-select',