1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10709832-7c84-425f-acd5-f430f16c6bb9",e._sentryDebugIdIdentifier="sentry-dbid-10709832-7c84-425f-acd5-f430f16c6bb9")}catch(e){}}();var _global="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{};_global.SENTRY_RELEASE={id:"57ecc7b471fce630a9a83e03af7702d6977a38be"};"use strict";(self.webpackChunkopus1io=self.webpackChunkopus1io||[]).push([["23215"],{91218:function(e,n,t){var s=t(41374),a=t(84577);t(93632),t(43831),t(45336),t(79936),t(23446);var i=t(74848),o=t(96540),r=t(24930),c=t(17535),l=t(52956),d=t(78258),u=t(17378),m=t(91575),h=t(36596),p=t(60469),g=t(38566),f=t(50926),b=t(96811),x=t(46793),v=t(86095),S=t(91536),j=t(27045),y=t(61963),N=t(59769),w=t(7527),A=t(70537),M=t(96339),C=t(7937),I=t(24923),_=t(6749),k=t(12163),$=t(42156),F=t(90943);function D(){var e=(0,a._)(["\n query locationsForBatchSMSModal($search: String!, $business: String!) {\n locations(search: $search, business: $business) {\n id\n name\n locationType\n smsPhoneNumber\n }\n }\n"]);return D=function(){return e},e}function E(){var e=(0,a._)(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n"]);return E=function(){return e},e}function T(){var e=(0,a._)(["\n width: 220px !important;\n\n .graphic {\n width: 40px !important;\n height: 40px !important;\n div div {\n line-height: 40px !important;\n font-size: 14px !important;\n }\n }\n"]);return T=function(){return e},e}function Y(){var e=(0,a._)(["\n textarea {\n min-height: 150px;\n }\n"]);return Y=function(){return e},e}function R(){var e=(0,a._)(["\n display: flex;\n width: 100%;\n justify-content: space-between;\n background: none;\n padding: 15px 10px 0px 10px;\n i {\n color: #c2c2c2;\n font-size: 0.8rem;\n &:hover {\n color: #646464;\n cursor: pointer;\n }\n }\n"]);return R=function(){return e},e}function q(){var e=(0,a._)(["\n mutation batchSendInstantMessageFromModal(\n $business: String!\n $locationId: ID\n $recipientIds: [ID]!\n $content: String!\n ) {\n batchSendInstantMessage(\n business: $business\n locationId: $locationId\n recipientIds: $recipientIds\n content: $content\n ) {\n status\n error\n recipientsNotNotified {\n id\n name\n }\n }\n }\n"]);return q=function(){return e},e}var B=(0,d.J1)(D()),L=u.Ay.div(E()),O=(0,u.Ay)(x.A)(T()),P=(0,u.Ay)(b.A)(Y()),U=u.Ay.div(R()),z="loading_recipients",G="confirmation",J="no_recipients",V="results",H=(0,d.J1)(q());n.A=e=>{var n,{name:t,isOpen:a,toggle:d,recipientIds:u,loadingRecipients:b,batchSMSto:x="clients",hideLocationSelector:D=!1,modalTitle:E="Batch SMS ".concat(x),className:T="",children:Y,modalSize:R}=e,{name:q,fullName:K,smsPhoneNumber:Q,perLocationSms:W}=(0,l.useSelector)(e=>e.app.business),Z=(0,l.useSelector)(e=>e.app.selectedSmsNumbers),[X,ee]=(0,o.useState)(),[en,et]=(0,o.useState)(),[es,ea]=(0,o.useState)(Z[0]),{capturedUrls:ei,shortenedUrls:eo,isScanningUrl:er,isShorteningUrl:ec,onRevertChanges:el,applyShortenedUrls:ed,shortenUrlsModalOpen:eu,toggleShortenUrlsModal:em}=(0,$.A)(en,et),[eh,ep]=(0,N.A)(),[eg,{loading:ef}]=(0,g.A)(H,{processor:e=>e.data.batchSendInstantMessage,successMessage:"Batch SMS queued successfully",failureMessage:"failed to queue batch SMS"}),eb=(u||[]).length;n=b?z:ef?G:(null==X?void 0:X.length)>0?V:eb?G:J;var ex=new m.SegmentedMessage((null==en?void 0:en.trim())||"");return(0,i.jsxs)(h.A,{isOpen:a,toggle:d,modalName:t,size:R||"lg",wrapClassName:T,children:[(0,i.jsx)(r.A,{toggle:d,children:E}),(0,i.jsxs)(c.A,{children:[n===z&&(0,i.jsxs)("p",{className:"d-flex flex-column align-items-center",children:[(0,i.jsx)(y.A,{size:50}),"".concat(eb," recipients loaded")]}),n===J&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"d-flex flex-column align-items-center mb-2",children:"There are no recipients - No sms will be sent"}),(0,i.jsx)("div",{children:Y})]}),n===G&&(0,i.jsxs)(i.Fragment,{children:[!D&&(0,i.jsx)(k.A,{field:{title:"SMS phone number"},children:(0,i.jsx)(M.f,{components:{Option:I.A,SingleValue:_.A},isClearable:!1,sort:!1,query:B,queryMiddleware:e=>[Q&&{type:"business",icon:"fa-city",id:q,name:K,number:Q},...e.filter(e=>e.smsPhoneNumber).map(e=>({type:"location",icon:C.e[e.locationType],id:e.id,name:e.name,number:e.smsPhoneNumber}
1))].filter(Boolean),value:es,onChange:ea,isDisabled:!W})}),(0,i.jsx)("div",{children:Y}),(0,i.jsxs)("div",{className:"d-flex flex-column align-items-center",children:["clients"===x?"You are about to send an SMS to ".concat(eb," recipients - and their account manager(s)"):"You are about to send an SMS to ".concat(eb," staff"),(0,i.jsxs)(U,{children:[(0,i.jsx)("div",{children:"SMS Message"}),(0,i.jsx)(p.A,{onClick:ep,tooltip:"Pick template",placement:"left",children:(0,i.jsx)(A.A,{faIcon:"file-text-o"})})]}),(0,i.jsxs)("div",{className:"d-flex flex-column p-2 width-100",children:[(0,i.jsx)(P,{id:"batch-sms-message-content",className:"mb-2",placeholder:"SMS message to send to ".concat(eb," recipients"),value:en,onChange:e=>et((0,S.x)(e.target.value)),error:"GSM-7"!==ex.encodingName&&"Your message contains special characters (which increase its overall cost): ".concat(ex.getNonGsmCharacters().join(" "))}),(0,i.jsxs)("div",{className:"d-flex justify-content-end",children:[(null==eo?void 0:eo.length)>0&&(0,i.jsx)(p.A,{id:"revert-shortened-url",className:"btn btn-secondary btn-rounded mr-2",onClick:el,disabled:er,children:"Revert Changes"}),(null==ei?void 0:ei.length)>0&&(0,i.jsx)(p.A,{id:"revert-shortened-url",className:"btn btn-secondary btn-rounded mr-2",disabled:er,onClick:em,children:"Shorten URLs"}),(0,i.jsx)(p.A,{id:"batch-send-sms",className:"btn btn-primary btn-rounded",onClick:()=>(0,s._)(function*(){try{var e=yield eg({variables:{business:q,locationId:(null==es?void 0:es.type)==="location"?es.id:void 0,recipientIds:u,content:null==en?void 0:en.trim()}});if(e.recipientsNotNotified.length>0)return void ee(e.recipientsNotNotified);d()}catch(e){(0,f.Fk)(e)}})(),loading:ef,disabled:er||ec||!en||en.length<=0,children:"Send SMS to ".concat(eb," recipients")})]})]}),(null==ei?void 0:ei.length)>0&&(0,i.jsx)(j.c,{className:"mb-2 mt-2",text:"Your message includes one or more URL. It is recommend to shorten URLs to limit message sizes and prevent spam filtering."}),(0,i.jsx)(j.c,{className:"mb-2",text:(null==ex?void 0:ex.segmentsCount)&&"This batch SMS will count as a minimum estimated of ".concat(eb," x ").concat(ex.segmentsCount," = ").concat(eb*ex.segmentsCount," segment(s) against your monthly quota (and more if some participants have multiple account managers with phone numbers).")}),ex.segmentsCount>5&&(0,i.jsx)(v.A,{className:"mb-2",text:"You are about to send a large message which is not recommended as each message will count as ".concat(ex.segmentsCount," segments.")}),eb>500&&(0,i.jsx)(v.A,{className:"mb-2",text:"You are about to send a batch SMS to a large number of ".concat(x," - it is not recommend to send too many SMSs at once.")}),(0,i.jsx)(v.A,{className:"mb-2",text:(0,i.jsxs)("div",{children:["Batch SMS are queued and may take up to 5 minutes before they are being processed. Large batches may take several minutes to be delivered."," ",(0,i.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://kb.opus1.io/batch-sms-best-practices",children:"See our SMS F.A.Q and best practices"})]})})]})]}),n===V&&(0,i.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("i",{className:"far fa-exclamation-triangle text-warning mr-2"}),"Not all participants were notified"]}),(0,i.jsxs)("div",{className:"d-flex flex-column p-2",children:[(0,i.jsx)("p",{children:"The following participants have opted out of receiving SMS messages or have been flagged for invalid phone number, and have NOT been notified:"}),(0,i.jsx)(L,{children:X.map(e=>(0,i.jsx)(O,{client:e},e.id))})]})]})]}),eh&&(0,i.jsx)(w.A,{isOpen:eh,toggle:ep,setMessageContent:et,messageContent:en}),eu&&(0,i.jsx)(F.A,{isOpen:eu,toggle:em,capturedUrl:ei,handleConfirm:ed,shortening:ec,buttonsDisabled:ec})]})}},91536:function(e,n,t){t.d(n,{x:function(){return i}}),t(45336),t(69861),t(60726),t(13467);var s=t(91575),a={"\xab":'"',"\xbb":'"',"â":'"',"â":'"',ʺ:'"',Ë®:'"',"â":'"',"â":'"',"â":'"',"ã":'"',"ã":'"',"ï¼":'"',"â":"'","â":"'",Ê»:"'",Ë:"'",ʼ:"'",ʽ:"'",ʹ:"'","â":"'","ï¼":"'","\xb4":"'",Ë:"'","`":"'",Ë:"'","â":"'","â":"'","Ì":"'","Ì":"'","ï¸":"'","ï¸":"'","\xf7":"/","\xbc":"1/4","\xbd":"1/2","\xbe":"3/4","⧸":"/","Ì·":"/","̸":"/","â":"/","â":"/","ï¼":"/","â§¹":"\\","â§µ":"\\","â¥":"\\","﹨":"\\","ï¼¼":"\\","̲":"_","_":"_","â":"|","â":"|","â£":"|","ï½":"|","â¸":"|","â¹":"|","â":"|","â":"|","â":"|","â¼":"-","â½":"-","â":"-","ï¹£":"-","ï¼":"-","â":"-","â":"-","﹫":"@","ï¼ ":"@","﹩":"$","ï¼":"$",Ç:"!","ï¸":"
1!","ï¹":"!","ï¼":"!","ï¹":"#","ï¼":"#","﹪":"%","ï¼ ":"%","ï¹ ":"&","ï¼":"&","â":",","̦":",","ï¹":",","ï¹":",","ï¼":",","、":",","â¨":"(","âª":"(","ï¹":"(","ï¼":"(","â®":"(","⦠":"(","â©":")","â«":")","ï¹":")","ï¼":")","â¯":")","â¦":")","â":"*","â":"*","â":"*","â¢":"*","â£":"*","â¤":"*","â¥":"*","â±":"*","â²":"*","â³":"*","âº":"*","â»":"*","â¼":"*","â½":"*","â":"*","â":"*","â":"*","â":"*","â§":"*","﹡":"*","ï¼":"*","Ë":"+","ï¹¢":"+","ï¼":"+","ã":".","ï¹":".","ï¼":".","。":".","ï¼":"0","ï¼":"1","ï¼":"2","ï¼":"3","ï¼":"4","ï¼":"5","ï¼":"6","ï¼":"7","ï¼":"8","ï¼":"9",Ë:":","˸":":","â¦":":","ê":":","ï¸":":","ï¼":":","â":";","ï¸":";","ï¹":";","ï¼":";","﹤":"<","ï¼":"<","Í":"=","ê":"=","﹦":"=","ï¼":"=","ï¹¥":">","ï¼":">","ï¸":"?","ï¹":"?","ï¼":"?",A:"A",á´:"A",ï¼¢:"B",Ê:"B",ï¼£:"C",á´:"C",D:"D",á´ :"D",ï¼¥:"E",á´:"E",F:"F",ê°:"F",ï¼§:"G",É¢:"G",H:"H",Ê:"H",I:"I",ɪ:"I",J:"J",á´:"J",K:"K",á´:"K",L:"L",Ê:"L",ï¼:"M",á´:"M",ï¼®:"N",É´:"N",O:"O",á´:"O",ï¼°:"P",á´:"P",ï¼±:"Q",ï¼²:"R",Ê:"R",ï¼³:"S",ê±:"S",ï¼´:"T",á´:"T",ï¼µ:"U",á´:"U",ï¼¶:"V",á´ :"V",ï¼·:"W",á´¡:"W",X:"X",ï¼¹:"Y",Ê:"Y",Z:"Z",á´¢:"Z",Ë:"^","Ì":"^","ï¼¾":"^","á·":"^","â´":"{","ï¹":"{","ï½":"{","âµ":"}","ï¹":"}","ï½":"}","ï¼»":"[","ï¼½":"]","Ë":"~","Ë·":"~","Ì":"~","̰":"~","Ì´":"~","â¼":"~","ï½":"~","\xa0":" ","â":" ","â":" ","â":" ","â":" ","â ":" ","â":" ","â":" ","â":" ","â":" ","â":" ","â¯":" ","â":" ","ã":" ","\x8d":" ","\x9f":" ","\x80":" ","\x90":" ","\x9b":" ","\x10":""," ":" ","\0":"","\x03":"","\x04":"","\x17":"","\x19":"","\x11":"","\x12":"","\x13":"","\x14":"","â ":"","â":"'","â":"-","â":"-","â¹":">","âº":"<","â¼":"!!","â":'"',"\u2028":" ","\u2029":" ","â¦":"...","â":" ","â":"","ã":",","\uFEFF":"","â¢":"-"},i=e=>{var n=e;return e?(new s.SegmentedMessage(e).getNonGsmCharacters().forEach(e=>{n=n.replace(e,a[e]?a[e]:e)}),n):e}}}]); 2//# sourceMappingURL=23215.7654e080.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.