1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1401],{1050:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/testimonials/forms",function(){return n(11699)}])},60383:function(e,t,n){"use strict";var r=n(85893),o=n(67294),s=n(82587),a=n(11163),i=n(12307),l=n(96225),c=n(35267),m=n(41664),u=n.n(m),d=n(38099),h=n(47516),p=n(40827);let f={default:3,1024:2,640:1},x=e=>{let{form:t,router:n}=e,[s,a]=(0,o.useState)(!1),i=e=>{navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)},m=t.short_code?"".concat(window.location.origin,"/t/").concat(t.short_code):null;return(0,r.jsxs)(c.So,{interactive:!0,className:"group p-4 mb-4",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start gap-3",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-gray-900 break-words",children:t.link_name}),(0,r.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Created ",new Date(t.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),(0,r.jsx)(c.T6,{tone:"on",children:"Active"})]}),t.short_code?(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-[#f5f7fa] p-2.5 rounded-xl border border-gray-200 group-hover:border-gray-300 transition-colors",children:[(0,r.jsxs)("code",{className:"text-xs font-mono text-gray-700 flex-1 truncate",children:[window.location.host,"/t/",t.short_code]}),(0,r.jsx)("button",{onClick:()=>i(m),title:"Copy full URL",className:"".concat(c.dy," flex-shrink-0 px-2.5 py-1.5 ").concat(s?"text-green-700 border-green-200":""),children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.KBY,{className:"text-xs"})," Copied"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.o$V,{className:"text-xs"})," Copy"]})})]})}):(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsx)(c.Tc,{tone:"warn",title:"No short link for this form",children:"Nothing to share until one is generated."})})]})};t.Z=e=>{var t;let{embedded:n=!1}=e,m=(0,a.useRouter)(),y=(0,i.yy)(s.L$),[g,b]=(0,o.useState)("loading"),[C,w]=(0,o.useState)(!1),j=null===(t=y.id)||void 0===t?void 0:t.value;(0,o.useEffect)(()=>{m.isReady&&j&&v()},[m.isReady,j]);let v=async()=>{try{let e=await fetch("/api/testimonial/fetch-company-testimonial-links?company_id=".concat(j));if(200!==e.status)return b([]),d.b.fire({icon:"error",text:"Error fetching testimonial forms. Please try again later."});{let t=await e.json();b(t)}}catch(e){return b([]),d.b.fire({icon:"error",text:"Error fetching testimonial forms. Please try again later."})}};if("loading"===g)return(0,r.jsxs)("div",{className:"flex items-center justify-center gap-3 text-center mt-28 mx-auto",children:[(0,r.jsx)(h.sOR,{className:"animate-spin text-gray-400",size:32}),(0,r.jsx)("span",{className:"text-gray-500 font-medium",children:"Loading..."})]});let N=(0,r.jsxs)(u(),{href:"/company/testimonials/create-testimonial-link",className:c.ZA,children:[(0,r.jsx)(l.w_y,{className:"text-xs"})," New form"]});return(0,r.jsx)("div",{className:n?"":"min-h-screen bg-[#f5f7fa]",children:(0,r.jsxs)("div",{className:n?"flex flex-col gap-4":"mt-[var(--spokk-chrome-top)] max-w-screen-xl mx-auto px-4 sm:px-6 py-6 pb-16 flex flex-col gap-4",children:[!n&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("button",{onClick:()=>m.back(),className:"inline-flex items-center gap-1.5 text-sm text-gray-500 hover:text-gray-700 mb-2 transition-colors",children:[(0,r.jsx)(l.t9Q,{className:"text-sm"}),(0,r.jsx)("span",{children:"Back"})]}),(0,r.jsx)("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-gray-900",children:"Testimonial forms"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"The links you send to collect written and video testimonials."})]}),(0,r.jsx)(c.KR,{title:"Collection links",description:g.length?"Share one of these and whoever opens it can record or write a testimonial.":"A form gives you a link to send. Anyone with the link can leave a testimonial.",action:g.length>0?N:null,children:0===g.length?(0,r.jsx)(c.an,{icon:l.bdW,title:"No forms yet",body:"Create your first testimonial form to get a shareable link.",action:N}):(0,r.jsx)(p.Z,{breakpointCols:f,className:"my-masonry-grid",columnClassName:"my-masonry-grid_column",children:g.map(e=>(0,r.jsx)(x,{form:e,router:m},e.id))})})]})})}},11699:function(e,t,n){"use strict";n.r(t);var r=n(85893),o=n(60383);t.default=()=>(0,r.jsx)(o.Z,{})},40827:function(e,t,n){"use strict";var r=n(67294);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?s(Object(n),!0).forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}class i extends r.Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){if(!window||!window.requestAnimationFrame){this.reCalculateColumnCount();return}window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})}reCalculateColumnCount(){let e=window&&window.innerWidth||1/0,t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let n=1/0,r=t.default||2;for(let o in t){let s=parseInt(o),a=s>0&&e<=s;a&&s<n&&(n=s,r=t[o])}r=Math.max(1,parseInt(r)||1),this.state.columnCount!==r&&this.setState({columnCount:r})}itemsInColumns(){let e=this.state.columnCount,t=Array(e),n=r.Children.toArray(this.props.children);for(let r=0;r<n.length;r++){let o=r%e;t[o]||(t[o]=[]),t[o].push(n[r])}return t}renderColumns(){let{column:e,columnAttrs:t={},columnClassName:n}=this.props,s=this.itemsInColumns(),i=`${100/s.length}%`,l=n;l&&"string"!=typeof l&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===l&&(l="my-masonry-grid_column"));let c=a(a(a({},e),t),{},{style:a(a({},t.style),{},{width:i}),className:l});return s.map((e,t)=>r.createElement("div",o({},c,{key:t}),e))}logDeprecated(e){console.error("[Masonry]",e)}render(){let e=this.props,{children:t,breakpointCols:n,columnClassName:s,columnAttrs:a,column:i,className:l}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]),m=l;return"string"!=typeof l&&(this.logDeprecated('The property "className" requires a string'),void 0===l&&(m="my-masonry-grid")),r.createElement("div",o({},c,{className:m}),this.renderColumns())}}i.defaultProps={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},t.Z=i}},function(e){e.O(0,[35267,49774,92888,40179],function(){return e(e.s=1050)}),_N_E=e.O()}]);
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.