PageSourceSearch

https://app.datamorf.io/chunk-6G2W6Y2T.js

js datamorf.io collected 2026-10-08 03:18:56 UTC 10,815 bytes, 5 lines download raw bytes

1import{a as G}from"./chunk-XDVB62AD.js";import"./chunk-VNVJAUZ2.js";import"./chunk-EYIPR324.js";import{e as $,f as H,g as z,h as Y}from"./chunk-A7RFGLKU.js";import{ab as U,b as D,d as L,g as N,l as Q,ta as K,y as q}from"./chunk-JGCQDCDJ.js";import"./chunk-G7SXUY2C.js";import{K as W,O as B,d as M,e as R,f as P}from"./chunk-7FFQBMZO.js";import{Bb as f,Dc as A,Ec as F,Fc as j,Nb as O,Tb as o,Ub as l,Vb as p,Wb as g,bc as x,eb as r,fc as w,hc as v,lc as I,mc as V,nc as S,pa as b,pb as _,qa as y,vb as E,wc as m,yc as k}from"./chunk-ZMXUQ3OG.js";import{a as C,f as J,k as h}from"./chunk-KZY52SKS.js";var T=J(K());var X=["transcript"],Z=["composer"];function ee(n,a){if(n&1&&(l(0,"div",23)(1,"div",24),m(2),p()()),n&2){let s=a.$implicit;o("ngClass",s.role==="user"?"justify-end":"justify-start"),r(),o("ngClass",s.role==="user"?"bg-primary-50 border border-primary-300 rounded-control p-3 text-gray-800":"panel panel-flat"),r(),k(" ",s.content," ")}}function te(n,a){n&1&&(l(0,"div",25)(1,"div",26),g(2,"i",27),m(3," Thinking\u2026 "),p()())}function ie(n,a){if(n&1&&(l(0,"div",28),g(1,"i",29),m(2),p()),n&2){let s=v();r(2),k(" ",s.rebuilding?"Rebuild whenever you are ready \u2014 every field is replaced from this conversation.":"That's everything I need. Build it when you're ready \u2014 or keep talking to add more."," ")}}function ne(n,a){n&1&&g(0,"i",34)}function se(n,a){if(n&1){let s=x();l(0,"button",32),w("click",function(){let i=b(s).$implicit,e=v(2);return y(e.choose(i))}),f(1,ne,1,0,"i",33),m(2),p()}if(n&2){let s=a.$implicit,t=v(2);o("ngClass",s.picked?"bg-primary-50 border-primary-300 text-primary-700":"border-gray-200 text-gray-600 hover:border-primary-300 hover:text-primary-700")("disabled",t.thinking||t.processing),O("aria-pressed",t.multiple?s.picked:null),r(),o("ngIf",s.picked),r(),k("",s.label," ")}}function re(n,a){if(n&1&&(l(0,"div",30),f(1,se,3,5,"button",31),p()),n&2){let s=v();r(),o("ngForOf",s.options)}}function oe(n,a){if(n&1){let s=x();l(0,"button",35),w("click",function(){b(s);let i=v();return y(i.skip())}),m(1," Skip \u2014 I'll fill it in myself "),p()}if(n&2){let s=v();o("disabled",s.processing)}}function ae(n,a){n&1&&g(0,"span")}function ce(n,a){n&1&&g(0,"i",39)}function le(n,a){n&1&&g(0,"i",40)}function pe(n,a){if(n&1){let s=x();l(0,"button",36),w("click",function(){b(s);let i=v();return y(i.build())}),f(1,ce,1,0,"i",37)(2,le,1,0,"i",38),m(3),p()}if(n&2){let s=v();o("disabled",!s.canSubmit),r(),o("ngIf",s.processing),r(),o("ngIf",!s.processing),r(),k(" ",s.rebuilding?"Rebuild my voice":"Build my voice"," ")}}function de(n,a){n&1&&(l(0,"p",41),m(1," Building your voice \u2014 this takes a few seconds. "),p())}var xe=(()=>{let a=class a{constructor(t,i,e,c,d){this.workspaceSvc=t,this.voiceSvc=i,this.route=e,this.router=c,this.toastr=d,this.messages=[],this.input="",this.answers={},this.done=!1,this.rebuilding=null,this.options=[],this.multiple=!1,this.hasPicked=!1,this.thinking=!1,this.processing=!1}ngOnInit(){return h(this,null,function*(){this.workspaceId=this.workspaceSvc.getWorkspaceIdFromUrl(),this.messages=[{role:"assistant",content:$}],this.setOptions(H,!0);let t=this.route.snapshot.queryParamMap.get("rebuild");t&&(yield this.loadForRebuild(t))})}get listLink(){return["/workspace",this.workspaceId,"linkedin","voices"]}loadForRebuild(t){return h(this,null,function*(){let i=yield this.voiceSvc.getVoice(this.workspaceId,t);if(!i){yield this.router.navigate(this.listLink);return}this.rebuilding=i,this.answers=i.sourceAnswers??{},this.done=this.voiceSvc.hasAnyAnswer(this.answers),this.setOptions([],!1),this.messages=[{role:"assistant",content:`${z}
2
3${i.sourceText}
4
5What should I change? Anything you don't mention stays as it is.`}]})}get canSubmit(){return!this.processing&&!this.thinking&&this.voiceSvc.hasAnyAnswer(this.answers)}setOptions(t,i){this.options=(t??[]).map(e=>({label:e,picked:!1})),this.multiple=!!i,this.hasPicked=!1}choose(t){return h(this,null,function*(){if(!(this.thinking||this.processing)){if(!this.multiple){yield this.send(t.label);return}t.picked=!t.picked,this.hasPicked=this.options.some(i=>i.picked)}})}send(t){return h(this,null,function*(){let i=this.input.trim(),e=this.options.filter(u=>u.picked).map(u=>
5u.label),c=t??[e.join(", "),i].filter(Boolean).join(". ");if(!c||this.thinking||this.processing)return;this.messages.push({role:"user",content:c}),this.input="",this.thinking=!0,this.scrollDown();let d=yield this.voiceSvc.interviewVoice(this.workspaceId,this.messages);if(this.thinking=!1,this.focusComposer(),!d){this.messages.pop(),this.input=i,this.toastr.warning("That answer did not go through \u2014 send it again.","Connection problem");return}this.messages.push({role:"assistant",content:d.reply}),this.answers=d.answers??this.answers,this.done=!!d.done,this.setOptions(d.options,d.multiple),this.scrollDown()})}build(){return h(this,null,function*(){if(!this.canSubmit)return;this.processing=!0;let t=yield this.voiceSvc.parseVoiceIntake(this.workspaceId,this.answers);if(!t&&this.rebuilding){this.processing=!1,this.toastr.warning("We could not rebuild it automatically. Nothing was changed.","Automatic parsing unavailable");return}t||this.toastr.warning("We could not build it automatically, but your answers are saved \u2014 fill the fields in on the next screen.","Automatic parsing unavailable");let i=this.voiceSvc.normalizeParsed(this.workspaceId,t);i.sourceAnswers=this.answers,i.sourceText=this.voiceSvc.flattenAnswers(this.answers);let e=this.rebuilding?yield this.saveOver(this.rebuilding,i):yield this.voiceSvc.createVoice(this.workspaceId,i);this.processing=!1,e&&(yield this.router.navigate([...this.listLink,e.id],{queryParams:{review:1}}))})}saveOver(t,i){return h(this,null,function*(){let e=["id","version","name","createdAt","createdBy","lastUpdate","lastUpdateBy"],c=C(C({},T.default.omit(i,e)),T.default.pick(t,e));return(yield this.voiceSvc.saveVoice(this.workspaceId,c))===null?null:c})}skip(){return h(this,null,function*(){if(this.processing)return;this.processing=!0;let t=yield this.voiceSvc.createVoice(this.workspaceId,this.voiceSvc.emptyVoice(this.workspaceId));this.processing=!1,t&&(yield this.router.navigate([...this.listLink,t.id]))})}cancel(){return h(this,null,function*(){yield this.router.navigate(this.rebuilding?[...this.listLink,this.rebuilding.id]:this.listLink)})}focusComposer(){setTimeout(()=>this.composer?.nativeElement.focus())}scrollDown(){setTimeout(()=>{let t=this.transcript?.nativeElement;t&&(t.scrollTop=t.scrollHeight)})}};a.\u0275fac=function(i){return new(i||a)(_(U),_(Y),_(W),_(B),_(D))},a.\u0275cmp=E({type:a,selectors:[["app-voice-create"]],viewQuery:function(i,e){if(i&1&&(I(X,5),I(Z,5)),i&2){let c;V(c=S())&&(e.transcript=c.first),V(c=S())&&(e.composer=c.first)}},decls:25,vars:14,consts:[["transcript",""],["composer",""],[1,"bg-white","shrink-0"],[3,"title","subtitle"],[1,"px-2","sm:px-4","md:px-6","pb-4","container","mx-auto","max-w-4xl","flex-1","min-h-0","flex","flex-col"],[1,"card","card-flush","mt-4","flex-1","min-h-0","flex","flex-col"],["aria-live","polite",1,"flex","flex-col","gap-4","p-4","sm:p-6","overflow-y-auto","flex-1","min-h-0"],["class","flex",3,"ngClass",4,"ngFor","ngForOf"],["class","flex justify-start",4,"ngIf"],[1,"border-t","border-gray-200","p-4","sm:p-6","shrink-0"],["class","notice notice-success mb-4",4,"ngIf"],["class","flex flex-wrap gap-2 mb-3","role","group","aria-label","Suggested answers",4,"ngIf"],[1,"dm-input","no-margin"],["id","voiceReply","rows","2","aria-label","Your answer","placeholder","Type your answer \u2014 Enter to send, Shift+Enter for a new line",3,"ngModelChange","keydown.enter","ngModel","disabled"],[1,"flex","flex-wrap","items-center","justify-between","gap-3","mt-4"],["class","text-sm text-gray-500 transition hover:text-primary-700 underline",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[1,"flex","items-center","gap-3"],[1,"btn","btn-sm","btn-ghost",3,"click","disabled"],[1,"btn","btn-sm","btn-secondary",3,"click","disabled"],[1,"fas","fa-paper-plane","mr-1"],["class","btn btn-sm btn-primary",3,"disabled","click",4,"ngIf"],["class","text-xs text-gray-400 mt-3 text-right",4,"ngIf"],[1,"flex",3,"ngClass"],[1,"max-w-[85%]","text-sm","whitespace-pre-wrap",3,"ngClass"],[1,"flex","justify-start"],[1,"panel","panel-flat","text-sm","text-gray-500"],[1,"fas","fa-spinner","fa-spin","mr-2"],[1,"notice","notice-success","mb-4"],[1,"fas","fa-circle-check","mr-1"],["role","group","aria-label","Suggested answers",1,"flex","flex-wrap","gap-2","mb-3"],["type","button","class","text-sm rounded-full border px-3 py-1 transition",3,"ngClass","disabled","click",4,"ngFor","ngForOf"],["type","button",1,"text-sm","rounded-full","border","px-3","py-1","transition",3,"click","ngClass","disabled"],["class","fas fa-check mr-1",4,"ngIf"],[1,"fas","fa-check","mr-1"],[1,"text-sm","text-gray-500","transition","hover:text-primary-700","underline",3,"click","disabled"],[1,"btn","btn-sm","btn-primary",3,"click","disabled"],["class","fas fa-spinner fa-spin mr-1",4,"ngIf"],["class","fas fa-wand-magic-sparkles mr-1",4,"ngIf"],[1,"fas","fa-spinner","fa-spin","mr-1"],[1,"fas","fa-wand-magic-sparkles","mr-1"],[1,"text-xs","text-gray-400","mt-3","text-right"]],template:function(i,e){if(i&1){let c=x();l(0,"header",2),g(1,"app-page-header",3),p(),l(2,"div",4)(3,"div",5)(4,"div",6,0),f(6,ee,3,3,"div",7)(7,te,4,0,"div",8),p(),l(8,"div",9),f(9,ie,3,1,"div",10)(10,re,2,1,"div",11),l(11,"div",12)(12,"textarea",13,1),j("ngModelChange",function(u){return b(c),F(e.input,u)||(e.input=u),y(u)}),w("keydown.enter",function(u){return b(c),u.preventDefault(),y(e.send())}),p()(),l(14,"div",14),f(15,oe,2,1,"button",15)(16,ae,1,0,"span",16),l(17,"div",17)(18,"button",18),w("click",function(){return b(c),y(e.cancel())}),m(19,"Cancel"),p(),l(20,"button",19),w("click",function(){return b(c),y(e.send())}),g(21,"i",20),m(22," Send "),p(),f(23,pe,4,4,"button",21),p()(),f(24,de,2,0,"p",22),p()()()}i&2&&(r(),o("title",e.rebuilding?"Rebuild "+e.rebuilding.name:"Create a voice")("subtitle",e.rebuilding?"Tell me what changed and I rebuild the voice from the whole conversation.":"A short conversation about how you write. We turn it into a voice you can review and edit."),r(5),o("ngForOf",e.messages),r(),o("ngIf",e.thinking),r(2),o("ngIf",e.done),r(),o("ngIf",e.options.length>0),r(2),A("ngModel",e.input),o("disabled",e.thinking||e.processing),r(3),o("ngIf",!e.rebuilding),r(),o("ngIf",e.rebuilding),r(2),o("disabled",e.processing),r(2),o("disabled",!e.input.trim()&&!e.hasPicked||e.thinking||e.processing),r(3),o("ngIf",e.done),r(),o("ngIf",e.processing))},dependencies:[P,R,M,q,L,N,Q,G],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex-direction:column;height:calc(100dvh - var(--assistant-clearance, 0px))}']});let n=a;return n})();export{xe as VoiceCreateComponent};

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.