PageSourceSearch

https://www.casino.us/_nuxt/DLutHHwq.js

js casino.us collected 2026-10-03 23:34:10 UTC 2,985 bytes, 1 lines download raw bytes

1import u from"./BzFipafK.js";import m from"./2Kz32Cv7.js";import s from"./DpWK8sBq.js";import{_ as h,c as y,b as C,w as b,o as r,a as d,n as p,j as a,r as _,t as T,m as g}from"./C_dDoqqV.js";import"./B3UUmxRX.js";import"./cg-AAXxy.js";const k=["SM","MD","LG"],z={name:"PromoButton",components:{IconCopy:u,IconCheck:s,Tooltip:m},props:{id:{type:String,required:!0},size:{type:String,validator:t=>k.includes(t),default:"SM"},fullWidth:{type:Boolean,default:!1},codeText:{type:String,default:"Promo"},tooltipContent:{type:String,default:"Click to copy code"},tooltipCenter:{type:Boolean,default:!0},noCode:{type:Boolean,default:!1}},data(){return{buttonId:this.id,tooltipText:this.tooltipContent,clickToCopyLabel:this.$t("tooltipCopyText"),copiedToClipboardLabel:`✓ ${this.$t("copiedToClipboard")}`,tooltipVisible:!1}},computed:{buttonSize(){return{SM:"text-xs",MD:"text-xs",LG:"text-sm"}[this.size]||"text-xs"},noCodeIcon(){return s},iconSize(){return this.size==="LG"?20:14}},methods:{async handleClick(){if(!this.noCode)try{await this.copyTextToClipboard(this.codeText),this.tooltipText=this.copiedToClipboardLabel,setTimeout(()=>{this.tooltipText=this.clickToCopyLabel},3e3)}catch(t){console.error("Failed to copy promo code:",t)}},async copyTextToClipboard(t){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch(n){console.error("navigator.clipboard.writeText failed, trying execCommand fallback:",n)}await this.fallbackCopyText(t)},fallbackCopyText(t){return new Promise((n,o)=>{const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.left="-9999px",e.style.top="0",document.body.appendChild(e),e.focus(),e.select(),e.setSelectionRange(0,t.length);try{const i=document.execCommand("copy");document.body.removeChild(e),i?n():o(new Error("execCommand copy failed"))}catch(i){document.body.removeChild(e),o(i)}})}}},S=["id"];function w(t,n,o,e,i,l){const c=u,x=m;return r(),y("div",null,[C(x,{content:i.tooltipText,"tooltip-center":o.tooltipCenter,class:"text-center"},{default:b(()=>[d("button",{id:i.buttonId,class:p(["flex justify-center items-center h-fit-content gap-xs button border-md button-promocode rounded-button border-dashed cursor-pointer focus:outline-none",{"px-xs py-2xs":o.size==="SM","px-md py-xs":o.size==="MD","px-md py-sm":o.size==="LG","w-full":o.fullWidth}]),onClick:n[0]||(n[0]=(...f)=>l.handleClick&&l.handleClick(...f))},[o.noCode?(r(),a(_(l.noCodeIcon),{key:0,width:l.iconSize,height:l.iconSize,color:"text-foreground-1",class:"flex00auto"},null,8,["width","height"])):o.size==="LG"?(r(),a(c,{key:1,width:20,height:20,color:"text-foreground-1",class:"flex00auto"})):(r(),a(c,{key:2,width:14,height:14,color:"text-foreground-1",class:"flex00auto"})),d("span",{class:p(l.buttonSize)},T(o.codeText),3),g(t.$slots,"default")],10,S)]),_:3},8,["content","tooltip-center"])])}const G=Object.assign(h(z,[["render",w]]),{__name:"PromoButton"});export{G as default};

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.