├── _config.yml ├── IconScout.gif ├── IconScout-min.gif ├── IconScout-logo.png ├── IconScout-logo@2x.png ├── IconScout-adobe-cover.png ├── IconScout-sketch-cover.png ├── IconScout.sketchplugin └── Contents │ ├── Resources │ └── icon.png │ └── Sketch │ ├── manifest.json │ └── __index.js ├── .sketchpacks.json ├── .gitignore ├── .appcast.xml ├── LICENSE ├── README-ADOBE.md └── README.md /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /IconScout.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Iconscout/iconscout-plugins/HEAD/IconScout.gif -------------------------------------------------------------------------------- /IconScout-min.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Iconscout/iconscout-plugins/HEAD/IconScout-min.gif -------------------------------------------------------------------------------- /IconScout-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Iconscout/iconscout-plugins/HEAD/IconScout-logo.png -------------------------------------------------------------------------------- /IconScout-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Iconscout/iconscout-plugins/HEAD/IconScout-logo@2x.png -------------------------------------------------------------------------------- /IconScout-adobe-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Iconscout/iconscout-plugins/HEAD/IconScout-adobe-cover.png -------------------------------------------------------------------------------- /IconScout-sketch-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Iconscout/iconscout-plugins/HEAD/IconScout-sketch-cover.png -------------------------------------------------------------------------------- /IconScout.sketchplugin/Contents/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Iconscout/iconscout-plugins/HEAD/IconScout.sketchplugin/Contents/Resources/icon.png -------------------------------------------------------------------------------- /.sketchpacks.json: -------------------------------------------------------------------------------- 1 | { 2 | "schema_version": "1.0.0", 3 | "manifest_path": "IconScout.sketchplugin/Contents/Sketch/manifest.json", 4 | "appcast_path": ".appcast.xml" 5 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # misc 7 | .DS_Store 8 | .env.local 9 | .env.development.local 10 | .env.test.local 11 | .env.production.local 12 | 13 | npm-debug.log* 14 | yarn-debug.log* 15 | yarn-error.log* 16 | IconScout.sketchplugin.zip 17 | *.map 18 | -------------------------------------------------------------------------------- /.appcast.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | IconScout 7 | https://raw.githubusercontent.com/Iconscout/iconscout-plugins/master/.appcast.xml 8 | Get access to 4.4 Million+ Icons, Illustrations & 3D Assets right into Sketch App 9 | en 10 | 11 | Sketch Plugin with New Branding 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /IconScout.sketchplugin/Contents/Sketch/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "IconScout - Icons, Illustrations & 3D Assets", 3 | "icon": "icon.png", 4 | "description": "Get access to 4.4 Million+ Icons, Illustrations & 3D Assets right into Sketch App", 5 | "homepage": "https://iconscout.com", 6 | "author": "IconScout", 7 | "authorEmail": "support@iconscout.com", 8 | "compatibleVersion": 3, 9 | "bundleVersion": 1, 10 | "commands": [ 11 | { 12 | "name": "IconScout", 13 | "identifier": "iconscout.index", 14 | "script": "__index.js", 15 | "shortcut": "cmd shift i", 16 | "handlers": { 17 | "run": "onRun", 18 | "actions": { 19 | "Shutdown": "onShutdown" 20 | } 21 | } 22 | } 23 | ], 24 | "menu": { 25 | "items": [ 26 | "iconscout.index" 27 | ], 28 | "isRoot": true 29 | }, 30 | "version": "2.4.2", 31 | "identifier": "IconScout", 32 | "disableCocoaScriptPreprocessor": true, 33 | "appcast": "https://raw.githubusercontent.com/Iconscout/iconscout-plugins/master/.appcast.xml" 34 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Iconscout 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README-ADOBE.md: -------------------------------------------------------------------------------- 1 | # IconScout by Iconscout 2 | An **Adobe Photoshop and Illustrator Extension** to Enhance your designs with high-quality icons from [Iconscout](https://iconscout.com/?utm_source=icondrop). 3 | 4 | 5 | IconScout for Adobe Photoshop and Illustrator by Iconscout 6 | 7 | 8 | ## Installation 9 | ### For Mac 10 | 1. Download and open **[IconScout.pkg](bin/IconScout.pkg)**. 11 | 2. Double click on **IconScout.pkg** to install. 12 | 13 | ### For Windows 14 | 1. Download and open **[IconScout.exe](bin/IconScout.exe)**. 15 | 2. Double click on **IconScout.exe** to install. 16 | 17 | View our instructions for installation and how to use. 18 | 19 | ## Usage 20 | 1. Select Shape Layer (which will be replaced by Icon) 21 | 2. Open Extension from the `Window` > `Extensions` > `Iconscout`. 22 | 3. Search for Icon you want (Home, Business, Finance, etc.) 23 | 4. Hover the Icon you want to insert and click `Download Icon`. 24 | 5. Upgrade to our Iconscout Pro Plans to download unlimited premium icons. 25 | 26 | ### Log 27 | | Version | Notes | 28 | | --- | --- | 29 | | **v1.0** | First Release. | 30 | 31 | ### Powered by 32 | 33 | Iconscout API 34 | 35 | 36 | ### License 37 | IconScout is released under the MIT license. 38 | See [LICENSE](https://github.com/Iconscout/iconscout-plugins/blob/master/LICENSE/) for details. 39 | 40 | ### Contact 41 | * Website: [iconscout.com](https://iconscout.com/?utm_source=icondrop) 42 | * Follow [@iconscout](http://twitter.com/iconscout) on Twitter 43 | * Email 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IconScout by Iconscout 2 | Get access to 2 million+ design resources such as icons, illustration and stock photos right inside Sketch, Figma, Adobe Xd, Microsoft Office, G Suite and many more. IconScout is powered by [Iconscout](https://iconscout.com/?utm_source=icondrop). 3 | 4 | 5 | IconScout Sketch Plugin by IconscoutIconScout Adobe Plugin by Iconscout 6 | 7 | 8 | 9 | IconScout Sketch Plugin by Iconscout 10 | 11 | 12 | ## How to Install 13 | ### Figma 14 | Download it from [Figma Plugin Store](https://www.figma.com/c/plugin/744098704933821409/Iconscout) 15 | 16 | ### Adobe Xd 17 | Download it from [Adobe Xd Plugin Store](https://xd.adobelanding.com/en/xd-plugin-download/?name=570d8b62) 18 | 19 | ### Sketch 20 | 1. Download plugin from **[here](https://github.com/Iconscout/iconscout-plugins/releases)**. 21 | 2. Double click on **IconScout.sketchplugin** to install. 22 | 23 | #### How to Use 24 | 1. Select Shape Layer (which will be replaced by Icon) 25 | 2. Run the plugin from the `plugins` menu or you can use the shortcut `cmd + shift + i` 26 | 3. Search for Icon you want (Home, Business, Finance, etc.) 27 | 4. Hover the Icon you want to insert and click `Use This`. 28 | 5. If you have Iconscout Pro Subscription, you can enjoy all premium icons in vector format. 29 | 30 | ### Adobe Photoshop, Illustrator and InDesign 31 | #### Install on Mac 32 | 1. Download and open **[IconScout.pkg](https://github.com/Iconscout/iconscout-plugins/releases)**. 33 | 2. Double click on **IconScout.pkg** to install. 34 | 35 | #### Install on Windows 36 | 1. Download and open **[IconScout.exe](https://github.com/Iconscout/iconscout-plugins/releases)**. 37 | 2. Double click on **IconScout.exe** to install. 38 | 39 | View our instructions for installation and how to use. 40 | 41 | #### How to Use 42 | 1. Select Shape Layer (which will be replaced by Icon) 43 | 2. Open Extension from the `Window` > `Extensions` > `Iconscout`. 44 | 3. Search for Icon you want (Home, Business, Finance, etc.) 45 | 4. Hover the Icon you want to insert and click `Download Icon`. 46 | 5. Upgrade to our Iconscout Pro Plans to download unlimited premium icons. 47 | 48 | ## Powered by 49 | 50 | Iconscout API 51 | 52 | 53 | ## License 54 | IconScout is released under the MIT license. 55 | See [LICENSE](https://github.com/Iconscout/iconscout-plugins/blob/master/LICENSE/) for details. 56 | 57 | ## Support 58 | * Website: [iconscout.com](https://iconscout.com/?utm_source=icondrop) 59 | * Follow [@iconscout](http://twitter.com/iconscout) on Twitter 60 | * Email 61 | -------------------------------------------------------------------------------- /IconScout.sketchplugin/Contents/Sketch/__index.js: -------------------------------------------------------------------------------- 1 | var globalThis=this,global=this;function __skpm_run(key,context){globalThis.context=context;try{var exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(e,t){e.exports={JS_BRIDGE:"__skpm_sketchBridge",JS_BRIDGE_RESULT_SUCCESS:"__skpm_sketchBridge_success",JS_BRIDGE_RESULT_ERROR:"__skpm_sketchBridge_error",START_MOVING_WINDOW:"__skpm_startMovingWindow",EXECUTE_JAVASCRIPT:"__skpm_executeJS",EXECUTE_JAVASCRIPT_SUCCESS:"__skpm_executeJS_success_",EXECUTE_JAVASCRIPT_ERROR:"__skpm_executeJS_error_"}},function(e,t){e.exports=require("sketch/settings")},function(e,t){e.exports=require("sketch")},function(e,t,n){var i=n(4),o=n(9),r=n(10),a=n(11),s=n(12),l=n(13),u=n(14),c=n(5),d=n(15);function f(e){var t=(e=e||{}).identifier||String(NSUUID.UUID().UUIDString()),n=NSThread.mainThread().threadDictionary(),p=f.fromId(t);if(p)return p;var h=new i;if(h.id=t,e.modal&&!e.parent)throw new Error("A modal needs to have a parent.");var m=coscript.createFiber(),S=e.width||800,w=e.height||600,g=NSScreen.screens().firstObject().frame(),v=NSMakeRect(void 0!==e.x?e.x:Math.round((NSWidth(g)-S)/2),void 0!==e.y?NSHeight(g)-e.y:Math.round((NSHeight(g)-w)/2),S,w);e.titleBarStyle&&"default"!==e.titleBarStyle&&(e.frame=!1);var y="textured"!==e.windowType,b=NSTitledWindowMask;!1!==e.minimizable&&(b|=NSMiniaturizableWindowMask),!1!==e.closable&&(b|=NSClosableWindowMask),!1!==e.resizable&&(b|=NSResizableWindowMask),y&&!e.transparent&&!1!==e.frame||(b|=NSTexturedBackgroundWindowMask);var _=NSPanel.alloc().initWithContentRect_styleMask_backing_defer(v,b,NSBackingStoreBuffered,!0),N=WKWebViewConfiguration.alloc().init(),C=WKWebView.alloc().initWithFrame_configuration(CGRectMake(0,0,e.width||800,e.height||600),N);if(l(C),C.setAutoresizingMask(NSViewWidthSizable|NSViewHeightSizable),o(h,_,C),r(h,_,C),d(h,_,C,e),"desktop"===e.windowType&&(_.setLevel(kCGDesktopWindowLevel-1),_.setCollectionBehavior(NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorStationary|NSWindowCollectionBehaviorIgnoresCycle)),void 0===e.minWidth&&void 0===e.minHeight||h.setMinimumSize(e.minWidth||0,e.minHeight||0),void 0===e.maxWidth&&void 0===e.maxHeight||h.setMaximumSize(e.maxWidth||1e4,e.maxHeight||1e4),e.transparent||!1===e.frame){_.titlebarAppearsTransparent=!0,_.titleVisibility=NSWindowTitleHidden,_.setOpaque(0),_.isMovableByWindowBackground=!0;var M=NSToolbar.alloc().initWithIdentifier("titlebarStylingToolbar");M.setShowsBaselineSeparator(!1),_.setToolbar(M)}if("hiddenInset"===e.titleBarStyle){var R=NSToolbar.alloc().initWithIdentifier("titlebarStylingToolbar");R.setShowsBaselineSeparator(!1),_.setToolbar(R)}!1!==e.frame&&e.useContentSize||h.setSize(S,w),e.center&&h.center(),e.alwaysOnTop&&h.setAlwaysOnTop(!0),e.fullscreen&&h.setFullScreen(!0),h.setFullScreenable(!!e.fullscreenable);let W=e.title;!1===e.frame?W=void 0:void 0===W&&"undefined"!=typeof __command&&__command.pluginBundle()&&(W=__command.pluginBundle().name()),W&&h.setTitle(W);var E=e.backgroundColor;e.transparent&&(E=NSColor.clearColor()),!E&&!1===e.frame&&e.vibrancy&&(E=NSColor.clearColor()),h._setBackgroundColor(E||NSColor.windowBackgroundColor()),!1===e.hasShadow&&h.setHasShadow(!1),void 0!==e.opacity&&h.setOpacity(e.opacity),e.webPreferences=e.webPreferences||{},C.configuration().preferences().setValue_forKey(!1!==e.webPreferences.devTools,"developerExtrasEnabled"),C.configuration().preferences().setValue_forKey(!1!==e.webPreferences.javascript,"javaScriptEnabled"),C.configuration().preferences().setValue_forKey(!!e.webPreferences.plugins,"plugInsEnabled"),C.configuration().preferences().setValue_forKey(e.webPreferences.minimumFontSize||0,"minimumFontSize"),e.webPreferences.zoomFactor&&C.setMagnification(e.webPreferences.zoomFactor);var k=_.contentView();return!1!==e.frame?(C.setFrame(k.bounds()),k.addSubview(C)):(k.setAutoresizingMask(NSViewWidthSizable|NSViewHeightSizable),a(k,k.superview()),C.setFrame(k.bounds()),k.addSubview(C),_.standardWindowButton(NSWindowFullScreenButton)&&_.standardWindowButton(NSWindowFullScreenButton).setHidden(!0),e.titleBarStyle&&"default"!==e.titleBarStyle||(_.standardWindowButton(NSWindowZoomButton).setHidden(!0),_.standardWindowButton(NSWindowMiniaturizeButton).setHidden(!0),_.standardWindowButton(NSWindowCloseButton).setHidden(!0),_.standardWindowButton(NSWindowZoomButton).setEnabled(!1))),e.vibrancy&&h.setVibrancy(e.vibrancy),h.setMaximizable(!1!==e.maximizable),_.setHidesOnDeactivate(!1!==e.hidesOnDeactivate),e.remembersWindowFrame&&(_.setFrameAutosaveName(t),_.setFrameUsingName_force(_.frameAutosaveName(),!1)),e.acceptsFirstMouse&&h.on("focus",(function(e){e.type()===NSEventTypeLeftMouseDown&&h.webContents.executeJavaScript(s(C,e)).catch(()=>{})})),c.injectScript(C),u.injectScript(C),u.setupHandler(h),!1!==e.show&&h.show(),h.on("closed",(function(){h._destroyed=!0,n.removeObjectForKey(t);var e=n[t+".themeObserver"];e&&(NSApplication.sharedApplication().removeObserver_forKeyPath(e,"effectiveAppearance"),n.removeObjectForKey(t+".themeObserver")),m.cleanup()})),n[t]=_,m.onCleanup((function(){h._destroyed||h.destroy()})),h}f.fromId=function(e){var t=NSThread.mainThread().threadDictionary();if(t[e])return f.fromPanel(t[e],e)},f.fromPanel=function(e,t){var n=new i;if(n.id=t,!e||!e.contentView)throw new Error("needs to pass an NSPanel");for(var a=null,s=e.contentView().subviews(),l=0;l0?t.setAspectRatio(NSMakeSize(e,1)):t.setResizeIncrements(NSMakeSize(1,1))},e.setBounds=function(n,i){if(!n)return;if(e.isFullscreen())return;const o=Object.assign(e.getBounds(),n);var r=NSMakeRect(o.x,0,o.width,o.height),a=NSScreen.screens().firstObject();r.origin.y=NSHeight(a.frame())-o.y,t.setFrame_display_animate(r,!0,i)},e.getBounds=function(){const e=t.frame();var n=NSScreen.screens().firstObject().frame();return{x:e.origin.x,y:Math.round(NSHeight(n)-e.origin.y),width:e.size.width,height:e.size.height}},e.setContentBounds=function(t,n){e.setBounds(t,n)},e.getContentBounds=function(){return e.getBounds()},e.setSize=function(t,n,i){return e.setBounds({width:t,height:n},i)},e.getSize=function(){var t=e.getBounds();return[t.width,t.height]},e.setContentSize=function(t,n,i){return e.setContentBounds({width:t,height:n},i)},e.getContentSize=function(){var t=e.getContentBounds();return[t.width,t.height]},e.setMinimumSize=function(e,n){const i=CGSizeMake(e,n);t.setContentMinSize(i)},e.getMinimumSize=function(){const e=t.contentMinSize();return[e.width,e.height]},e.setMaximumSize=function(e,n){const i=CGSizeMake(e,n);t.setContentMaxSize(i)},e.getMaximumSize=function(){const e=t.contentMaxSize();return[e.width,e.height]},e.setResizable=function(t){return e._setStyleMask(t,NSResizableWindowMask)},e.isResizable=function(){return t.styleMask()&NSResizableWindowMask},e.setMovable=function(e){return t.setMovable(e)},e.isMovable=function(){return t.isMovable()},e.setMinimizable=function(t){return e._setStyleMask(t,NSMiniaturizableWindowMask)},e.isMinimizable=function(){return t.styleMask()&NSMiniaturizableWindowMask},e.setMaximizable=function(e){t.standardWindowButton(NSWindowZoomButton)&&t.standardWindowButton(NSWindowZoomButton).setEnabled(e)},e.isMaximizable=function(){return t.standardWindowButton(NSWindowZoomButton)&&t.standardWindowButton(NSWindowZoomButton).isEnabled()},e.setFullScreenable=function(t){e._setCollectionBehavior(t,NSWindowCollectionBehaviorFullScreenPrimary),e._setCollectionBehavior(!t,NSWindowCollectionBehaviorFullScreenAuxiliary)},e.isFullScreenable=function(){return t.collectionBehavior()&NSWindowCollectionBehaviorFullScreenPrimary},e.setClosable=function(t){e._setStyleMask(t,NSClosableWindowMask)},e.isClosable=function(){return t.styleMask()&NSClosableWindowMask},e.setAlwaysOnTop=function(e,n,i){var o=NSNormalWindowLevel,r=CGWindowLevelForKey(kCGMaximumWindowLevelKey),a=CGWindowLevelForKey(kCGMinimumWindowLevelKey);e&&(o="normal"===n?NSNormalWindowLevel:"torn-off-menu"===n?NSTornOffMenuWindowLevel:"modal-panel"===n?NSModalPanelWindowLevel:"main-menu"===n?NSMainMenuWindowLevel:"status"===n?NSStatusWindowLevel:"pop-up-menu"===n?NSPopUpMenuWindowLevel:"screen-saver"===n?NSScreenSaverWindowLevel:"dock"===n?NSDockWindowLevel:NSFloatingWindowLevel);var s=o+(i||0);if(!(s>=a&&s<=r))throw new Error("relativeLevel must be between "+a+" and "+r);t.setLevel(s)},e.isAlwaysOnTop=function(){return t.level()!==NSNormalWindowLevel},e.moveTop=function(){return t.orderFrontRegardless()},e.center=function(){t.center()},e.setPosition=function(t,n,i){return e.setBounds({x:t,y:n},i)},e.getPosition=function(){var t=e.getBounds();return[t.x,t.y]},e.setTitle=function(e){t.setTitle(e)},e.getTitle=function(){return String(t.title())};var o=0;e.flashFrame=function(e){e?o=NSApp.requestUserAttention(NSInformationalRequest):(NSApp.cancelUserAttentionRequest(o),o=0)},e.getNativeWindowHandle=function(){return t},e.getNativeWebViewHandle=function(){return n},e.loadURL=function(e){if(/^(?!https?|file).*\.html?$/.test(e)&&"undefined"!=typeof __command&&__command.pluginBundle()&&(e="file://"+__command.pluginBundle().urlForResourceNamed(e).path()),/^file:\/\/.*\.html?$/.test(e))return e=(e=NSString.alloc().initWithString(e)).stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()),void n.loadFileURL_allowingReadAccessToURL(NSURL.URLWithString(e),NSURL.URLWithString("file:///"));const t=NSURL.URLWithString(e),i=NSURLRequest.requestWithURL(t);n.loadRequest(i)},e.reload=function(){n.reload()},e.setHasShadow=function(e){return t.setHasShadow(e)},e.hasShadow=function(){return t.hasShadow()},e.setOpacity=function(e){return t.setAlphaValue(e)},e.getOpacity=function(){return t.alphaValue()},e.setVisibleOnAllWorkspaces=function(t){return e._setCollectionBehavior(t,NSWindowCollectionBehaviorCanJoinAllSpaces)},e.isVisibleOnAllWorkspaces=function(){return t.collectionBehavior()&NSWindowCollectionBehaviorCanJoinAllSpaces},e.setIgnoreMouseEvents=function(e){return t.setIgnoresMouseEvents(e)},e.setContentProtection=function(e){t.setSharingType(e?NSWindowSharingNone:NSWindowSharingReadOnly)},e.setAutoHideCursor=function(e){t.setDisableAutoHideCursor(e)},e.setVibrancy=function(n){var i=e._vibrantView;if(!n){if(null==i)return;return i.removeFromSuperview(),void t.setVibrantView(null)}if(null==i){var o=t.contentView();i=NSVisualEffectView.alloc().initWithFrame(o.bounds()),e._vibrantView=i,i.setAutoresizingMask(NSViewWidthSizable|NSViewHeightSizable),i.setBlendingMode(NSVisualEffectBlendingModeBehindWindow),i.setState(NSVisualEffectStateActive),i.setFrame(o.bounds()),o.addSubview_positioned_relativeTo(i,NSWindowBelow,null)}var r=NSVisualEffectMaterialLight;"appearance-based"===n?r=NSVisualEffectMaterialAppearanceBased:"light"===n?r=NSVisualEffectMaterialLight:"dark"===n?r=NSVisualEffectMaterialDark:"titlebar"===n?r=NSVisualEffectMaterialTitlebar:"selection"===n?r=NSVisualEffectMaterialSelection:"menu"===n?r=NSVisualEffectMaterialMenu:"popover"===n?r=NSVisualEffectMaterialPopover:"sidebar"===n?r=NSVisualEffectMaterialSidebar:"medium-light"===n?r=NSVisualEffectMaterialMediumLight:"ultra-dark"===n&&(r=NSVisualEffectMaterialUltraDark),i.setMaterial(r)},e._setBackgroundColor=function(e){var i=function(e){if(!e||"#"!==e[0]){if(e&&"function"==typeof e.isKindOfClass&&e.isKindOfClass(NSColor))return e;throw new Error("Incorrect color formating. It should be an hex color: #RRGGBBAA")}var t,n=e.substr(1);if(3===n.length?n+="F":6===n.length&&(n+="FF"),4===n.length)for(var i=0;i<4;i+=1)t+=n[i],t+=n[i];else{if(8!==n.length)return NSColor.whiteColor();t=n}var o=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,a=parseInt(t.slice(4,6),16)/255,s=parseInt(t.slice(6,8),16)/255;return NSColor.colorWithSRGBRed_green_blue_alpha(o,r,a,s)}(e);n.setValue_forKey(!1,"drawsBackground"),t.backgroundColor=i},e._invalidate=function(){t.flushWindow(),t.contentView().setNeedsDisplay(!0)},e._setStyleMask=function(n,i){var o=e.isMaximizable();n?t.setStyleMask(t.styleMask()|i):t.setStyleMask(t.styleMask()&~i),e.setMaximizable(o)},e._setCollectionBehavior=function(n,i){var o=e.isMaximizable();n?t.setCollectionBehavior(t.collectionBehavior()|i):t.setCollectionBehavior(t.collectionBehavior()&~i),e.setMaximizable(o)},e._showWindowButton=function(e){var n=t.standardWindowButton(e);n.superview().addSubview_positioned_relative(n,NSWindowAbove,null)}}},function(e,t,n){var i=n(4),o=n(5);e.exports=function(e,t,n){var r=new i;r.loadURL=e.loadURL,r.loadFile=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.downloadURL=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.getURL=function(){return String(n.URL())},r.getTitle=function(){return String(n.title())},r.isDestroyed=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.focus=e.focus,r.isFocused=e.isFocused,r.isLoading=function(){return!!n.loading()},r.isLoadingMainFrame=function(){return!!n.loading()},r.isWaitingForResponse=function(){return!n.loading()},r.stop=function(){n.stopLoading()},r.reload=function(){n.reload()},r.reloadIgnoringCache=function(){n.reloadFromOrigin()},r.canGoBack=function(){return!!n.canGoBack()},r.canGoForward=function(){return!!n.canGoForward()},r.canGoToOffset=function(e){return!!n.backForwardList().itemAtIndex(e)},r.clearHistory=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.goBack=function(){n.goBack()},r.goForward=function(){n.goForward()},r.goToIndex=function(e){var t=n.backForwardList(),i=t.backList(),o=i.count();if(o>e)n.loadRequest(NSURLRequest.requestWithURL(i[e]));else{var r=t.forwardList();if(!(r.count()>e-o))throw new Error("Cannot go to index "+e);n.loadRequest(NSURLRequest.requestWithURL(r[e-o]))}},r.goToOffset=function(e){if(!r.canGoToOffset(e))throw new Error("Cannot go to offset "+e);n.loadRequest(NSURLRequest.requestWithURL(n.backForwardList().itemAtIndex(e)))},r.isCrashed=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.setUserAgent=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.getUserAgent=function(){const e=n.customUserAgent();return e?String(e):void 0},r.insertCSS=function(e){var t="var style = document.createElement('style'); style.innerHTML = "+e.replace(/"/,'\\"')+"; document.head.appendChild(style);",i=WKUserScript.alloc().initWithSource_injectionTime_forMainFrameOnly(t,0,!0);n.configuration().userContentController().addUserScript(i)},r.insertJS=function(e){var t=WKUserScript.alloc().initWithSource_injectionTime_forMainFrameOnly(e,0,!0);n.configuration().userContentController().addUserScript(t)},r.executeJavaScript=o(n,e),r.setIgnoreMenuShortcuts=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.setAudioMuted=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.isAudioMuted=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.setZoomFactor=function(e){n.setMagnification_centeredAtPoint(e,CGPointMake(0,0))},r.getZoomFactor=function(e){e(Number(n.magnification()))},r.setZoomLevel=function(e){r.setZoomFactor(Math.pow(1.2,e))},r.getZoomLevel=function(e){e(Math.log(Number(n.magnification()))/Math.log(1.2))},r.setVisualZoomLevelLimits=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.setLayoutZoomLevelLimits=function(){console.warn("Not implemented yet, please open a PR on https://github.com/skpm/sketch-module-web-view :)")},r.send=function(){const e="window.postMessage({isSketchMessage: true,origin: '"+String(__command.identifier())+"',args: "+JSON.stringify([].slice.call(arguments))+'}, "*")';n.evaluateJavaScript_completionHandler(e,null)},r.getNativeWebview=function(){return n},e.webContents=r}},function(e,t){function n(e,t,n,i){n.addConstraint(NSLayoutConstraint.constraintWithItem_attribute_relatedBy_toItem_attribute_multiplier_constant(t,e,NSLayoutRelationEqual,n,e,1,i))}e.exports=function(e,t,i){i=i||[],e.setTranslatesAutoresizingMaskIntoConstraints(!1),n(NSLayoutAttributeLeft,e,t,i[0]||0),n(NSLayoutAttributeTop,e,t,i[1]||0),n(NSLayoutAttributeRight,e,t,i[2]||0),n(NSLayoutAttributeBottom,e,t,i[3]||0)}},function(e,t){e.exports=function(e,t){var n=e.convertPoint_fromView(t.locationInWindow(),null);return"var el = document.elementFromPoint("+n.x+", "+n.y+'); if (el && el.tagName === "SELECT") { var event = document.createEvent("MouseEvents"); event.initMouseEvent("mousedown", true, true, window); el.dispatchEvent(event);} else if (el && ["text", "textarea", "date", "datetime-local", "email", "number", "month", "password", "search", "tel", "time", "url", "week" ].indexOf(el.type) >= 0 && el.focus) {el.focus();} else if (el) {el.dispatchEvent(new Event("click", {bubbles: true}))}'}},function(e,t,n){var i=n(0);e.exports=function(e){var t='window.originalPostMessage = window.postMessage;window.postMessage = function(actionName) { if (!actionName) { throw new Error(\'missing action name\') } var id = String(Math.random()).replace(".", ""); var args = [].slice.call(arguments); args.unshift(id); return new Promise(function (resolve, reject) { window["'+i.JS_BRIDGE_RESULT_SUCCESS+'" + id] = resolve; window["'+i.JS_BRIDGE_RESULT_ERROR+'" + id] = reject; window.webkit.messageHandlers.'+i.JS_BRIDGE+".postMessage(JSON.stringify(args)); });}",n=WKUserScript.alloc().initWithSource_injectionTime_forMainFrameOnly(t,0,!0);e.configuration().userContentController().addUserScript(n)}},function(e,t,n){var i=n(0);e.exports.injectScript=function(e){var t='(function () {document.addEventListener(\'mousedown\', onMouseDown);function shouldDrag(target) { if (!target || (target.dataset || {}).appRegion === "no-drag") { return false } if ((target.dataset || {}).appRegion === "drag") { return true } return shouldDrag(target.parentElement)};function onMouseDown(e) { if (e.button !== 0 || !shouldDrag(e.target)) { return } window.postMessage("'+i.START_MOVING_WINDOW+'");};})()',n=WKUserScript.alloc().initWithSource_injectionTime_forMainFrameOnly(t,0,!0);e.configuration().userContentController().addUserScript(n)},e.exports.setupHandler=function(e){var t=null,n=null,o=null;function r(){if(!n||1!==NSEvent.pressedMouseButtons())return clearInterval(o),t=null,void(n=null);var i=NSEvent.mouseLocation();e.setPosition(n.x+(i.x-t.x),n.y+(t.y-i.y),!1)}e.webContents.on(i.START_MOVING_WINDOW,(function(){t=NSEvent.mouseLocation();var i=e.getPosition();n={x:i[0],y:i[1]},o=setInterval(r,1e3/60)}))}},function(e,t,n){(function(t){var i,o,r,a,s=n(16),l=n(17),u=n(0);e.exports=function(e,n,c,d){a||(a=new s({utils:null,"observeValueForKeyPath:ofObject:change:context:":function(e,t,n){const i=n[NSKeyValueChangeNewKey],o="NSAppearanceNameDarkAqua"===String(i.bestMatchFromAppearancesWithNames(["NSAppearanceNameAqua","NSAppearanceNameDarkAqua"]));this.utils.executeJavaScript("document.body.classList.remove('__skpm-"+(o?"light":"dark")+"'); document.body.classList.add('__skpm-"+(o?"dark":"light")+"')")}})),i||(i=new s({utils:null,panel:null,"windowDidResize:":function(){this.utils.emit("resize")},"windowDidMiniaturize:":function(){this.utils.emit("minimize")},"windowDidDeminiaturize:":function(){this.utils.emit("restore")},"windowDidEnterFullScreen:":function(){this.utils.emit("enter-full-screen")},"windowDidExitFullScreen:":function(){this.utils.emit("leave-full-screen")},"windowDidMove:":function(){this.utils.emit("move"),this.utils.emit("moved")},"windowShouldClose:":function(){var e=1;return this.utils.emit("close",{get defaultPrevented(){return!e},preventDefault:function(){e=0}}),e},"windowWillClose:":function(){this.utils.emit("closed")},"windowDidBecomeKey:":function(){this.utils.emit("focus",this.panel.currentEvent())},"windowDidResignKey:":function(){this.utils.emit("blur")}})),o||(o=new s({state:{wasReady:0},utils:null,"webView:didCommitNavigation:":function(e){this.utils.emit("will-navigate",{},String(String(e.URL())))},"webView:didStartProvisionalNavigation:":function(){this.utils.emit("did-start-navigation"),this.utils.emit("did-start-loading")},"webView:didReceiveServerRedirectForProvisionalNavigation:":function(){this.utils.emit("did-get-redirect-request")},"webView:didFailProvisionalNavigation:withError:":function(e,t,n){this.utils.emit("did-fail-load",n)},"webView:didFinishNavigation:":function(){0==this.state.wasReady&&(this.state.wasReady=1,this.utils.emitBrowserEvent("ready-to-show")),this.utils.emit("did-navigate"),this.utils.emit("did-frame-navigate"),this.utils.emit("did-stop-loading"),this.utils.emit("did-finish-load"),this.utils.emit("did-frame-finish-load")},"webViewWebContentProcessDidTerminate:":function(){this.utils.emit("dom-ready")}})),r||(r=new s({utils:null,"userContentController:didReceiveScriptMessage:":function(e,t){var n=this.utils.parseWebArguments(String(t.body()));n&&n[0]&&"string"==typeof n[0]&&(n[0]=String(n[0]),this.utils.emit.apply(this,n))}}));var f=a.new({utils:{executeJavaScript(e){c.evaluateJavaScript_completionHandler(e,null)}}}),p=WKUserScript.alloc().initWithSource_injectionTime_forMainFrameOnly("document.addEventListener('DOMContentLoaded', function() { document.body.classList.add('__skpm-"+("undefined"!=typeof MSTheme&&MSTheme.sharedTheme().isDark()?"dark":"light")+"') }, false)",0,!0);c.configuration().userContentController().addUserScript(p),NSApplication.sharedApplication().addObserver_forKeyPath_options_context(f,"effectiveAppearance",NSKeyValueObservingOptionNew,null),NSThread.mainThread().threadDictionary()[e.id+".themeObserver"]=f;var h=o.new({utils:{setTitle:e.setTitle.bind(e),emitBrowserEvent(){try{e.emit.apply(e,arguments)}catch(t){if("undefined"==typeof process||!process.listenerCount||!process.listenerCount("uncaughtException"))throw console.error(t),t;process.emit("uncaughtException",t,"uncaughtException")}},emit(){try{e.webContents.emit.apply(e.webContents,arguments)}catch(t){if("undefined"==typeof process||!process.listenerCount||!process.listenerCount("uncaughtException"))throw console.error(t),t;process.emit("uncaughtException",t,"uncaughtException")}}},state:{wasReady:0}});c.setNavigationDelegate(h);var m=r.new({utils:{emit(n,i){if(i){for(var o=[],r=2;r