1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[51116],{45688:(e,t,r)=>{"use strict";var n=r(95704);r(86340);var i=r(12115),s=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(i),o=void 0!==n&&n.env&&!0,d=function(e){return"[object String]"===Object.prototype.toString.call(e)},a=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,i=t.optimizeForSpeed,s=void 0===i?o:i;c(d(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var a="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=a?a.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(c(d(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return o||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var r="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){o||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];c(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},r.deleteRule=function(e){if("undefined"==typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEac
1h(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&c(d(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return r?i.insertBefore(n,r):i.appendChild(n),n},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var l=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},u={};function f(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return u[n]||(u[n]="jsx-"+l(e+"-"+r)),u[n]}function h(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,i=t.optimizeForSpeed,s=void 0!==i&&i;this._sheet=n||new a({name:"styled-jsx",optimizeForSpeed:s}),this._sheet.inject(),n&&"boolean"==typeof s&&(this._sheet.setOptimizeForSpeed(s),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,i=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var s=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=s,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return s.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var i=f(n,r);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return h(i,e)}):[h(i,t)]}}return{styleId:f(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=i.createContext(null);m.displayName="StyleSheetContext";var _=s.default.useInsertionEffect||s.default.useLayoutEffect,g="undefined"!=typeof window?new p:void 0;function y(e){var t=g||i.useContext(m);return t&&("undefined"==typeof window?t.add(e):_(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}y.dynamic=function(e){return e.map(function(e){return f(e[0],e[1])}).join(" ")},t.style=y},73699:(e,t,r)=>{"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}r.d(t,{_:()=>n})},86340:()=>{},88661:(e,t,r)=>{"use strict";e.exports=r(45688).style},94606:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ContractDraftPreview:()=>m});var n=r(95155),i=r(88661),s=r.n(i),o=r(12115),d=r(13722),a=r(57082),c=r(46546),l=r(77087);let u=/\b(?:master services? agreement|master service agreement|master client agreement|msa|mca)\b/i,f=/\bMASTER\s+(?:SERVICES?|SERVICE|CLIENT)\s+AGREEMENT\b/i,h=/(?:\{\{#conditional:autoRenew:boolean\}\}|\[#conditional:autoRenew:boolean\]|\{\{#when:autoRenew=|\[#when:autoRenew=)/i,p=/\b(?:automatically\s+renew|auto-?renew(?:al)?\s+for\s+successive|written\s+notice\s+of\s+non-?renew
1al|notice\s+of\s+non-?renewal|successive\s+renewal\s+terms)\b/i;function m(e){let{title:t,content:r,formFields:i={},assignedClauses:m,recentlyUpdatedFields:_,template:g,contractFormData:y,acceptedEdits:v=[]}=e,[b,w]=(0,o.useState)(""),[S,x]=(0,o.useState)(new Set),j=(0,o.useRef)({}),R=(0,o.useMemo)(()=>JSON.stringify(Object.entries(i).sort((e,t)=>{let[r]=e,[n]=t;return r.localeCompare(n)})),[i]);return(0,o.useEffect)(()=>{let e=new Set;Object.entries(i).forEach(t=>{let[r,n]=t;j.current[r]!==n&&""!==n&&(e.add(r),e.add(r.toLowerCase()),e.add("[".concat(r,"]")),e.add("{{".concat(r,"}}")))}),e.size>0&&(x(e),setTimeout(()=>{x(new Set)},3e3)),j.current={...i}},[i]),(0,o.useEffect)(()=>{var e,n,s,o,l;if(console.log("[ContractDraftPreview] Effect running - assignedClauses:",null!=(e=null==m?void 0:m.length)?e:0,null==m?void 0:m.map(e=>e.title)),r){let e=r.trim();if(e.startsWith('{"type":"doc"'))return void(0,c.tx)(r,i).then(e=>w(e)).catch(e=>{console.error("Error converting block JSON to HTML:",e),w('<p class="text-red-500">We couldn\'t render this preview. Reload the page to try again â if it keeps happening, reach out to support.</p>')});try{let r=m;if(m&&m.length>0){let e=new Map;m.forEach(t=>{e.has(t.id)||e.set(t.id,t)}),r=Array.from(e.values())}let c=e+"\n\n";if(g&&g.content){let e=!c.includes("[")&&!c.includes("{{");(g.content.includes("[")||g.content.includes("{{"))&&(e||y)&&(c=g.content.trim()+"\n\n")}c=function(e,t){var r,n;if(!e||!t.autoRenew||"SOW"===t.templateType||e.trim().startsWith('{"type":"doc"')||(n=t.title,!(u.test(n||"")||f.test(e)))||h.test(e)||p.test(e))return e;let i=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=(t=function(e){if("number"==typeof e&&Number.isFinite(e)&&e>0)return Math.round(e);if("string"==typeof e){let t=Number.parseInt(e,10);if(Number.isFinite(t)&&t>0)return t}return null}(e))?"for successive renewal terms of ".concat(t," month").concat(1===t?"":"s"," each"):"for successive renewal terms",i=Number.isFinite(r)&&r>0?Math.round(r):30;return"2.1(a) Automatic Renewal. Upon expiration of the initial term, this Agreement shall automatically renew ".concat(n," unless either Party provides written notice of non-renewal to the other, by email or other writing, at least ").concat(i," calendar days before the end of the then-current term. Each renewal term shall remain subject to this Agreement and any then-current Order unless the Parties agree otherwise in writing.")}(t.contractTerm,null!=(r=t.noticePeriodDays)?r:30);return/<(?:p|h[1-6]|ul|ol|table)\b[^>]*>/i.test(e)?function(e,t){let r=function(e){let t="2.1(a) Automatic Renewal. ",r=e.startsWith(t)?e.slice(t.length):e;return"<p><strong>2.1(a) Automatic Renewal.</strong> ".concat(r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),"</p>")}(t);for(let t of[/(<p[^>]*>\s*2\.2\b[^<]*<\/p>)/i,/(<h[1-6][^>]*>\s*3\.[\s\S]*?<\/h[1-6]>)/i,/(<p[^>]*>\s*3\.[^<]*<\/p>)/i]){let n=e.match(t);if((null==n?void 0:n.index)!==void 0)return"".concat(e.slice(0,n.index)).concat(r,"\n").concat(e.slice(n.index))}return"".concat(e.trimEnd(),"\n").concat(r)}(e,i):function(e,t){let r="\n\n".concat(t,"\n\n");for(let t of[/(\n\s*2\.2\b)/m,/(\n\s*2\.3\b)/m,/(\n\s*3\.\s)/m])if(t.test(e))return e.replace(t,"".concat(r,"$1"));return"".concat(e.trimEnd()).concat(r)}(e,i)}(c,{title:t||(null==g?void 0:g.title),autoRenew:(null==g?void 0:g.templateVisibility)!=="SPECIFIC_CLIENTS"&&(null==y?void 0:y.autoRenew)===!0,contractTerm:null!=(s=null!=(n=null==y?void 0:y.term)?n:null==g?void 0:g.term)?s:null,templateType:null!=(l=null!=(o=null==y?void 0:y.templateType)?o:null==g?void 0:g.templateType)?l:null});let b=new Set([...Array.from(S),...Array.from(_||[])]),x=(0,a.BU)(c,i,r,b,g,y,t);if(v.length>0)for(let e of v)if(x.includes(e.selectedText))x=x.replace(e.selectedText,e.editSuggestion);else{let t=RegExp(e.selectedText.split(/\s+/).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("\\s+"),"i"),r=x.match(t);r&&(x=x.replace(r[0],e.editSuggestion))}let j=(0,d.sanitizeHtmlServer)(x,{allowedTags:["p","br","strong","em","u","h1","h2","h3","h4","h5","h6","ul","ol","li","a","span","div"],allowedAttributes:{"*":["class","href","title","style","data-field"]}});w(j)}catch(e){console.error("Error processing contract content:",e),w('<p class="text-red-500">We couldn\'t render this preview. Reload the page to try again â if it keeps happening, reach out to supp
1ort.</p>')}}},[r,R,m,g,y,_,S,t,i,JSON.stringify(v)]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s(),{id:"c5d51d727fe2f5d9",children:'.form-field-highlight.jsx-c5d51d727fe2f5d9{background:rgba(34,197,94,.16);border-radius:2px}.form-field-value.jsx-c5d51d727fe2f5d9{transition:background.2s ease}.form-field-value.jsx-c5d51d727fe2f5d9:hover{background:rgba(6,182,212,.16)!important}.form-field-empty.jsx-c5d51d727fe2f5d9{opacity:.7}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9,.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 *.jsx-c5d51d727fe2f5d9{color:inherit!important}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 strong.jsx-c5d51d727fe2f5d9{font-weight:600}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 .editor-two-columns.jsx-c5d51d727fe2f5d9{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:.75rem 0}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 .editor-column.jsx-c5d51d727fe2f5d9{border:1px solid rgba(0,0,0,.1);border-radius:6px;padding:.5rem}.dark .contract-draft-preview__body.jsx-c5d51d727fe2f5d9 .editor-column.jsx-c5d51d727fe2f5d9{border-color:rgba(255,255,255,.1)}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 .merge-field-highlight.jsx-c5d51d727fe2f5d9{background:rgba(251,191,36,.2);color:#92400e;padding:0 2px;border-radius:2px;font-family:monospace;font-size:.9em}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 ul[data-type="taskList"].jsx-c5d51d727fe2f5d9{list-style:none;padding-left:0}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 li[data-type="taskItem"].jsx-c5d51d727fe2f5d9{display:flex;align-items:flex-start;gap:.5rem}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 table.jsx-c5d51d727fe2f5d9{border-collapse:collapse;table-layout:auto;width:max-content;max-width:100%;margin:1rem 0}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 th.jsx-c5d51d727fe2f5d9,.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 td.jsx-c5d51d727fe2f5d9{border:1px solid rgba(0,0,0,.15);padding:.5rem .75rem;vertical-align:top;min-width:2rem}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 th.jsx-c5d51d727fe2f5d9{background:rgba(0,0,0,.06);font-weight:600;text-align:left}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 td.jsx-c5d51d727fe2f5d9{text-align:left}.dark .contract-draft-preview__body.jsx-c5d51d727fe2f5d9 th.jsx-c5d51d727fe2f5d9,.dark .contract-draft-preview__body.jsx-c5d51d727fe2f5d9 td.jsx-c5d51d727fe2f5d9{border-color:rgba(255,255,255,.1)}.dark .contract-draft-preview__body.jsx-c5d51d727fe2f5d9 th.jsx-c5d51d727fe2f5d9{background:rgba(255,255,255,.06)}.contract-draft-preview__body.jsx-c5d51d727fe2f5d9 img.jsx-c5d51d727fe2f5d9{max-width:100%;max-height:min(70vh,480px);height:auto;object-fit:contain;display:block;margin:.5rem auto;border-radius:6px;border:1px solid rgba(0,0,0,.1)}.dark .contract-draft-preview__body.jsx-c5d51d727fe2f5d9 img.jsx-c5d51d727fe2f5d9{border-color:rgba(255,255,255,.1)}'}),(0,n.jsxs)(l.M,{contentKey:b,className:"contract-draft-preview__body prose dark:prose-invert max-w-none text-foreground",showHighlightHint:!0,highlightHintText:"Highlight text in this preview to get a Daemon AI explanation.",children:[t&&(0,n.jsx)("h1",{className:"jsx-c5d51d727fe2f5d9 text-2xl font-bold mb-6",children:t}),(0,n.jsx)("div",{"data-contract-content":!0,dangerouslySetInnerHTML:{__html:b},className:"jsx-c5d51d727fe2f5d9 overflow-x-auto min-w-0 opacity-90 dark:opacity-100 space-y-4"})]})]})}}}]);
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.