function humanDigits(t,e){return 2==e.length?1==t?e[0]:e[1]:e[5
'),this.options.clickable)if(!0===this.options.clickable)if(this.element==this.emptydropzone){var i,o=N.getElements("#"+this.emptydropzone.getAttribute("id")+" .tu-clickable","clickable");for(this.clickableElements=[this.originalelement],i=0;i'),this.element.appendChild(e)),(i=e.getElementsByTagName("span")[0])&&(null!=i.textContent?i.textContent=this.options.dicts[this.options.locale].fallbackMessage:null!=i.innerText&&(i.innerText=this.options.dicts[this.options.locale].fallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t){var e,i={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;return!this.options.thumbnailWidth&&!this.options.thumbnailHeight&&(e=this.elementid,e=document.getElementById(e))&&(this.options.thumbnailWidth=e.getBoundingClientRect().width),i.optWidth=this.options.thumbnailWidth,i.optHeight=this.options.thumbnailHeight,null==i.optWidth&&null==i.optHeight?(i.optWidth=i.srcWidth,i.optHeight=i.srcHeight):null==i.optWidth?i.optWidth=o*i.optHeight:null==i.optHeight&&(i.optHeight=1/o*i.optWidth),e=i.optWidth/i.optHeight,t.heightthis.options.fileNameSize&&(t.textContent=t.textContent.substring(0,this.options.fileNameSize-3)+"...");for(s=0,n=(p=i.previewElement.querySelectorAll("[data-tu-size]")).length;s'+this.options.dicts[this.options.locale].removeFile+""),i.previewElement.appendChild(i._removeLink))}if(f=this,o=function(t){return t.preventDefault(),t.stopPropagation(),i.status===N.UPLOADING?N.confirm(f.options.dicts[f.options.locale].cancelUploadConfirmation,function(){return f.removeFile(i)}):f.options.dicts[f.options.locale].removeFileConfirmation?N.confirm(f.options.dicts[f.options.locale].removeFileConfirmation,function(){return f.removeFile(i)}):f.removeFile(i)},c=[],i.previewElement)for(r=0,a=(d=i.previewElement.querySelectorAll("[data-tu-remove]")).length;r
Upload only images
'),t.previewElement.appendChild(u),u=t.previewElement.querySelector(".tu-uploader-multiple-img-item-error-text")),u.innerHTML=e,N.addClass(t.previewElement,"tu-uploader-multiple-img-item-error"));else if(this.previewsContainer){this.previewsContainer.classList.add("tu-popup-progressbar-error");var n,a,u=this.previewsContainer.querySelector("[data-tu-errormessage]"),p=(u?(u.textContent=e,n="Upload error >",(a=this.previewsContainer.querySelector(".tu-popup-progressbar-error-title"))&&(25<(n=void 0!==e?e:n).length&&(n=n.substring(0,23)+"..."),a.textContent=n)):((u=document.getElementById("tu-global-error-container"))||((u=N.createElement('
')).style.display="none",document.body.appendChild(u)),u.childNodes[u.childNodes.length-1].innerHTML=e,u.style.display="block",window.setTimeout(function(){var t=document.getElementById("tu-global-error-container");t&&(t.style.display="none")},5e3)),this);window.setTimeout(function(){p.previewsContainer.classList.add("tu-popup-progressbar-start"),p.previewsContainer.classList.remove("tu-popup-progressbar-error")},5e3)}else if(t.previewElement)for(t.previewElement.classList.add("tu-error"),"string"!=typeof e&&e.error&&(e=e.error),l=[],o=0,s=(r=t.previewElement.querySelectorAll("[data-tu-errormessage]")).length;o
'},D=function(){for(var t,e,i,o=arguments[0],s=2<=arguments.length?u.call(arguments,1):[],r=0,l=s.length;r'},N.prototype.createUploadButtonHTML=function(t){return'
Upload error >
Image files allowed only
'+t+'
0KB
'+this.options.dicts[this.options.locale].uploading+'
'},N.prototype.getAcceptedFiles=function(){for(var t,e=this.files,i=[],o=0,s=e.length;o'+this.options.dicts[this.options.locale].defaultMessage+"")),n=this,(s=function(){n.hiddenFileInput&&n.hiddenFileInput.parentNode.removeChild(n.hiddenFileInput),n.hiddenFileInput=document.createElement("input"),n.hiddenFileInput.setAttribute("type","file"),(null==n.options.maxFiles||1"),e+='',e=N.createElement(e),"FORM"!==this.element.tagName?(t=N.createElement('
')).appendChild(e):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:e)},N.prototype.getExistingFallback=function(){for(var t,e=function(t){for(var e,i=0,o=t.length;i"+(l=Math.round(10*l)/10)+" "+n}return""},N.prototype.sizeUploadedFiles=function(){var t,e=0,i="";if(this.files&&0"+(e=(e=""+e).substring(0,4))+" "+i}return""},N.prototype._updateMaxFilesReachedClass=function(){return this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles&&01024*this.options.maxFilesize*1024?e(this.options.dicts[this.options.locale].fileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):N.isValidFile(t,this.options.acceptedFiles)?this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles&&0t.status===N.SUCCESS)?(t=(t=this.options.originalelement)?t.getAttribute("id"):"",(t=document.getElementById(t+"-previews"))&&t.classList.remove("tu-popup-progressbar-error"),this.enableUploadAllBtn()):this.disableUploadAllBtn()},N.prototype.removeAllFiles=function(t){var e,i,o,s;for(null==t&&(t=!1),i=0,o=(s=this.files.slice()).length;i")}r=25<(s=""==s?"Upload only image files":s).length?s.substring(0,23)+"...":s;var a=o.querySelector(".tu-popup-progressbar-error-title");a&&(a.innerHTML=r),o.querySelector(".tu-popup-progressbar-error-text").innerHTML=s,window.setTimeout(function(){o.classList.remove("tu-popup-progressbar-error"),o.classList.add("tu-popup-progressbar-start")},5e3)}else{a=document.getElementById(p+"-progress");a&&(N.setPositionForProgressLine(e),a.style.backgroundColor="#ff2222")}null!=i&&void 0!==i&&i.onUserFail&&!i.options.uploadMultiple&&i.onUserFail.call(i,u,t)}}}),e.addEventListener("timeout",function(){td__showBubbleNotice("Request timeout (loading image). Please reload the page and try again.",3e4,"error"),l(this,"timeout")}),e.addEventListener("abort",function(){l.call(this,"abort")}),e.addEventListener("error",function(){l.call(this,"error")}),e.upload&&e.upload.addEventListener("progress",function(t){var e;t.lengthComputable&&(e=Math.ceil(t.loaded/t.total*100),d.emit("progress",e,t.loaded))},!1),e.send(r),d.emit("uploadprogress",null,0,0)},N.prototype.done=function(t){return this.onUserDone=t,this},N.prototype.fail=function(t){return this.onUserFail=t,this},N.prototype.progress=function(t){return this.onUserProgress=t,this},N}()).version="4.3.0",l.options={},l.optionsForElement=function(t){if(t.getAttribute("id"))return l.options[e(t.getAttribute("id"))]},l.instances=[],l.forElement=function(t){if(null==(null!=(t="string"==typeof t?document.querySelector(t):t)?t.tildaupload:void 0))throw new Error("No Tildaupload found for given element. This is probably because you're trying to access it before Tildaupload had the time to initialize. Use the `init` option to setup any additional observers on your Tildaupload.");return t.tildaupload},l.autoDiscover=!0,l.discover=function(){var t,e,r,i,o,s;for(document.querySelectorAll?r=document.querySelectorAll(".tildaupload"):(r=[],(t=function(t){for(var e,i=[],o=0,s=t.length;os[e].end&&o.style[e]>s[e].end)&&(l=0>1;return 0==(t=o/r)?1:t},n=function(t,e,i,o,s,r,l,n,a,u){var p=d(e);return t.drawImage(e,i,o,s,r,l,n,a,u/p)},t=function(e,i){var o=!1,t=!0,s=e.document,r=s.documentElement,l=s.addEventListener?"addEventListener":"attachEvent",n=s.addEventListener?"removeEventListener":"detachEvent",a=s.addEventListener?"":"on",u=function(t){if("readystatechange"!==t.type||"complete"===s.readyState)return("load"===t.type?e:s)[n](a+t.type,u,!1),!o&&(o=!0)?i.call(e,t.type||t):void 0},p=function(){try{r.doScroll("left")}catch(t){return void setTimeout(p,50)}return u("poll")};if("complete"!==s.readyState){if(s.createEventObject&&r.doScroll){try{t=!e.frameElement}catch(t){console.log(t)}t&&p()}return s[l](a+"DOMContentLoaded",u,!1),s[l](a+"readystatechange",u,!1),e[l](a+"load",u,!1)}},l._autoDiscoverFunction=function(){if(l.autoDiscover)return l.discover()},t(window,l._autoDiscoverFunction)}.call(this),"https://upload.tildacdn.com/api/upload/"),Tildavideoupload_URL="https://videoupload.tildaapi.com/api/upload/";function tu_onReady(t){"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)}TUWidget={urlUploadAPI:Tildaupload_URL,locale:"EN",dicts:{EN:{defaultMessage:"Drop files here to upload",fallbackMessage:"Your browser does not support drag'n'drop file uploads.",fallbackText:"Please use the fallback form below to upload your files like in the olden days.",fileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",invalidFileType:"You can't upload files of this type.",responseError:"Server responded with {{statusCode}} code.",cancelUpload:"Cancel upload",cancelUploadConfirmation:"Are you sure you want to cancel this upload?",removeFile:"Remove file",removeFileConfirmation:null,removeAll:"Remove All",browseFiles:"Browse files",fileFromTheWeb:"File from the web",maxFilesExceeded:"You can not upload any more files.",buttonUploadLink:"Upload",buttonUpload:"Upload file",buttonUploads:"Upload files",buttonUploadImage:"Upload image",buttonUploadImages:"Upload images",backToLocalUpload:"Back to local upload",uploadToLink:"Upload from URL",uploadToPaste:"Paste",attentionToLink:"Grab any file off the web. Just provide the link",pasteLink:"Paste your link here",uploading:"Uploading...",uploadSelected:"Upload selected",selected:"You've selected {cnt} files",settings:{big:"Enable 1920px wide image uploading",attentionToBig:"By default, images are resized to 1680px. Wider images increase page load time and negatively affect SEO, conversion rates, and user experience"},uploadCanceled:"Upload canceled",videoSize:"Upload video (up to 5 MB)"},RU:{defaultMessage:"Бросьте файл сюда для загрузки",fallbackMessage:"Ваш браузер не поддерживает drag'n'drop",fallbackText:"Please use the fallback form below to upload your files like in the olden days",fileTooBig:"Файл слишком большой ({{filesize}}MiB). Максимальный размер: {{maxFilesize}}MiB",invalidFileType:"Вы не можете загрузить файл этого типа",responseError:"Сервер получил ответ {{statusCode}} код.",cancelUpload:"Отмена загрузки",cancelUploadConfirmation:"Вы действительно хотите отменить загрузку?",removeFile:"Удалить файл",removeFileConfirmation:null,removeAll:"Удалить все",browseFiles:"Посмотреть файлы",maxFilesExceeded:"Вы не можете больше загружать файлы",fileFromTheWeb:"Файл по ссылке",buttonUploadLink:"Загрузить",buttonUpload:"Загрузить файл",buttonUploads:"Загрузить файлы",buttonUploadImage:"Загрузить изображение",buttonUploadImages:"Загрузить изображения",uploadToLink:"Загрузка по ссылке",uploadToPaste:"Вставить",backToLocalUpload:"Вернуться к загрузке файлов с компьютера",attentionToLink:"Загрузите любой файл из сети. Просто укажите ссылку",pasteLink:"Вставьте ссылку сюда",uploading:"Загрузка...",uploadSelected:"Загрузить выбранное",selected:"Вы выбрали {cnt}",settings:{big:"Разрешить загрузку до 1920px",attentionToBig:"По умолчанию загруженные изображения сжимаются до 1680px. При использовании опции страницы могут загружаться медленнее, что может негативно повлиять на SEO, конверсию и опыт использования сайта"},uploadCanceled:"Загрузка отменена",videoSize:"Загрузить видео (до 5 MB)"}},settings:{big:""}},tu_onReady(function(){var t=document.body.getAttribute("data-lang")||window.lang,e=(TUWidget.locale="RU"==t?"RU":"EN",document.querySelector("[data-tu-ondrag-hide=yes]"));e&&Array.prototype.forEach.call(["dragstart","dragenter","dragover"],function(t){e.addEventListener(t,function(){var t="none"===window.getComputedStyle(void 0).display;t&&(t=window.getComputedStyle(t).display,e.setAttribute("data-tu-old-display",t),e.style.display="none")})})});var isTildaUploudBig=document.cookie.split(";").some(function(t){return 0<=t.trim().indexOf("Tildaupload_BIG=y")});function fadeIn(t,e,i){if(("1"===getComputedStyle(t).opacity||""===getComputedStyle(t).opacity)&&"none"!==getComputedStyle(t).display)return!1;var o=0,e=0<(e=parseInt(e))?e/10:40,s=(t.style.opacity=o,t.style.display="block",setInterval(function(){t.style.opacity=o,1<=(o+=.1)&&(clearInterval(s),"function"==typeof i)&&i()},e))}function fadeOut(t,e,i){e=parseInt(e);var o=10,s=setInterval(function(){--o,t.style.opacity=10===o?1:"0."+o,0===o&&(clearInterval(s),t.style.display="none",t.style.removeProperty("opacity"),"function"==typeof i)&&i()},0\t
\t\t
\t\t\t\t\t
\t\t
\t\t\t
\t\t\t
\t\t
\t\t
\t\t\t
\t\t\t
\t\t\t\t
\t\t\t\t\t\x3c!-- Muliple screen --\x3e\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].removeAll+'\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].uploadSelected+'\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
\t\t\t\t\t\x3c!-- uploader main screen --\x3e\t\t\t\t\t
\t\t\t\t\t\t\x3c!-- settings --\x3e\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].settings.attentionToBig+'\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\x3c!-- multiple --\x3e\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].defaultMessage+'\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].browseFiles+'\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\x3c!-- /end multiple --\x3e\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].defaultMessage+'\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].buttonUpload+'\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\x3c!-- uploader url screen --\x3e\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].fileFromTheWeb+'\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t'+TUWidget.dicts[TUWidget.locale].attentionToLink+'\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t
\t\t\t
\t\t
\t
"},TUWidget.showUploader=function(){fadeIn(document.getElementById("tu-popup"),200);var t=document.querySelector(".tu-popup-content");fadeIn(t,10,function(){t.classList.add("tu-popup-content-scale")})},TUWidget.hideUploader=function(t){var e=document.getElementById("tu-popup");if(!e)return!1;fadeOut(e,400),document.body.classList.remove("tu-opened"),document.body.classList.remove("t-body_popupshowed");var i=e.querySelector(".tu-popup-content"),i=(i&&i.classList.remove("tu-popup-content-scale"),window.tu_flag_widget_ui_focus=!1,e.getAttribute("tu-id")),o=window["tu_"+i],i=document.getElementById(i);void 0!==i&&(o.element=i),o.options.uploadMultiple&&0===o.getActiveFiles().length&&0{e.remove()},0),document.removeEventListener("paste",TUWidget.popupPasteHandler)},TUWidget.sortFiles=function(){var s,r,t,e=document.getElementById("tu-popup");e&&(t=e.getAttribute("tu-id"),(s=window["tu_"+t]).files)&&0 div"),Array.prototype.forEach.call(r,function(t){t.style.width="0"})):(n=parseInt(d.style.paddingLeft)||0,a=parseInt(d.style.paddingRight)||0,u=d.clientWidth-(n+a),d&&d.classList.contains("tn-atom__img")?d.insertAdjacentHTML("afterend",p='
\t
'):(p=`
`,d.insertAdjacentHTML("afterend",p))),t.previewElement=null):"INPUT"!==i&&("" div"),Array.prototype.forEach.call(r,function(t){t.style.width="0"})):(l={left:d.getBoundingClientRect().left+window.scrollX,top:d.getBoundingClientRect().top+window.scrollY},n=parseInt(d.style.paddingLeft)||0,a=parseInt(d.style.paddingRight)||0,p='
\t
',d.insertAdjacentHTML("beforebegin",p)),t.previewElement=null):e&&e.insertAdjacentHTML("beforeend",p='
\t
")))}),p.on("uploadprogress",function(t,e){var i=this.originalelement,o=i.getAttribute("id"),o=document.getElementById(o+"-progress");this.onUserProgress&&!this.options.uploadMultiple?this.onUserProgress.call(this,e,t):o&&(Tildaupload.setPositionForProgressLine(i),e*=.8,(t=o.querySelector("div")).style.width=e+"%",80==e)&&Tildaupload.animate(t,{width:{start:80,end:95,step:1}},"slow")}),n&&(p.on("addedfiles",function(t){var e,i=this.originalelement,o=i.getAttribute("id"),s=(window["tu_"+o+"_last_file"]=t[t.length-1],document.getElementById(o+"-previews")),o=document.getElementById(o+"-progress");this.disableUploadAllBtn(),s?((e=s.querySelector("[data-tu-uploadprogress]"))&&(e.style.width="0"),s.classList.remove("tu-popup-progressbar-start"),s.classList.remove("tu-popup-progressbar-completed"),s.classList.remove("tu-popup-progressbar-uploaded"),s.classList.add("tu-processing"),(e=s.querySelector("[data-tu-name]"))&&(e.innerHTML="Uploading "+t.length+" files"),(e=s.querySelector("[data-tu-size]"))&&(e.innerHTML=this.sizeUploadedFiles())):o&&(Tildaupload.setPositionForProgressLine(i),o.querySelector("div").style.width="0")}),p.on("totaluploadprogress",function(t){var e,i,o=this.originalelement,s=o.getAttribute("id"),r=document.getElementById(s+"-progress"),s=document.getElementById(s+"-previews"),l=document.getElementById("tu-popup");this.options.uploadMultiple&&(this.onUserProgress?this.onUserProgress.call(this,t):(r?(Tildaupload.setPositionForProgressLine(o),r.querySelector("div").style.width=t+"%"):this.originalelement&&"INPUT"===this.originalelement.nodeName.toUpperCase()&&s&&(o=s.querySelector("[data-tu-uploadprogress]"))&&(o.style.width=parseInt(t,10)+"%"),this.options.uploadMultiple&&l&&(r=this.files.length,(o=l.querySelector(".tu-js-selected"))&&(o.style.display="inline-block"),(t=l.querySelector(".tu-js-removeall"))&&(t.style.display="none"),e=l.querySelector(".tu-uploader-multiple-nav-title"),i=l.querySelector(".tu-uploader-multiple-title"),l=l.querySelector(".tu-popup-content"),0==r?(e.innerHTML="Drop file here",i.innerHTML="",l.classList.remove("tu-uploader-multiple-screen"),l.classList.remove("tu-uploader-has-miltiple-img"),o.style.display="none",t.style.display="none"):("RU"==this.options.locale?(l=humanDigits(r,["файл","файла","файлов"]),i.innerHTML="Вы выбрали "+r+" "+l,e.innerHTML="Вы выбрали "+r+" "+l):(i.innerHTML="You've selected "+(r+=1==r?" file":" files"),e.innerHTML="You've selected "+r),o.style.display="inline-block",1'))}),p.on("success",function(t,e){var i=this.originalelement,o=i.getAttribute("id"),s=i.nodeName.toUpperCase(),r="",l="Upload error",n=(t.tuInfo||(t.tuInfo={}),e);if("string"==typeof e&&console.log("_[#"+o+"] success event error: "+e),(e=e&&"string"==typeof e&&"{"==e.substring(0,1)?JSON.parse(e):e)&&e.result&&0':s&&(s.innerHTML=e.result[0].cdnUrl):r=e.result[0].error&&""")}else e&&"""),"IMG"==s?(i.style.opacity=1,e&&setTimeout(function(){fadeOut(e,20,function(){e.remove()})},500)):e?setTimeout(function(){fadeOut(e,20,function(){e.remove()})},500):(i=(s=document.getElementById(o+"-previews"))&&s.querySelector("[data-tu-size]"),s&&i&&(i.innerHTML=this.filesize(t.size))))}),p.on("queuecomplete",function(){this.options.uploadMultiple||this.removeAllFiles()}),window["tu_"+r]=p,"undefined"!=typeof $&&$(e).data("tildaupload",p),Array.isArray(window.tu_ids)||(window.tu_ids=[]),window.tu_ids.push(r),i&&(s=document.getElementById(i))&&s.addEventListener("click",function(t){t.preventDefault();t=s.classList.contains("tu-uploadvideo-button");return TUWidget.openPopup(e,t),!1}),p};