!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TedoCharts=e():t.TedoCharts=e()}(this,(()=>(()=>{"use strict";var t={56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},72:t=>{var e=[];function n(t){for(var n=-1,a=0;a{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},197:(t,e,n)=>{n.d(e,{A:()=>s});var a=n(601),r=n.n(a),o=n(314),l=n.n(o)()(r());l.push([t.id,"/* Стили для основного контейнера */\n.tt_chart__bubbles--main_wrapper {\n\tposition: relative;\n\tdisplay: flex;\n\tgap: 30px;\n\twidth: 100%;\n\tmax-width: 960px;\n\theight: 680px;\n\tmargin: auto !important;\n\tpadding: 0 0 60px 60px !important;\n}\n/* Стили для контейнера пузырей */\n.tt_chart__bubbles--bubbles_wrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\tborder-bottom-left-radius: 10px;\n}\n/* Стили для текстовых меток осей */\n.tt_chart__bubbles--text_label__y,\n.tt_chart__bubbles--text_label__x {\n\tposition: absolute;\n\tfont-size: 20px;\n}\n.tt_chart__bubbles--text_label__y {\n\tleft: -30px;\n\tbottom: 50%;\n\ttransform: translate(-50%, -50%) rotate(-90deg);\n}\n.tt_chart__bubbles--text_label__x {\n\tleft: 50%;\n\tbottom: -30px;\n\ttransform: translate(-50%, 50%);\n}\n/* Стили для числовых меток */\n.tt_chart__bubbles--number_label__y,\n.tt_chart__bubbles--number_label__c,\n.tt_chart__bubbles--number_label__x {\n\tposition: absolute;\n\tpadding: 10px !important;\n\tborder: 2px solid white;\n\tborder-radius: 10px;\n\tfont-weight: 700;\n}\n.tt_chart__bubbles--number_label__y {\n\ttop: 0;\n\tleft: 0;\n\ttransform: translate(-100%, -25%);\n}\n.tt_chart__bubbles--number_label__c {\n\tbottom: 0;\n\tleft: 0;\n\ttransform: translate(-2px, 2px);\n}\n.tt_chart__bubbles--number_label__x {\n\tbottom: 0;\n\tright: 0;\n\ttransform: translate(20%, 2px);\n}\n/* Стили для контейнера элементов */\n.tt_chart__bubbles--items_wrapper {\n\tposition: absolute;\n\tleft: 50% !important;\n\ttop: 50% !important;\n\ttransform: translate(-50%, -50%) !important;\n\twidth: 75% !important;\n\theight: 75% !important;\n}\n/* Стили для контейнера пузыря */\n.tt_chart__bubbles--item_container {\n\tposition: absolute;\n\tdisplay: block;\n\ttransform: translate(-50%, 50%);\n}\n/* Стили для фона пузыря */\n.tt_chart__bubbles--bubble_bg {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\tborder-radius: 100%;\n\ttransition: 0.2s ease;\n}\n/* Стили для подписи пузыря */\n.tt_chart__bubbles--bubble_label {\n\tposition: absolute;\n\ttext-wrap: nowrap;\n\ttext-align: center;\n\ttransition: 0.2s ease;\n}\n/* Стили для контейнера легенды */\n.tt_chart__bubbles--legend_container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tgap: 20px;\n}\n/* Стили для элемента легенды */\n.tt_chart__bubbles--legend_item {\n\tdisplay: grid;\n\tgap: 10px;\n\tplace-content: center;\n\tplace-items: center;\n}\n/* Стили для фона элемента легенды */\n.tt_chart__bubbles--legend_bg {\n\taspect-ratio: 2 / 1;\n\tborder-top-left-radius: 110px;\n\tborder-top-right-radius: 110px;\n\tborder-bottom: none !important;\n}\n/* Стили для заголовка легенды */\n.tt_chart__bubbles--legend_label__outer {\n\ttext-align: center;\n\tfont-weight: 700;\n}\n/* Стили для горизонтального расположения */\n.tt_chart__bubbles--main_wrapper.horizontal {\n\tflex-direction: column;\n\tgap: 75px;\n}\n\n.tt_chart__bubbles--legend_container.horizontal {\n\tflex-direction: row;\n\tgap: 20px;\n\talign-items: flex-end;\n}\n\n.tt_chart__bubbles--legend_container.horizontal\n\t.tt_chart__bubbles--legend_label__outer {\n\torder: -1;\n}\n",""]);const s=l},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",a=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),a&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),a&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,a,r,o){"string"==typeof t&&(t=[[null,t,void 0]]);var l={};if(a)for(var s=0;s0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=o),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),r&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=r):p[4]="".concat(r)),e.push(p))}},e}},539:(t,e,n)=>{n.d(e,{A:()=>s});var a=n(601),r=n.n(a),o=n(314),l=n.n(o)()(r());l.push([t.id,".tt_chart__bars {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: auto !important;\n\tpadding: 30px 0 !important;\n\tcolor: white;\n\toverflow: hidden;\n\tgap: 15px;\n}\n\n.tt_chart__bars--wrapper {\n\tmin-height: 40px;\n\tdisplay: grid;\n\tgap: 8px;\n\talign-items: center;\n}\n\n.tt_chart__bars--value_wrapper {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: 0 30px !important;\n}\n\n.tt_chart__bars--bar_line {\n\theight: 10px; /* circleSize/2 */\n\tbackground: linear-gradient(90deg, transparent, #cad9ff 100%, transparent 0%);\n\tfilter: blur(5px);\n\ttransition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);\n}\n\n.tt_chart__bars--bar_circle {\n\tflex-shrink: 0;\n\tmargin-left: 5px !important; /* circleSize/4 */\n\tbackground-color: #cad9ff;\n\tborder-radius: 100%;\n\tbox-shadow: 0px 0px 20px #cad9ff;\n}\n\n.tt_chart__bars--value {\n\tposition: absolute;\n\tleft: 0;\n\tmargin-left: 10px !important;\n\tfont-size: 16px;\n\tfont-weight: 700;\n\ttransition: cubic-bezier(0.25, 1, 0.5, 1);\n}\n\n@media (min-width: 980px) {\n\t.tt_chart__bars {\n\t\tgap: 10px;\n\t}\n\n\t.tt_chart__bars--wrapper {\n\t\tgrid-template-columns: 1fr 2fr;\n\t}\n\n\t.tt_chart__bars--value_wrapper {\n\t\tpadding: 0 30px 0 15% !important;\n\t}\n}\n\n/* Добавьте остальные стили для компонента bar */\n",""]);const s=l},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},601:t=>{t.exports=function(t){return t[1]}},659:t=>{var e={};t.exports=function(t,n){var a=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(a,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},965:(t,e,n)=>{n.d(e,{A:()=>s});var a=n(601),r=n.n(a),o=n(314),l=n.n(o)()(r());l.push([t.id,"/* Основной контейнер */\n.tt_chart__dual_bars--main_wrapper {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 15px;\n\twidth: 100%;\n\tmargin: auto !important;\n\tmax-width: 480px;\n}\n\n/* Вспомогательный элемент для выравнивания сетки */\n.dummy {\n\tdisplay: none;\n}\n\n/* Адаптивная сетка для легенды */\n@media screen and (min-width: 420px) {\n\t.tt_chart__dual_bars--legend_wrapper {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 2fr;\n\t\tgap: 15px;\n\t}\n\t.dummy {\n\t\tdisplay: block;\n\t}\n}\n\n/* Стили для легенды */\n.tt_chart__dual_bars--legend_values_wrapper {\n\tdisplay: grid;\n\tgap: 5px;\n}\n.tt_chart__dual_bars--legend_value_item {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: flex-end;\n}\n.tt_chart__dual_bars--legend_value_item span {\n\tdisplay: inline-block;\n\tfont-size: 12px;\n}\n.tt_chart__dual_bars--legend_items_wrapper {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tgap: 5px;\n}\n.tt_chart__dual_bars--legend_label_wrapper {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 5px;\n}\n.tt_chart__dual_bars--legend_item {\n\twidth: 100%;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tgap: 5px;\n}\n.tt_chart__dual_bars--legend_bg {\n\twidth: 12px;\n\theight: 12px;\n\tmargin-right: 8px !important;\n\tborder-radius: 2px;\n}\n.tt_chart__dual_bars--legend_text,\n.tt_chart__dual_bars--legend_value {\n\tfont-size: 12px;\n}\n\n/* Стили для элементов с барами */\n.tt_chart__dual_bars--item_wrapper {\n\tdisplay: grid;\n\tgap: 15px;\n\n\t@media screen and (min-width: 420px) {\n\t\tgrid-template-columns: 1fr 2fr;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t}\n}\n.tt_chart__dual_bars--link {\n\twidth: 100%;\n\talign-items: center;\n\tfont-size: 12px;\n\tfont-weight: 700;\n\ttext-decoration: underline;\n}\n.tt_chart__dual_bars--bars_wrapper {\n\twidth: 100%;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tgap: 8px;\n\tborder-left: 1px solid rgba(255, 255, 255, 0.4);\n\tborder-right: 1px solid rgba(255, 255, 255, 0.4);\n}\n.tt_chart__dual_bars--bar_wrapper {\n\tposition: relative;\n\twidth: 100%;\n\tdisplay: flex;\n\tgap: 4px;\n}\n.tt_chart__dual_bars--bar_label {\n\tdisplay: none;\n\tposition: absolute;\n\ttop: 50%;\n\ttransform: translateY(-50%);\n\tfont-weight: 700;\n\t@media screen and (min-width: 560px) {\n\t\tdisplay: block;\n\t}\n}\n.tt_chart__dual_bars--bar_line {\n\tborder-radius: 2px;\n\theight: 24px;\n}\n",""]);const s=l}},e={};function n(a){var r=e[a];if(void 0!==r)return r.exports;var o=e[a]={id:a,exports:{}};return t[a](o,o.exports,n),o.exports}function a(t,e){Object.entries(e).forEach((([e,n])=>{t.style[e]=n}))}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0;var r=n(72),o=n.n(r),l=n(825),s=n.n(l),i=n(659),c=n.n(i),p=n(56),d=n.n(p),_=n(540),b=n.n(_),u=n(113),m=n.n(u),f=n(539),h={};h.styleTagTransform=m(),h.setAttributes=d(),h.insert=c().bind(null,"head"),h.domAPI=s(),h.insertStyleElement=b(),o()(f.A,h),f.A&&f.A.locals&&f.A.locals;var x=n(197),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=c().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=b(),o()(x.A,g),x.A&&x.A.locals&&x.A.locals;var y=n(965),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=b(),o()(y.A,v),y.A&&y.A.locals&&y.A.locals;const w={createBarChart:function(t,e=!0){const n="tt_chart__bars",a=document.getElementById(t.id);a.className=`${n} tedo-container`,t.items.forEach((r=>{const o=document.createElement("div");o.className=`${n}--wrapper`;const l=document.createElement("div");l.className=`${n}--label`,l.textContent=r.label,o.appendChild(l);const s=document.createElement("div");s.className=`${n}--value_wrapper`;const i=document.createElement("div");i.className=`${n}--bar_line`;const c=`calc(${r.position}% - 20px - 5px)`;i.style.width=c,i.style.transitionDuration=.0209*r.position+"s",s.appendChild(i),e&&(i.style.width="0",function(t){const e=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(i.style.width=c,e.unobserve(t.target))}))})),n=document.getElementById(t);e.observe(n)}(t.id));const p=document.createElement("div");if(p.className=`${n}--bar_circle`,p.style.width="20px",p.style.height="20px",s.appendChild(p),r.value){const t=document.createElement("div");t.className=`${n}--value`,t.textContent=r.value,s.appendChild(t)}o.appendChild(s),a.appendChild(o)}))},createBubbleChart:function(t){const e={S:"30px",M:"60px",L:"80px"},n={TOP:{bottom:"100%",left:"50%",transform:"translateX(-50%)",paddingBottom:"10px"},TOP_LEFT:{bottom:"100%",right:"100%"},TOP_RIGHT:{bottom:"100%",left:"100%"},BOTTOM:{top:"100%",left:"50%",transform:"translateX(-50%)",paddingTop:"10px"},BOTTOM_LEFT:{top:"100%",right:"100%"},BOTTOM_RIGHT:{top:"100%",left:"100%"},LEFT:{top:"50%",transform:"translateY(-50%)",right:"100%",paddingRight:"10px"},RIGHT:{top:"50%",transform:"translateY(-50%)",left:"100%",paddingLeft:"10px"}};(t=>{const r=document.getElementById(t.id);if(!r||void 0===r)return;const o="tt_chart__bubbles",{config:l}=t;t.items.forEach((({label:t,size:e})=>{t.position=t.position.toUpperCase().replace(/-/g,"_")}));const s=document.createElement("div");s.className=`${o}--main_wrapper`,r.append(s);const i=document.createElement("div");i.className=`${o}--bubbles_wrapper`;const{border:c}=l.layout;c.enabled&&(i.style.borderLeft=`2px solid ${c.color}`,i.style.borderBottom=`2px solid ${c.color}`);const{labels:p}=l.layout,{labels:d}=t;if(p.text.enabled){const t=document.createElement("span");t.className=`${o}--text_label__y`,t.textContent=d.text.y;const e=document.createElement("span");e.className=`${o}--text_label__x`,e.textContent=d.text.x,i.append(t),i.append(e)}if(s.append(i),p.numbers.enabled){const t=document.createElement("span");t.className=`${o}--number_label__y`,t.textContent=d.numbers.y;const e=document.createElement("span");e.className=`${o}--number_label__c`,e.textContent=d.numbers.center;const n=document.createElement("span");n.className=`${o}--number_label__x`,n.textContent=d.numbers.x,i.append(t),i.append(e),i.append(n)}const _=document.createElement("div");_.className=`${o}--items_wrapper`,i.append(_),t.items.forEach(((t,r)=>{const s=document.createElement("a"),i={id:`bubbleItem_${r}`,className:`${o}--item_container`,href:t.link,target:"_blank"};var c,p;c=s,p=i,Object.entries(p).forEach((([t,e])=>{c[t]=e})),a(s,{width:e[t.size],height:e[t.size],bottom:`${t.position.y}%`,left:`${t.position.x}%`});const d=document.createElement("span");d.className=`${o}--bubble_bg`;const{bubbleColors:b}=l.layout,u={backgroundColor:b.deafult,boxShadow:`0 0 10px 3px ${b.deafult}`,border:`1px solid ${b.hover}`};a(d,u);const m=document.createElement("p");m.className=`${o}--bubble_label`;const f={color:b.deafult};a(m,f),m.innerHTML=t.label.text;const h=n[t.label.position];Object.entries(h).forEach((([t,e])=>{m.style[t]=e||n.TOP})),s.addEventListener("mouseenter",(()=>{d.style.boxShadow=`0 0 10px 3px ${b.hover.label}`,d.style.background=b.hover.bubble,m.style.color=b.hover.label})),s.addEventListener("mouseleave",(()=>{d.style.boxShadow=`0 0 10px 3px ${b.deafult}`,d.style.background=b.deafult,m.style.color=b.deafult})),s.append(d),s.append(m),_.append(s)}));const{enabled:b}=t.config.layout.legend;if(b){const n=document.createElement("div");n.className=`${o}--legend_container`,t.config.layout.legend.horizontal&&(n.className+=" horizontal",s.className+=" horizontal"),d.legend.items.forEach(((t,r)=>{const l=document.createElement("div");l.className=`${o}--legend_item ${r+1}`;const s=document.createElement("span");s.className=o+"--legend_bg",a(s,{width:Object.values(e)[r]||e.M,border:`2px dashed ${p.legend.color.items}`});const i=document.createElement("span");i.innerHTML=t,i.style.textAlign="center",l.append(s),l.append(i),n.append(l)}));const r=document.createElement("span");r.className=`${o}--legend_label__outer`,r.textContent=d.legend.title,a(r,{color:p.legend.color.title}),n.append(r),s.append(n)}})(t)},createDualBarChart:function(t){const e=document.getElementById(t.id);if(!e)return;const n="tt_chart__dual_bars",{layout:a}=t.config,r=document.createElement("div");if(r.className=n+"--main_wrapper",e.append(r),a.legend.active){const e=document.createElement("div");e.className=n+"--legend_wrapper";const o=document.createElement("div");o.className="dummy",e.appendChild(o);const l=document.createElement("div");l.className=n+"--legend_items_wrapper",t.labels.forEach(((t,e)=>{const r=document.createElement("div");r.className=n+"--legend_item",0===e&&(r.style.flexDirection="row-reverse");const o=document.createElement("div");o.className=n+"--legend_label_wrapper",0===e&&(o.style.flexDirection="row-reverse");const s=document.createElement("span");s.className=n+"--legend_bg",s.style.backgroundColor=a.colors.bars[e],o.append(s);const i=document.createElement("span");i.className=n+"--legend_text",i.style.color=a.colors.text,i.textContent=t,o.append(i);const c=document.createElement("span");c.className=n+"--legend_value",c.textContent="100%",c.style.color=a.colors.bars[e],r.append(o,c),l.append(r)})),e.appendChild(l),r.append(e)}t.items.forEach((t=>{const e=document.createElement("div");e.className=n+"--item_wrapper";const o=document.createElement("a");o.className=n+"--link",o.href=t.link,o.target="_blank",o.innerHTML=t.label,o.style.color=a.colors.text,e.append(o);const l=document.createElement("div");l.className=n+"--bars_wrapper",t.bars.forEach(((t,e)=>{const r=document.createElement("div");r.className=n+"--bar_wrapper",r.style.justifyContent=0===e?"flex-end":"flex-start";const o=document.createElement("span");o.className=n+"--bar_label",o.style.color=a.colors.bars[e],o.innerHTML="100%",o.style[1===e?"left":"right"]="105%";const s=document.createElement("div");s.className=n+"--bar_line",s.style.width=t+"%",s.style.backgroundColor=a.colors.bars[e],1===e&&(s.style.order="-1"),r.append(s),l.append(r)})),e.append(l),r.append(e)}))}};return"undefined"!=typeof window&&(window.tedoCharts=w),{}})()));