1"use strict";(self.webpackChunksmarty_crm_frontend=self.webpackChunksmarty_crm_frontend||[]).push([[7852],{7924(e,t,n){n.d(t,{h:()=>i});var o,a=n(96540);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(null,arguments)}const i=e=>a.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:7,height:14,viewBox:"0 0 7 14"},e),o||(o=a.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"#201600",strokeWidth:2},a.createElement("path",{d:"m1 4.2 2.5-2.6L6 4.2M6 9l-2.5 2.6L1 9"}))));n.p},41217(e,t,n){n.d(t,{A:()=>g,M:()=>A});var o=n(80045),a=n(64467),s=n(96540),i=n(20053),l=n(69733),r=n(60794),c=n(7924),d=n(38327),f=n(94152),p=n(68263),h=n(3157),u=n(98491),m=n(65231),b=n(95844),C=n(74848);const w=["className","contentClassName","titleClassName","children","title","hideCloseIcon","isWhiteCloseIcon","showExpandButton","isExpanded","onExpandClick","isNotExpanded","isChoiceCountry","isLastModal","onCloseClick","onEnterPress","popModalWindow"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){(0,a.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}class A extends s.PureComponent{constructor(){super(...arguments),(0,a.A)(this,"handleKeyPress",e=>{const{isLastModal:t,onEnterPress:n}=this.props;(0,p.A)(e,"enter")&&e.shiftKey||n&&(0,p.A)(e,"enter")&&t&&(e.preventDefault(),n())}),(0,a.A)(this,"handleCloseClick",()=>{this.props.onCloseClick&&this.props.onCloseClick(),this.props.popModalWindow({type:m.bv6.CANCEL})})}componentDidMount(){window.addEventListener("keypress",this.handleKeyPress)}componentWillUnmount(){window.removeEventListener("keypress",this.handleKeyPress)}render(){const e=this.props,{className:t,contentClassName:n,titleClassName:a,children:s,title:l,hideCloseIcon:p,isWhiteCloseIcon:u,showExpandButton:m,isExpanded:v,onExpandClick:A,isNotExpanded:g,isChoiceCountry:k,isLastModal:y,onCloseClick:j,onEnterPress:N,popModalWindow:E}=e,O=(0,o.A)(e,w);return(0,C.jsxs)("div",x(x({className:(0,i.A)("box-col nowrap radius-4",b.A["widget-universal-window"],{[b.A.expanded]:v},{[b.A["not-expanded"]]:g},{[b.A["choice-country"]]:k},t)},O),{},{children:[!!l&&(0,C.jsx)("b",{className:(0,i.A)("flex-auto",b.A.title,a),children:l}),(0,C.jsx)("div",{className:(0,i.A)("box-col nowrap no-overflow scrollable",b.A.content,n),children:s}),m&&(0,C.jsx)(h.A,{icon:v?r.h:c.h,className:(0,i.A)("box-row align-middle",b.A.wide),onClick:A}),p||(0,C.jsx)(h.A,{icon:u?d.h:f.h,className:(0,i.A)("box-row align-middle",b.A.close),onClick:this.handleCloseClick})]}))}}(0,a.A)(A,"defaultProps",{className:"",contentClassName:"",titleClassName:"",title:"",children:null,isLastModal:!0,hideCloseIcon:!1,showExpandButton:!1,isWhiteCloseIcon:!1,isExpanded:!1,isNotExpanded:!1,isChoiceCountry:!1,onExpandClick:()=>{},onCloseClick:()=>{},onEnterPress:()=>{},popModalWindow:()=>{}});const g=(0,l.Ng)(null,{popModalWindow:u.Vc})(A)},60794(e,t,n){n.d(t,{h:()=>i});var o,a=n(96540);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(null,arguments)}const i=e=>a.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:7,height:13,viewBox:"0 0 7 13"},e),o||(o=a.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"#201600",strokeWidth:2},a.createElement("path",{d:"M6 1.6 3.5 4.2 1 1.6M1 11.6 3.5 9 6 11.6"}))));n.p},61350(e,t,n){n.d(t,{A:()=>o});const o={editFieldModal:"editFieldModal--a1f874b1eb75ef7adfc3",input:"input--b690de201eb37dabc175",radioBlock:"radioBlock--c9c6188a6cc0b3f77952",type:"type--e4380ad76e0fc75e016d",input2:"input2--cffeb7ac9847bbad6ea2",faqBlock:"faqBlock--e5e445288e4665d007e8",faqBlockRedirect:"faqBlockRedirect--c51d674a64fac8ab306a"}},67852(e,t,n){n.r(t),n.d(t,{default:()=>O});var o=n(20053),a=n(96540),s=n(69733),i=n(95551),l=n(9194),r=n(46376),c=n(3055),d=n(43072),f=n(98491),p=n(19118),h=n(41217),u=n(65231),m=n(16249),b=n(19176),C=n(77418),w=n(99784),v=n(39835);n(55915);const x=(0,n(71258).A)("getDefaultsIsAction",(e,t)=>({config:{method:"POST",endpoint:"/ws/:wsId/extbot",data:{authToken:e.authToken,_flowId:e.flowId,confirmationToken:e.confirmationToken,messenger:e.messenger}},options:t}));var A=n(30321),g=n(1596),k=n(91205),y=n(61350),j=n(74848);const N=()=>(0,j.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,j.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 14C25 20.0751 20.0751 25 14 25C7.92487 25 3 20.0751 3 14C3 7.92487 7.92487 3 14 3C20.0751 3 25 7.92487 25 14ZM27 14C27 21.1797 21.1797 27 14 27C6.8203 27 1 21.1797 1 14C1 6.8203 6.8203 1 14 1C21.1797 1 27 6.8203 27 14ZM12.7766 18.2524H15.1642C15.1517 17.4547 15.211 16.9011 15.3421 16.5917C15.4794 16.2822 15.8259 15.8731 16.3814 15.3642C17.4551 14.3808 18.1542 13.6038 18.4788 13.033C18.8096 12.4623 18.975 11.8571 18.975 11.2176C18.975 10.0623 18.5287 9.05145 17.6361 8.185C16.7435 7.31167 15.5419 6.875 14.0313 6.875C12.5956 6.875 11.4346 7.30479 10.5482 8.16437C9.66806 9.02395 9.19366 10.0692 9.125 11.3001L11.5407 11.6302C11.7092 10.7706 12.0182 10.1311 12.4676 9.71161C12.9171 9.29213 13.4757 9.0824 14.1436 9.0824C14.8365 9.0824 15.3858 9.28526 15.7915 9.69098C16.2035 10.0898 16.4095 10.5712 16.4095 11.1351C16.4095 11.5408 16.294 11.9121 16.0631 12.2491C15.9133 12.4623 15.4545 12.9127 14.6867 13.6003C13.9189 14.288 13.4071 14.9069 13.1511 15.457C12.8952 16.0072 12.7673 16.7086 12.7673 17.5613C12.7673 17.6438 12.7704 17.8742 12.7766 18.2524ZM12.7766 19.2529V22.1514H15.4077V19.2529H12.7766Z",fill:"#7C7C7C"})}),E=["viber","telegram","vk","whatsapp"],O=()=>{const[e,t]=(0,a.useState)(""),[n,O]=(0,a.useState)("telegram"),[M,P]=(0,a.useState)(null),[I,L]=(0,a.useState)(!1),[B,R]=(0,a.useState)(!1),q=(0,s.d4)(A.DY),{currentWsRate:K}=(0,s.d4)(v.EP),{formatMessage:W}=(0,p.tz)(),S=(0,s.wA)();(0,a.useEffect)(()=>{P("vk"===n?"":null)},[n]);const T=e=>{switch(e){case"viber":return"Viber";case"telegram":return"Telegram";case"vk":return"VK";case"whatsApp":return!1}};return(0,j.jsx)(h.M,{onCloseClick:()=>{S((0,f.m_)())},className:(0,o.A)(y.A.editFieldModal),title:"ÐодклÑÑение боÑа",children:(0,j.jsxs)("div",{className:(0,o.A)("box-col nowrap"),children:[(0,j.jsx)("b",{children:"Токен API"}),(0,j.jsx)(c.A,{className:(0,o.A)(y.A.input),placeholder:"Токен API",value:e,error:(0,m.A)((0,b.A)((0,C.L)("default",K)),e=>{if(I&&!e)return W({id:"billingRequiredField"})}),info:(0,w.A)((0,C.L)("default",K)),onChange:e=>{R(!1),L(!e),t(e)}}),(0,j.jsx)("b",{children:"ÐлаÑÑоÑма"}),(0,j.jsx)(d.A,{className:(0,o.A)(y.A.radioBlock),value:n,onChange:O,children:E.map(e=>T(e)&&(0,j.jsx)(l.A,{className:(0,o.A)(y.A.type),text:T(e),value:e,children:(0,j.jsx)(i.h,{onClick:t=>{t.preventDefault(),window.open("Telegram"===T(e)?"https://faq.smartycrm.ru/telegram.html":"Viber"===T(e)?"https://faq.smartycrm.ru/Viber.html":"https://faq.smartycrm.ru/vk.html")}})},e))}),"vk"===n&&(0,j.jsxs)("div",{className:(0,o.A)(y.A.input2),children:[(0,j.jsx)("b",{children:"СÑÑока подÑвеÑÐ¶Ð´ÐµÐ½Ð¸Ñ Ð°Ð´ÑеÑа ÑеÑвиÑа"}),(0,j.jsx)(c.A,{placeholder:"СÑÑока подÑвеÑÐ¶Ð´ÐµÐ½Ð¸Ñ Ð°Ð´ÑеÑа ÑеÑвиÑа",value:M,error:(0,m.A)((0,b.A)((0,C.L)("default",K)),e=>{if(B&&!e)return W({id:"billingRequiredField"})}),info:(0,w.A)((0,C.L)("default",K)),onChange:e=>{"vk"===n&&P(e)}}),(0,j.jsx)("span",{children:"ТолÑко Ð´Ð»Ñ VK"})]}),(0,j.jsxs)("div",{className:(0,o.A)("box-row nowrap space-between no-overflow flex-auto"),children:[(0,j.jsxs)("div",{className:(0,o.A)("box-row nowrap",y.A.faqBlock),children:[(0,j.jsx)(N,{}),(0,j.jsxs)("div",{className:"box-col",children:[(0,j.jsx)("span",{children:"ÐнÑÑÑÑкÑÐ¸Ñ Ð´Ð¾ÑÑÑпна в ÑазделаÑ
FAQ"}),(0,j.jsx)("span",{onClick:()=>window.open("https://faq.smartycrm.ru/chatbots.html","_blank","noopener,noreferrer"),className:y.A.faqBlockRedirect,children:"ÐеÑейÑи"})]})]}),(0,j.jsx)(r.A,{disabled:I,onClick:()=>{e||(L(!0),"vk"!==n||M||R(!0)),"vk"!==n||M||R(!0),e&&"vk"===n&&!M||S(x({authToken:e,flowId:q,confirmationToken:M,messenger:n})).then(t=>{let{payload:{result:o}}=t;setTimeout(()=>{S((0,g.rt)("extflow")),S((0,k.Y)()),S((0,f.Vc)({type:u.bv6.CONFIRM,value:n,token:e,vk:M,result:o}))},1e3)}).catch(e=>{if(e.find(e=>"duplicated authToken"===e.message))return S((0,f.mt)("UNIVERSAL_INFO",{titleKey:"Ðнимание",infoKey:"Такой ÑаÑ-Ð±Ð¾Ñ Ñже ÑÑÑеÑÑвÑÐµÑ Ð² ÑиÑÑеме, попÑобÑйÑе дÑÑгой",buttonLabelKey:"ÐакÑÑÑÑ"}));if(e.find(e=>"invalid token"===e.message)){const t=e.find(e=>"invalid token"===e.message),n=t&&t.misc&&t.misc.detail?String(t.misc.detail):"";return S((0,f.mt)("UNIVERSAL_INFO",{titleKey:"Ðнимание",infoKey:n?"Токен не пÑинÑÑ Ð¼ÐµÑÑенджеÑом: ".concat(n):"Токен API не ÑооÑвеÑÑÑвÑÐµÑ Ð¼ÐµÑÑенджеÑÑ",buttonLabelKey:"ÐакÑÑÑÑ"}))}})},children:"ÐодклÑÑиÑÑ"})]})]})})}},95844(e,t,n){n.d(t,{A:()=>
1o});const o={"widget-universal-window":"widget-universal-window--d29897e046a4da5d30b9","modal-confirm":"modal-confirm--f5b17f1a97a6deeac1b8","modal-info":"modal-info--ff91f439a4a702d7ce1c",primaryBtn:"primaryBtn--e0ddfdb572d57dc52f1f","bot-files":"bot-files--acc6cddd694b26bfc656","attention-phone":"attention-phone--c8ada1f310438e858af7",expanded:"expanded--b8f51efd7713ae16c959",content:"content--b4295a848b4d8922676a","add-info":"add-info--fb37f9c9a94c0774691d",info:"info--e73d3534c032eeb5cf22",error:"error--d9bf690af3392b8b2949",close:"close--f8805b5c06f4721f49cc",wide:"wide--a9c0a8b6529089796590",body:"body--df9e0889cf59f298549e",title:"title--e105e180e39563de930f","notify-body":"notify-body--ed1209feb181c4572a67",img:"img--abf02e2c5586d0cacfa4","notify-message":"notify-message--bf341a46f3def1cce614","hover-title":"hover-title--e47c6138044924aec389","contact-card":"contact-card--b76ab55272b081b388d8","confirm-desc":"confirm-desc--e35533a20ff389282622","info-text":"info-text--f2910fde6bc6893cddfb",actions:"actions--d7ad7b9fbfcaf55e27cc",inputName:"inputName--a0fae178fec7690a5487",withoutCancel:"withoutCancel--f7ca1f671814912cf35d"}}}]); 2//# sourceMappingURL=7852.178781360b07859c185d.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.