StreamElements themes API
Endpoints to browse StreamElements themes
Endpoints to browse StreamElements themes
openapi: 3.0.0
info:
title: SE API Docs activities themes API
description: '## Custom Variable types
`guid` - string that matches pattern: `/^[0-9a-fA-F]{24}$/` (24 character hexadecimal string)
`datetime` - either timestamp in milliseconds (unix timestamp*1000) or string in ISO 8061 format
## Global variables
`Authorization` - string: JWT Token you can obtain here: https://streamelements.com/dashboard/account/channels (click "Show secrets")
`channelId` - guid: obtained by requesting `/channels/me` endpoint with provided JWT token
`channelName` - string: lowercase channel name
`timezone` - integer: timezone index'
contact: {}
version: '1.0'
servers:
- url: https://api.streamelements.com/kappa/v2
description: V2
variables: {}
- url: https://api.streamelements.com/kappa/v3
description: V3
variables: {}
security:
- JWTBearer: []
- OAuth2: []
- ApiKeyBearer: []
tags:
- name: themes
description: Endpoints to browse StreamElements themes
paths:
/themes:
get:
tags:
- themes
summary: /
description: List available themes
operationId: Get/
parameters:
- name: type
in: query
description: string - one of alert, regular, super mobile, widget
required: true
style: form
explode: true
schema:
type: string
- name: mobile
in: query
description: boolean
required: true
style: form
explode: true
schema:
type: string
- name: Accept
in: header
description: ''
required: true
style: simple
schema:
type: string
example: application/json; charset=utf-8
responses:
'200':
description: ''
headers:
Date:
content:
text/plain:
schema:
type: string
example: Sat, 08 Dec 2018 12:40:47 GMT
Content-Length:
content:
text/plain:
schema:
type: string
example: '167228'
content:
application/json; charset=utf-8:
schema:
type: array
items:
$ref: '#/components/schemas/ThemesList'
deprecated: false
/themes/{themeId}:
get:
tags:
- themes
summary: /:themeId
description: Get theme details
operationId: /:themeId
parameters:
- name: themeId
in: path
description: guid - theme id
required: true
style: simple
schema:
type: string
example: 59c29040a59fb471efc0c8c5
- name: Accept
in: header
description: ''
required: true
style: simple
schema:
type: string
example: application/json; charset=utf-8
responses:
'200':
description: ''
headers:
Date:
content:
text/plain:
schema:
type: string
example: Sat, 08 Dec 2018 12:42:03 GMT
Content-Length:
content:
text/plain:
schema:
type: string
example: '1989'
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/OverlayData'
example:
published: true
provider: twitch
type: super
size: '1080'
totalUsers: 359
mobile: false
_id: 59c29040a59fb471efc0c8c5
updatedAt: '2018-03-17T22:46:11.532Z'
createdAt: '2017-09-20T15:58:56.312Z'
title: HATTRICK SUPER THEME
author: designki
game: FIFA2018
thumbnail: https://cdn.streamelements.com/uploads/418cd740-f6ea-4050-a82b-761c9b1c9b1d.png
overlays:
- overlay:
_id: 59c03140374e871d01925ef1
game: FIFA 18
name: HATTRICK IN GAME SCENE
thumbnail: https://cdn.streamelements.com/uploads/6882ec4d-a59b-4fed-9bb2-86d88b3a10d6.jpg
preview: https://cdn.streamelements.com/uploads/0be5a140-42d4-4311-a139-947a33f89680.jpg
_id: 59c29040a59fb471efc0c8c6
- overlay:
_id: 59c03634374e871d01926090
game: FIFA 18
name: HATTRICK TALK SCENE
thumbnail: https://cdn.streamelements.com/uploads/c8f686e8-505f-47ab-8f90-f923bb62eafa.jpg
preview: https://cdn.streamelements.com/uploads/7e79a7c1-18cd-48c3-ac55-52b9daad55ab.jpg
_id: 59c29040a59fb471efc0c8c7
- overlay:
_id: 59c0d6cadf375d6bb3858424
game: FIFA 18
name: HATTRICK START SCENE
thumbnail: https://cdn.streamelements.com/uploads/8d494630-3264-44c0-9e68-bce32bb8267c.jpg
preview: https://cdn.streamelements.com/uploads/4b249217-5b4e-4277-be8a-cae8abf7dc84.jpg
_id: 59c29040a59fb471efc0c8c8
- overlay:
_id: 59c0d9444492765935648d70
game: FIFA 18
name: HATTRICK BRB SCENE
thumbnail: https://cdn.streamelements.com/uploads/4cb659ea-7a7b-4e81-b75e-8643944d5957.jpg
preview: https://cdn.streamelements.com/uploads/c2202e0c-1695-4169-b155-cd1c4dd5a157.jpg
_id: 59c29040a59fb471efc0c8c9
- overlay:
_id: 59c0dbff69db7f0460376197
game: FIFA 18
name: HATTRICK END SCENE
thumbnail: https://cdn.streamelements.com/uploads/c3f6be0f-2c93-41f9-8b84-469c1073e558.jpg
preview: https://cdn.streamelements.com/uploads/643b716d-0597-4673-9772-3b7f1194b604.jpg
_id: 59c29040a59fb471efc0c8ca
rating: 0.2777777777777778
new: false
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/400-badrequest'
example:
statusCode: 400
error: Bad Request
message: 'child "themeId" fails because ["themeId" with value "truncated" fails to match the required pattern: /^[0-9a-fA-F]{24}$/]'
details:
- path:
- themeId
message: '"themeId" with value "truncated" fails to match the required pattern: /^[0-9a-fA-F]{24}$/'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Notfound2'
example:
statusCode: 404
error: Not Found
deprecated: false
components:
schemas:
ThemesList:
title: Themes List
required:
- published
- provider
- type
- size
- totalUsers
- mobile
- _id
- updatedAt
- createdAt
- title
- author
- game
- thumbnail
- overlays
- rating
- new
type: object
properties:
published:
type: boolean
provider:
type: string
type:
type: string
size:
type: string
totalUsers:
type: integer
format: int32
mobile:
type: boolean
_id:
type: string
updatedAt:
type: string
createdAt:
type: string
title:
type: string
author:
type: string
game:
type: string
thumbnail:
type: string
overlays:
type: array
items:
$ref: '#/components/schemas/Overlay'
description: ''
rating:
type: integer
format: int32
new:
type: boolean
example:
published: true
provider: twitch
type: super
size: '1080'
totalUsers: 139
mobile: false
_id: 59efb08e96c10a00014f62f3
updatedAt: '2018-03-10T22:20:35.721Z'
createdAt: '2017-10-24T21:28:46.797Z'
title: ' Генерал Жу́ков Супер Дизайн'
author: kireakid
game: World of Tanks
thumbnail: https://cdn.streamelements.com/uploads/2bb4518f-09be-413b-a92c-23d17614aeca.png
overlays:
- overlay: 59ef74438af1bc0001deac8e
thumbnail: https://cdn.streamelements.com/uploads/d6e21e73-0199-4c63-ac75-86be48fad5fc.jpg
preview: https://cdn.streamelements.com/uploads/0135c315-8f84-4b9d-a215-06300e4c3d7c.jpg
_id: 59efb08e96c10a00014f62f4
- overlay: 59ef889d8fc6280001a69e85
thumbnail: https://cdn.streamelements.com/uploads/6c17d0bb-bfc1-4589-932e-bf2a6a2b7da7.jpg
preview: https://cdn.streamelements.com/uploads/6e4f4d5c-a82d-4f4e-ae2b-e2430c0e9035.jpg
_id: 59efb08e96c10a00014f62f5
- overlay: 59ef85476ed75b0001711884
thumbnail: https://cdn.streamelements.com/uploads/c7d25122-a644-4a03-a284-36c73bb83c3a.jpg
preview: https://cdn.streamelements.com/uploads/afa8af96-1616-4156-a129-86a582946d63.jpg
_id: 59efb08e96c10a00014f62f6
- overlay: 59ef7f5715c68700019ee22f
thumbnail: https://cdn.streamelements.com/uploads/cdc32b4d-15df-4a87-835a-4ed7fd7ac207.jpg
preview: https://cdn.streamelements.com/uploads/4bacf05f-c3c1-4d37-ad2b-92cb113c3471.jpg
_id: 59efb08e96c10a00014f62f7
- overlay: 59ef87997163b100014368b3
thumbnail: https://cdn.streamelements.com/uploads/87d58821-6908-4264-aa6c-507f47472ea4.jpg
preview: https://cdn.streamelements.com/uploads/5d6e00d0-0764-41c1-a756-bec303e42856.jpg
_id: 59efb08e96c10a00014f62f8
rating: 0
new: false
Scrolling:
title: Scrolling
required:
- direction
- speed
type: object
properties:
direction:
type: string
speed:
type: integer
format: int32
example:
direction: left
speed: 6
Detail:
title: Detail
required:
- path
- message
type: object
properties:
path:
type: array
items:
type: string
description: ''
message:
type: string
example:
path:
- types
message: '"types" must be an array'
Highlights:
title: Highlights
required:
- color
type: object
properties:
color:
type: string
example:
color: '#3F51B5'
Css6:
title: Css6
required:
- margin-top
type: object
properties:
margin-top:
type: integer
format: int32
example:
margin-top: 50
Image:
title: Image
required:
- type
- css
type: object
properties:
type:
type: string
css:
$ref: '#/components/schemas/Css2'
example:
type: image
css:
max-width: 100%
Host1:
title: Host1
required:
- enableRandomPick
- enabled
- duration
- layout
- text
- graphics
- audio
- animation
- variations
- minAmount
type: object
properties:
enableRandomPick:
type: boolean
enabled:
type: boolean
duration:
type: integer
format: int32
layout:
type: string
text:
$ref: '#/components/schemas/Text1'
graphics:
$ref: '#/components/schemas/Graphics'
audio:
$ref: '#/components/schemas/Audio1'
animation:
$ref: '#/components/schemas/Animation'
variations:
type: array
items:
type: string
description: ''
minAmount:
type: integer
format: int32
example:
enableRandomPick: true
enabled: true
duration: 8
layout: column
text:
animation: wobble
css:
font-family: Roboto
font-size: 42
color: '#ffffff'
font-weight: bold
text-shadow: rgba(0, 0, 0, 0.8) 1px 1px 1px
text-align: center
highlights:
color: '#3F51B5'
message:
font-size: 16
font-family: Roboto
color: '#ffffff'
text-shadow: rgba(0, 0, 0, 0.8) 1px 1px 1px
text-align: center
margin: 0 auto
enableShadow: true
message: '{name} is now hosting my stream with {amount} viewers!'
graphics:
src: https://cdn.streamelements.com/static/alertbox/default.gif
type: image
audio:
src: https://cdn.streamelements.com/static/alertbox/default.ogg
volume: 0.5
animation:
in: fadeInDown
out: fadeOutUp
variations: []
minAmount: 1
SubVariationSettings:
title: SubVariationSettings
required:
- layout
- text
- graphics
type: object
properties:
layout:
type: string
text:
$ref: '#/components/schemas/Text3'
graphics:
$ref: '#/components/schemas/Graphics'
example:
layout: column
text:
message: '{name} just resubscribed for {amount} months!'
graphics:
src: https://cdn.streamelements.com/static/alertbox/default.gif
type: image
Widget:
title: Widget
required:
- id
- type
- visible
- locked
- listeners
- css
- text
- image
- video
- audio
- animation
- variables
- provider
- staffOnly
type: object
properties:
id:
type: integer
format: int32
type:
type: string
visible:
type: boolean
locked:
type: boolean
listeners:
$ref: '#/components/schemas/Listeners'
css:
$ref: '#/components/schemas/Css'
text:
$ref: '#/components/schemas/Text'
image:
$ref: '#/components/schemas/Image'
video:
$ref: '#/components/schemas/Video'
audio:
$ref: '#/components/schemas/Audio'
animation:
$ref: '#/components/schemas/Animation'
variables:
$ref: '#/components/schemas/Variables'
provider:
type: string
staffOnly:
type: boolean
version:
type: number
example:
id: 1
type: se-widget-custom-event-list
visible: true
locked: false
listeners:
tip-latest: true
subscriber-latest: true
follower-latest: true
cheer-latest: true
host-latest: true
raid-latest: true
redemption-latest: true
css:
z-index: 2
top: -8.00px
left: -9.00px
width: 822.00px
height: 684.00px
opacity: 1
text:
type: text
enableShadow: true
scrolling:
direction: left
speed: 6
css:
position: relative
z-index: 1
font-family: Roboto
font-size: 24
color: '#fff'
font-weight: bold
text-shadow: rgb(0, 0, 0) 1px 1px 1px
text-align: left
line-height: 1.3
message:
enableShadow: false
font-family: Roboto
font-size: 16
line-height: 1.3
color: '#fff'
text-align: center
image:
type: image
css:
max-width: 100%
video:
type: video
css:
widget: 320
height: 240
audio:
type: audio
volume: 1
animation:
in: fadeIn
out: fadeOut
timeout: 6
variables:
css: ".main_canvas {\n border: 1px solid;\n}\n"
html: "<div class=\"wrapper\">\n <div id=\"score\"> </div>\n <canvas class=\"main_canvas\" width=600 height=600></canvas>\n</div>"
js: "/*\nReadMe:\n1) create Custom Event list within your layer on StreamElements\n2) replace content of each section with code provided below\n3) Click done\n4) Change multipliers to fit your needs,\n5) This snake doesn't store its state, so the best way to use it is to create a new overlay just with it, add as new browser source and DON'T ENABLE \"Shutdown source when not visible\"\n6) If you feel happy about it, you can buy me a beer at http://paypal.me/ThisIsLex\n*/\n\n// Your channelname - to get list of emotes mostly used on your chan - makes it more personalised!\nlet channelName=\"twitch\";\n// How many points should we add for each type of event\nlet subValue = 3,\n cheerValue = 0.01,\n tipValue=1;\n\nvar feed=1; //Initial points to go\nlet pointIcon=\"https://static-cdn.jtvnw.net/emoticons/v1/25/1.0\"; //Initial point icon - Kappa\n\nlet useRandom=true; //If set to false, each event type will have its own image defined below\nlet subPoint=\"https://static-cdn.jtvnw.net/emoticons/v1/25/1.0\"; // Kappa\nlet cheerPoint=\"https://static-cdn.jtvnw.net/emoticons/v1/88/1.0\"; // PogChamp\nlet tipPoint=\"https://static-cdn.jtvnw.net/emoticons/v1/425618/1.0\"; // LUL\n\nlet dotSize=10; // Size of snake and points\n//Snake Color RGBA\nlet snakeRed=99,\n snakeGreen=99,\n snakeBlue=99;\n\nvar _0x5ee5=['aXNDZWxsRnJlZQ==','Zm9sbG93VGFpbA==','YWRqYWNlbnRDZWxs','ZmluZFBhdGhUb0NlbGw=','cmV0dXJuIChmdW5jdGlvbigpIA==','e30uY29uc3RydWN0b3IoInJldHVybiB0aGlzIikoICk=','Y29uc29sZQ==','bG9n','ZGVidWc=','aW5mbw==','ZXJyb3I=','dHJhY2U=','d2Fybg==','ZXhjZXB0aW9u','Y21k','cGFyZW50','dHJhY2VDbWQ=','LCAn','cmVhZHk=','Z2V0Q29udGV4dA==','cGxheQ==','LzEuMA==','b25FdmVudFJlY2VpdmVk','ZGV0YWls','bGlzdGVuZXI=','c3Vic2NyaWJlci1sYXRlc3Q=','Y2hlZXItbGF0ZXN0','YW1vdW50','dGlwLWxhdGVzdA==','I3Njb3Jl','aHRtbA==','I3dyYXBwZXI=','d2lkdGg=','c3RyaW5n','d2hpbGUgKHRydWUpIHt9','Y29uc3RydWN0b3I=','ZGVidQ==','Z2dlcg==','Y2FsbA==','YWN0aW9u','c3RhdGVPYmplY3Q=','Z2V0SlNPTg==','aHR0cHM6Ly9hcGkuc3RyZWFtZWxlbWVudHMuY29tL2thcHBhL3YyL2NoYXRzdGF0cy8=','L3N0YXRzP2xpbWl0PTEw','dHdpdGNoRW1vdGVz','Lm1haW5fY2FudmFz','aGVpZ2h0','cmdiYSg=','Zmxvb3I=','cmFuZG9t','SW52YWxpZCBkaXJlY3Rpb24g','cHJvdG90eXBl','YWRk','ZXF1YWxz','dG9TdHJpbmc=','Ym9keQ==','ZGlyZWN0aW9u','aGVhZA==','dGFpbA==','bGVuZ3Ro','Zm9yaw==','c2xpY2U=','dW5zaGlmdA==','bW92ZQ==','YWR2YW5jZQ==','bW92ZVRhaWw=','cG9w','Ym9keUhpdA==','d2FsbEhpdA==','YXBwbHk=','ZnVuY3Rpb24gKlwoICpcKQ==','XCtcKyAqKD86XzB4KD86W2EtZjAtOV0pezQsNn18KD86XGJ8XGQpW2EtejAtOV17MSw0fSg/OlxifFxkKSk=','aW5pdA==','dGVzdA==','Y2hhaW4=','aW5wdXQ=','ZnBz','c2NvcmU=','Y29tbWFuZHM=','bWFw','cHVzaA==','bWFya3M=','ZHJhdw==','Y3R4','Y2xlYXJSZWN0','c25ha2U=','ZmlsbFN0eWxl','ZmlsbFJlY3Q=','c3Jj','b25sb2Fk','Y3JlYXRlUGF0dGVybg==','cmVwZWF0','ZHJhd0ltYWdl','Zm9vZA==','ZXZlcnk=','bGFzdEZvb2Q=','b25UaWNr','bWFrZU1vdmVz','c2hpZnQ=','dHJpZ2dlcg==','dXBkYXRlSW5mbw==','cGxhY2VGb29k','c3RvcA==','R0FNRSBPVkVS','VW5iZWxpZXZhYmxlIQ==','dGlja2Vy'];(function(_0x3bccaf,_0x37602a){var _0x388fb7=function(_0x4f0104){while(--_0x4f0104){_0x3bccaf['push'](_0x3bccaf['shift']());}};var _0x41e93a=function(){var _0x105001={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x55f5e9,_0x3555a4,_0xa8e881,_0x382bb0){_0x382bb0=_0x382bb0||{};var _0x518de6=_0x3555a4+'='+_0xa8e881;var _0x306604=0x0;for(var _0x306604=0x0,_0x4a0427=_0x55f5e9['length'];_0x306604<_0x4a0427;_0x306604++){var _0x2292e5=_0x55f5e9[_0x306604];_0x518de6+=';\\x20'+_0x2292e5;var _0x29dd66=_0x55f5e9[_0x2292e5];_0x55f5e9['push'](_0x29dd66);_0x4a0427=_0x55f5e9['length'];if(_0x29dd66!==!![]){_0x518de6+='='+_0x29dd66;}}_0x382bb0['cookie']=_0x518de6;},'removeCookie':function(){return'dev';},'getCookie':function(_0xcef3db,_0x2155fa){_0xcef3db=_0xcef3db||function(_0x52966d){return _0x52966d;};var _0x1d80dc=_0xcef3db(new RegExp('(?:^|;\\x20)'+_0x2155fa['replace'](/([.$?*|{}()[]\\/+^])/g,'$1')+'=([^;]*)'));var _0x41192b=function(_0x2f2067,_0x3149a7){_0x2f2067(++_0x3149a7);};_0x41192b(_0x388fb7,_0x37602a);return _0x1d80dc?decodeURIComponent(_0x1d80dc[0x1]):undefined;}};var _0x2ac408=function(){var _0x5ba171=new RegExp('\\x5cw+\\x20*\\x5c(\\x5c)\\x20*{\\x5cw+\\x20*[\\x27|\\x22].+[\\x27|\\x22];?\\x20*}');return _0x5ba171['test'](_0x105001['removeCookie']['toString']());};_0x105001['updateCookie']=_0x2ac408;var _0x3ad1e2='';var _0x3d0c0e=_0x105001['updateCookie']();if(!_0x3d0c0e){_0x105001['setCookie'](['*'],'counter',0x1);}else if(_0x3d0c0e){_0x3ad1e2=_0x105001['getCookie'](null,'counter');}else{_0x105001['removeCookie']();}};_0x41e93a();}(_0x5ee5,0x1d1));var _0x331f=function(_0x2245a3,_0x55e20b){_0x2245a3=_0x2245a3-0x0;var _0x18ed7b=_0x5ee5[_0x2245a3];if(_0x331f['dKqWXk']===undefined){(function(){var _0x358e2a=function(){var _0xf8bb85;try{_0xf8bb85=Function('return\\x20(function()\\x20'+'{}.constructor(\\x22return\\x20this\\x22)(\\x20)'+');')();}catch(_0x33b321){_0xf8bb85=window;}return _0xf8bb85;};var _0x2e401e=_0x358e2a();var _0x56edf3='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x2e401e['atob']||(_0x2e401e['atob']=function(_0x4a7a72){var _0x19cfc0=String(_0x4a7a72)['replace'](/=+$/,'');for(var _0x1bf298=0x0,_0x277522,_0x1f6398,_0x544478=0x0,_0x1a3c2b='';_0x1f6398=_0x19cfc0['charAt'](_0x544478++);~_0x1f6398&&(_0x277522=_0x1bf298%0x4?_0x277522*0x40+_0x1f6398:_0x1f6398,_0x1bf298++%0x4)?_0x1a3c2b+=String['fromCharCode'](0xff&_0x277522>>(-0x2*_0x1bf298&0x6)):0x0){_0x1f6398=_0x56edf3['indexOf'](_0x1f6398);}return _0x1a3c2b;});}());_0x331f['nrRyEY']=function(_0x517005){var _0x51c65e=atob(_0x517005);var _0x59bbe8=[];for(var _0x6e54da=0x0,_0x2b2143=_0x51c65e['length'];_0x6e54da<_0x2b2143;_0x6e54da++){_0x59bbe8+='%'+('00'+_0x51c65e['charCodeAt'](_0x6e54da)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x59bbe8);};_0x331f['MsOjWS']={};_0x331f['dKqWXk']=!![];}var _0x357214=_0x331f['MsOjWS'][_0x2245a3];if(_0x357214===undefined){var _0x29cb45=function(_0x245ad3){this['kzebhe']=_0x245ad3;this['jBpbdc']=[0x1,0x0,0x0];this['fLmrfL']=function(){return'newState';};this['OggpLT']='\\x5cw+\\x20*\\x5c(\\x5c)\\x20*{\\x5cw+\\x20*';this['GCdrZc']='[\\x27|\\x22].+[\\x27|\\x22];?\\x20*}';};_0x29cb45['prototype']['HAOOnN']=function(){var _0x4f9bff=new RegExp(this['OggpLT']+this['GCdrZc']);var _0x22193c=_0x4f9bff['test'](this['fLmrfL']['toString']())?--this['jBpbdc'][0x1]:--this['jBpbdc'][0x0];return this['acCDbd'](_0x22193c);};_0x29cb45['prototype']['acCDbd']=function(_0x20c8b3){if(!Boolean(~_0x20c8b3)){return _0x20c8b3;}return this['rnqMRL'](this['kzebhe']);};_0x29cb45['prototype']['rnqMRL']=function(_0x28a4cd){for(var _0x3eac32=0x0,_0x12799f=this['jBpbdc']['length'];_0x3eac32<_0x12799f;_0x3eac32++){this['jBpbdc']['push'](Math['round'](Math['random']()));_0x12799f=this['jBpbdc']['length'];}return _0x28a4cd(this['jBpbdc'][0x0]);};new _0x29cb45(_0x331f)['HAOOnN']();_0x18ed7b=_0x331f['nrRyEY'](_0x18ed7b);_0x331f['MsOjWS'][_0x2245a3]=_0x18ed7b;}else{_0x18ed7b=_0x357214;}return _0x18ed7b;};let emotes=[];let initialized=0x0;if(useRandom&&!initialized){$[_0x331f('0x0')](_0x331f('0x1')+channelName+_0x331f('0x2'),function(_0x30411c){emotes=_0x30411c[_0x331f('0x3')];initialized=0x1;});}var CANVAS_HEIGHT,CANVAS_WIDTH,DOWN,FIELD_AREA,Game,HEIGHT,H_SCALE,INIT_FPS,LEFT,PathNotFoundError,Point,RIGHT,SearchState,Snake,UP,WIDTH,W_SCALE,isOpposite,randInt,rgba,_ref;INIT_FPS=0x14;WIDTH=0x14;HEIGHT=0x14;CANVAS_WIDTH=$('.main_canvas')['width']();CANVAS_HEIGHT=$(_0x331f('0x4'))[_0x331f('0x5')]();FIELD_AREA=HEIGHT*WIDTH;W_SCALE=CANVAS_WIDTH/WIDTH;H_SCALE=CANVAS_HEIGHT/HEIGHT;_ref=['u','d','l','r'],UP=_ref[0x0],DOWN=_ref[0x1],LEFT=_ref[0x2],RIGHT=_ref[0x3];rgba=function(_0x5c6b42,_0x2970c1,_0x546970,_0x2cc8eb){return _0x331f('0x6')+_0x5c6b42+',\\x20'+_0x2970c1+',\\x20'+_0x546970+',\\x20'+_0x2cc8eb+')';};randInt=function(_0x255527,_0x27ed18){return Math[_0x331f('0x7')](Math[_0x331f('0x8')]()*(_0x27ed18-_0x255527)+_0x255527);};isOpposite=function(_0x2c47ac,_0x497b8b){switch(_0x2c47ac){case UP:if(_0x497b8b===DOWN){return!![];}else{return![];}break;case DOWN:if(_0x497b8b===UP){return!![];}else{return![];}break;case LEFT:if(_0x497b8b===RIGHT){return!![];}else{return![];}break;case RIGHT:if(_0x497b8b===LEFT){return!![];}else{return![];}break;default:throw new Error(_0x331f('0x9')+_0x2c47ac);}};setInterval(function(){_0x618780();},0xfa0);Point=function(){var _0x59e441=function(){var _0x57406=!![];return function(_0xb0c9a4,_0x2ebd78){var _0x2f190f=_0x57406?function(){if(_0x2ebd78){var _0xb7e854=_0x2ebd78['apply'](_0xb0c9a4,arguments);_0x2ebd78=null;return _0xb7e854;}}:function(){};_0x57406=![];return _0x2f190f;};}();var _0x1f64b4=_0x59e441(this,function(){var _0x4d2341=function(){return'\\x64\\x65\\x76';},_0x5c855e=function(){return'\\x77\\x69\\x6e\\x64\\x6f\\x77';};var _0x6c0a8=function(){var _0x2a66be=new RegExp('\\x5c\\x77\\x2b\\x20\\x2a\\x5c\\x28\\x5c\\x29\\x20\\x2a\\x7b\\x5c\\x77\\x2b\\x20\\x2a\\x5b\\x27\\x7c\\x22\\x5d\\x2e\\x2b\\x5b\\x27\\x7c\\x22\\x5d\\x3b\\x3f\\x20\\x2a\\x7d');return!_0x2a66be['\\x74\\x65\\x73\\x74'](_0x4d2341['\\x74\\x6f\\x53\\x74\\x72\\x69\\x6e\\x67']());};var _0x33fea8=function(){var _0x669312=new RegExp('\\x28\\x5c\\x5c\\x5b\\x78\\x7c\\x75\\x5d\\x28\\x5c\\x77\\x29\\x7b\\x32\\x2c\\x34\\x7d\\x29\\x2b');return _0x669312['\\x74\\x65\\x73\\x74'](_0x5c855e['\\x74\\x6f\\x53\\x74\\x72\\x69\\x6e\\x67']());};var _0x594e37=function(_0x3a8938){var _0x29ee3d=~-0x1>>0x1+0xff%0x0;if(_0x3a8938['\\x69\\x6e\\x64\\x65\\x78\\x4f\\x66']('\\x69'===_0x29ee3d)){_0x4dfa53(_0x3a8938);}};var _0x4dfa53=function(_0x373f2b){var _0x58b0f6=~-0x4>>0x1+0xff%0x0;if(_0x373f2b['\\x69\\x6e\\x64\\x65\\x78\\x4f\\x66']((!![]+'')[0x3])!==_0x58b0f6){_0x594e37(_0x373f2b);}};if(!_0x6c0a8()){if(!_0x33fea8()){_0x594e37('\\x69\\x6e\\x64\\u0435\\x78\\x4f\\x66');}else{_0x594e37('\\x69\\x6e\\x64\\x65\\x78\\x4f\\x66');}}else{_0x594e37('\\x69\\x6e\\x64\\u0435\\x78\\x4f\\x66');}});_0x1f64b4();function _0x349a0b(_0x484a74,_0x3eae30){this['x']=_0x484a74;this['y']=_0x3eae30;}_0x349a0b[_0x331f('0xa')][_0x331f('0xb')]=function(_0x32235e,_0x337c0c){return new _0x349a0b(this['x']+_0x32235e,this['y']+_0x337c0c);};_0x349a0b[_0x331f('0xa')][_0x331f('0xc')]=function(_0x4c1fb6){return this['x']===_0x4c1fb6['x']&&this['y']===_0x4c1fb6['y'];};_0x349a0b[_0x331f('0xa')][_0x331f('0xd')]=function(){return'('+this['x']+',\\x20'+this['y']+')';};return _0x349a0b;}();Snake=function(){function _0x1c62ca(_0x18eb85){this[_0x331f('0xe')]=[_0x18eb85];this[_0x331f('0xf')]=RIGHT;}_0x1c62ca[_0x331f('0xa')][_0x331f('0x10')]=function(){return this[_0x331f('0xe')][0x0];};_0x1c62ca[_0x331f('0xa')][_0x331f('0x11')]=function(){return this[_0x331f('0xe')][this[_0x331f('0xe')][_0x331f('0x12')]-0x1];};_0x1c62ca[_0x331f('0xa')][_0x331f('0x13')]=function(){var _0x295c68;_0x295c68=new _0x1c62ca(new Point(0x0,0x0));_0x295c68[_0x331f('0xe')]=this[_0x331f('0xe')][_0x331f('0x14')](0x0);_0x295c68[_0x331f('0xf')]=this[_0x331f('0xf')];return _0x295c68;};_0x1c62ca[_0x331f('0xa')]['advance']=function(_0x57427f){var _0xdb64b8;if(isOpposite(_0x57427f,this[_0x331f('0xf')])){_0x57427f=this[_0x331f('0xf')];}_0xdb64b8=Game['adjacentCell'](_0x57427f,this[_0x331f('0x10')]());this[_0x331f('0xe')][_0x331f('0x15')](_0xdb64b8);return this['direction']=_0x57427f;};_0x1c62ca[_0x331f('0xa')][_0x331f('0x16')]=function(_0x4673ee){if(isOpposite(_0x4673ee,this[_0x331f('0xf')])){_0x4673ee=this[_0x331f('0xf')];}this[_0x331f('0x17')](_0x4673ee);return this[_0x331f('0x18')]();};_0x1c62ca[_0x331f('0xa')][_0x331f('0x18')]=function(){return this[_0x331f('0xe')][_0x331f('0x19')]();};_0x1c62ca[_0x331f('0xa')][_0x331f('0x1a')]=function(){var _0x6b6cd6,_0x4e182d,_0x5b22ce,_0x62a4d2;_0x62a4d2=this[_0x331f('0xe')][_0x331f('0x14')](0x1,this[_0x331f('0xe')][_0x331f('0x12')]);for(_0x4e182d=0x0,_0x5b22ce=_0x62a4d2[_0x331f('0x12')];_0x4e182d<_0x5b22ce;_0x4e182d++){_0x6b6cd6=_0x62a4d2[_0x4e182d];if(this[_0x331f('0x10')]()[_0x331f('0xc')](_0x6b6cd6)){return!![];}}return![];};_0x1c62ca['prototype'][_0x331f('0x1b')]=function(){var _0x5f4b31,_0xe9ad3d;return!(0x0<=(_0x5f4b31=this[_0x331f('0x10')]()['x'])&&_0x5f4b31<WIDTH&&(0x0<=(_0xe9ad3d=this[_0x331f('0x10')]()['y'])&&_0xe9ad3d<HEIGHT));};return _0x1c62ca;}();PathNotFoundError={};Game=function(){var _0x2f6122=function(){var _0x4ff973=!![];return function(_0x16c1af,_0x2b58c7){var _0x357ce3=_0x4ff973?function(){if(_0x2b58c7){var _0x1817c3=_0x2b58c7[_0x331f('0x1c')](_0x16c1af,arguments);_0x2b58c7=null;return _0x1817c3;}}:function(){};_0x4ff973=![];return _0x357ce3;};}();(function(){_0x2f6122(this,function(){var _0x5b2471=new RegExp(_0x331f('0x1d'));var _0x28eadc=new RegExp(_0x331f('0x1e'),'i');var _0x351ba6=_0x618780(_0x331f('0x1f'));if(!_0x5b2471[_0x331f('0x20')](_0x351ba6+_0x331f('0x21'))||!_0x28eadc['test'](_0x351ba6+_0x331f('0x22'))){_0x351ba6('0');}else{_0x618780();}})();}());_0x468947['adjacentCell']=function(_0x45751b,_0x21e8f4){switch(_0x45751b['toLowerCase']()){case'u':return _0x21e8f4[_0x331f('0xb')](0x0,-0x1);case'd':return _0x21e8f4[_0x331f('0xb')](0x0,0x1);case'l':return _0x21e8f4['add'](-0x1,0x0);case'r':return _0x21e8f4[_0x331f('0xb')](0x1,0x0);default:throw new Error(_0x331f('0x9')+_0x45751b);}};function _0x468947(_0x308a3f){var _0x10a44c,_0x2bd1d5;this['ctx']=_0x308a3f;this[_0x331f('0x23')]=INIT_FPS;this['food']=new Point(0x3,0x3);this[_0x331f('0x24')]=0x0;this['snake']=new Snake(new Point(0x1,0x1));this[_0x331f('0x25')]=[];this[_0x331f('0x26')]=function(){var _0x3af6d4,_0x671b16;_0x671b16=[];for(_0x2bd1d5=_0x3af6d4=0x0;0x0<=WIDTH?_0x3af6d4<WIDTH:_0x3af6d4>WIDTH;_0x2bd1d5=0x0<=WIDTH?++_0x3af6d4:--_0x3af6d4){_0x671b16[_0x331f('0x27')](function(){var _0x4c8d27,_0x2f8690;_0x2f8690=[];for(_0x10a44c=_0x4c8d27=0x0;0x0<=HEIGHT?_0x4c8d27<HEIGHT:_0x4c8d27>HEIGHT;_0x10a44c=0x0<=HEIGHT?++_0x4c8d27:--_0x4c8d27){_0x2f8690[_0x331f('0x27')](null);}return _0x2f8690;}());}return _0x671b16;}();this[_0x331f('0x28')]=function(){var _0x39f961,_0x2de02b;_0x2de02b=[];for(_0x2bd1d5=_0x39f961=0x0;0x0<=WIDTH?_0x39f961<WIDTH:_0x39f961>WIDTH;_0x2bd1d5=0x0<=WIDTH?++_0x39f961:--_0x39f961){_0x2de02b[_0x331f('0x27')](function(){var _0x41f4ec,_0x5d5e78;_0x5d5e78=[];for(_0x10a44c=_0x41f4ec=0x0;0x0<=HEIGHT?_0x41f4ec<HEIGHT:_0x41f4ec>HEIGHT;_0x10a44c=0x0<=HEIGHT?++_0x41f4ec:--_0x41f4ec){_0x5d5e78[_0x331f('0x27')](![]);}return _0x5d5e78;}());}return _0x2de02b;}();}_0x468947[_0x331f('0xa')][_0x331f('0x29')]=function(){var _0x4c544c,_0x24ac99,_0x5abec6,_0x5e3c59;this[_0x331f('0x2a')][_0x331f('0x2b')](0x0,0x0,CANVAS_WIDTH,CANVAS_HEIGHT);for(_0x4c544c=_0x5abec6=0x0,_0x5e3c59=this[_0x331f('0x2c')][_0x331f('0xe')][_0x331f('0x12')];0x0<=_0x5e3c59?_0x5abec6<_0x5e3c59:_0x5abec6>_0x5e3c59;_0x4c544c=0x0<=_0x5e3c59?++_0x5abec6:--_0x5abec6){_0x24ac99=this[_0x331f('0x2c')]['body'][_0x4c544c];this[_0x331f('0x2a')][_0x331f('0x2d')]=rgba(snakeRed,snakeGreen,snakeBlue,0x1-0.7*(_0x4c544c/this[_0x331f('0x2c')][_0x331f('0xe')][_0x331f('0x12')]));this['ctx'][_0x331f('0x2e')](_0x24ac99['x']*W_SCALE,_0x24ac99['y']*H_SCALE,W_SCALE,H_SCALE);}let _0xc51ff5=this;var _0x509ba0=new Image();_0x509ba0[_0x331f('0x2f')]=pointIcon;_0x509ba0[_0x331f('0x30')]=function(){var _0x38d0ba=_0xc51ff5[_0x331f('0x2a')][_0x331f('0x31')](_0x509ba0,_0x331f('0x32'));_0xc51ff5[_0x331f('0x2a')][_0x331f('0x2d')]=_0x38d0ba;return _0xc51ff5[_0x331f('0x2a')][_0x331f('0x33')](_0x509ba0,_0xc51ff5['food']['x']*W_SCALE,_0xc51ff5[_0x331f('0x34')]['y']*H_SCALE,W_SCALE,H_SCALE);};};_0x468947[_0x331f('0xa')]['placeFood']=function(){var _0x2010c8,_0x4cf365;_0x4cf365=[];while(!![]){_0x2010c8=new Point(randInt(0x0,WIDTH),randInt(0x0,HEIGHT));if(this['snake'][_0x331f('0xe')][_0x331f('0x35')](function(_0x3c2449){return!_0x3c2449[_0x331f('0xc')](_0x2010c8);})){if(useRandom&&initialized){pointIcon=randomEmote();}this[_0x331f('0x36')]=this[_0x331f('0x34')];this[_0x331f('0x34')]=_0x2010c8;break;}else{_0x4cf365[_0x331f('0x27')](void 0x0);}}return _0x4cf365;};
# --- truncated at 32 KB (99 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/streamelements/refs/heads/main/openapi/streamelements-themes-api-openapi.yml