├── .github └── FUNDING.yml ├── COPYING ├── PRIVACYPOLICY.md ├── README.md ├── Shared ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Bridge.h ├── Builder │ ├── SignedBuilder.swift │ └── SignedContext.swift ├── ContentView.swift ├── DataModel.xcdatamodeld │ └── DataModel.xcdatamodel │ │ └── contents ├── Drawables │ ├── Drawables.metal │ └── Drawables.swift ├── Files │ ├── ace │ │ ├── ace.js │ │ ├── ext-beautify.js │ │ ├── ext-code_lens.js │ │ ├── ext-elastic_tabstops_lite.js │ │ ├── ext-emmet.js │ │ ├── ext-error_marker.js │ │ ├── ext-keybinding_menu.js │ │ ├── ext-language_tools.js │ │ ├── ext-linking.js │ │ ├── ext-modelist.js │ │ ├── ext-options.js │ │ ├── ext-prompt.js │ │ ├── ext-rtl.js │ │ ├── ext-searchbox.js │ │ ├── ext-settings_menu.js │ │ ├── ext-spellcheck.js │ │ ├── ext-split.js │ │ ├── ext-static_highlight.js │ │ ├── ext-statusbar.js │ │ ├── ext-textarea.js │ │ ├── ext-themelist.js │ │ ├── ext-whitespace.js │ │ ├── keybinding-emacs.js │ │ ├── keybinding-sublime.js │ │ ├── keybinding-vim.js │ │ ├── keybinding-vscode.js │ │ ├── mode-abap.js │ │ ├── mode-abc.js │ │ ├── mode-actionscript.js │ │ ├── mode-ada.js │ │ ├── mode-alda.js │ │ ├── mode-apache_conf.js │ │ ├── mode-apex.js │ │ ├── mode-applescript.js │ │ ├── mode-aql.js │ │ ├── mode-asciidoc.js │ │ ├── mode-asl.js │ │ ├── mode-assembly_x86.js │ │ ├── mode-autohotkey.js │ │ ├── mode-batchfile.js │ │ ├── mode-c9search.js │ │ ├── mode-c_cpp.js │ │ ├── mode-cirru.js │ │ ├── mode-clojure.js │ │ ├── mode-cobol.js │ │ ├── mode-coffee.js │ │ ├── mode-coldfusion.js │ │ ├── mode-crystal.js │ │ ├── mode-csharp.js │ │ ├── mode-csound_document.js │ │ ├── mode-csound_orchestra.js │ │ ├── mode-csound_score.js │ │ ├── mode-csp.js │ │ ├── mode-css.js │ │ ├── mode-curly.js │ │ ├── mode-d.js │ │ ├── mode-dart.js │ │ ├── mode-denrim.js │ │ ├── mode-diff.js │ │ ├── mode-django.js │ │ ├── mode-dockerfile.js │ │ ├── mode-dot.js │ │ ├── mode-drools.js │ │ ├── mode-edifact.js │ │ ├── mode-eiffel.js │ │ ├── mode-ejs.js │ │ ├── mode-elixir.js │ │ ├── mode-elm.js │ │ ├── mode-erlang.js │ │ ├── mode-forth.js │ │ ├── mode-fortran.js │ │ ├── mode-fsharp.js │ │ ├── mode-fsl.js │ │ ├── mode-ftl.js │ │ ├── mode-gcode.js │ │ ├── mode-gherkin.js │ │ ├── mode-gitignore.js │ │ ├── mode-glsl.js │ │ ├── mode-gobstones.js │ │ ├── mode-golang.js │ │ ├── mode-graphqlschema.js │ │ ├── mode-groovy.js │ │ ├── mode-haml.js │ │ ├── mode-handlebars.js │ │ ├── mode-haskell.js │ │ ├── mode-haskell_cabal.js │ │ ├── mode-haxe.js │ │ ├── mode-hjson.js │ │ ├── mode-html.js │ │ ├── mode-html_elixir.js │ │ ├── mode-html_ruby.js │ │ ├── mode-ini.js │ │ ├── mode-io.js │ │ ├── mode-jack.js │ │ ├── mode-jade.js │ │ ├── mode-java.js │ │ ├── mode-javascript.js │ │ ├── mode-json.js │ │ ├── mode-json5.js │ │ ├── mode-jsoniq.js │ │ ├── mode-jsp.js │ │ ├── mode-jssm.js │ │ ├── mode-jsx.js │ │ ├── mode-julia.js │ │ ├── mode-kotlin.js │ │ ├── mode-latex.js │ │ ├── mode-less.js │ │ ├── mode-liquid.js │ │ ├── mode-lisp.js │ │ ├── mode-livescript.js │ │ ├── mode-logiql.js │ │ ├── mode-logtalk.js │ │ ├── mode-lsl.js │ │ ├── mode-lua.js │ │ ├── mode-luapage.js │ │ ├── mode-lucene.js │ │ ├── mode-makefile.js │ │ ├── mode-markdown.js │ │ ├── mode-mask.js │ │ ├── mode-matlab.js │ │ ├── mode-maze.js │ │ ├── mode-mediawiki.js │ │ ├── mode-mel.js │ │ ├── mode-mixal.js │ │ ├── mode-mode-denrim.js │ │ ├── mode-mushcode.js │ │ ├── mode-mysql.js │ │ ├── mode-nginx.js │ │ ├── mode-nim.js │ │ ├── mode-nix.js │ │ ├── mode-nsis.js │ │ ├── mode-nunjucks.js │ │ ├── mode-objectivec.js │ │ ├── mode-ocaml.js │ │ ├── mode-pascal.js │ │ ├── mode-perl.js │ │ ├── mode-perl6.js │ │ ├── mode-pgsql.js │ │ ├── mode-php.js │ │ ├── mode-php_laravel_blade.js │ │ ├── mode-pig.js │ │ ├── mode-plain_text.js │ │ ├── mode-powershell.js │ │ ├── mode-praat.js │ │ ├── mode-prisma.js │ │ ├── mode-prolog.js │ │ ├── mode-properties.js │ │ ├── mode-protobuf.js │ │ ├── mode-puppet.js │ │ ├── mode-python.js │ │ ├── mode-qml.js │ │ ├── mode-r.js │ │ ├── mode-razor.js │ │ ├── mode-rdoc.js │ │ ├── mode-red.js │ │ ├── mode-redshift.js │ │ ├── mode-rhtml.js │ │ ├── mode-rst.js │ │ ├── mode-ruby.js │ │ ├── mode-rust.js │ │ ├── mode-sass.js │ │ ├── mode-scad.js │ │ ├── mode-scala.js │ │ ├── mode-scheme.js │ │ ├── mode-scss.js │ │ ├── mode-sh.js │ │ ├── mode-signed.js │ │ ├── mode-sjs.js │ │ ├── mode-slim.js │ │ ├── mode-smarty.js │ │ ├── mode-smithy.js │ │ ├── mode-snippets.js │ │ ├── mode-soy_template.js │ │ ├── mode-space.js │ │ ├── mode-sparql.js │ │ ├── mode-sql.js │ │ ├── mode-sqlserver.js │ │ ├── mode-stylus.js │ │ ├── mode-svg.js │ │ ├── mode-swift.js │ │ ├── mode-tcl.js │ │ ├── mode-terraform.js │ │ ├── mode-tex.js │ │ ├── mode-text.js │ │ ├── mode-textile.js │ │ ├── mode-toml.js │ │ ├── mode-tsx.js │ │ ├── mode-turtle.js │ │ ├── mode-twig.js │ │ ├── mode-typescript.js │ │ ├── mode-vala.js │ │ ├── mode-vbscript.js │ │ ├── mode-velocity.js │ │ ├── mode-verilog.js │ │ ├── mode-vhdl.js │ │ ├── mode-visualforce.js │ │ ├── mode-wollok.js │ │ ├── mode-xml.js │ │ ├── mode-xquery.js │ │ ├── mode-yaml.js │ │ ├── mode-zeek.js │ │ ├── snippets │ │ │ ├── abap.js │ │ │ ├── abc.js │ │ │ ├── actionscript.js │ │ │ ├── ada.js │ │ │ ├── alda.js │ │ │ ├── apache_conf.js │ │ │ ├── apex.js │ │ │ ├── applescript.js │ │ │ ├── aql.js │ │ │ ├── asciidoc.js │ │ │ ├── asl.js │ │ │ ├── assembly_x86.js │ │ │ ├── autohotkey.js │ │ │ ├── batchfile.js │ │ │ ├── c9search.js │ │ │ ├── c_cpp.js │ │ │ ├── cirru.js │ │ │ ├── clojure.js │ │ │ ├── cobol.js │ │ │ ├── coffee.js │ │ │ ├── coldfusion.js │ │ │ ├── crystal.js │ │ │ ├── csharp.js │ │ │ ├── csound_document.js │ │ │ ├── csound_orchestra.js │ │ │ ├── csound_score.js │ │ │ ├── csp.js │ │ │ ├── css.js │ │ │ ├── curly.js │ │ │ ├── d.js │ │ │ ├── dart.js │ │ │ ├── denrim.js │ │ │ ├── diff.js │ │ │ ├── django.js │ │ │ ├── dockerfile.js │ │ │ ├── dot.js │ │ │ ├── drools.js │ │ │ ├── edifact.js │ │ │ ├── eiffel.js │ │ │ ├── ejs.js │ │ │ ├── elixir.js │ │ │ ├── elm.js │ │ │ ├── erlang.js │ │ │ ├── forth.js │ │ │ ├── fortran.js │ │ │ ├── fsharp.js │ │ │ ├── fsl.js │ │ │ ├── ftl.js │ │ │ ├── gcode.js │ │ │ ├── gherkin.js │ │ │ ├── gitignore.js │ │ │ ├── glsl.js │ │ │ ├── gobstones.js │ │ │ ├── golang.js │ │ │ ├── graphqlschema.js │ │ │ ├── groovy.js │ │ │ ├── haml.js │ │ │ ├── handlebars.js │ │ │ ├── haskell.js │ │ │ ├── haskell_cabal.js │ │ │ ├── haxe.js │ │ │ ├── hjson.js │ │ │ ├── html.js │ │ │ ├── html_elixir.js │ │ │ ├── html_ruby.js │ │ │ ├── ini.js │ │ │ ├── io.js │ │ │ ├── jack.js │ │ │ ├── jade.js │ │ │ ├── java.js │ │ │ ├── javascript.js │ │ │ ├── json.js │ │ │ ├── json5.js │ │ │ ├── jsoniq.js │ │ │ ├── jsp.js │ │ │ ├── jssm.js │ │ │ ├── jsx.js │ │ │ ├── julia.js │ │ │ ├── kotlin.js │ │ │ ├── latex.js │ │ │ ├── less.js │ │ │ ├── liquid.js │ │ │ ├── lisp.js │ │ │ ├── livescript.js │ │ │ ├── logiql.js │ │ │ ├── logtalk.js │ │ │ ├── lsl.js │ │ │ ├── lua.js │ │ │ ├── luapage.js │ │ │ ├── lucene.js │ │ │ ├── makefile.js │ │ │ ├── markdown.js │ │ │ ├── mask.js │ │ │ ├── matlab.js │ │ │ ├── maze.js │ │ │ ├── mediawiki.js │ │ │ ├── mel.js │ │ │ ├── mixal.js │ │ │ ├── mode-denrim.js │ │ │ ├── mushcode.js │ │ │ ├── mysql.js │ │ │ ├── nginx.js │ │ │ ├── nim.js │ │ │ ├── nix.js │ │ │ ├── nsis.js │ │ │ ├── nunjucks.js │ │ │ ├── objectivec.js │ │ │ ├── ocaml.js │ │ │ ├── pascal.js │ │ │ ├── perl.js │ │ │ ├── perl6.js │ │ │ ├── pgsql.js │ │ │ ├── php.js │ │ │ ├── php_laravel_blade.js │ │ │ ├── pig.js │ │ │ ├── plain_text.js │ │ │ ├── powershell.js │ │ │ ├── praat.js │ │ │ ├── prisma.js │ │ │ ├── prolog.js │ │ │ ├── properties.js │ │ │ ├── protobuf.js │ │ │ ├── puppet.js │ │ │ ├── python.js │ │ │ ├── qml.js │ │ │ ├── r.js │ │ │ ├── razor.js │ │ │ ├── rdoc.js │ │ │ ├── red.js │ │ │ ├── redshift.js │ │ │ ├── rhtml.js │ │ │ ├── rst.js │ │ │ ├── ruby.js │ │ │ ├── rust.js │ │ │ ├── sass.js │ │ │ ├── scad.js │ │ │ ├── scala.js │ │ │ ├── scheme.js │ │ │ ├── scss.js │ │ │ ├── sh.js │ │ │ ├── signed.js │ │ │ ├── sjs.js │ │ │ ├── slim.js │ │ │ ├── smarty.js │ │ │ ├── smithy.js │ │ │ ├── snippets.js │ │ │ ├── soy_template.js │ │ │ ├── space.js │ │ │ ├── sparql.js │ │ │ ├── sql.js │ │ │ ├── sqlserver.js │ │ │ ├── stylus.js │ │ │ ├── svg.js │ │ │ ├── swift.js │ │ │ ├── tcl.js │ │ │ ├── terraform.js │ │ │ ├── tex.js │ │ │ ├── text.js │ │ │ ├── textile.js │ │ │ ├── toml.js │ │ │ ├── tsx.js │ │ │ ├── turtle.js │ │ │ ├── twig.js │ │ │ ├── typescript.js │ │ │ ├── vala.js │ │ │ ├── vbscript.js │ │ │ ├── velocity.js │ │ │ ├── verilog.js │ │ │ ├── vhdl.js │ │ │ ├── visualforce.js │ │ │ ├── wollok.js │ │ │ ├── xml.js │ │ │ ├── xquery.js │ │ │ ├── yaml.js │ │ │ └── zeek.js │ │ ├── theme-ambiance.js │ │ ├── theme-chaos.js │ │ ├── theme-chrome.js │ │ ├── theme-clouds.js │ │ ├── theme-clouds_midnight.js │ │ ├── theme-cobalt.js │ │ ├── theme-crimson_editor.js │ │ ├── theme-dawn.js │ │ ├── theme-dracula.js │ │ ├── theme-dreamweaver.js │ │ ├── theme-eclipse.js │ │ ├── theme-github.js │ │ ├── theme-gob.js │ │ ├── theme-gruvbox.js │ │ ├── theme-idle_fingers.js │ │ ├── theme-iplastic.js │ │ ├── theme-katzenmilch.js │ │ ├── theme-kr_theme.js │ │ ├── theme-kuroir.js │ │ ├── theme-merbivore.js │ │ ├── theme-merbivore_soft.js │ │ ├── theme-mono_industrial.js │ │ ├── theme-monokai.js │ │ ├── theme-nord_dark.js │ │ ├── theme-pastel_on_dark.js │ │ ├── theme-solarized_dark.js │ │ ├── theme-solarized_light.js │ │ ├── theme-sqlserver.js │ │ ├── theme-terminal.js │ │ ├── theme-textmate.js │ │ ├── theme-tomorrow.js │ │ ├── theme-tomorrow_night.js │ │ ├── theme-tomorrow_night_blue.js │ │ ├── theme-tomorrow_night_bright.js │ │ ├── theme-tomorrow_night_eighties.js │ │ ├── theme-twilight.js │ │ ├── theme-vibrant_ink.js │ │ ├── theme-xcode.js │ │ ├── worker-base.js │ │ ├── worker-coffee.js │ │ ├── worker-css.js │ │ ├── worker-html.js │ │ ├── worker-javascript.js │ │ ├── worker-json.js │ │ ├── worker-lua.js │ │ ├── worker-php.js │ │ ├── worker-xml.js │ │ └── worker-xquery.js │ ├── default │ │ └── main │ ├── help.cpp │ ├── help │ │ └── introduction.md │ ├── index.html │ ├── iro │ └── lua │ │ └── vec3.lua ├── Lua │ ├── Boolean.swift │ ├── ExtraTypes.swift │ ├── Function.swift │ ├── Nil.swift │ ├── Number.swift │ ├── String.swift │ ├── Table.swift │ ├── Thread.swift │ ├── Userdata.swift │ ├── Value.swift │ └── VirtualMachine.swift ├── LuaSource │ ├── LuaSource.h │ ├── LuaSource.m │ ├── lapi.c │ ├── lapi.h │ ├── lauxlib.c │ ├── lauxlib.h │ ├── lbaselib.c │ ├── lbitlib.c │ ├── lcode.c │ ├── lcode.h │ ├── lcorolib.c │ ├── lctype.c │ ├── lctype.h │ ├── ldblib.c │ ├── ldebug.c │ ├── ldebug.h │ ├── ldo.c │ ├── ldo.h │ ├── ldump.c │ ├── lfunc.c │ ├── lfunc.h │ ├── lgc.c │ ├── lgc.h │ ├── linit.c │ ├── liolib.c │ ├── llex.c │ ├── llex.h │ ├── llimits.h │ ├── lmathlib.c │ ├── lmem.c │ ├── lmem.h │ ├── loadlib.c │ ├── lobject.c │ ├── lobject.h │ ├── lopcodes.c │ ├── lopcodes.h │ ├── loslib.c │ ├── lparser.c │ ├── lparser.h │ ├── lprefix.h │ ├── lstate.c │ ├── lstate.h │ ├── lstring.c │ ├── lstring.h │ ├── lstrlib.c │ ├── ltable.c │ ├── ltable.h │ ├── ltablib.c │ ├── ltm.c │ ├── ltm.h │ ├── lua.h │ ├── luaconf.h │ ├── lualib.h │ ├── lundump.c │ ├── lundump.h │ ├── lutf8lib.c │ ├── lvm.c │ ├── lvm.h │ ├── lzio.c │ └── lzio.h ├── MathLibrary.swift ├── Metal.h ├── Misc │ ├── ScriptProcessor.swift │ └── Utils.swift ├── Model │ ├── Model.swift │ ├── SignedCameras.swift │ ├── SignedCommand.swift │ ├── SignedData.swift │ ├── SignedMaterial.swift │ ├── SignedObject.swift │ └── SignedProject.swift ├── ModelerPipeline │ ├── Modeler.metal │ ├── ModelerPipeline.swift │ ├── ModelerPolygonise.swift │ ├── ModelerPolygoniseChunk.swift │ └── ModelerStates.swift ├── PersistenceController.swift ├── RenderPipeline │ ├── Render.metal │ ├── RenderPipeline.swift │ └── RenderStates.swift ├── SignedApp.swift ├── SignedDocument.swift ├── StoreManager.swift └── Views │ ├── BrowserView.swift │ ├── CodeEditor.swift │ ├── DataView.swift │ ├── EditorView.swift │ ├── HelpView.swift │ ├── InfoView.swift │ ├── MaterialDetailsView.swift │ ├── MaterialView.swift │ ├── ModuleView.swift │ ├── ObjectDetailsView.swift │ ├── ObjectView.swift │ ├── PreviewView.swift │ ├── ProgressView.swift │ ├── ProjectView.swift │ ├── RenderView.swift │ ├── ShapeDetailsView.swift │ ├── ShapeView.swift │ └── SideView.swift ├── Signed.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ │ └── Package.resolved │ └── xcuserdata │ │ ├── markusm.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── markusmoenig.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcshareddata │ └── xcschemes │ │ ├── Signed (iOS).xcscheme │ │ └── Signed (macOS).xcscheme └── xcuserdata │ └── markusm.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── iOS ├── Info.plist └── iOS.entitlements ├── images ├── appstore.svg └── screen.png └── macOS ├── Info.plist └── macOS.entitlements /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: markusmoenig 2 | -------------------------------------------------------------------------------- /Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Shared/Bridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // Bridge.h 3 | // Bridge 4 | // 5 | // Created by Markus Moenig on 15/8/21. 6 | // 7 | 8 | #ifndef Bridge_h 9 | #define Bridge_h 10 | 11 | #import "Metal.h" 12 | 13 | // Lua 14 | 15 | @import Foundation; 16 | 17 | extern int SDegutisLuaRegistryIndex; 18 | 19 | //! Project version number for LuaSource. 20 | FOUNDATION_EXPORT double LuaSourceVersionNumber; 21 | 22 | //! Project version string for LuaSource. 23 | FOUNDATION_EXPORT const unsigned char LuaSourceVersionString[]; 24 | 25 | // In this header, you should import all the public headers of your framework using statements like #import 26 | 27 | #import "lapi.h" 28 | #import "lauxlib.h" 29 | #import "lcode.h" 30 | #import "lctype.h" 31 | #import "ldebug.h" 32 | #import "ldo.h" 33 | #import "lfunc.h" 34 | #import "lgc.h" 35 | #import "llex.h" 36 | #import "llimits.h" 37 | #import "lmem.h" 38 | #import "lobject.h" 39 | #import "lopcodes.h" 40 | #import "lparser.h" 41 | #import "lprefix.h" 42 | #import "lstate.h" 43 | #import "lstring.h" 44 | #import "ltable.h" 45 | #import "ltm.h" 46 | #import "lua.h" 47 | #import "luaconf.h" 48 | #import "lualib.h" 49 | #import "lundump.h" 50 | #import "lvm.h" 51 | #import "lzio.h" 52 | 53 | #endif /* Bridge_h */ 54 | -------------------------------------------------------------------------------- /Shared/Builder/SignedContext.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SignedContext.swift 3 | // SignedContext 4 | // 5 | // Created by Markus Moenig on 16/8/21. 6 | // 7 | 8 | import Foundation 9 | 10 | class SignedContext { 11 | 12 | let model : Model 13 | let kit : ModelerKit 14 | 15 | var scriptStartTime : Double = 0 16 | var scriptEndTime : Double = 0 17 | 18 | var hasErrors = false 19 | 20 | var commands : [String:SignedCommand] = [:] 21 | 22 | init(model: Model, kit: ModelerKit) { 23 | self.model = model 24 | self.kit = kit 25 | } 26 | 27 | deinit { 28 | commands = [:] 29 | } 30 | 31 | /// Adds the given cmd to the modeler pipeline 32 | func addToPipeline(cmd: SignedCommand) { 33 | if let copy = cmd.copy() { 34 | kit.pipeline.append(copy) 35 | } 36 | 37 | if kit.role == .main { 38 | model.progressTotal += 1 39 | sendProgressNotification() 40 | } 41 | } 42 | 43 | func sendProgressNotification() { 44 | DispatchQueue.main.async { 45 | self.model.progressChanged.send() 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Shared/Files/ace/ext-error_marker.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/ext/error_marker"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/ext-linking.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("../editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); (function() { 2 | window.require(["ace/ext/linking"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/ext-spellcheck.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="\x01\x01",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); (function() { 2 | window.require(["ace/ext/spellcheck"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/ext-statusbar.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s}); (function() { 2 | window.require(["ace/ext/statusbar"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/ext-themelist.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/themelist",["require","exports","module"],function(e,t,n){"use strict";var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["Xcode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Dracula","","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Nord Dark","nord_dark","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); (function() { 2 | window.require(["ace/ext/themelist"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-csp.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language":"child-src|connect-src|default-src|font-src|frame-src|img-src|manifest-src|media-src|object-src|script-src|style-src|worker-src|base-uri|plugin-types|sandbox|disown-opener|form-action|frame-ancestors|report-uri|report-to|upgrade-insecure-requests|block-all-mixed-content|require-sri-for|reflected-xss|referrer|policy-uri",variable:"'none'|'self'|'unsafe-inline'|'unsafe-eval'|'strict-dynamic'|'unsafe-hashed-attributes'"},"identifier",!0);this.$rules={start:[{token:"string.link",regex:/https?:[^;\s]*/},{token:"operator.punctuation",regex:/;/},{token:e,regex:/[^\s;]+/}]}};r.inherits(s,i),t.CspHighlightRules=s}),define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./text").Mode,i=e("./csp_highlight_rules").CspHighlightRules,s=e("../lib/oop"),o=function(){this.HighlightRules=i};s.inherits(o,r),function(){this.$id="ace/mode/csp"}.call(o.prototype),t.Mode=o}); (function() { 2 | window.require(["ace/mode/csp"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-gcode.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL",t="PI",n="ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\(.*\\)"},{token:"comment",regex:"([N])([0-9]+)"},{token:"string",regex:"([G])([0-9]+\\.?[0-9]?)"},{token:"string",regex:"([M])([0-9]+\\.?[0-9]?)"},{token:"constant.numeric",regex:"([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"},{token:r,regex:"[A-Z]"},{token:"keyword.operator",regex:"EQ|LT|GT|NE|GE|LE|OR|XOR"},{token:"paren.lparen",regex:"[\\[]"},{token:"paren.rparen",regex:"[\\]]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.GcodeHighlightRules=s}),define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gcode_highlight_rules").GcodeHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/gcode"}.call(u.prototype),t.Mode=u}); (function() { 2 | window.require(["ace/mode/gcode"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-gitignore.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};s.metaData={fileTypes:["gitignore"],name:"Gitignore"},r.inherits(s,i),t.GitignoreHighlightRules=s}),define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gitignore_highlight_rules").GitignoreHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(o.prototype),t.Mode=o}); (function() { 2 | window.require(["ace/mode/gitignore"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-lisp.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq|neq|and|or",n="null|nil",r="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.lisp","text","entity.name.function.lisp"],regex:"(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:["punctuation.definition.constant.character.lisp","constant.character.lisp"],regex:"(#)((?:\\w|[\\\\+-=<>'\"&#])+)"},{token:["punctuation.definition.variable.lisp","variable.other.global.lisp","punctuation.definition.variable.lisp"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.lisp",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}]}};r.inherits(s,i),t.LispHighlightRules=s}),define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lisp_highlight_rules").LispHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart=";",this.$id="ace/mode/lisp"}.call(o.prototype),t.Mode=o}); (function() { 2 | window.require(["ace/mode/lisp"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-plain_text.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u}); (function() { 2 | window.require(["ace/mode/plain_text"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-properties.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}); (function() { 2 | window.require(["ace/mode/properties"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-space.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++nl){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&ul){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./toml_highlight_rules").TomlHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/toml"}.call(u.prototype),t.Mode=u}); (function() { 2 | window.require(["ace/mode/toml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/mode-vhdl.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="access|after|ailas|all|architecture|assert|attribute|begin|block|buffer|bus|case|component|configuration|disconnect|downto|else|elsif|end|entity|file|for|function|generate|generic|guarded|if|impure|in|inertial|inout|is|label|linkage|literal|loop|mapnew|next|of|on|open|others|out|port|process|pure|range|record|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|united|until|wait|when|while|with",t="bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|signed|std_logic|std_logic_vector|string||text|time|unsigned|variable",n="array|constant",r="abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",i="true|false|null",s=this.createKeywordMapper({"keyword.operator":r,keyword:e,"constant.language":i,"storage.modifier":n,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.VHDLHighlightRules=s}),define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vhdl_highlight_rules").VHDLHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(o.prototype),t.Mode=o}); (function() { 2 | window.require(["ace/mode/vhdl"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/abap.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/abap"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/abc.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/abc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='\nsnippet zupfnoter.print\n %%%%hn.print {"startpos": ${1:pos_y}, "t":"${2:title}", "v":[${3:voices}], "s":[[${4:syncvoices}1,2]], "f":[${5:flowlines}], "sf":[${6:subflowlines}], "j":[${7:jumplines}]}\n\nsnippet zupfnoter.note\n %%%%hn.note {"pos": [${1:pos_x},${2:pos_y}], "text": "${3:text}", "style": "${4:style}"}\n\nsnippet zupfnoter.annotation\n %%%%hn.annotation {"id": "${1:id}", "pos": [${2:pos}], "text": "${3:text}"}\n\nsnippet zupfnoter.lyrics\n %%%%hn.lyrics {"pos": [${1:x_pos},${2:y_pos}]}\n\nsnippet zupfnoter.legend\n %%%%hn.legend {"pos": [${1:x_pos},${2:y_pos}]}\n\n\n\nsnippet zupfnoter.target\n "^:${1:target}"\n\nsnippet zupfnoter.goto\n "^@${1:target}@${2:distance}"\n\nsnippet zupfnoter.annotationref\n "^#${1:target}"\n\nsnippet zupfnoter.annotation\n "^!${1:text}@${2:x_offset},${3:y_offset}"\n\n\n',t.scope="abc"}); (function() { 2 | window.require(["ace/snippets/abc"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/ada.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/ada"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/alda.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/alda"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/apache_conf.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/apache_conf"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/apex.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/apex"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/applescript.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/applescript"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/aql.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/aql"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/asciidoc.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/asciidoc"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/asl.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/asl"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/assembly_x86.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/assembly_x86"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/autohotkey.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/autohotkey"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/batchfile.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/batchfile"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/c9search.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/c9search"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/cirru.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/cirru"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/clojure.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/clojure",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet comm\n (comment\n ${1}\n )\nsnippet condp\n (condp ${1:pred} ${2:expr}\n ${3})\nsnippet def\n (def ${1})\nsnippet defm\n (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]\n ${5})\nsnippet defmm\n (defmulti ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defma\n (defmacro ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defn\n (defn ${1:name} "${2:doc-string}" [${3:arg-list}]\n ${4})\nsnippet defp\n (defprotocol ${1:name}\n ${2})\nsnippet defr\n (defrecord ${1:name} [${2:fields}]\n ${3:protocol}\n ${4})\nsnippet deft\n (deftest ${1:name}\n (is (= ${2:assertion})))\n ${3})\nsnippet is\n (is (= ${1} ${2}))\nsnippet defty\n (deftype ${1:Name} [${2:fields}]\n ${3:Protocol}\n ${4})\nsnippet doseq\n (doseq [${1:elem} ${2:coll}]\n ${3})\nsnippet fn\n (fn [${1:arg-list}] ${2})\nsnippet if\n (if ${1:test-expr}\n ${2:then-expr}\n ${3:else-expr})\nsnippet if-let \n (if-let [${1:result} ${2:test-expr}]\n (${3:then-expr} $1)\n (${4:else-expr}))\nsnippet imp\n (:import [${1:package}])\n & {:keys [${1:keys}] :or {${2:defaults}}}\nsnippet let\n (let [${1:name} ${2:expr}]\n ${3})\nsnippet letfn\n (letfn [(${1:name) [${2:args}]\n ${3})])\nsnippet map\n (map ${1:func} ${2:coll})\nsnippet mapl\n (map #(${1:lambda}) ${2:coll})\nsnippet met\n (${1:name} [${2:this} ${3:args}]\n ${4})\nsnippet ns\n (ns ${1:name}\n ${2})\nsnippet dotimes\n (dotimes [_ 10]\n (time\n (dotimes [_ ${1:times}]\n ${2})))\nsnippet pmethod\n (${1:name} [${2:this} ${3:args}])\nsnippet refer\n (:refer-clojure :exclude [${1}])\nsnippet require\n (:require [${1:namespace} :as [${2}]])\nsnippet use\n (:use [${1:namespace} :only [${2}]])\nsnippet print\n (println ${1})\nsnippet reduce\n (reduce ${1:(fn [p n] ${3})} ${2})\nsnippet when\n (when ${1:test} ${2:body})\nsnippet when-let\n (when-let [${1:result} ${2:test}]\n ${3:body})\n',t.scope="clojure"}); (function() { 2 | window.require(["ace/snippets/clojure"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/cobol.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/cobol"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/coffee.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/coffee",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Closure loop\nsnippet forindo\n for ${1:name} in ${2:array}\n do ($1) ->\n ${3:// body}\n# Array comprehension\nsnippet fora\n for ${1:name} in ${2:array}\n ${3:// body...}\n# Object comprehension\nsnippet foro\n for ${1:key}, ${2:value} of ${3:object}\n ${4:// body...}\n# Range comprehension (inclusive)\nsnippet forr\n for ${1:name} in [${2:start}..${3:finish}]\n ${4:// body...}\nsnippet forrb\n for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n ${5:// body...}\n# Range comprehension (exclusive)\nsnippet forrex\n for ${1:name} in [${2:start}...${3:finish}]\n ${4:// body...}\nsnippet forrexb\n for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n ${5:// body...}\n# Function\nsnippet fun\n (${1:args}) ->\n ${2:// body...}\n# Function (bound)\nsnippet bfun\n (${1:args}) =>\n ${2:// body...}\n# Class\nsnippet cla class ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n ${2}\nsnippet cla class .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n constructor: (${2:args}) ->\n ${3}\n\n ${4}\nsnippet cla class .. extends ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n ${3}\nsnippet cla class .. extends .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n constructor: (${3:args}) ->\n ${4}\n\n ${5}\n# If\nsnippet if\n if ${1:condition}\n ${2:// body...}\n# If __ Else\nsnippet ife\n if ${1:condition}\n ${2:// body...}\n else\n ${3:// body...}\n# Else if\nsnippet elif\n else if ${1:condition}\n ${2:// body...}\n# Ternary If\nsnippet ifte\n if ${1:condition} then ${2:value} else ${3:other}\n# Unless\nsnippet unl\n ${1:action} unless ${2:condition}\n# Switch\nsnippet swi\n switch ${1:object}\n when ${2:value}\n ${3:// body...}\n\n# Log\nsnippet log\n console.log ${1}\n# Try __ Catch\nsnippet try\n try\n ${1}\n catch ${2:error}\n ${3}\n# Require\nsnippet req\n ${2:$1} = require '${1:sys}'${3}\n# Export\nsnippet exp\n ${1:root} = exports ? this\n",t.scope="coffee"}); (function() { 2 | window.require(["ace/snippets/coffee"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/coldfusion.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/coldfusion"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/crystal.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/crystal"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/csharp.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/csharp"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/csound_document.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/csound_document",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# \nsnippet synth\n \n \n ${1}\n \n \n e\n \n \n",t.scope="csound_document"}); (function() { 2 | window.require(["ace/snippets/csound_document"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/csound_orchestra.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/csound_orchestra",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# else\nsnippet else\n else\n ${1:/* statements */}\n# elseif\nsnippet elseif\n elseif ${1:/* condition */} then\n ${2:/* statements */}\n# if\nsnippet if\n if ${1:/* condition */} then\n ${2:/* statements */}\n endif\n# instrument block\nsnippet instr\n instr ${1:name}\n ${2:/* statements */}\n endin\n# i-time while loop\nsnippet iwhile\n i${1:Index} = ${2:0}\n while i${1:Index} < ${3:/* count */} do\n ${4:/* statements */}\n i${1:Index} += 1\n od\n# k-rate while loop\nsnippet kwhile\n k${1:Index} = ${2:0}\n while k${1:Index} < ${3:/* count */} do\n ${4:/* statements */}\n k${1:Index} += 1\n od\n# opcode\nsnippet opcode\n opcode ${1:name}, ${2:/* output types */ 0}, ${3:/* input types */ 0}\n ${4:/* statements */}\n endop\n# until loop\nsnippet until\n until ${1:/* condition */} do\n ${2:/* statements */}\n od\n# while loop\nsnippet while\n while ${1:/* condition */} do\n ${2:/* statements */}\n od\n",t.scope="csound_orchestra"}); (function() { 2 | window.require(["ace/snippets/csound_orchestra"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/csound_score.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/csound_score"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/csp.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/csp"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/curly.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/curly"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/d.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/d"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/dart.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/dart",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet lib\n library ${1};\n ${2}\nsnippet im\n import '${1}';\n ${2}\nsnippet pa\n part '${1}';\n ${2}\nsnippet pao\n part of ${1};\n ${2}\nsnippet main\n void main() {\n ${1:/* code */}\n }\nsnippet st\n static ${1}\nsnippet fi\n final ${1}\nsnippet re\n return ${1}\nsnippet br\n break;\nsnippet th\n throw ${1}\nsnippet cl\n class ${1:`Filename(\"\", \"untitled\")`} ${2}\nsnippet imp\n implements ${1}\nsnippet ext\n extends ${1}\nsnippet if\n if (${1:true}) {\n ${2}\n }\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${3}\n }\nsnippet el\n else\nsnippet sw\n switch (${1}) {\n ${2}\n }\nsnippet cs\n case ${1}:\n ${2}\nsnippet de\n default:\n ${1}\nsnippet for\n for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n ${4:$1[$2]}\n }\nsnippet fore\n for (final ${2:item} in ${1:itemList}) {\n ${3:/* code */}\n }\nsnippet wh\n while (${1:/* condition */}) {\n ${2:/* code */}\n }\nsnippet dowh\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\nsnippet as\n assert(${1:/* condition */});\nsnippet try\n try {\n ${2}\n } catch (${1:Exception e}) {\n }\nsnippet tryf\n try {\n ${2}\n } catch (${1:Exception e}) {\n } finally {\n }\n",t.scope="dart"}); (function() { 2 | window.require(["ace/snippets/dart"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/denrim.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/denrim",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet >\ndescription function\nscope denrim\n -> ${1}() = ${2};\n\nsnippet >\ndescription if\nscope denrim\n -> struct ${1} \\{ ${2:**} \\n \\}\n",t.scope="denrim"}); (function() { 2 | window.require(["ace/snippets/denrim"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/diff.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/diff",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\nsnippet header DEP-3 style header\n Description: ${1}\n Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n Bug: ${4:url in upstream bugtracker}\n Forwarded: ${5:no|not-needed|url}\n Author: ${6:`g:snips_author`}\n Reviewed-by: ${7:name and email}\n Last-Update: ${8:`strftime("%Y-%m-%d")`}\n Applied-Upstream: ${9:upstream version|url|commit}\n\n',t.scope="diff"}); (function() { 2 | window.require(["ace/snippets/diff"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/dockerfile.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/dockerfile"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/dot.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/dot"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/drools.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/drools",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='\nsnippet rule\n rule "${1?:rule_name}"\n when\n ${2:// when...} \n then\n ${3:// then...}\n end\n\nsnippet query\n query ${1?:query_name}\n ${2:// find} \n end\n \nsnippet declare\n declare ${1?:type_name}\n ${2:// attributes} \n end\n\n',t.scope="drools"}); (function() { 2 | window.require(["ace/snippets/drools"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/eiffel.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/eiffel"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/ejs.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/ejs"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/elixir.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/elixir"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/elm.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/elm"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/forth.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/forth"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/fortran.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/fortran"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/fsharp.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/fsharp"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/fsl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/fsl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}); (function() { 2 | window.require(["ace/snippets/fsl"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/ftl.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/ftl"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/gcode.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/gcode"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/gherkin.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/gherkin"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/gitignore.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/gitignore"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/glsl.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/glsl"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/golang.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/golang"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/graphqlschema.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/graphqlschema",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Type Snippet\ntrigger type\nsnippet type\n type ${1:type_name} {\n ${2:type_siblings}\n }\n\n# Input Snippet\ntrigger input\nsnippet input\n input ${1:input_name} {\n ${2:input_siblings}\n }\n\n# Interface Snippet\ntrigger interface\nsnippet interface\n interface ${1:interface_name} {\n ${2:interface_siblings}\n }\n\n# Interface Snippet\ntrigger union\nsnippet union\n union ${1:union_name} = ${2:type} | ${3: type}\n\n# Enum Snippet\ntrigger enum\nsnippet enum\n enum ${1:enum_name} {\n ${2:enum_siblings}\n }\n",t.scope="graphqlschema"}); (function() { 2 | window.require(["ace/snippets/graphqlschema"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/groovy.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/groovy"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/haml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet t\n %table\n %tr\n %th\n ${1:headers}\n %tr\n %td\n ${2:headers}\nsnippet ul\n %ul\n %li\n ${1:item}\n %li\nsnippet =rp\n = render :partial => '${1:partial}'\nsnippet =rpl\n = render :partial => '${1:partial}', :locals => {}\nsnippet =rpc\n = render :partial => '${1:partial}', :collection => @$1\n\n",t.scope="haml"}); (function() { 2 | window.require(["ace/snippets/haml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/handlebars.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/handlebars"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/haskell.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haskell",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet lang\n {-# LANGUAGE ${1:OverloadedStrings} #-}\nsnippet info\n -- |\n -- Module : ${1:Module.Namespace}\n -- Copyright : ${2:Author} ${3:2011-2012}\n -- License : ${4:BSD3}\n --\n -- Maintainer : ${5:email@something.com}\n -- Stability : ${6:experimental}\n -- Portability : ${7:unknown}\n --\n -- ${8:Description}\n --\nsnippet import\n import ${1:Data.Text}\nsnippet import2\n import ${1:Data.Text} (${2:head})\nsnippet importq\n import qualified ${1:Data.Text} as ${2:T}\nsnippet inst\n instance ${1:Monoid} ${2:Type} where\n ${3}\nsnippet type\n type ${1:Type} = ${2:Type}\nsnippet data\n data ${1:Type} = ${2:$1} ${3:Int}\nsnippet newtype\n newtype ${1:Type} = ${2:$1} ${3:Int}\nsnippet class\n class ${1:Class} a where\n ${2}\nsnippet module\n module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n ) where\n `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\nsnippet const\n ${1:name} :: ${2:a}\n $1 = ${3:undefined}\nsnippet fn\n ${1:fn} :: ${2:a} -> ${3:a}\n $1 ${4} = ${5:undefined}\nsnippet fn2\n ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n $1 ${5} = ${6:undefined}\nsnippet ap\n ${1:map} ${2:fn} ${3:list}\nsnippet do\n do\n \nsnippet \u03bb\n \\${1:x} -> ${2}\nsnippet \\\n \\${1:x} -> ${2}\nsnippet <-\n ${1:a} <- ${2:m a}\nsnippet \u2190\n ${1:a} <- ${2:m a}\nsnippet ->\n ${1:m a} -> ${2:a}\nsnippet \u2192\n ${1:m a} -> ${2:a}\nsnippet tup\n (${1:a}, ${2:b})\nsnippet tup2\n (${1:a}, ${2:b}, ${3:c})\nsnippet tup3\n (${1:a}, ${2:b}, ${3:c}, ${4:d})\nsnippet rec\n ${1:Record} { ${2:recFieldA} = ${3:undefined}\n , ${4:recFieldB} = ${5:undefined}\n }\nsnippet case\n case ${1:something} of\n ${2} -> ${3}\nsnippet let\n let ${1} = ${2}\n in ${3}\nsnippet where\n where\n ${1:fn} = ${2:undefined}\n",t.scope="haskell"}); (function() { 2 | window.require(["ace/snippets/haskell"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/haskell_cabal.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/haskell_cabal"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/haxe.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/haxe"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/hjson.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/hjson"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/html_elixir.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/html_elixir"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/html_ruby.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/html_ruby"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/ini.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/ini"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/io.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/io",["require","exports","module"],function(e,t,n){"use strict";t.snippets=[{content:"assertEquals(${1:expected}, ${2:expr})",name:"assertEquals",scope:"io",tabTrigger:"ae"},{content:"${1:${2:newValue} := ${3:Object} }clone do(\n $0\n)",name:"clone do",scope:"io",tabTrigger:"cdo"},{content:'docSlot("${1:slotName}", "${2:documentation}")',name:"docSlot",scope:"io",tabTrigger:"ds"},{content:"(${1:header,}\n ${2:body}\n)$0",keyEquivalent:"@(",name:"Indented Bracketed Line",scope:"io",tabTrigger:"("},{content:"\n $0\n",keyEquivalent:"\r",name:"Special: Return Inside Empty Parenthesis",scope:"io meta.empty-parenthesis.io, io meta.comma-parenthesis.io"},{content:"${1:methodName} := method(${2:args,}\n $0\n)",name:"method",scope:"io",tabTrigger:"m"},{content:'newSlot("${1:slotName}", ${2:defaultValue}, "${3:docString}")$0',name:"newSlot",scope:"io",tabTrigger:"ns"},{content:"${1:name} := Object clone do(\n $0\n)",name:"Object clone do",scope:"io",tabTrigger:"ocdo"},{content:"test${1:SomeFeature} := method(\n $0\n)",name:"testMethod",scope:"io",tabTrigger:"ts"},{content:"${1:Something}Test := ${2:UnitTest} clone do(\n $0\n)",name:"UnitTest",scope:"io",tabTrigger:"ut"}],t.scope="io"}); (function() { 2 | window.require(["ace/snippets/io"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/jack.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/jack"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/jade.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/jade"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/json.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/json"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/json5.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/json5"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/jsoniq.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jsoniq",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet for\n for $${1:item} in ${2:expr}\nsnippet return\n return ${1:expr}\nsnippet import\n import module namespace ${1:ns} = "${2:http://www.example.com/}";\nsnippet some\n some $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet every\n every $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet if\n if(${1:true}) then ${2:expr} else ${3:true}\nsnippet switch\n switch(${1:"foo"})\n case ${2:"foo"}\n return ${3:true}\n default return ${4:false}\nsnippet try\n try { ${1:expr} } catch ${2:*} { ${3:expr} }\nsnippet tumbling\n for tumbling window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet sliding\n for sliding window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet let\n let $${1:varname} := ${2:expr}\nsnippet group\n group by $${1:varname} := ${2:expr}\nsnippet order\n order by ${1:expr} ${2:descending}\nsnippet stable\n stable order by ${1:expr}\nsnippet count\n count $${1:varname}\nsnippet ordered\n ordered { ${1:expr} }\nsnippet unordered\n unordered { ${1:expr} }\nsnippet treat \n treat as ${1:expr}\nsnippet castable\n castable as ${1:atomicType}\nsnippet cast\n cast as ${1:atomicType}\nsnippet typeswitch\n typeswitch(${1:expr})\n case ${2:type} return ${3:expr}\n default return ${4:expr}\nsnippet var\n declare variable $${1:varname} := ${2:expr};\nsnippet fn\n declare function ${1:ns}:${2:name}(){\n ${3:expr}\n };\nsnippet module\n module namespace ${1:ns} = "${2:http://www.example.com}";\n',t.scope="jsoniq"}); (function() { 2 | window.require(["ace/snippets/jsoniq"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/jssm.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/jssm"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/jsx.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/jsx"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/julia.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/julia"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/kotlin.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/kotlin"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/latex.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/latex"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/less.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/less"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/lisp.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/lisp"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/livescript.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/livescript"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/logiql.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/logiql"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/logtalk.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/logtalk"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/lua.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lua",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet #!\n #!/usr/bin/env lua\n $1\nsnippet local\n local ${1:x} = ${2:1}\nsnippet fun\n function ${1:fname}(${2:...})\n ${3:-- body}\n end\nsnippet for\n for ${1:i}=${2:1},${3:10} do\n ${4:print(i)}\n end\nsnippet forp\n for ${1:i},${2:v} in pairs(${3:table_name}) do\n ${4:-- body}\n end\nsnippet fori\n for ${1:i},${2:v} in ipairs(${3:table_name}) do\n ${4:-- body}\n end\n",t.scope="lua"}); (function() { 2 | window.require(["ace/snippets/lua"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/luapage.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/luapage"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/lucene.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/lucene"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/makefile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/makefile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet ifeq\n ifeq (${1:cond0},${2:cond1})\n ${3:code}\n endif\n",t.scope="makefile"}); (function() { 2 | window.require(["ace/snippets/makefile"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/markdown.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n ![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n ![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n',t.scope="markdown"}); (function() { 2 | window.require(["ace/snippets/markdown"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/mask.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/mask"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/matlab.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/matlab"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/maze.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/maze",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet >\ndescription assignment\nscope maze\n -> ${1}= ${2}\n\nsnippet >\ndescription if\nscope maze\n -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n",t.scope="maze"}); (function() { 2 | window.require(["ace/snippets/maze"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/mediawiki.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/mediawiki"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/mel.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/mel"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/mixal.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/mixal"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/mode-denrim.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/mode-denrim"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/mushcode.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/mushcode"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/mysql.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/mysql"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/nginx.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/nginx"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/nim.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/nim"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/nix.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/nix"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/nsis.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/nsis"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/nunjucks.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/nunjucks"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/objectivec.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/objectivec"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/ocaml.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/ocaml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/pascal.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/pascal"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/perl6.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/perl6"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/pgsql.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/pgsql"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/php_laravel_blade.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/php_laravel_blade"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/pig.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/pig"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/plain_text.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/plain_text"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/powershell.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/powershell"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/praat.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/praat"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/prisma.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/prisma"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/prolog.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/prolog"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/properties.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/properties"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/protobuf.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/protobuf"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/puppet.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/puppet"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/qml.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/qml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/razor.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/razor",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet if\n(${1} == ${2}) {\n ${3}\n}",t.scope="razor"}); (function() { 2 | window.require(["ace/snippets/razor"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/rdoc.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/rdoc"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/red.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/red"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/redshift.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/redshift"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/rhtml.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/rhtml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/rst.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rst",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# rst\n\nsnippet :\n :${1:field name}: ${2:field body}\nsnippet *\n *${1:Emphasis}*\nsnippet **\n **${1:Strong emphasis}**\nsnippet _\n \\`${1:hyperlink-name}\\`_\n .. _\\`$1\\`: ${2:link-block}\nsnippet =\n ${1:Title}\n =====${2:=}\n ${3}\nsnippet -\n ${1:Title}\n -----${2:-}\n ${3}\nsnippet cont:\n .. contents::\n \n",t.scope="rst"}); (function() { 2 | window.require(["ace/snippets/rst"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/rust.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/rust"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/sass.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/sass"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/scad.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/scad"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/scala.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/scala"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/scheme.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/scheme"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/scss.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/scss"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/sh.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sh",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\nsnippet #!\n #!/usr/bin/env bash\n \nsnippet if\n if [[ ${1:condition} ]]; then\n ${2:#statements}\n fi\nsnippet elif\n elif [[ ${1:condition} ]]; then\n ${2:#statements}\nsnippet for\n for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do\n ${3:#statements}\n done\nsnippet fori\n for ${1:needle} in ${2:haystack} ; do\n ${3:#statements}\n done\nsnippet wh\n while [[ ${1:condition} ]]; do\n ${2:#statements}\n done\nsnippet until\n until [[ ${1:condition} ]]; do\n ${2:#statements}\n done\nsnippet case\n case ${1:word} in\n ${2:pattern})\n ${3};;\n esac\nsnippet go \n while getopts \'${1:o}\' ${2:opts} \n do \n case $$2 in\n ${3:o0})\n ${4:#staments};;\n esac\n done\n# Set SCRIPT_DIR variable to directory script is located.\nsnippet sdir\n SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"\n# getopt\nsnippet getopt\n __ScriptVersion="${1:version}"\n\n #=== FUNCTION ================================================================\n # NAME: usage\n # DESCRIPTION: Display usage information.\n #===============================================================================\n function usage ()\n {\n cat <<- EOT\n\n Usage : $${0:0} [options] [--] \n\n Options: \n -h|help Display this message\n -v|version Display script version\n\n EOT\n } # ---------- end of function usage ----------\n\n #-----------------------------------------------------------------------\n # Handle command line arguments\n #-----------------------------------------------------------------------\n\n while getopts ":hv" opt\n do\n case $opt in\n\n h|help ) usage; exit 0 ;;\n\n v|version ) echo "$${0:0} -- Version $__ScriptVersion"; exit 0 ;;\n\n \\? ) echo -e "\\n Option does not exist : $OPTARG\\n"\n usage; exit 1 ;;\n\n esac # --- end of case ---\n done\n shift $(($OPTIND-1))\n\n',t.scope="sh"}); (function() { 2 | window.require(["ace/snippets/sh"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/signed.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/signed"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/sjs.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/sjs"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/slim.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/slim"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/smarty.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/smarty"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/smithy.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/smithy"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/snippets.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/snippets",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# snippets for making snippets :)\nsnippet snip\n snippet ${1:trigger}\n ${2}\nsnippet msnip\n snippet ${1:trigger} ${2:description}\n ${3}\nsnippet v\n {VISUAL}\n",t.scope="snippets"}); (function() { 2 | window.require(["ace/snippets/snippets"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/soy_template.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/soy_template"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/space.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/space"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/sparql.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/sparql"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/sql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"}); (function() { 2 | window.require(["ace/snippets/sql"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/sqlserver.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sqlserver",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# ISNULL\nsnippet isnull\n ISNULL(${1:check_expression}, ${2:replacement_value})\n# FORMAT\nsnippet format\n FORMAT(${1:value}, ${2:format})\n# CAST\nsnippet cast\n CAST(${1:expression} AS ${2:data_type})\n# CONVERT\nsnippet convert\n CONVERT(${1:data_type}, ${2:expression})\n# DATEPART\nsnippet datepart\n DATEPART(${1:datepart}, ${2:date})\n# DATEDIFF\nsnippet datediff\n DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})\n# DATEADD\nsnippet dateadd\n DATEADD(${1:datepart}, ${2:number}, ${3:date})\n# DATEFROMPARTS \nsnippet datefromparts\n DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})\n# OBJECT_DEFINITION\nsnippet objectdef\n SELECT OBJECT_DEFINITION(OBJECT_ID('${1:sys.server_permissions /*object name*/}'))\n# STUFF XML\nsnippet stuffxml\n STUFF((SELECT ', ' + ${1:ColumnName}\n FROM ${2:TableName}\n WHERE ${3:WhereClause}\n FOR XML PATH('')), 1, 1, '') AS ${4:Alias}\n ${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}\n# Create Procedure\nsnippet createproc\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE PROCEDURE ${4:Procedure_Name}\n ${5:/*Add the parameters for the stored procedure here*/}\n AS\n BEGIN\n -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.\n SET NOCOUNT ON;\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO\n# Create Scalar Function\nsnippet createfn\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE FUNCTION ${4:Scalar_Function_Name}\n -- Add the parameters for the function here\n RETURNS ${5:Function_Data_Type}\n AS\n BEGIN\n DECLARE @Result ${5:Function_Data_Type}\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO",t.scope="sqlserver"}); (function() { 2 | window.require(["ace/snippets/sqlserver"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/stylus.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/stylus"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/svg.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/svg"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/swift.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/swift"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/tcl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/tcl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# #!/usr/bin/env tclsh\nsnippet #!\n #!/usr/bin/env tclsh\n \n# Process\nsnippet pro\n proc ${1:function_name} {${2:args}} {\n ${3:#body ...}\n }\n#xif\nsnippet xif\n ${1:expr}? ${2:true} : ${3:false}\n# Conditional\nsnippet if\n if {${1}} {\n ${2:# body...}\n }\n# Conditional if..else\nsnippet ife\n if {${1}} {\n ${2:# body...}\n } else {\n ${3:# else...}\n }\n# Conditional if..elsif..else\nsnippet ifee\n if {${1}} {\n ${2:# body...}\n } elseif {${3}} {\n ${4:# elsif...}\n } else {\n ${5:# else...}\n }\n# If catch then\nsnippet ifc\n if { [catch {${1:#do something...}} ${2:err}] } {\n ${3:# handle failure...}\n }\n# Catch\nsnippet catch\n catch {${1}} ${2:err} ${3:options}\n# While Loop\nsnippet wh\n while {${1}} {\n ${2:# body...}\n }\n# For Loop\nsnippet for\n for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {\n ${4:# body...}\n }\n# Foreach Loop\nsnippet fore\n foreach ${1:x} {${2:#list}} {\n ${3:# body...}\n }\n# after ms script...\nsnippet af\n after ${1:ms} ${2:#do something}\n# after cancel id\nsnippet afc\n after cancel ${1:id or script}\n# after idle\nsnippet afi\n after idle ${1:script}\n# after info id\nsnippet afin\n after info ${1:id}\n# Expr\nsnippet exp\n expr {${1:#expression here}}\n# Switch\nsnippet sw\n switch ${1:var} {\n ${3:pattern 1} {\n ${4:#do something}\n }\n default {\n ${2:#do something}\n }\n }\n# Case\nsnippet ca\n ${1:pattern} {\n ${2:#do something}\n }${3}\n# Namespace eval\nsnippet ns\n namespace eval ${1:path} {${2:#script...}}\n# Namespace current\nsnippet nsc\n namespace current\n",t.scope="tcl"}); (function() { 2 | window.require(["ace/snippets/tcl"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/terraform.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/terraform"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/text.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/text"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/textile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/textile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Jekyll post header\nsnippet header\n ---\n title: ${1:title}\n layout: post\n date: ${2:date} ${3:hour:minute:second} -05:00\n ---\n\n# Image\nsnippet img\n !${1:url}(${2:title}):${3:link}!\n\n# Table\nsnippet |\n |${1}|${2}\n\n# Link\nsnippet link\n "${1:link text}":${2:url}\n\n# Acronym\nsnippet (\n (${1:Expand acronym})${2}\n\n# Footnote\nsnippet fn\n [${1:ref number}] ${3}\n\n fn$1. ${2:footnote}\n \n',t.scope="textile"}); (function() { 2 | window.require(["ace/snippets/textile"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/toml.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/toml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/tsx.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/tsx"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/turtle.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/turtle"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/twig.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/twig"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/typescript.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/typescript"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/vbscript.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/vbscript"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/velocity.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/velocity",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# macro\nsnippet #macro\n #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n ${3:## macro code}\n #end\n# foreach\nsnippet #foreach\n #foreach ( ${1:\\$item} in ${2:\\$collection} )\n ${3:## foreach code}\n #end\n# if\nsnippet #if\n #if ( ${1:true} )\n ${0}\n #end\n# if ... else\nsnippet #ife\n #if ( ${1:true} )\n ${2}\n #else\n ${0}\n #end\n#import\nsnippet #import\n #import ( "${1:path/to/velocity/format}" )\n# set\nsnippet #set\n #set ( $${1:var} = ${0} )\n',t.scope="velocity",t.includeScopes=["html","javascript","css"]}); (function() { 2 | window.require(["ace/snippets/velocity"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/verilog.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/verilog"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/vhdl.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/vhdl"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/visualforce.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/visualforce"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/wollok.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/wollok",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='##\n## Basic Java packages and import\nsnippet im\n import\nsnippet w.l\n wollok.lang\nsnippet w.i\n wollok.lib\n\n## Class and object\nsnippet cl\n class ${1:`Filename("", "untitled")`} ${2}\nsnippet obj\n object ${1:`Filename("", "untitled")`} ${2:inherits Parent}${3}\nsnippet te\n test ${1:`Filename("", "untitled")`}\n\n##\n## Enhancements\nsnippet inh\n inherits\n\n##\n## Comments\nsnippet /*\n /*\n * ${1}\n */\n\n##\n## Control Statements\nsnippet el\n else\nsnippet if\n if (${1}) ${2}\n\n##\n## Create a Method\nsnippet m\n method ${1:method}(${2}) ${5}\n\n## \n## Tests\nsnippet as\n assert.equals(${1:expected}, ${2:actual})\n\n##\n## Exceptions\nsnippet ca\n catch ${1:e} : (${2:Exception} ) ${3}\nsnippet thr\n throw\nsnippet try\n try {\n ${3}\n } catch ${1:e} : ${2:Exception} {\n }\n\n##\n## Javadocs\nsnippet /**\n /**\n * ${1}\n */\n\n##\n## Print Methods\nsnippet print\n console.println("${1:Message}")\n\n##\n## Setter and Getter Methods\nsnippet set\n method set${1:}(${2:}) {\n $1 = $2\n }\nsnippet get\n method get${1:}() {\n return ${1:};\n }\n\n##\n## Terminate Methods or Loops\nsnippet re\n return',t.scope="wollok"}); (function() { 2 | window.require(["ace/snippets/wollok"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/xml.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/xml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/xquery.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/xquery",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet for\n for $${1:item} in ${2:expr}\nsnippet return\n return ${1:expr}\nsnippet import\n import module namespace ${1:ns} = "${2:http://www.example.com/}";\nsnippet some\n some $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet every\n every $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet if\n if(${1:true}) then ${2:expr} else ${3:true}\nsnippet switch\n switch(${1:"foo"})\n case ${2:"foo"}\n return ${3:true}\n default return ${4:false}\nsnippet try\n try { ${1:expr} } catch ${2:*} { ${3:expr} }\nsnippet tumbling\n for tumbling window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet sliding\n for sliding window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet let\n let $${1:varname} := ${2:expr}\nsnippet group\n group by $${1:varname} := ${2:expr}\nsnippet order\n order by ${1:expr} ${2:descending}\nsnippet stable\n stable order by ${1:expr}\nsnippet count\n count $${1:varname}\nsnippet ordered\n ordered { ${1:expr} }\nsnippet unordered\n unordered { ${1:expr} }\nsnippet treat \n treat as ${1:expr}\nsnippet castable\n castable as ${1:atomicType}\nsnippet cast\n cast as ${1:atomicType}\nsnippet typeswitch\n typeswitch(${1:expr})\n case ${2:type} return ${3:expr}\n default return ${4:expr}\nsnippet var\n declare variable $${1:varname} := ${2:expr};\nsnippet fn\n declare function ${1:ns}:${2:name}(){\n ${3:expr}\n };\nsnippet module\n module namespace ${1:ns} = "${2:http://www.example.com}";\n',t.scope="xquery"}); (function() { 2 | window.require(["ace/snippets/xquery"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/yaml.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/yaml"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/snippets/zeek.js: -------------------------------------------------------------------------------- 1 | ; (function() { 2 | window.require(["ace/snippets/zeek"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-clouds.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/clouds",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-clouds",t.cssText='.ace-clouds .ace_gutter {background: #ebebeb;color: #333}.ace-clouds .ace_print-margin {width: 1px;background: #e8e8e8}.ace-clouds {background-color: #FFFFFF;color: #000000}.ace-clouds .ace_cursor {color: #000000}.ace-clouds .ace_marker-layer .ace_selection {background: #BDD5FC}.ace-clouds.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-clouds .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-clouds .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-clouds .ace_marker-layer .ace_active-line {background: #FFFBD1}.ace-clouds .ace_gutter-active-line {background-color : #dcdcdc}.ace-clouds .ace_marker-layer .ace_selected-word {border: 1px solid #BDD5FC}.ace-clouds .ace_invisible {color: #BFBFBF}.ace-clouds .ace_keyword,.ace-clouds .ace_meta,.ace-clouds .ace_support.ace_constant.ace_property-value {color: #AF956F}.ace-clouds .ace_keyword.ace_operator {color: #484848}.ace-clouds .ace_keyword.ace_other.ace_unit {color: #96DC5F}.ace-clouds .ace_constant.ace_language {color: #39946A}.ace-clouds .ace_constant.ace_numeric {color: #46A609}.ace-clouds .ace_constant.ace_character.ace_entity {color: #BF78CC}.ace-clouds .ace_invalid {background-color: #FF002A}.ace-clouds .ace_fold {background-color: #AF956F;border-color: #000000}.ace-clouds .ace_storage,.ace-clouds .ace_support.ace_class,.ace-clouds .ace_support.ace_function,.ace-clouds .ace_support.ace_other,.ace-clouds .ace_support.ace_type {color: #C52727}.ace-clouds .ace_string {color: #5D90CD}.ace-clouds .ace_comment {color: #BCC8BA}.ace-clouds .ace_entity.ace_name.ace_tag,.ace-clouds .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-clouds .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/clouds"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-dawn.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/dawn",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-dawn",t.cssText=".ace-dawn .ace_gutter {background: #ebebeb;color: #333}.ace-dawn .ace_print-margin {width: 1px;background: #e8e8e8}.ace-dawn {background-color: #F9F9F9;color: #080808}.ace-dawn .ace_cursor {color: #000000}.ace-dawn .ace_marker-layer .ace_selection {background: rgba(39, 95, 255, 0.30)}.ace-dawn.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #F9F9F9;}.ace-dawn .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-dawn .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(75, 75, 126, 0.50)}.ace-dawn .ace_marker-layer .ace_active-line {background: rgba(36, 99, 180, 0.12)}.ace-dawn .ace_gutter-active-line {background-color : #dcdcdc}.ace-dawn .ace_marker-layer .ace_selected-word {border: 1px solid rgba(39, 95, 255, 0.30)}.ace-dawn .ace_invisible {color: rgba(75, 75, 126, 0.50)}.ace-dawn .ace_keyword,.ace-dawn .ace_meta {color: #794938}.ace-dawn .ace_constant,.ace-dawn .ace_constant.ace_character,.ace-dawn .ace_constant.ace_character.ace_escape,.ace-dawn .ace_constant.ace_other {color: #811F24}.ace-dawn .ace_invalid.ace_illegal {text-decoration: underline;font-style: italic;color: #F8F8F8;background-color: #B52A1D}.ace-dawn .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #B52A1D}.ace-dawn .ace_support {color: #691C97}.ace-dawn .ace_support.ace_constant {color: #B4371F}.ace-dawn .ace_fold {background-color: #794938;border-color: #080808}.ace-dawn .ace_list,.ace-dawn .ace_markup.ace_list,.ace-dawn .ace_support.ace_function {color: #693A17}.ace-dawn .ace_storage {font-style: italic;color: #A71D5D}.ace-dawn .ace_string {color: #0B6125}.ace-dawn .ace_string.ace_regexp {color: #CF5628}.ace-dawn .ace_comment {font-style: italic;color: #5A525F}.ace-dawn .ace_heading,.ace-dawn .ace_markup.ace_heading {color: #19356D}.ace-dawn .ace_variable {color: #234A97}.ace-dawn .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/dawn"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-eclipse.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssText='.ace-eclipse .ace_gutter {background: #ebebeb;border-right: 1px solid rgb(159, 159, 159);color: rgb(136, 136, 136);}.ace-eclipse .ace_print-margin {width: 1px;background: #ebebeb;}.ace-eclipse {background-color: #FFFFFF;color: black;}.ace-eclipse .ace_fold {background-color: rgb(60, 76, 114);}.ace-eclipse .ace_cursor {color: black;}.ace-eclipse .ace_storage,.ace-eclipse .ace_keyword,.ace-eclipse .ace_variable {color: rgb(127, 0, 85);}.ace-eclipse .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-eclipse .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-eclipse .ace_function {color: rgb(60, 76, 114);}.ace-eclipse .ace_string {color: rgb(42, 0, 255);}.ace-eclipse .ace_comment {color: rgb(113, 150, 130);}.ace-eclipse .ace_comment.ace_doc {color: rgb(63, 95, 191);}.ace-eclipse .ace_comment.ace_doc.ace_tag {color: rgb(127, 159, 191);}.ace-eclipse .ace_constant.ace_numeric {color: darkblue;}.ace-eclipse .ace_tag {color: rgb(25, 118, 116);}.ace-eclipse .ace_type {color: rgb(127, 0, 127);}.ace-eclipse .ace_xml-pe {color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_meta.ace_tag {color:rgb(25, 118, 116);}.ace-eclipse .ace_invisible {color: #ddd;}.ace-eclipse .ace_entity.ace_other.ace_attribute-name {color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_step {background: rgb(255, 255, 0);}.ace-eclipse .ace_active-line {background: rgb(232, 242, 254);}.ace-eclipse .ace_gutter-active-line {background-color : #DADADA;}.ace-eclipse .ace_marker-layer .ace_selected-word {border: 1px solid rgb(181, 213, 255);}.ace-eclipse .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.cssClass="ace-eclipse";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/eclipse"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-github.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/github",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-github",t.cssText='.ace-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-github {background: #fff;color: #000;}.ace-github .ace_keyword {font-weight: bold;}.ace-github .ace_string {color: #D14;}.ace-github .ace_variable.ace_class {color: teal;}.ace-github .ace_constant.ace_numeric {color: #099;}.ace-github .ace_constant.ace_buildin {color: #0086B3;}.ace-github .ace_support.ace_function {color: #0086B3;}.ace-github .ace_comment {color: #998;font-style: italic;}.ace-github .ace_variable.ace_language {color: #0086B3;}.ace-github .ace_paren {font-weight: bold;}.ace-github .ace_boolean {font-weight: bold;}.ace-github .ace_string.ace_regexp {color: #009926;font-weight: normal;}.ace-github .ace_variable.ace_instance {color: teal;}.ace-github .ace_constant.ace_language {font-weight: bold;}.ace-github .ace_cursor {color: black;}.ace-github.ace_focus .ace_marker-layer .ace_active-line {background: rgb(255, 255, 204);}.ace-github .ace_marker-layer .ace_active-line {background: rgb(245, 245, 245);}.ace-github .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-github.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-github.ace_nobold .ace_line > span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_invisible {color: #BFBFBF}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/github"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-gruvbox.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/gruvbox",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-gruvbox",t.cssText='.ace-gruvbox .ace_gutter-active-line {background-color: #3C3836;}.ace-gruvbox {color: #EBDAB4;background-color: #1D2021;}.ace-gruvbox .ace_invisible {color: #504945;}.ace-gruvbox .ace_marker-layer .ace_selection {background: rgba(179, 101, 57, 0.75)}.ace-gruvbox.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002240;}.ace-gruvbox .ace_keyword {color: #8ec07c;}.ace-gruvbox .ace_comment {font-style: italic;color: #928375;}.ace-gruvbox .ace-statement {color: red;}.ace-gruvbox .ace_variable {color: #84A598;}.ace-gruvbox .ace_variable.ace_language {color: #D2879B;}.ace-gruvbox .ace_constant {color: #C2859A;}.ace-gruvbox .ace_constant.ace_language {color: #C2859A;}.ace-gruvbox .ace_constant.ace_numeric {color: #C2859A;}.ace-gruvbox .ace_string {color: #B8BA37;}.ace-gruvbox .ace_support {color: #F9BC41;}.ace-gruvbox .ace_support.ace_function {color: #F84B3C;}.ace-gruvbox .ace_storage {color: #8FBF7F;}.ace-gruvbox .ace_keyword.ace_operator {color: #EBDAB4;}.ace-gruvbox .ace_punctuation.ace_operator {color: yellow;}.ace-gruvbox .ace_marker-layer .ace_active-line {background: #3C3836;}.ace-gruvbox .ace_marker-layer .ace_selected-word {border-radius: 4px;border: 8px solid #3f475d;}.ace-gruvbox .ace_print-margin {width: 5px;background: #3C3836;}.ace-gruvbox .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/gruvbox"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-kuroir.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-kuroir",t.cssText=".ace-kuroir .ace_gutter {background: #e8e8e8;color: #333;}.ace-kuroir .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-kuroir {background-color: #E8E9E8;color: #363636;}.ace-kuroir .ace_cursor {color: #202020;}.ace-kuroir .ace_marker-layer .ace_selection {background: rgba(245, 170, 0, 0.57);}.ace-kuroir.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #E8E9E8;}.ace-kuroir .ace_marker-layer .ace_step {background: rgb(198, 219, 174);}.ace-kuroir .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(0, 0, 0, 0.29);}.ace-kuroir .ace_marker-layer .ace_active-line {background: rgba(203, 220, 47, 0.22);}.ace-kuroir .ace_gutter-active-line {background-color: rgba(203, 220, 47, 0.22);}.ace-kuroir .ace_marker-layer .ace_selected-word {border: 1px solid rgba(245, 170, 0, 0.57);}.ace-kuroir .ace_invisible {color: #BFBFBF}.ace-kuroir .ace_fold {border-color: #363636;}.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;font-style:italic;color:#FD1732;background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/kuroir"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-merbivore.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-merbivore",t.cssText=".ace-merbivore .ace_gutter {background: #202020;color: #E6E1DC}.ace-merbivore .ace_print-margin {width: 1px;background: #555651}.ace-merbivore {background-color: #161616;color: #E6E1DC}.ace-merbivore .ace_cursor {color: #FFFFFF}.ace-merbivore .ace_marker-layer .ace_selection {background: #454545}.ace-merbivore.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #161616;}.ace-merbivore .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-merbivore .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-merbivore .ace_marker-layer .ace_active-line {background: #333435}.ace-merbivore .ace_gutter-active-line {background-color: #333435}.ace-merbivore .ace_marker-layer .ace_selected-word {border: 1px solid #454545}.ace-merbivore .ace_invisible {color: #404040}.ace-merbivore .ace_entity.ace_name.ace_tag,.ace-merbivore .ace_keyword,.ace-merbivore .ace_meta,.ace-merbivore .ace_meta.ace_tag,.ace-merbivore .ace_storage,.ace-merbivore .ace_support.ace_function {color: #FC6F09}.ace-merbivore .ace_constant,.ace-merbivore .ace_constant.ace_character,.ace-merbivore .ace_constant.ace_character.ace_escape,.ace-merbivore .ace_constant.ace_other,.ace-merbivore .ace_support.ace_type {color: #1EDAFB}.ace-merbivore .ace_constant.ace_character.ace_escape {color: #519F50}.ace-merbivore .ace_constant.ace_language {color: #FDC251}.ace-merbivore .ace_constant.ace_library,.ace-merbivore .ace_string,.ace-merbivore .ace_support.ace_constant {color: #8DFF0A}.ace-merbivore .ace_constant.ace_numeric {color: #58C554}.ace-merbivore .ace_invalid {color: #FFFFFF;background-color: #990000}.ace-merbivore .ace_fold {background-color: #FC6F09;border-color: #E6E1DC}.ace-merbivore .ace_comment {font-style: italic;color: #AD2EA4}.ace-merbivore .ace_entity.ace_other.ace_attribute-name {color: #FFFF89}.ace-merbivore .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/merbivore"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-nord_dark.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/nord_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-nord-dark",t.cssText=".ace-nord-dark .ace_gutter {color: #616e88;}.ace-nord-dark .ace_print-margin {width: 1px;background: #4c566a;}.ace-nord-dark {background-color: #2e3440;color: #d8dee9;}.ace-nord-dark .ace_entity.ace_other.ace_attribute-name,.ace-nord-dark .ace_storage {color: #d8dee9;}.ace-nord-dark .ace_cursor {color: #d8dee9;},.ace-nord-dark .ace_string.ace_regexp {color: #bf616a;}.ace-nord-dark .ace_marker-layer .ace_active-line {background: #434c5ecc;}.ace-nord-dark .ace_marker-layer .ace_selection {background: #434c5ecc;}.ace-nord-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #2e3440;}.ace-nord-dark .ace_marker-layer .ace_step {background: #ebcb8b;}.ace-nord-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #88c0d066;}.ace-nord-dark .ace_gutter-active-line {background-color: #434c5ecc;}.ace-nord-dark .ace_marker-layer .ace_selected-word {border: 1px solid #88c0d066;}.ace-nord-dark .ace_invisible {color: #4c566a;}.ace-nord-dark .ace_keyword,.ace-nord-dark .ace_meta,.ace-nord-dark .ace_support.ace_class,.ace-nord-dark .ace_support.ace_type {color: #81a1c1;}.ace-nord-dark .ace_constant.ace_character,.ace-nord-dark .ace_constant.ace_other {color: #d8dee9;}.ace-nord-dark .ace_constant.ace_language {color: #5e81ac;}.ace-nord-dark .ace_constant.ace_escape {color: #ebcB8b;}.ace-nord-dark .ace_constant.ace_numeric {color: #b48ead;}.ace-nord-dark .ace_fold {background-color: #4c566a;border-color: #d8dee9;}.ace-nord-dark .ace_entity.ace_name.ace_function,.ace-nord-dark .ace_entity.ace_name.ace_tag,.ace-nord-dark .ace_support.ace_function,.ace-nord-dark .ace_variable,.ace-nord-dark .ace_variable.ace_language {color: #8fbcbb;}.ace-nord-dark .ace_string {color: #a3be8c;}.ace-nord-dark .ace_comment {color: #616e88;}.ace-nord-dark .ace_indent-guide {box-shadow: inset -1px 0 0 0 #434c5eb3;}",t.$selectionColorConflict=!0;var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/nord_dark"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-vibrant_ink.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-vibrant-ink",t.cssText=".ace-vibrant-ink .ace_gutter {background: #1a1a1a;color: #BEBEBE}.ace-vibrant-ink .ace_print-margin {width: 1px;background: #1a1a1a}.ace-vibrant-ink {background-color: #0F0F0F;color: #FFFFFF}.ace-vibrant-ink .ace_cursor {color: #FFFFFF}.ace-vibrant-ink .ace_marker-layer .ace_selection {background: #6699CC}.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #0F0F0F;}.ace-vibrant-ink .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-vibrant-ink .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-vibrant-ink .ace_marker-layer .ace_active-line {background: #333333}.ace-vibrant-ink .ace_gutter-active-line {background-color: #333333}.ace-vibrant-ink .ace_marker-layer .ace_selected-word {border: 1px solid #6699CC}.ace-vibrant-ink .ace_invisible {color: #404040}.ace-vibrant-ink .ace_keyword,.ace-vibrant-ink .ace_meta {color: #FF6600}.ace-vibrant-ink .ace_constant,.ace-vibrant-ink .ace_constant.ace_character,.ace-vibrant-ink .ace_constant.ace_character.ace_escape,.ace-vibrant-ink .ace_constant.ace_other {color: #339999}.ace-vibrant-ink .ace_constant.ace_numeric {color: #99CC99}.ace-vibrant-ink .ace_invalid,.ace-vibrant-ink .ace_invalid.ace_deprecated {color: #CCFF33;background-color: #000000}.ace-vibrant-ink .ace_fold {background-color: #FFCC00;border-color: #FFFFFF}.ace-vibrant-ink .ace_entity.ace_name.ace_function,.ace-vibrant-ink .ace_support.ace_function,.ace-vibrant-ink .ace_variable {color: #FFCC00}.ace-vibrant-ink .ace_variable.ace_parameter {font-style: italic}.ace-vibrant-ink .ace_string {color: #66FF00}.ace-vibrant-ink .ace_string.ace_regexp {color: #44B4CC}.ace-vibrant-ink .ace_comment {color: #9933CC}.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {font-style: italic;color: #99CC99}.ace-vibrant-ink .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/vibrant_ink"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/ace/theme-xcode.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/xcode",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-xcode",t.cssText=".ace-xcode .ace_gutter {background: #e8e8e8;color: #333}.ace-xcode .ace_print-margin {width: 1px;background: #e8e8e8}.ace-xcode {background-color: #FFFFFF;color: #000000}.ace-xcode .ace_cursor {color: #000000}.ace-xcode .ace_marker-layer .ace_selection {background: #B5D5FF}.ace-xcode.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-xcode .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-xcode .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-xcode .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_marker-layer .ace_selected-word {border: 1px solid #B5D5FF}.ace-xcode .ace_constant.ace_language,.ace-xcode .ace_keyword,.ace-xcode .ace_meta,.ace-xcode .ace_variable.ace_language {color: #C800A4}.ace-xcode .ace_invisible {color: #BFBFBF}.ace-xcode .ace_constant.ace_character,.ace-xcode .ace_constant.ace_other {color: #275A5E}.ace-xcode .ace_constant.ace_numeric {color: #3A00DC}.ace-xcode .ace_entity.ace_other.ace_attribute-name,.ace-xcode .ace_support.ace_constant,.ace-xcode .ace_support.ace_function {color: #450084}.ace-xcode .ace_fold {background-color: #C800A4;border-color: #000000}.ace-xcode .ace_entity.ace_name.ace_tag,.ace-xcode .ace_support.ace_class,.ace-xcode .ace_support.ace_type {color: #790EAD}.ace-xcode .ace_storage {color: #C900A4}.ace-xcode .ace_string {color: #DF0002}.ace-xcode .ace_comment {color: #008E00}.ace-xcode .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/xcode"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /Shared/Files/default/main: -------------------------------------------------------------------------------- 1 | # 2 | 3 | PinholeCamera<> 4 | DefaultSky<> 5 | 6 | sdfObject 7 | sdfBox 8 | sdfSphere 9 | boolMerge<> 10 | -------------------------------------------------------------------------------- /Shared/Files/help.cpp: -------------------------------------------------------------------------------- 1 | 2 | // ShaderMania 1.0 3 | 4 | // To learn more about shader development: 5 | 6 | // The Book Of Shaders https://thebookofshaders.com 7 | // The Art of Code YouTube Channel https://www.youtube.com/channel/UCcAlTqd9zID6aNX3TzwxJXg 8 | 9 | // Incoming Data structure 10 | 11 | typedef struct 12 | { 13 | float2 uv; // UV coordinate 0..1 14 | float2 size; // Viewport size 15 | float time; // Global time 16 | unsigned int frame; // Frame number 17 | 18 | float4 outColor; // The resulting RGBA color, set to (0,0,0,1) by default 19 | 20 | texture2d slot0; // The 4 texture input slots 21 | texture2d slot1; 22 | texture2d slot2; 23 | texture2d slot3; 24 | } Data; 25 | 26 | /* 27 | * 28 | * To read from a texture slot: 29 | * 30 | * constexpr sampler textureSampler(mag_filter::linear, min_filter::linear); 31 | * 32 | * float4 sample = data.slot0.sample(textureSampler, data.uv); 33 | * 34 | */ 35 | -------------------------------------------------------------------------------- /Shared/Files/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ACE in Action 5 | 6 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Shared/Lua/Boolean.swift: -------------------------------------------------------------------------------- 1 | 2 | extension Bool: Value { 3 | 4 | public func push(_ vm: VirtualMachine) { 5 | lua_pushboolean(vm.vm, self ? 1 : 0) 6 | } 7 | 8 | public func kind() -> Kind { return .boolean } 9 | 10 | public static func arg(_ vm: VirtualMachine, value: Value) -> String? { 11 | if value.kind() != .boolean { return "boolean" } 12 | return nil 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Shared/Lua/ExtraTypes.swift: -------------------------------------------------------------------------------- 1 | import CoreGraphics 2 | 3 | extension CGPoint: Value { 4 | 5 | public func push(_ vm: VirtualMachine) { 6 | let t = vm.createTable() 7 | t["x"] = Double(self.x) 8 | t["y"] = Double(self.y) 9 | t.push(vm) 10 | } 11 | 12 | public func kind() -> Kind { return .table } 13 | 14 | fileprivate static let typeName: String = "point (table with numeric keys x,y)" 15 | public static func arg(_ vm: VirtualMachine, value: Value) -> String? { 16 | if value.kind() != .table { return typeName } 17 | if let result = Table.arg(vm, value: value) { return result } 18 | let t = value as! Table 19 | if !(t["x"] is Number) || !(t["y"] is Number) { return typeName } 20 | return nil 21 | } 22 | 23 | } 24 | 25 | extension CGSize: Value { 26 | 27 | public func push(_ vm: VirtualMachine) { 28 | let t = vm.createTable() 29 | t["w"] = Double(self.width) 30 | t["h"] = Double(self.height) 31 | t.push(vm) 32 | } 33 | 34 | public func kind() -> Kind { return .table } 35 | 36 | fileprivate static let typeName: String = "size (table with numeric keys w,h)" 37 | public static func arg(_ vm: VirtualMachine, value: Value) -> String? { 38 | if value.kind() != .table { return typeName } 39 | if let result = Table.arg(vm, value: value) { return result } 40 | let t = value as! Table 41 | if !(t["w"] is Number) || !(t["h"] is Number) { return typeName } 42 | return nil 43 | } 44 | 45 | } 46 | 47 | extension Table { 48 | 49 | public func toPoint() -> CGPoint? { 50 | let x = self["x"] as? Number 51 | let y = self["y"] as? Number 52 | if x == nil || y == nil { return nil } 53 | return CGPoint(x: x!.toDouble(), y: y!.toDouble()) 54 | } 55 | 56 | public func toSize() -> CGSize? { 57 | let w = self["w"] as? Number 58 | let h = self["h"] as? Number 59 | if w == nil || h == nil { return nil } 60 | return CGSize(width: w!.toDouble(), height: h!.toDouble()) 61 | } 62 | 63 | } 64 | 65 | extension Arguments { 66 | 67 | public var point: CGPoint { return (values.remove(at: 0) as! Table).toPoint()! } 68 | public var size: CGSize { return (values.remove(at: 0) as! Table).toSize()! } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /Shared/Lua/Nil.swift: -------------------------------------------------------------------------------- 1 | 2 | open class Nil: Value, Equatable { 3 | 4 | open func push(_ vm: VirtualMachine) { 5 | lua_pushnil(vm.vm) 6 | } 7 | 8 | open func kind() -> Kind { return .nil } 9 | 10 | open class func arg(_ vm: VirtualMachine, value: Value) -> String? { 11 | if value.kind() != .nil { return "nil" } 12 | return nil 13 | } 14 | 15 | } 16 | 17 | public func ==(lhs: Nil, rhs: Nil) -> Bool { 18 | return true 19 | } 20 | -------------------------------------------------------------------------------- /Shared/Lua/String.swift: -------------------------------------------------------------------------------- 1 | 2 | extension String: Value { 3 | 4 | public func push(_ vm: VirtualMachine) { 5 | lua_pushstring(vm.vm, (self as NSString).utf8String) 6 | } 7 | 8 | public func kind() -> Kind { return .string } 9 | 10 | public static func arg(_ vm: VirtualMachine, value: Value) -> String? { 11 | if value.kind() != .string { return "string" } 12 | return nil 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Shared/Lua/Thread.swift: -------------------------------------------------------------------------------- 1 | 2 | open class Thread: StoredValue { 3 | 4 | override open func kind() -> Kind { return .thread } 5 | 6 | override open class func arg(_ vm: VirtualMachine, value: Value) -> String? { 7 | if value.kind() != .thread { return "thread" } 8 | return nil 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Shared/Lua/Userdata.swift: -------------------------------------------------------------------------------- 1 | 2 | open class Userdata: StoredValue { 3 | 4 | open func userdataPointer() -> UnsafeMutablePointer { 5 | push(vm) 6 | let ptr = lua_touserdata(vm.vm, -1) 7 | vm.pop() 8 | return (ptr?.assumingMemoryBound(to: T.self))! 9 | } 10 | 11 | open func toCustomType() -> T { 12 | return userdataPointer().pointee 13 | } 14 | 15 | open func toAny() -> Any { 16 | return userdataPointer().pointee 17 | } 18 | 19 | override open func kind() -> Kind { return .userdata } 20 | 21 | } 22 | 23 | open class LightUserdata: StoredValue { 24 | 25 | override open func kind() -> Kind { return .lightUserdata } 26 | 27 | override open class func arg(_ vm: VirtualMachine, value: Value) -> String? { 28 | if value.kind() != .lightUserdata { return "light userdata" } 29 | return nil 30 | } 31 | 32 | } 33 | 34 | public protocol CustomTypeInstance { 35 | 36 | static func luaTypeName() -> String 37 | 38 | } 39 | 40 | open class CustomType: Table { 41 | 42 | override open class func arg(_ vm: VirtualMachine, value: Value) -> String? { 43 | value.push(vm) 44 | let isLegit = luaL_testudata(vm.vm, -1, (T.luaTypeName() as NSString).utf8String) != nil 45 | vm.pop() 46 | if !isLegit { return T.luaTypeName() } 47 | return nil 48 | } 49 | 50 | override internal init(_ vm: VirtualMachine) { 51 | super.init(vm) 52 | } 53 | 54 | open var gc: ((T) -> Void)? 55 | open var eq: ((T, T) -> Bool)? 56 | 57 | public func createMethod(_ typeCheckers: [TypeChecker], _ fn: @escaping (T, Arguments) -> SwiftReturnValue) -> Function { 58 | var typeCheckers = typeCheckers 59 | typeCheckers.insert(CustomType.arg, at: 0) 60 | return vm.createFunction(typeCheckers) { (args: Arguments) in 61 | if args.values.count > 0 { 62 | let o: T = args.customType() 63 | return fn(o, args) 64 | } else { 65 | return .nothing 66 | } 67 | } 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /Shared/Lua/Value.swift: -------------------------------------------------------------------------------- 1 | 2 | public protocol Value { 3 | func push(_ vm: VirtualMachine) 4 | func kind() -> Kind 5 | static func arg(_ vm: VirtualMachine, value: Value) -> String? 6 | } 7 | 8 | open class StoredValue: Value, Equatable { 9 | 10 | fileprivate let registryLocation: Int 11 | internal unowned var vm: VirtualMachine 12 | 13 | internal init(_ vm: VirtualMachine) { 14 | self.vm = vm 15 | vm.pushFromStack(-1) 16 | registryLocation = vm.ref(RegistryIndex) 17 | } 18 | 19 | deinit { 20 | vm.unref(RegistryIndex, registryLocation) 21 | } 22 | 23 | open func push(_ vm: VirtualMachine) { 24 | vm.rawGet(tablePosition: RegistryIndex, index: registryLocation) 25 | } 26 | 27 | open func kind() -> Kind { 28 | fatalError("Override kind()") 29 | } 30 | 31 | open class func arg(_ vm: VirtualMachine, value: Value) -> String? { 32 | fatalError("Override arg()") 33 | } 34 | 35 | } 36 | 37 | public func ==(lhs: StoredValue, rhs: StoredValue) -> Bool { 38 | if lhs.vm.vm != rhs.vm.vm { return false } 39 | 40 | lhs.push(lhs.vm) 41 | lhs.push(rhs.vm) 42 | let result = lua_compare(lhs.vm.vm, -2, -1, LUA_OPEQ) == 1 43 | lhs.vm.pop(2) 44 | 45 | return result 46 | } 47 | -------------------------------------------------------------------------------- /Shared/LuaSource/LuaSource.h: -------------------------------------------------------------------------------- 1 | @import Foundation; 2 | 3 | extern int SDegutisLuaRegistryIndex; 4 | 5 | //! Project version number for LuaSource. 6 | FOUNDATION_EXPORT double LuaSourceVersionNumber; 7 | 8 | //! Project version string for LuaSource. 9 | FOUNDATION_EXPORT const unsigned char LuaSourceVersionString[]; 10 | 11 | // In this header, you should import all the public headers of your framework using statements like #import 12 | 13 | #import "lapi.h" 14 | #import "lauxlib.h" 15 | #import "lcode.h" 16 | #import "lctype.h" 17 | #import "ldebug.h" 18 | #import "ldo.h" 19 | #import "lfunc.h" 20 | #import "lgc.h" 21 | #import "llex.h" 22 | #import "llimits.h" 23 | #import "lmem.h" 24 | #import "lobject.h" 25 | #import "lopcodes.h" 26 | #import "lparser.h" 27 | #import "lprefix.h" 28 | #import "lstate.h" 29 | #import "lstring.h" 30 | #import "ltable.h" 31 | #import "ltm.h" 32 | #import "lua.h" 33 | #import "luaconf.h" 34 | #import "lualib.h" 35 | #import "lundump.h" 36 | #import "lvm.h" 37 | #import "lzio.h" 38 | -------------------------------------------------------------------------------- /Shared/LuaSource/LuaSource.m: -------------------------------------------------------------------------------- 1 | #import "LuaSource.h" 2 | 3 | int SDegutisLuaRegistryIndex = LUA_REGISTRYINDEX; 4 | -------------------------------------------------------------------------------- /Shared/LuaSource/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.8 2014/07/15 21:26:50 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check((n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /Shared/LuaSource/lctype.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lctype.c,v 1.12 2014/11/02 19:19:04 roberto Exp $ 3 | ** 'ctype' functions for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lctype_c 8 | #define LUA_CORE 9 | 10 | #include "lprefix.h" 11 | 12 | 13 | #include "lctype.h" 14 | 15 | #if !LUA_USE_CTYPE /* { */ 16 | 17 | #include 18 | 19 | LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = { 20 | 0x00, /* EOZ */ 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */ 22 | 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1. */ 24 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 25 | 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* 2. */ 26 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 27 | 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, /* 3. */ 28 | 0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 29 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 4. */ 30 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 31 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 5. */ 32 | 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05, 33 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 6. */ 34 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 35 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 7. */ 36 | 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8. */ 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9. */ 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a. */ 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b. */ 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c. */ 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d. */ 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e. */ 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f. */ 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | }; 54 | 55 | #endif /* } */ 56 | -------------------------------------------------------------------------------- /Shared/LuaSource/lctype.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lctype.h,v 1.12 2011/07/15 12:50:29 roberto Exp $ 3 | ** 'ctype' functions for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lctype_h 8 | #define lctype_h 9 | 10 | #include "lua.h" 11 | 12 | 13 | /* 14 | ** WARNING: the functions defined here do not necessarily correspond 15 | ** to the similar functions in the standard C ctype.h. They are 16 | ** optimized for the specific needs of Lua 17 | */ 18 | 19 | #if !defined(LUA_USE_CTYPE) 20 | 21 | #if 'A' == 65 && '0' == 48 22 | /* ASCII case: can use its own tables; faster and fixed */ 23 | #define LUA_USE_CTYPE 0 24 | #else 25 | /* must use standard C ctype */ 26 | #define LUA_USE_CTYPE 1 27 | #endif 28 | 29 | #endif 30 | 31 | 32 | #if !LUA_USE_CTYPE /* { */ 33 | 34 | #include 35 | 36 | #include "llimits.h" 37 | 38 | 39 | #define ALPHABIT 0 40 | #define DIGITBIT 1 41 | #define PRINTBIT 2 42 | #define SPACEBIT 3 43 | #define XDIGITBIT 4 44 | 45 | 46 | #define MASK(B) (1 << (B)) 47 | 48 | 49 | /* 50 | ** add 1 to char to allow index -1 (EOZ) 51 | */ 52 | #define testprop(c,p) (luai_ctype_[(c)+1] & (p)) 53 | 54 | /* 55 | ** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_' 56 | */ 57 | #define lislalpha(c) testprop(c, MASK(ALPHABIT)) 58 | #define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) 59 | #define lisdigit(c) testprop(c, MASK(DIGITBIT)) 60 | #define lisspace(c) testprop(c, MASK(SPACEBIT)) 61 | #define lisprint(c) testprop(c, MASK(PRINTBIT)) 62 | #define lisxdigit(c) testprop(c, MASK(XDIGITBIT)) 63 | 64 | /* 65 | ** this 'ltolower' only works for alphabetic characters 66 | */ 67 | #define ltolower(c) ((c) | ('A' ^ 'a')) 68 | 69 | 70 | /* two more entries for 0 and -1 (EOZ) */ 71 | LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2]; 72 | 73 | 74 | #else /* }{ */ 75 | 76 | /* 77 | ** use standard C ctypes 78 | */ 79 | 80 | #include 81 | 82 | 83 | #define lislalpha(c) (isalpha(c) || (c) == '_') 84 | #define lislalnum(c) (isalnum(c) || (c) == '_') 85 | #define lisdigit(c) (isdigit(c)) 86 | #define lisspace(c) (isspace(c)) 87 | #define lisprint(c) (isprint(c)) 88 | #define lisxdigit(c) (isxdigit(c)) 89 | 90 | #define ltolower(c) (tolower(c)) 91 | 92 | #endif /* } */ 93 | 94 | #endif 95 | 96 | -------------------------------------------------------------------------------- /Shared/LuaSource/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.12 2014/11/10 14:46:05 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | /* Active Lua function (given call info) */ 21 | #define ci_func(ci) (clLvalue((ci)->func)) 22 | 23 | 24 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 25 | const char *opname); 26 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, 27 | const TValue *p2); 28 | LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1, 29 | const TValue *p2, 30 | const char *msg); 31 | LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1, 32 | const TValue *p2); 33 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 34 | const TValue *p2); 35 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 36 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 37 | LUAI_FUNC void luaG_traceexec (lua_State *L); 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /Shared/LuaSource/ldo.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldo.h,v 2.21 2014/10/25 11:50:46 roberto Exp $ 3 | ** Stack and Call structure of Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldo_h 8 | #define ldo_h 9 | 10 | 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | #include "lzio.h" 14 | 15 | 16 | #define luaD_checkstack(L,n) if (L->stack_last - L->top <= (n)) \ 17 | luaD_growstack(L, n); else condmovestack(L); 18 | 19 | 20 | #define incr_top(L) {L->top++; luaD_checkstack(L,0);} 21 | 22 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) 23 | #define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) 24 | 25 | 26 | /* type of protected functions, to be ran by 'runprotected' */ 27 | typedef void (*Pfunc) (lua_State *L, void *ud); 28 | 29 | LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, 30 | const char *mode); 31 | LUAI_FUNC void luaD_hook (lua_State *L, int event, int line); 32 | LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); 33 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults, 34 | int allowyield); 35 | LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 36 | ptrdiff_t oldtop, ptrdiff_t ef); 37 | LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); 38 | LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); 39 | LUAI_FUNC void luaD_growstack (lua_State *L, int n); 40 | LUAI_FUNC void luaD_shrinkstack (lua_State *L); 41 | 42 | LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); 43 | LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /Shared/LuaSource/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.14 2014/06/19 18:27:20 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | /* test whether thread is in 'twups' list */ 22 | #define isintwups(L) (L->twups != L) 23 | 24 | 25 | /* 26 | ** Upvalues for Lua closures 27 | */ 28 | struct UpVal { 29 | TValue *v; /* points to stack or to its own value */ 30 | lu_mem refcount; /* reference counter */ 31 | union { 32 | struct { /* (when open) */ 33 | UpVal *next; /* linked list */ 34 | int touched; /* mark to avoid cycles with dead threads */ 35 | } open; 36 | TValue value; /* the value (when closed) */ 37 | } u; 38 | }; 39 | 40 | #define upisopen(up) ((up)->v != &(up)->u.value) 41 | 42 | 43 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 44 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); 45 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); 46 | LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl); 47 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 48 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 49 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 50 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 51 | int pc); 52 | 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Shared/LuaSource/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.38 2015/01/05 13:48:33 roberto Exp $ 3 | ** Initialization of libraries for lua.c and other clients 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | /* 12 | ** If you embed Lua in your program and need to open the standard 13 | ** libraries, call luaL_openlibs in your program. If you need a 14 | ** different set of libraries, copy this file to your project and edit 15 | ** it to suit your needs. 16 | ** 17 | ** You can also *preload* libraries, so that a later 'require' can 18 | ** open the library, which is already linked to the application. 19 | ** For that, do the following code: 20 | ** 21 | ** luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); 22 | ** lua_pushcfunction(L, luaopen_modname); 23 | ** lua_setfield(L, -2, modname); 24 | ** lua_pop(L, 1); // remove _PRELOAD table 25 | */ 26 | 27 | #include "lprefix.h" 28 | 29 | 30 | #include 31 | 32 | #include "lua.h" 33 | 34 | #include "lualib.h" 35 | #include "lauxlib.h" 36 | 37 | 38 | /* 39 | ** these libs are loaded by lua.c and are readily available to any Lua 40 | ** program 41 | */ 42 | static const luaL_Reg loadedlibs[] = { 43 | {"_G", luaopen_base}, 44 | {LUA_LOADLIBNAME, luaopen_package}, 45 | {LUA_COLIBNAME, luaopen_coroutine}, 46 | {LUA_TABLIBNAME, luaopen_table}, 47 | {LUA_IOLIBNAME, luaopen_io}, 48 | {LUA_OSLIBNAME, luaopen_os}, 49 | {LUA_STRLIBNAME, luaopen_string}, 50 | {LUA_MATHLIBNAME, luaopen_math}, 51 | {LUA_UTF8LIBNAME, luaopen_utf8}, 52 | {LUA_DBLIBNAME, luaopen_debug}, 53 | #if defined(LUA_COMPAT_BITLIB) 54 | {LUA_BITLIBNAME, luaopen_bit32}, 55 | #endif 56 | {NULL, NULL} 57 | }; 58 | 59 | 60 | LUALIB_API void luaL_openlibs (lua_State *L) { 61 | const luaL_Reg *lib; 62 | /* "require" functions from 'loadedlibs' and set results to global table */ 63 | for (lib = loadedlibs; lib->func; lib++) { 64 | luaL_requiref(L, lib->name, lib->func, 1); 65 | lua_pop(L, 1); /* remove lib */ 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Shared/LuaSource/lprefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ 3 | ** Definitions for Lua code that must come before any other header file 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lprefix_h 8 | #define lprefix_h 9 | 10 | 11 | /* 12 | ** Allows POSIX/XSI stuff 13 | */ 14 | #if !defined(LUA_USE_C89) /* { */ 15 | 16 | #if !defined(_XOPEN_SOURCE) 17 | #define _XOPEN_SOURCE 600 18 | #elif _XOPEN_SOURCE == 0 19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ 20 | #endif 21 | 22 | /* 23 | ** Allows manipulation of large files in gcc and some other compilers 24 | */ 25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) 26 | #define _LARGEFILE_SOURCE 1 27 | #define _FILE_OFFSET_BITS 64 28 | #endif 29 | 30 | #endif /* } */ 31 | 32 | 33 | /* 34 | ** Windows stuff 35 | */ 36 | #if defined(_WIN32) /* { */ 37 | 38 | #if !defined(_CRT_SECURE_NO_WARNINGS) 39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ 40 | #endif 41 | 42 | #endif /* } */ 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /Shared/LuaSource/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.56 2014/07/18 14:46:47 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | #include "lgc.h" 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | 14 | 15 | #define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) 16 | #define sizestring(s) sizelstring((s)->len) 17 | 18 | #define sizeludata(l) (sizeof(union UUdata) + (l)) 19 | #define sizeudata(u) sizeludata((u)->len) 20 | 21 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 22 | (sizeof(s)/sizeof(char))-1)) 23 | 24 | 25 | /* 26 | ** test whether a string is a reserved word 27 | */ 28 | #define isreserved(s) ((s)->tt == LUA_TSHRSTR && (s)->extra > 0) 29 | 30 | 31 | /* 32 | ** equality for short strings, which are always internalized 33 | */ 34 | #define eqshrstr(a,b) check_exp((a)->tt == LUA_TSHRSTR, (a) == (b)) 35 | 36 | 37 | LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); 38 | LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); 39 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 40 | LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); 41 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s); 42 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 43 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Shared/LuaSource/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltable.h,v 2.20 2014/09/04 18:15:29 roberto Exp $ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gval(n) (&(n)->i_val) 15 | #define gnext(n) ((n)->i_key.nk.next) 16 | 17 | 18 | /* 'const' to avoid wrong writings that can mess up field 'next' */ 19 | #define gkey(n) cast(const TValue*, (&(n)->i_key.tvk)) 20 | 21 | #define wgkey(n) (&(n)->i_key.nk) 22 | 23 | #define invalidateTMcache(t) ((t)->flags = 0) 24 | 25 | 26 | /* returns the key, given the value of a table entry */ 27 | #define keyfromval(v) \ 28 | (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val)))) 29 | 30 | 31 | LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key); 32 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, 33 | TValue *value); 34 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 35 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 36 | LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); 37 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 38 | LUAI_FUNC Table *luaH_new (lua_State *L); 39 | LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize, 40 | unsigned int nhsize); 41 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize); 42 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 43 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 44 | LUAI_FUNC int luaH_getn (Table *t); 45 | 46 | 47 | #if defined(LUA_DEBUG) 48 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 49 | LUAI_FUNC int luaH_isdummy (Node *n); 50 | #endif 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Shared/LuaSource/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 2.21 2014/10/25 11:50:46 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" and "ORDER OP" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_LEN, 24 | TM_EQ, /* last tag method with fast access */ 25 | TM_ADD, 26 | TM_SUB, 27 | TM_MUL, 28 | TM_MOD, 29 | TM_POW, 30 | TM_DIV, 31 | TM_IDIV, 32 | TM_BAND, 33 | TM_BOR, 34 | TM_BXOR, 35 | TM_SHL, 36 | TM_SHR, 37 | TM_UNM, 38 | TM_BNOT, 39 | TM_LT, 40 | TM_LE, 41 | TM_CONCAT, 42 | TM_CALL, 43 | TM_N /* number of elements in the enum */ 44 | } TMS; 45 | 46 | 47 | 48 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 49 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 50 | 51 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 52 | 53 | #define ttypename(x) luaT_typenames_[(x) + 1] 54 | #define objtypename(x) ttypename(ttnov(x)) 55 | 56 | LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; 57 | 58 | 59 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 60 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 61 | TMS event); 62 | LUAI_FUNC void luaT_init (lua_State *L); 63 | 64 | LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, 65 | const TValue *p2, TValue *p3, int hasres); 66 | LUAI_FUNC int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, 67 | StkId res, TMS event); 68 | LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, 69 | StkId res, TMS event); 70 | LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, 71 | const TValue *p2, TMS event); 72 | 73 | 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /Shared/LuaSource/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.44 2014/02/06 17:32:33 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | 15 | LUAMOD_API int (luaopen_base) (lua_State *L); 16 | 17 | #define LUA_COLIBNAME "coroutine" 18 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 19 | 20 | #define LUA_TABLIBNAME "table" 21 | LUAMOD_API int (luaopen_table) (lua_State *L); 22 | 23 | #define LUA_IOLIBNAME "io" 24 | LUAMOD_API int (luaopen_io) (lua_State *L); 25 | 26 | #define LUA_OSLIBNAME "os" 27 | LUAMOD_API int (luaopen_os) (lua_State *L); 28 | 29 | #define LUA_STRLIBNAME "string" 30 | LUAMOD_API int (luaopen_string) (lua_State *L); 31 | 32 | #define LUA_UTF8LIBNAME "utf8" 33 | LUAMOD_API int (luaopen_utf8) (lua_State *L); 34 | 35 | #define LUA_BITLIBNAME "bit32" 36 | LUAMOD_API int (luaopen_bit32) (lua_State *L); 37 | 38 | #define LUA_MATHLIBNAME "math" 39 | LUAMOD_API int (luaopen_math) (lua_State *L); 40 | 41 | #define LUA_DBLIBNAME "debug" 42 | LUAMOD_API int (luaopen_debug) (lua_State *L); 43 | 44 | #define LUA_LOADLIBNAME "package" 45 | LUAMOD_API int (luaopen_package) (lua_State *L); 46 | 47 | 48 | /* open all previous libraries */ 49 | LUALIB_API void (luaL_openlibs) (lua_State *L); 50 | 51 | 52 | 53 | #if !defined(lua_assert) 54 | #define lua_assert(x) ((void)0) 55 | #endif 56 | 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Shared/LuaSource/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.44 2014/06/19 18:27:20 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* data to catch conversion errors */ 16 | #define LUAC_DATA "\x19\x93\r\n\x1a\n" 17 | 18 | #define LUAC_INT 0x5678 19 | #define LUAC_NUM cast_num(370.5) 20 | 21 | #define MYINT(s) (s[0]-'0') 22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) 23 | #define LUAC_FORMAT 0 /* this is the official format */ 24 | 25 | /* load one chunk; from lundump.c */ 26 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, 27 | const char* name); 28 | 29 | /* dump one chunk; from ldump.c */ 30 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, 31 | void* data, int strip); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Shared/LuaSource/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lvm.h,v 2.34 2014/08/01 17:24:02 roberto Exp $ 3 | ** Lua virtual machine 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lvm_h 8 | #define lvm_h 9 | 10 | 11 | #include "ldo.h" 12 | #include "lobject.h" 13 | #include "ltm.h" 14 | 15 | 16 | #if !defined(LUA_NOCVTN2S) 17 | #define cvt2str(o) ttisnumber(o) 18 | #else 19 | #define cvt2str(o) 0 /* no conversion from numbers to strings */ 20 | #endif 21 | 22 | 23 | #if !defined(LUA_NOCVTS2N) 24 | #define cvt2num(o) ttisstring(o) 25 | #else 26 | #define cvt2num(o) 0 /* no conversion from strings to numbers */ 27 | #endif 28 | 29 | 30 | #define tonumber(o,n) \ 31 | (ttisfloat(o) ? (*(n) = fltvalue(o), 1) : luaV_tonumber_(o,n)) 32 | 33 | #define tointeger(o,i) \ 34 | (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointeger_(o,i)) 35 | 36 | #define intop(op,v1,v2) l_castU2S(l_castS2U(v1) op l_castS2U(v2)) 37 | 38 | #define luaV_rawequalobj(t1,t2) luaV_equalobj(NULL,t1,t2) 39 | 40 | 41 | LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2); 42 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 43 | LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); 44 | LUAI_FUNC int luaV_tonumber_ (const TValue *obj, lua_Number *n); 45 | LUAI_FUNC int luaV_tointeger_ (const TValue *obj, lua_Integer *p); 46 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 47 | StkId val); 48 | LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 49 | StkId val); 50 | LUAI_FUNC void luaV_finishOp (lua_State *L); 51 | LUAI_FUNC void luaV_execute (lua_State *L); 52 | LUAI_FUNC void luaV_concat (lua_State *L, int total); 53 | LUAI_FUNC lua_Integer luaV_div (lua_State *L, lua_Integer x, lua_Integer y); 54 | LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y); 55 | LUAI_FUNC lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y); 56 | LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Shared/LuaSource/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.36 2014/11/02 19:19:04 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lzio_c 8 | #define LUA_CORE 9 | 10 | #include "lprefix.h" 11 | 12 | 13 | #include 14 | 15 | #include "lua.h" 16 | 17 | #include "llimits.h" 18 | #include "lmem.h" 19 | #include "lstate.h" 20 | #include "lzio.h" 21 | 22 | 23 | int luaZ_fill (ZIO *z) { 24 | size_t size; 25 | lua_State *L = z->L; 26 | const char *buff; 27 | lua_unlock(L); 28 | buff = z->reader(L, z->data, &size); 29 | lua_lock(L); 30 | if (buff == NULL || size == 0) 31 | return EOZ; 32 | z->n = size - 1; /* discount char being returned */ 33 | z->p = buff; 34 | return cast_uchar(*(z->p++)); 35 | } 36 | 37 | 38 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 39 | z->L = L; 40 | z->reader = reader; 41 | z->data = data; 42 | z->n = 0; 43 | z->p = NULL; 44 | } 45 | 46 | 47 | /* --------------------------------------------------------------- read --- */ 48 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 49 | while (n) { 50 | size_t m; 51 | if (z->n == 0) { /* no bytes in buffer? */ 52 | if (luaZ_fill(z) == EOZ) /* try to read more */ 53 | return n; /* no more input; return number of missing bytes */ 54 | else { 55 | z->n++; /* luaZ_fill consumed first byte; put it back */ 56 | z->p--; 57 | } 58 | } 59 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 60 | memcpy(b, z->p, m); 61 | z->n -= m; 62 | z->p += m; 63 | b = (char *)b + m; 64 | n -= m; 65 | } 66 | return 0; 67 | } 68 | 69 | /* ------------------------------------------------------------------------ */ 70 | char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { 71 | if (n > buff->buffsize) { 72 | if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; 73 | luaZ_resizebuffer(L, buff, n); 74 | } 75 | return buff->buffer; 76 | } 77 | 78 | 79 | -------------------------------------------------------------------------------- /Shared/LuaSource/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.30 2014/12/19 17:26:14 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) 21 | 22 | 23 | typedef struct Mbuffer { 24 | char *buffer; 25 | size_t n; 26 | size_t buffsize; 27 | } Mbuffer; 28 | 29 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 30 | 31 | #define luaZ_buffer(buff) ((buff)->buffer) 32 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 33 | #define luaZ_bufflen(buff) ((buff)->n) 34 | 35 | #define luaZ_buffremove(buff,i) ((buff)->n -= (i)) 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | ((buff)->buffer = luaM_reallocvchar(L, (buff)->buffer, \ 41 | (buff)->buffsize, size), \ 42 | (buff)->buffsize = size) 43 | 44 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 45 | 46 | 47 | LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); 48 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 49 | void *data); 50 | LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */ 51 | 52 | 53 | 54 | /* --------- Private Part ------------------ */ 55 | 56 | struct Zio { 57 | size_t n; /* bytes still unread */ 58 | const char *p; /* current position in buffer */ 59 | lua_Reader reader; /* reader function */ 60 | void *data; /* additional data */ 61 | lua_State *L; /* Lua state (for reader) */ 62 | }; 63 | 64 | 65 | LUAI_FUNC int luaZ_fill (ZIO *z); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /Shared/MathLibrary.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MathLibrary.swift 3 | // Signed 4 | // 5 | // Created by Markus Moenig on 29/8/20. 6 | // 7 | 8 | import simd 9 | 10 | typealias float2 = SIMD2 11 | typealias float3 = SIMD3 12 | typealias float4 = SIMD4 13 | 14 | let π = Float.pi 15 | 16 | extension Float { 17 | var radiansToDegrees: Float { 18 | (self / π) * 180 19 | } 20 | var degreesToRadians: Float { 21 | (self / 180) * π 22 | } 23 | } 24 | 25 | extension Double { 26 | var radiansToDegrees: Double { 27 | (self / Double.pi) * 180 28 | } 29 | var degreesToRadians: Double { 30 | (self / 180) * Double.pi 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Shared/ModelerPipeline/ModelerStates.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ModelerStates.swift 3 | // Signed 4 | // 5 | // Created by Markus Moenig on 28/6/21. 6 | // 7 | 8 | import MetalKit 9 | 10 | class ModelerStates { 11 | 12 | var defaultLibrary : MTLLibrary! 13 | var computeStates : [String: MTLComputePipelineState] = [:] 14 | 15 | var device : MTLDevice 16 | 17 | init(_ device: MTLDevice) 18 | { 19 | self.device = device 20 | defaultLibrary = device.makeDefaultLibrary() 21 | 22 | computeStates["modelerCmd"] = createComputeState(name: "modelerCmd") 23 | computeStates["modelerHitScene"] = createComputeState(name: "modelerHitScene") 24 | computeStates["modelerClear"] = createComputeState(name: "modelerClear") 25 | computeStates["modelerMakeCGIImage"] = createComputeState(name: "modelerMakeCGIImage") 26 | } 27 | 28 | /// Creates a compute state from an optional library and the function name 29 | func createComputeState( library: MTLLibrary? = nil, name: String ) -> MTLComputePipelineState? 30 | { 31 | let function : MTLFunction? 32 | 33 | if library != nil { 34 | function = library!.makeFunction( name: name ) 35 | } else { 36 | function = defaultLibrary!.makeFunction( name: name ) 37 | } 38 | 39 | var computePipelineState : MTLComputePipelineState? 40 | 41 | if function == nil { 42 | return nil 43 | } 44 | 45 | do { 46 | computePipelineState = try device.makeComputePipelineState( function: function! ) 47 | } catch { 48 | print( "computePipelineState failed" ) 49 | return nil 50 | } 51 | 52 | return computePipelineState 53 | } 54 | 55 | func getComputeState(stateName: String) -> MTLComputePipelineState? 56 | { 57 | return computeStates[stateName] 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Shared/PersistenceController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PersistenceController.swift 3 | // Signed 4 | // 5 | // Created by Markus Moenig on 23/6/21. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | import CloudKit 11 | 12 | struct PersistenceController { 13 | // A singleton for our entire app to use 14 | static let shared = PersistenceController() 15 | 16 | let container: NSPersistentContainer 17 | 18 | init(inMemory: Bool = true) { 19 | 20 | container = NSPersistentCloudKitContainer(name: "DataModel") 21 | 22 | guard let description = container.persistentStoreDescriptions.first else { 23 | fatalError("Error") 24 | } 25 | 26 | //description.cloudKitContainerOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: "iCloud.com.moenig.signed") 27 | 28 | description.cloudKitContainerOptions?.databaseScope = .public 29 | 30 | description.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey) 31 | description.setOption(true as NSNumber, forKey: NSPersistentStoreRemoteChangeNotificationPostOptionKey) 32 | 33 | if inMemory { 34 | container.persistentStoreDescriptions.first?.url = URL(fileURLWithPath: "/dev/null") 35 | } 36 | 37 | container.loadPersistentStores { description, error in 38 | if let error = error { 39 | fatalError("Error: \(error.localizedDescription)") 40 | } 41 | } 42 | 43 | container.viewContext.automaticallyMergesChangesFromParent = true 44 | } 45 | 46 | /// Save the context if it has changes 47 | func save() { 48 | let context = container.viewContext 49 | 50 | if context.hasChanges { 51 | do { 52 | try context.save() 53 | } catch { 54 | let nserror = error as NSError 55 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)") 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Shared/SignedApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SignedApp.swift 3 | // Signed 4 | // 5 | // Created by Markus Moenig on 12/12/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct SignedApp: App { 12 | 13 | let persistenceController = PersistenceController.shared 14 | 15 | @StateObject var storeManager = StoreManager() 16 | 17 | @Environment(\.scenePhase) var scenePhase 18 | 19 | var body: some Scene { 20 | DocumentGroup(newDocument: SignedDocument()) { file in 21 | ContentView(document: file.$document, storeManager: storeManager) 22 | .environment(\.managedObjectContext, persistenceController.container.viewContext) 23 | } 24 | .commands { 25 | SidebarCommands() 26 | } 27 | .onChange(of: scenePhase) { _ in 28 | persistenceController.save() 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Shared/SignedDocument.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SignedDocument.swift 3 | // Signed 4 | // 5 | // Created by Markus Moenig on 12/12/20. 6 | // 7 | 8 | import SwiftUI 9 | import UniformTypeIdentifiers 10 | 11 | extension UTType { 12 | static var signedProject: UTType { 13 | UTType(exportedAs: "com.Signed.project") 14 | } 15 | } 16 | 17 | extension UTType { 18 | static var signedOBJ: UTType { 19 | UTType(exportedAs: "com.Signed.obj") 20 | } 21 | } 22 | 23 | struct SignedDocument: FileDocument { 24 | 25 | var model = Model() 26 | 27 | var updated = false 28 | 29 | init() { 30 | } 31 | 32 | static var readableContentTypes: [UTType] { [.signedProject] } 33 | static var writableContentTypes: [UTType] { [.signedProject, .png, .signedOBJ] } 34 | 35 | init(configuration: ReadConfiguration) throws { 36 | 37 | guard let data = configuration.file.regularFileContents, 38 | let project = try? JSONDecoder().decode(SignedProject.self, from: data) 39 | else { 40 | throw CocoaError(.fileReadCorruptFile) 41 | } 42 | if data.isEmpty == false { 43 | model.setProject(project) 44 | } 45 | } 46 | 47 | func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper { 48 | var data = Data() 49 | 50 | let encodedData = try? JSONEncoder().encode(model.project) 51 | if let json = String(data: encodedData!, encoding: .utf8) { 52 | data = json.data(using: .utf8)! 53 | } 54 | 55 | return .init(regularFileWithContents: data) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Shared/Views/MaterialDetailsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUIView.swift 3 | // Signed 4 | // 5 | // Created by Markus Moenig on 25/9/2564 BE. 6 | // 7 | 8 | import SwiftUI 9 | import MarkdownUI 10 | 11 | struct MaterialDetailsView: View { 12 | 13 | let model : Model 14 | 15 | @State var material : MaterialEntity 16 | 17 | init(model: Model, material: MaterialEntity) { 18 | self.model = model 19 | self._material = State(initialValue: material) 20 | } 21 | 22 | var body: some View { 23 | 24 | Text(material.name!) 25 | .font(.title2) 26 | 27 | ScrollView { 28 | VStack(alignment: .leading) { 29 | Text("Create using") 30 | .font(.headline) 31 | 32 | Button("command:newMaterial(\"\(material.name!)\")") { 33 | copyToClipboard("local cmd = command:newMaterial(\"\(material.name!)\")") 34 | } 35 | .background(Color.accentColor) 36 | .font(.system(size: 12)) 37 | .padding(.top, 4) 38 | 39 | Text("execute with") 40 | .font(.headline) 41 | 42 | Button(":execute(id)") { 43 | copyToClipboard(":execute(0, { } )") 44 | } 45 | .background(Color.accentColor) 46 | .font(.system(size: 12)) 47 | .padding(.top, 4) 48 | 49 | Markdown("To layer materials use :setBlendMode( *mode*, { *options* } ) where mode is either \"valuenoise\" or \"linear\". ") 50 | 51 | Markdown("See material documentation for further details.") 52 | } 53 | .padding(2) 54 | } 55 | 56 | .onReceive(model.dbMaterialSelected) { material in 57 | self.material = material 58 | } 59 | } 60 | 61 | func copyToClipboard(_ str: String) { 62 | #if os(iOS) 63 | UIPasteboard.general.string = str 64 | #elseif os(OSX) 65 | let pasteBoard = NSPasteboard.general 66 | pasteBoard.clearContents() 67 | pasteBoard.setString(str, forType: .string) 68 | #endif 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Shared/Views/ObjectDetailsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectDetailsView.swift 3 | // Signed 4 | // 5 | // Created by Markus Moenig on 25/9/2564 BE. 6 | // 7 | 8 | import SwiftUI 9 | import MarkdownUI 10 | 11 | struct ObjectDetailsView: View { 12 | 13 | let model : Model 14 | 15 | @State var object : ObjectEntity 16 | 17 | init(model: Model, object: ObjectEntity) { 18 | self.model = model 19 | self._object = State(initialValue: object) 20 | } 21 | 22 | var body: some View { 23 | 24 | Text(object.name!) 25 | .font(.title2) 26 | 27 | ScrollView { 28 | VStack(alignment: .leading) { 29 | Text("Create using") 30 | .font(.headline) 31 | 32 | Button("command:newObject(\"\(object.name!)\", bbox)") { 33 | copyToClipboard("local bbox = bbox:new( vec3(0, 0, 0), vec3(1, 1, 1) )\nlocal cmd = command:newObject(\"\(object.name!)\", bbox)") 34 | } 35 | .background(Color.accentColor) 36 | .font(.system(size: 12)) 37 | .padding(.top, 4) 38 | 39 | Text("execute with") 40 | .font(.headline) 41 | 42 | Button(":execute(id, { *options* } )") { 43 | copyToClipboard(":execute(0, { } )") 44 | } 45 | .background(Color.accentColor) 46 | .font(.system(size: 12)) 47 | .padding(.top, 4) 48 | 49 | Markdown("Reference the object source code for a list of supported options.") 50 | } 51 | .padding(2) 52 | } 53 | 54 | .onReceive(model.dbObjectSelected) { object in 55 | self.object = object 56 | } 57 | } 58 | 59 | func copyToClipboard(_ str: String) { 60 | #if os(iOS) 61 | UIPasteboard.general.string = str 62 | #elseif os(OSX) 63 | let pasteBoard = NSPasteboard.general 64 | pasteBoard.clearContents() 65 | pasteBoard.setString(str, forType: .string) 66 | #endif 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Shared/Views/ProgressView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressView.swift 3 | // ProgressView 4 | // 5 | // Created by Markus Moenig on 10/9/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ProgressView: View { 11 | 12 | let model : Model 13 | 14 | @State private var value : Float = 0 15 | @State private var color : Color = .accentColor 16 | 17 | var body: some View { 18 | 19 | GeometryReader { geometry in 20 | if geometry.size.width > geometry.size.height { 21 | Rectangle().frame(width: min(CGFloat(self.value)*geometry.size.width, geometry.size.width), height: geometry.size.height) 22 | .foregroundColor(color) 23 | } else { 24 | Rectangle().frame(width: geometry.size.width, height: min(CGFloat(self.value)*geometry.size.height, geometry.size.height)) 25 | .foregroundColor(color) 26 | } 27 | } 28 | 29 | .onReceive(model.progressChanged) { _ in 30 | 31 | if model.progress == .modelling { 32 | color = .accentColor 33 | } else { 34 | color = .green 35 | } 36 | 37 | if model.progressCurrent < model.progressTotal { 38 | value = Float(model.progressCurrent) / Float(model.progressTotal) 39 | } else { 40 | if model.progressTotal > 0 { 41 | value = 1 42 | } 43 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { 44 | value = 0 45 | } 46 | } 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /Signed.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Signed.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Signed.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "AttributedText", 6 | "repositoryURL": "https://github.com/gonzalezreal/AttributedText", 7 | "state": { 8 | "branch": null, 9 | "revision": "c345033e22d5a1cd0e9fe0ec405cc809a8349586", 10 | "version": "0.3.1" 11 | } 12 | }, 13 | { 14 | "package": "combine-schedulers", 15 | "repositoryURL": "https://github.com/pointfreeco/combine-schedulers", 16 | "state": { 17 | "branch": null, 18 | "revision": "4cf088c29a20f52be0f2ca54992b492c54e0076b", 19 | "version": "0.5.3" 20 | } 21 | }, 22 | { 23 | "package": "MarkdownUI", 24 | "repositoryURL": "https://github.com/gonzalezreal/MarkdownUI", 25 | "state": { 26 | "branch": null, 27 | "revision": "29d94710545952dd4c724cc2ca901848eef54ded", 28 | "version": "0.5.2" 29 | } 30 | }, 31 | { 32 | "package": "NetworkImage", 33 | "repositoryURL": "https://github.com/gonzalezreal/NetworkImage", 34 | "state": { 35 | "branch": null, 36 | "revision": "d45f014daf5c54ef73a7d8db87ac94b9bd3d31bd", 37 | "version": "3.1.1" 38 | } 39 | }, 40 | { 41 | "package": "cmark", 42 | "repositoryURL": "https://github.com/SwiftDocOrg/swift-cmark.git", 43 | "state": { 44 | "branch": null, 45 | "revision": "9c8096a23f44794bde297452d87c455fc4f76d42", 46 | "version": "0.29.0+20210102.9c8096a" 47 | } 48 | }, 49 | { 50 | "package": "SwiftCommonMark", 51 | "repositoryURL": "https://github.com/gonzalezreal/SwiftCommonMark", 52 | "state": { 53 | "branch": null, 54 | "revision": "ed60da54305c244d0f77bc8d08495e04161e96a4", 55 | "version": "0.1.2" 56 | } 57 | }, 58 | { 59 | "package": "xctest-dynamic-overlay", 60 | "repositoryURL": "https://github.com/pointfreeco/xctest-dynamic-overlay", 61 | "state": { 62 | "branch": null, 63 | "revision": "50a70a9d3583fe228ce672e8923010c8df2deddd", 64 | "version": "0.2.1" 65 | } 66 | } 67 | ] 68 | }, 69 | "version": 1 70 | } 71 | -------------------------------------------------------------------------------- /Signed.xcodeproj/project.xcworkspace/xcuserdata/markusm.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markusmoenig/SignedLua/2515d0dc62fc27a1b4eabceb2c55957cc61cd05d/Signed.xcodeproj/project.xcworkspace/xcuserdata/markusm.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Signed.xcodeproj/project.xcworkspace/xcuserdata/markusmoenig.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markusmoenig/SignedLua/2515d0dc62fc27a1b4eabceb2c55957cc61cd05d/Signed.xcodeproj/project.xcworkspace/xcuserdata/markusmoenig.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Signed.xcodeproj/xcuserdata/markusm.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /Signed.xcodeproj/xcuserdata/markusm.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Example (Playground) 1.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 4 13 | 14 | Example (Playground) 2.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 5 20 | 21 | Example (Playground) 3.xcscheme 22 | 23 | isShown 24 | 25 | orderHint 26 | 2 27 | 28 | Example (Playground) 4.xcscheme 29 | 30 | isShown 31 | 32 | orderHint 33 | 6 34 | 35 | Example (Playground) 5.xcscheme 36 | 37 | isShown 38 | 39 | orderHint 40 | 7 41 | 42 | Example (Playground).xcscheme 43 | 44 | isShown 45 | 46 | orderHint 47 | 3 48 | 49 | Signed (iOS).xcscheme_^#shared#^_ 50 | 51 | orderHint 52 | 0 53 | 54 | Signed (macOS).xcscheme_^#shared#^_ 55 | 56 | orderHint 57 | 1 58 | 59 | Surge (Playground) 1.xcscheme 60 | 61 | isShown 62 | 63 | orderHint 64 | 3 65 | 66 | Surge (Playground) 2.xcscheme 67 | 68 | isShown 69 | 70 | orderHint 71 | 4 72 | 73 | Surge (Playground).xcscheme 74 | 75 | isShown 76 | 77 | orderHint 78 | 2 79 | 80 | 81 | SuppressBuildableAutocreation 82 | 83 | 2B224F342584485300F32354 84 | 85 | primary 86 | 87 | 88 | 2B224F3C2584485300F32354 89 | 90 | primary 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /iOS/iOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.icloud-container-identifiers 8 | 9 | iCloud.com.moenig.signed 10 | 11 | com.apple.developer.icloud-services 12 | 13 | CloudDocuments 14 | CloudKit 15 | 16 | com.apple.developer.ubiquity-container-identifiers 17 | 18 | iCloud.com.moenig.signed 19 | 20 | com.apple.developer.icloud-container-environment 21 | Production 22 | com.apple.developer.ubiquity-kvstore-identifier 23 | $(TeamIdentifierPrefix)$(CFBundleIdentifier) 24 | 25 | 26 | -------------------------------------------------------------------------------- /images/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markusmoenig/SignedLua/2515d0dc62fc27a1b4eabceb2c55957cc61cd05d/images/screen.png -------------------------------------------------------------------------------- /macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.aps-environment 6 | development 7 | com.apple.developer.icloud-container-identifiers 8 | 9 | iCloud.com.moenig.signed 10 | 11 | com.apple.developer.icloud-services 12 | 13 | CloudDocuments 14 | CloudKit 15 | 16 | com.apple.developer.ubiquity-container-identifiers 17 | 18 | iCloud.com.moenig.signed 19 | 20 | com.apple.developer.icloud-container-environment 21 | Production 22 | com.apple.developer.ubiquity-kvstore-identifier 23 | $(TeamIdentifierPrefix)$(CFBundleIdentifier) 24 | com.apple.security.app-sandbox 25 | 26 | com.apple.security.files.user-selected.read-write 27 | 28 | com.apple.security.network.client 29 | 30 | 31 | 32 | --------------------------------------------------------------------------------