1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ef3a8de6-4537-5f27-8bd3-a1cf2b950896")}catch(e){}}(); 3import{a as J}from"./chunk-JRHQOV6G.js";import{a as H}from"./chunk-WRXC5ORK.js";import{c as W}from"./chunk-CN4EGA4I.js";import{a as g}from"./chunk-MGCQ5S6F.js";import{d as P,e as j}from"./chunk-UQU3EU23.js";import"./chunk-346ISJSG.js";import{a as z}from"./chunk-5SJALNJN.js";import{a as B,b as D,i as q}from"./chunk-XEY266ER.js";import"./chunk-SEDEP525.js";import"./chunk-SECBI6OV.js";import{G as R,I as A,b as L,d as T,g as F,h as N,o as V,r as I,u as G}from"./chunk-MF7VZYLI.js";import{a as y,b as M,e as w}from"./chunk-NFMDOWTR.js";import"./chunk-QE6DXY66.js";import"./chunk-HCSN2NMS.js";import"./chunk-FDIRDMLL.js";import"./chunk-XQLUXGKM.js";import"./chunk-3JHJJCIF.js";import"./chunk-J4X36CU5.js";import"./chunk-X3ZU2Z3D.js";import"./chunk-QZXCI4ZV.js";import"./chunk-VO633UWN.js";import{f as k}from"./chunk-XIKGSSI2.js";import"./chunk-MNZQGPDO.js";import"./chunk-MU5APV2L.js";import"./chunk-KRFZY2QT.js";import"./chunk-DFSGG2NH.js";import"./chunk-MREDPIUE.js";import{a as E}from"./chunk-BWICLBYB.js";import"./chunk-TYTNPDEC.js";import"./chunk-WAPZ5LEW.js";import"./chunk-746D4QTP.js";import{Ac as u,Dc as f,Ib as C,Sc as r,Uc as h,cc as d,cd as x,dc as p,ic as c,jc as e,kc as t,lb as U,lc as s,qa as m,qb as a,uc as _,va as S,wa as b}from"./chunk-BZJI6Z2X.js";import"./chunk-CS7K6LXP.js";function K(i,v){i&1&&(e(0,"mat-error"),r(1," Long URL is "),e(2,"strong"),r(3,"required"),t()())}function O(i,v){i&1&&(e(0,"mat-error"),r(1," Long URL is "),e(2,"strong"),r(3,"invalid"),t()())}function Q(i,v){if(i&1){let o=_();e(0,"div",2)(1,"div",3)(2,"div",15)(3,"p",16),r(4,"Generated URL:"),t(),e(5,"div",17)(6,"a",18),r(7),t(),e(8,"div",19)(9,"button",20),u("click",function(){S(o);let n=f();return b(n.copyLink())}),s(10,"i",21),t()()()()()()}if(i&2){let o=f();a(6),c("href",x(o.generatedShortUrl),U),a(),h(" ",o.generatedShortUrl," ")}}var fe=(()=>{class i{fb=m(R);appService=m(k);clipboard=m(J);snackbar=m(W);nonProdEnvWarning=E.name==="prod"?"":"Note: qatest_ will be appended to non-prod testing tokens.";generatedShortUrl="";form;constructor(){this.form=this.fb.group({longUrl:["",[T.required,g.urlValidator]],shortToken:["",null]})}getShortUrl(){if(this.form.invalid)return this.form.markAllAsTouched(),"";this.generatedShortUrl="";let o={long_url:g.resolveUrlValue(this.form.value.longUrl),short_token:this.form.value.shortToken,mcadmin:!0};return this.appService.getShortUrl(o).subscribe(l=>{this.generatedShortUrl=l.url,this.form.reset()}),""}copyLink(){this.generatedShortUrl&&(this.clipboard.copy(this.generatedShortUrl),this.snackbar.open("Copied","",{duration:1e3}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=C({type:i,selectors:[["app-short-url"]],decls:29,vars:5,consts:[[1,"min-vh-100"],[1,"dashboard-container-fluid"],[1,"row"],[1,"col-12"],[1,"d-flex","flex-wrap","justify-content-between","align-items-center","admins-header"],[1,"dashboard-heading","mb-2"],[1,"row","align-items-center","mb-3"],[3,"ngSubmit","formGroup"],[1,"row","mb-4"],[1,"col-12","col-md-6"],[1,"sm"],["formControlName","longUrl","type","text","matInput","","appNormalizeUrl",""],["formControlName","shortToken","type","text","matInput",""],[1,"row","mb-4","text-center"],["type","submit","mat-raised-button","",1,"custom","auto"],[1,"d-flex","flex-column","align-items-center","mb-4"],[1,"overline","mb-0"],[1,"d-flex","align-items-center"],["target","_blank","rel","noopener noreferrer",3,"href"],[1,"ms-1"],["mat-icon-button","","aria-label","Copy",1,"custom",3,"click"],[1,"fal","fa-copy"]],template:function(l,n){l&1&&(e(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"h1",5),r(6,"Mightycause Admin Short URL Creator"),t()()()(),e(7,"div",6)(8,"form",7),u("ngSubmit",function(){return n.getShortUrl()}),e(9,"div",8)(10,"div",9)(11,"mat-form-field",10)(12,"mat-label"),r(13,"Long URL"),t(),s(14,"input",11),d(15,K,4,0,"mat-error"),d(16,O,4,0,"mat-error"),t()(),e(17,"div",9)(18,"mat-form-field",10)(19,"mat-label"),r(20,"Short Url Path/Token"),t(),s(21,"input",12),t(),e(22,"p",10),r(23),t()()(),e(24,"div",13)(25,"div",3)(26,"button",14),r(27," Generate "),t()()()(),d(28,Q,11,3,"div",2),t()()()),l&2&&(a(8),c("formGroup",n.form),a(7),p(n.form.get("longUrl").hasError("required")?15:-1),a(),p(n.form.get("longUrl").hasError("invalidUrl")?16:-1),a(7),h(' For example, "test" will generate "https://mtyc.co/test" if left blank, it will generate a random path. Cannot be changed or updated. ',n.nonProdEnvWarning," "),a(5),p(n.generatedShortUrl?28:-1))},dependencies:[A,V,L,F,N,I,G,z,q,B,D,j,P,w,M,y,H],encapsulation:2})}return i})();export{fe as ShortUrlComponent}; 4 5//# debugId=ef3a8de6-4537-5f27-8bd3-a1cf2b950896
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.