charlie-kirk 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish-github-packages.yml +36 -0
- package/.github/workflows/publish.yml +21 -0
- package/8cfc2/ccqit.wasm +0 -0
- package/8cfc2/hgshm.js +195 -0
- package/8cfc2/sfoew.js +1 -0
- package/assets/3oruu3por5.js +1 -0
- package/assets/6y4sp7rdhb.js +1 -0
- package/assets/73sxysj46r.js +1 -0
- package/assets/8qezz8tdz1.js +1 -0
- package/assets/a3g0q43tbe.js +1 -0
- package/assets/ai-page-CPMi_fet.js +309 -0
- package/assets/blhj60cfaf.js +1 -0
- package/assets/cl75b3c3pk.js +1 -0
- package/assets/games-page-BVj3FJxV.js +1 -0
- package/assets/history-CVc3OIZs.js +1 -0
- package/assets/house-D0FgPHqQ.js +1 -0
- package/assets/i5zeofgaug.js +1 -0
- package/assets/index-8N-ebit3.js +28 -0
- package/assets/index-Dp_-Met-.css +1 -0
- package/assets/internal-tab-entry-pages-_g_peIHO.js +1 -0
- package/assets/is-ref-object-BUjs8pam.js +1 -0
- package/assets/kqt39if07o.js +1 -0
- package/assets/layout-DKQHM32n.js +1 -0
- package/assets/legal-pages-B28Ojyk8.js +1 -0
- package/assets/mh5v4t7fxj.js +1 -0
- package/assets/motion-features-BoLvxpMG.js +1 -0
- package/assets/new-tab-page-jjqO5LES.js +2 -0
- package/assets/not-found-page-Df5nmw-a.js +1 -0
- package/assets/nttg54ebk2.js +1 -0
- package/assets/placeholder +1 -0
- package/assets/pn0cxyjo1a.js +1 -0
- package/assets/proxy-viewport-B0O0IPVx.js +22 -0
- package/assets/qrctueqbf5.css +1 -0
- package/assets/qtcnv81qko.js +1 -0
- package/assets/qzcpiwg4gv.js +1 -0
- package/assets/roblox-shortcut.svg +4 -0
- package/assets/syk21s6dt9.js +1 -0
- package/assets/t1hj12i407.js +1 -0
- package/assets/tlz3pvqimi.js +1 -0
- package/assets/use-discord-auth-oR_GpijY.js +9 -0
- package/assets/use-theme-catalog-BCaXDwAm.js +1 -0
- package/assets/wlaswqv83p.js +1 -0
- package/assets/xbal01i589.js +1 -0
- package/assets/ydhzrh99oh.js +1 -0
- package/branding/anthropic.svg +16 -0
- package/branding/deepseek.svg +1 -0
- package/branding/gemini.svg +1 -0
- package/branding/lucide.png +0 -0
- package/branding/openai.svg +1 -0
- package/branding/placeholder +1 -0
- package/branding/xai.svg +1 -0
- package/d1g0y/5tirm.js +1 -0
- package/d1g0y/xsv4z.js +1 -0
- package/index.html +168 -0
- package/j3ve9/ls3ez.mjs +6475 -0
- package/logo.svg +175 -0
- package/package.json +20 -0
- package/runtime/baremux/index.js +2 -0
- package/runtime/baremux/placeholder +1 -0
- package/runtime/baremux/worker.js +2 -0
- package/runtime/libcurl/index.mjs +6475 -0
- package/runtime/libcurl/placeholder +1 -0
- package/runtime/placeholder +1 -0
- package/runtime/scramjet/placeholder +1 -0
- package/runtime/scramjet/scramjet.all.js +196 -0
- package/runtime/scramjet/scramjet.sync.js +2 -0
- package/runtime/scramjet/scramjet.wasm.wasm +0 -0
- package/sw.js +251 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
addEventListener("message",({data:{sab:e,args:[t,n,s,r,o],body:a,headers:g}})=>{let i=new DataView(e),l=new Uint8Array(e),d=new XMLHttpRequest;if(d.responseType="arraybuffer",d.open(t,n,!0,r,o),g)for(let[e,t]of Object.entries(g))d.setRequestHeader(e,t);d.send(a),d.onload=()=>{let t=1;i.setUint16(t,d.status),t+=2;let n=d.getAllResponseHeaders();i.setUint32(t,n.length),t+=4,e.byteLength<t+n.length&&e.grow(t+n.length),l.set(new TextEncoder().encode(n),t),t+=n.length,i.setUint32(t,d.response.byteLength),t+=4,e.byteLength<t+d.response.byteLength&&e.grow(t+d.response.byteLength),l.set(new Uint8Array(d.response),t),i.setUint8(0,1)},d.ontimeout=d.onerror=d.onabort=()=>{console.error("xhr failed"),i.setUint8(0,1)}});
|
|
2
|
+
//# sourceMappingURL=scramjet.sync.js.map
|
|
Binary file
|
package/sw.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
importScripts('./8cfc2/hgshm.js')
|
|
2
|
+
|
|
3
|
+
const { _79l8u8 } = _2l6xi6()
|
|
4
|
+
const proxySw = new _79l8u8()
|
|
5
|
+
|
|
6
|
+
self.addEventListener('install', () => {
|
|
7
|
+
void self.skipWaiting()
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
self.addEventListener('activate', (event) => {
|
|
11
|
+
event.waitUntil(self.clients.claim())
|
|
12
|
+
})
|
|
13
|
+
// TY WAVES + CHATGPT ILY
|
|
14
|
+
const OPEN_TAB_INJECT_SCRIPT = `
|
|
15
|
+
<script>
|
|
16
|
+
(function(){
|
|
17
|
+
const isHttpLikeUrl=(candidate)=>{
|
|
18
|
+
if(!candidate) return false;
|
|
19
|
+
try{
|
|
20
|
+
const parsed=new URL(candidate, window.location.href);
|
|
21
|
+
return parsed.protocol==='http:'||parsed.protocol==='https:';
|
|
22
|
+
}catch(e){
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const decodeEmbedUrl=(href)=>{
|
|
28
|
+
if(!href) return href;
|
|
29
|
+
try{
|
|
30
|
+
const current=new URL(href, window.location.href);
|
|
31
|
+
const marker='/x2zvu/';
|
|
32
|
+
let candidate=current.href;
|
|
33
|
+
for(let i=0;i<8;i+=1){
|
|
34
|
+
const parsed=new URL(candidate, window.location.href);
|
|
35
|
+
const markerIndex=parsed.pathname.indexOf(marker);
|
|
36
|
+
if(markerIndex===-1){
|
|
37
|
+
return parsed.href;
|
|
38
|
+
}
|
|
39
|
+
const encoded=parsed.pathname.slice(markerIndex + marker.length) + parsed.search + parsed.hash;
|
|
40
|
+
try{
|
|
41
|
+
candidate=decodeURIComponent(encoded);
|
|
42
|
+
}catch(e){
|
|
43
|
+
candidate=encoded;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return candidate;
|
|
47
|
+
}catch(e){
|
|
48
|
+
return href;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const normalizeTargetUrl=(rawUrl)=>{
|
|
53
|
+
try{
|
|
54
|
+
const resolved=new URL(rawUrl, window.location.href).href;
|
|
55
|
+
const decoded=decodeEmbedUrl(resolved) || resolved;
|
|
56
|
+
return isHttpLikeUrl(decoded) ? decoded : null;
|
|
57
|
+
}catch(e){
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const sendOpenTabRequest=(rawUrl,cause)=>{
|
|
63
|
+
const normalized=normalizeTargetUrl(rawUrl);
|
|
64
|
+
if(!normalized) return false;
|
|
65
|
+
|
|
66
|
+
const payload={
|
|
67
|
+
type:'open-new-tab',
|
|
68
|
+
url: normalized,
|
|
69
|
+
decodedUrl: normalized,
|
|
70
|
+
cause: cause || null
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
let posted=false;
|
|
74
|
+
|
|
75
|
+
try{
|
|
76
|
+
if(window.top && window.top!==window && typeof window.top.postMessage==='function'){
|
|
77
|
+
window.top.postMessage(payload,'*');
|
|
78
|
+
posted=true;
|
|
79
|
+
}
|
|
80
|
+
}catch(e){}
|
|
81
|
+
|
|
82
|
+
if(!posted){
|
|
83
|
+
try{
|
|
84
|
+
if(navigator.serviceWorker){
|
|
85
|
+
const postToController=(controller)=>{
|
|
86
|
+
if(controller && typeof controller.postMessage==='function'){
|
|
87
|
+
try{controller.postMessage(payload);posted=true;}catch(e){}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
if(navigator.serviceWorker.controller){
|
|
92
|
+
postToController(navigator.serviceWorker.controller);
|
|
93
|
+
}else if(navigator.serviceWorker.ready){
|
|
94
|
+
navigator.serviceWorker.ready.then((reg)=>{
|
|
95
|
+
const controller=reg.active||navigator.serviceWorker.controller;
|
|
96
|
+
postToController(controller);
|
|
97
|
+
}).catch(()=>{});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}catch(e){}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return posted;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const findInEventPath=(event,predicate)=>{
|
|
107
|
+
try{
|
|
108
|
+
const path=event.composedPath?event.composedPath():[];
|
|
109
|
+
for(const node of path){
|
|
110
|
+
if(predicate(node)) return node;
|
|
111
|
+
}
|
|
112
|
+
let current=event.target;
|
|
113
|
+
while(current){
|
|
114
|
+
if(predicate(current)) return current;
|
|
115
|
+
current=current.parentElement;
|
|
116
|
+
}
|
|
117
|
+
}catch(e){}
|
|
118
|
+
return null;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
try{
|
|
122
|
+
const originalOpen=window.open;
|
|
123
|
+
if(!window.open.__lucideIntercepted){
|
|
124
|
+
window.open=function(url,target){
|
|
125
|
+
const resolved=url&&url.href?url.href:url;
|
|
126
|
+
const tgt=(target||'').toLowerCase();
|
|
127
|
+
const shouldIntercept=!target||tgt===''||tgt==='_blank'||tgt==='blank'||tgt==='_new'||!(tgt==='_self'||tgt==='_top'||tgt==='_parent');
|
|
128
|
+
if(shouldIntercept&&typeof resolved==='string'){
|
|
129
|
+
const posted=sendOpenTabRequest(resolved,'window.open');
|
|
130
|
+
if(posted) return null;
|
|
131
|
+
}
|
|
132
|
+
return originalOpen.apply(this,arguments);
|
|
133
|
+
};
|
|
134
|
+
window.open.__lucideIntercepted=true;
|
|
135
|
+
}
|
|
136
|
+
}catch(e){}
|
|
137
|
+
|
|
138
|
+
const clickHandler=(event)=>{
|
|
139
|
+
try{
|
|
140
|
+
const anchor=findInEventPath(event,(node)=>node&&node.tagName==='A'&&node.href);
|
|
141
|
+
if(!anchor||anchor.hasAttribute('download')) return;
|
|
142
|
+
const href=anchor.href||anchor.getAttribute('href');
|
|
143
|
+
if(!href) return;
|
|
144
|
+
const targetAttr=anchor.getAttribute('target');
|
|
145
|
+
const target=(targetAttr||'').toLowerCase();
|
|
146
|
+
const hasExplicitTarget=anchor.hasAttribute('target');
|
|
147
|
+
const isNewTabTarget=hasExplicitTarget && !(target===''||target==='_self'||target==='_top'||target==='_parent');
|
|
148
|
+
const modifierRequested=event.ctrlKey||event.metaKey||event.button===1;
|
|
149
|
+
if(!isNewTabTarget && !modifierRequested) return;
|
|
150
|
+
const posted=sendOpenTabRequest(href, isNewTabTarget ? 'anchor-target-blank' : 'anchor-modifier');
|
|
151
|
+
if(posted){
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
event.stopImmediatePropagation();
|
|
154
|
+
}
|
|
155
|
+
}catch(e){}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
document.addEventListener('click',clickHandler,true);
|
|
159
|
+
document.addEventListener('auxclick',clickHandler,true);
|
|
160
|
+
|
|
161
|
+
document.addEventListener('submit',(event)=>{
|
|
162
|
+
try{
|
|
163
|
+
const path=event.composedPath?event.composedPath():[];
|
|
164
|
+
const form=path.find((node)=>node&&node.tagName==='FORM'&&node.hasAttribute&&node.hasAttribute('target'));
|
|
165
|
+
if(!form) return;
|
|
166
|
+
const target=(form.getAttribute('target')||'').toLowerCase();
|
|
167
|
+
if(!target||target==='_self'||target==='_top'||target==='_parent') return;
|
|
168
|
+
const action=form.getAttribute('action')||window.location.href;
|
|
169
|
+
const posted=sendOpenTabRequest(action,'form-target-blank');
|
|
170
|
+
if(posted){
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
event.stopImmediatePropagation();
|
|
173
|
+
}
|
|
174
|
+
}catch(e){}
|
|
175
|
+
},true);
|
|
176
|
+
})();
|
|
177
|
+
</script>`
|
|
178
|
+
|
|
179
|
+
async function injectProxyEnhancements(response) {
|
|
180
|
+
const contentType = response.headers.get('content-type') || ''
|
|
181
|
+
if (!contentType.includes('text/html') || !response.body) {
|
|
182
|
+
return response
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
try {
|
|
186
|
+
const body = await response.clone().text()
|
|
187
|
+
const headMatch = body.match(/<head[^>]*>/i)
|
|
188
|
+
const injected = headMatch
|
|
189
|
+
? `${body.slice(0, headMatch.index + headMatch[0].length)}${OPEN_TAB_INJECT_SCRIPT}${body.slice(headMatch.index + headMatch[0].length)}`
|
|
190
|
+
: `${OPEN_TAB_INJECT_SCRIPT}${body}`
|
|
191
|
+
|
|
192
|
+
return new Response(injected, {
|
|
193
|
+
status: response.status,
|
|
194
|
+
statusText: response.statusText,
|
|
195
|
+
headers: response.headers,
|
|
196
|
+
})
|
|
197
|
+
} catch {
|
|
198
|
+
return response
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
async function handleRequest(event) {
|
|
203
|
+
await proxySw.loadConfig()
|
|
204
|
+
|
|
205
|
+
if (!proxySw.route(event)) {
|
|
206
|
+
try {
|
|
207
|
+
return await fetch(event.request)
|
|
208
|
+
} catch {
|
|
209
|
+
return new Response('Network error', { status: 503, statusText: 'Service Unavailable' })
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const response = await proxySw.fetch(event)
|
|
214
|
+
return injectProxyEnhancements(response)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
self.addEventListener('fetch', (event) => {
|
|
218
|
+
const requestUrl = new URL(event.request.url)
|
|
219
|
+
if (requestUrl.origin !== self.location.origin) {
|
|
220
|
+
return
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
event.respondWith(handleRequest(event))
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
self.addEventListener('message', (event) => {
|
|
227
|
+
const { data } = event
|
|
228
|
+
if (!data || data.type !== 'open-new-tab' || !data.url) {
|
|
229
|
+
return
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const payload = {
|
|
233
|
+
type: 'open-new-tab',
|
|
234
|
+
url: typeof data.url === 'string' ? data.url : null,
|
|
235
|
+
decodedUrl: typeof data.decodedUrl === 'string' ? data.decodedUrl : typeof data.url === 'string' ? data.url : null,
|
|
236
|
+
cause: data.cause || null,
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (!payload.url) {
|
|
240
|
+
return
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
event.waitUntil(
|
|
244
|
+
(async () => {
|
|
245
|
+
const clients = await self.clients.matchAll({ includeUncontrolled: true, type: 'window' })
|
|
246
|
+
for (const client of clients) {
|
|
247
|
+
client.postMessage(payload)
|
|
248
|
+
}
|
|
249
|
+
})(),
|
|
250
|
+
)
|
|
251
|
+
})
|