UNPKG

vintasoft-web-twain-js

Version:

VintaSoft Twain .NET SDK provides JavaScript API and VintaSoft Web TWAIN service, which allow to create web application for acquiring images from TWAIN or SANE scanner in Windows and Linux. Developed web applications can be used in all major web browsers

106 lines 79.6 kB
// Copyright 2014-2025 VintaSoft LLC. All rights reserved. // This software is protected by International copyright laws. // Any copying, duplication, deployment, redistribution, modification or other // disposition hereof is STRICTLY PROHIBITED without an express written license // granted by VintaSoft LLC. This notice may not be removed or otherwise // altered under any circumstances. // This code may NOT be used apart of the VintaSoft product. var Vintasoft; (function(p){function b(b,p,c){b=N[b];for(var E="",F=p;F<p+c;F++)E+=String.fromCharCode(b[F]^255);return E}if(void 0==p.Shared)throw Error("Vintasoft.Shared is not found.");if("4.5.0.1"!==p.version)throw Error("Wrong version of Vintasoft.Shared script.");var N=[];N.push([188,158,143,158,157,150,147,150,139,150,154,140,223,158,141,154,223,145,144,139,223,141,154,156,154,150,137,154,155,209,184,154,139,187,154,137,150,156,154,188,158,143,158,157,150,147,150,139,134,188,147,144,140,154,171,136,158,150, 145,172,154,140,140,150,144,145,175,177,184,150,175,151,144,145,154,166,144,138,223,140,151,144,138,147,155,223,140,143,154,156,150,153,134,223,156,144,141,141,154,156,139,223,171,168,190,182,177,223,140,154,141,137,150,156,154,223,176,173,223,155,154,153,150,145,154,223,139,151,154,223,155,154,153,158,138,147,139,223,171,168,190,182,177,223,140,154,141,137,150,156,154,209,171,151,154,223,216,135,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,147,154,140,140, 223,139,151,158,145,223,207,209,214,196,168,150,145,155,144,136,140,171,151,154,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,150,154,140,182,145,153,144,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,157,154,223,158,145,223,158,141,141,158,134,209,221,209,223,175,147,154,158,140,154,223,138,140,154,223,139,151,154,223,140,158,146,154,223,137,154,141,140,150,144,145,223,153,144,141,223,169,150,145,139,158,140,144,153,139,223,168,154,157,223,171,168,190,182,177, 223,140,154,141,137,150,156,154,223,158,145,155,223,169,150,145,139,158,172,144,153,139,223,171,168,190,182,177,223,181,158,137,158,172,156,141,150,143,139,223,190,175,182,209,187,144,156,138,146,154,145,139,223,153,154,154,155,154,141,223,150,140,223,145,144,139,223,153,144,138,145,155,209,178,158,156,201,199,180,171,151,154,223,216,140,138,143,143,144,141,139,154,155,169,158,147,138,154,140,190,140,190,141,141,158,134,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,141,154,143, 141,154,140,154,145,139,223,158,141,141,158,134,209,187,154,140,143,154,156,148,147,154,182,146,158,152,154,168,150,145,204,205,188,151,158,145,152,154,182,146,158,152,154,188,144,145,139,141,158,140,139,187,154,137,150,156,154,223,150,140,223,145,144,139,223,144,143,154,145,154,155,209,188,141,144,143,182,146,158,152,154,221,223,155,150,153,153,154,141,140,223,153,141,144,146,223,169,150,145,139,158,172,144,153,139,223,171,168,190,182,177,223,181,158,137,158,172,156,141,150,143,139,223,190,175,182, 223,137,154,141,140,150,144,145,223,221,182,146,158,152,154,223,150,140,223,145,144,139,223,141,154,146,144,137,154,155,223,153,141,144,146,223,150,146,158,152,154,223,156,144,147,147,154,156,139,150,144,145,209,182,146,158,152,154,140,223,158,141,154,223,145,144,139,223,140,158,137,154,155,209,184,154,139,182,146,158,152,154,173,154,140,154,139,187,154,137,150,156,154,182,146,158,152,154,179,158,134,144,138,139,182,146,158,152,154,223,150,145,153,144,223,150,140,223,145,144,139,223,141,154,156,154, 150,137,154,155,209,141,154,140,144,147,138,139,150,144,145,186,147,154,146,154,145,139,223,144,153,223,158,141,141,158,134,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,134,182,155,140,216,223,146,138,140,139,223,157,154,223,158,223,145,138,146,157,154,141,223,144,141,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,187,154,137,150,156,154,188,158,143,158,157,150,147,150,139,134,182,155,186,145,138,146,181,172,223,156,147,158,140,140,209,184,154,139,187,154,137,150, 156,154,188,158,143,158,157,150,147,150,139,150,154,140,171,151,154,223,216,140,138,156,156,154,140,140,185,138,145,156,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,157,154,223,158,223,153,138,145,156,139,150,144,145,209,176,143,154,145,187,154,137,150,156,154,171,151,154,223,216,137,158,147,138,154,171,134,143,154,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,171,136,158,150, 145,169,158,147,138,154,171,134,143,154,186,145,138,146,181,172,223,156,147,158,140,140,209,173,154,140,150,133,154,188,158,145,137,158,140,171,151,154,223,216,139,136,158,150,145,187,154,137,150,156,154,178,158,145,158,152,154,141,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,156,147,158,140,140,223,168,154,157,171,136,158,150,145,187,154,137,150,156,154,178,158,145,158,152,154,141,181,172,209,178,158,156,150, 145,139,144,140,151,175,158,141,158,146,158,139,154,141,223,216,140,151,144,136,182,145,155,150,156,158,139,144,141,140,216,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,168,150,145,201,203,171,168,190,182,177,223,155,154,137,150,156,154,223,146,158,145,158,152,154,141,223,150,140,223,145,144,139,223,156,147,144,140,154,155,209,182,146,158,152,154,223,147,158,134,144,138,139,223,150,140,223,145,144,139,223,140,154,139,209,172,158,145,154,171,141,158,145,140,153,154,141,223,150,140, 223,145,144,139,223,156,158,145,156,154,147,154,155,209,184,154,139,182,146,158,152,154,182,145,153,144,182,146,158,152,154,223,150,140,223,145,144,139,223,153,144,138,145,155,223,150,145,223,156,144,147,147,154,156,139,150,144,145,209,171,151,154,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,134,182,155,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,146,144,155,154,171,151,154,223,216,139,136,158,150,145,188,158,143,158, 157,150,147,150,139,134,182,155,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,157,154,223,158,223,145,138,146,157,154,141,211,223,140,139,141,150,145,152,223,144,141,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,187,154,137,150,156,154,188,158,143,158,157,150,147,150,139,134,182,155,186,145,138,146,181,172,223,156,147,158,140,140,209,150,175,158,155,187,154,140,148,154,136,182,146,158,152,154,214,210,215,171,151,154,223,216,156,158,143,158,157,150, 147,150,139,134,182,155,216,223,153,150,154,147,155,223,146,138,140,139,223,157,154,223,158,223,140,139,141,150,145,152,209,171,151,154,223,216,156,158,143,158,157,150,147,150,139,134,182,155,216,223,153,150,154,147,155,223,156,158,145,145,144,139,223,151,158,137,154,223,146,144,141,154,223,139,151,158,145,223,202,207,223,140,134,146,157,144,147,140,209,178,158,156,223,176,172,171,168,190,182,177,223,155,154,137,150,156,154,223,150,140,223,145,144,139,223,144,143,154,145,154,155,209,188,138,141,141, 154,145,139,223,150,146,158,152,154,223,147,158,134,144,138,139,223,150,140,223,145,144,139,223,152,154,139,209,215,171,151,154,223,216,150,145,155,154,135,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,152,141,154,158,139,154,141,223,139,151,158,145,223,156,144,147,147,154,156,139,150,144,145,223,140,150,133,154,209,168,150,145,188,186,173,154,153,141,154,140,151,171,136,158,150,145,172,154,140,140,150,144,145,171,151,154,223,216,139,136,158,150,145,188,158, 143,158,157,150,147,150,139,150,154,140,182,145,153,144,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,171,151,154,223,216,139,136,158,150,145,187,154,137,150,156,154,178,158,145,158,152,154,141,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,171,136,158,150,145,187,154,137,150,156,154,178,158,145,158,152,154,141,181,172,223,156,147,158,140, 140,209,169,150,145,139,158,140,144,153,139,223,168,154,157,223,171,168,190,182,177,223,140,154,141,137,150,156,154,223,137,154,141,140,150,144,145,223,221,171,168,190,182,177,223,155,154,137,150,156,154,223,150,140,223,145,144,139,223,156,147,144,140,154,155,209,182,146,158,152,154,140,223,158,141,154,223,145,144,139,223,141,154,139,141,150,154,137,154,155,209,187,154,137,150,156,154,223,150,140,223,145,144,139,223,171,168,190,182,177,223,155,154,137,150,156,154,209,184,154,139,188,138,141,141,154, 145,139,171,151,154,223,216,158,156,142,138,150,141,154,178,144,155,158,147,172,139,158,139,154,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,190,156,142,138,150,141,154,178,144,155,158,147,172,139,158,139,154,186,145,138,146,181,172,223,156,147,158,140,140,209,187,154,137,150,156,154,223,150,140,223,145,144,139,223,172,190,177,186,223,155,154,137,150,156,154,209,184,154,139,172,138,143,143,144,141, 139,154,155,187,154,137,150,156,154,188,158,143,158,157,150,147,150,139,150,154,140,187,154,147,154,139,154,182,146,158,152,154,171,151,154,223,216,158,156,142,138,150,141,154,155,182,146,158,152,154,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,190,156,142,138,150,141,154,155,182,146,158,152,154,181,172,223,156,147,158,140,140,209,171,151,154,223,216,151,154,150,152,151,139,216,223,143,158,141,158, 146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,147,154,140,140,223,139,151,158,145,223,206,209,171,151,154,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,134,169,158,147,138,154,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,171,168,190,182,177,223,155,154,137,150,156,154,223,146,158,145,158,152,154,141,223,150,140,223,145,144,139,223,144,143,154,145,154,155,209,184,154,139,182,146,158,152,154,185,150,147, 154,171,151,154,223,216,154,141,141,144,141,185,138,145,156,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,178,144,155,158,147,223,150,146,158,152,154,223,158,156,142,138,150,140,150,139,150,144,145,223,150,140,223,153,158,150,147,154,155,209,184,154,139,187,154,153,158,138,147,139,187,154,137,150,156,154,182,146,158,152,154,179,158,134,144,138,139,182,146,158,152,154,223,157,150,139,146,158,143,223,150,140,223,145,144,139,223,141,154,139, 141,150,154,137,154,155,209,190,145,144,139,151,154,141,223,155,154,137,150,156,154,223,216,182,145,153,144,141,146,158,139,150,144,145,223,158,157,144,138,139,223,171,168,190,182,177,223,155,154,137,150,156,154,140,223,150,140,223,145,144,139,223,141,154,156,154,150,137,154,155,209,175,176,172,171,171,151,154,223,216,154,141,141,144,141,185,138,145,156,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,157,154,223,158,223,153,138,145,156,139,150,144,145,209,171,151,154,223,216,150, 145,155,154,135,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,147,154,140,140,223,139,151,158,145,223,207,209,171,151,154,223,216,138,140,158,152,154,178,144,155,154,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,157,154,223,158,223,145,138,146,157,154,141,223,144,141,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,171,136,158,150,145,188,158,143,158,157,150,147,150,139,134,182,145,153,144,181,172,223,156,147, 158,140,140,209,190,141,141,158,134,223,154,147,154,146,154,145,139,223,150,145,223,158,141,141,158,134,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,150,154,140,182,145,153,144,216,223,155,144,154,140,223,145,144,139,223,151,158,137,154,223,153,150,154,147,155,223,216,156,158,143,158,157,150,147,150,139,134,182,155,216,209,173,144,139,158,139,154,182,146,158,152,154,175,158,141,158,146,158,139,154,141,223,216,140,151,144,136,170,182,216,223,156,158,145,145,144,139,223,157,154,223, 145,138,147,147,209,187,154,147,154,139,154,190,147,147,182,146,158,152,154,140,188,147,144,140,154,187,154,137,150,156,154,179,150,145,138,135,171,151,154,223,216,158,156,142,138,150,141,154,178,144,155,158,147,172,139,158,139,154,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,138,145,155,154,153,150,145,154,155,209,182,146,158,152,154,223,147,158,134,144,138,139,223,150,140,223,145,144,139,223,141,154,140,154,139,209,146,158,156,176,172,182,146,158,152,154, 223,156,144,147,147,154,156,139,150,144,145,223,150,140,223,145,144,139,223,156,147,154,158,141,154,155,209,182,145,137,154,141,139,182,146,158,152,154,188,158,145,156,154,147,171,141,158,145,140,153,154,141,171,151,154,223,216,150,146,158,152,154,182,155,140,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,141,154,143,141,154,140,154,145,139,223,145,144,139,223,154,146,143,139,134,223,158,141,141,158,134,223,144,153,223,140,139,141,150,145,152,140,209,150,175,144,155,184,154,139, 155,158,139,158,197,150,146,158,152,154,208,143,145,152,196,157,158,140,154,201,203,211,171,151,154,223,216,140,138,156,156,154,140,140,185,138,145,156,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,168,182,190,223,210,223,171,151,154,223,216,140,138,143,143,144,141,139,154,155,169,158,147,138,154,140,190,140,173,158,145,152,154,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145, 156,154,223,144,153,223,168,154,157,171,136,158,150,145,173,158,145,152,154,181,172,223,156,147,158,140,140,209,187,154,153,158,138,147,139,223,150,146,158,152,154,223,147,158,134,144,138,139,223,150,140,223,145,144,139,223,152,154,139,209,190,156,142,138,150,141,154,178,144,155,158,147,171,151,154,223,216,150,146,158,152,154,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,156,147,158,140,140,223,168,154,157,190, 156,142,138,150,141,154,155,182,146,158,152,154,181,172,209,182,140,182,146,158,152,154,189,147,158,145,148,172,138,143,143,144,141,139,154,155,223,156,158,143,158,157,150,147,150,139,150,154,140,223,158,141,154,223,145,144,139,223,141,154,156,154,150,137,154,155,209,184,154,139,187,154,137,150,156,154,182,145,153,144,140,172,154,139,187,154,137,150,156,154,188,158,143,158,157,150,147,150,139,150,154,140,178,158,156,175,175,188,190,141,141,158,134,223,154,147,154,146,154,145,139,223,150,145,223,158, 141,141,158,134,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,150,154,140,182,145,153,144,216,223,155,144,154,140,223,145,144,139,223,151,158,137,154,223,153,150,154,147,155,223,216,156,158,143,158,157,150,147,150,139,134,169,158,147,138,154,216,209,188,158,143,158,157,150,147,150,139,134,223,137,158,147,138,154,223,150,140,223,145,144,139,223,152,154,139,209,169,150,145,139,158,140,144,153,139,223,168,154,157,223,171,168,190,182,177,223,140,154,141,137,150,156,154,223,150,140,223, 145,144,139,223,153,144,138,145,155,209,150,176,172,182,146,158,152,154,223,150,140,223,150,145,223,143,141,144,156,154,140,140,150,145,152,223,145,144,136,209,171,151,154,223,216,156,144,145,139,158,150,145,154,141,171,134,143,154,216,223,143,158,141,158,146,154,139,154,141,223,150,140,223,145,144,139,223,158,145,223,150,145,140,139,158,145,156,154,223,144,153,223,168,154,157,171,136,158,150,145,169,158,147,138,154,188,144,145,139,158,150,145,154,141,171,134,143,154,186,145,138,146,181,172,223,156, 147,158,140,140,209,188,151,158,145,152,154,182,146,158,152,154,189,141,150,152,151,139,145,154,140,140,171,151,154,223,216,153,150,147,154,177,158,146,154,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,171,141,138,154,172,158,137,154,182,146,158,152,154,140,182,146,158,152,154,223,143,141,144,156,154,140,140,150,145,152,223,150,140,223,153,158,150,147,154,155,209,223,172,154,139,187,154,137,150,156,154,188,158,143,158,157,150,147,150,139, 134,190,145,155,141,144,150,155,178,158,156,182,145,139,154,147,171,151,154,223,216,136,150,155,139,151,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,147,154,140,140,223,139,151,158,145,223,206,209,184,154,139,187,154,137,150,156,154,182,146,158,152,154,179,158,134,144,138,139,140,144,138,141,156,154,172,154,139,187,154,137,150,156,154,182,146,158,152,154,179,158,134,144,138,139,188,141,154,158,139,154,171,136,158,150,145,172,154,140,140,150,144,145,176,143, 154,145,187,154,137,150,156,154,178,158,145,158,152,154,141,188,158,143,158,157,150,147,150,139,134,223,137,158,147,138,154,223,150,140,223,145,144,139,223,140,154,139,209,187,154,139,154,156,139,189,144,141,155,154,141,171,151,154,223,216,158,156,142,138,150,141,154,178,144,155,158,147,172,139,158,139,154,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209,171,151,154,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,134,182,155, 140,216,223,143,158,141,158,146,154,139,154,141,223,146,138,140,139,223,157,154,223,158,145,223,158,141,141,158,134,209,216,223,150,140,223,144,143,154,145,154,155,223,158,147,141,154,158,155,134,209,171,151,154,223,216,139,136,158,150,145,188,158,143,158,157,150,147,150,139,134,182,155,140,216,223,143,158,141,158,146,154,139,154,141,223,156,158,145,145,144,139,223,157,154,223,145,138,147,147,209]);p.Twain=p.Twain||(p.Twain={});(function(n){function s(a,f){if(null==a)throw Error(b(0,3104,43));if(!c.pv.isf(a))throw Error(b(0, 828,47));if(null==f)throw Error(b(0,2327,41));if(!c.pv.isf(f))throw Error(b(0,2527,45));}n.version="15.1.3.1";var c=p.Shared,E=c.EnumGenerator.create([{None:0},{Get:1},{GetDefault:2},{GetCurrent:4}],!0),F=c.EnumGenerator.create([{DeviceEvent:7},{ImageAcquired:2},{ImageAcquiring:1},{ImageAcquiringProgress:8},{None:0},{ScanCanceled:5},{ScanCompleted:3},{ScanFailed:4},{ScanFinished:9},{UserInterfaceClosed:6}],!1),U=c.EnumGenerator.create([{CustomHalftone:2},{Diffusion:3},{Halftones:1},{Threshold:0}], !1),N=c.EnumGenerator.create([{Auto:0},{Clear:1},{NoClear:2}],!1),Q=c.EnumGenerator.create([{None:0},{OnePass:1},{TwoPass:2}],!1),V=c.EnumGenerator.create([{Black:8},{Blue:2},{Cyan:5},{Green:1},{Magenta:6},{None:3},{Red:0},{White:4},{Yellow:7}],!1),W=c.EnumGenerator.create([{DetectAndExcludeJobSeparatorAndContinueScanning:3},{DetectAndExcludeJobSeparatorAndStopScanning:4},{DetectAndIncludeJobSeparatorAndContinueScanning:1},{DetectAndIncludeJobSeparatorAndStopScanning:2},{None:0}],!1),X=c.EnumGenerator.create([{Reflective:0}, {Transmissive:1}],!1),Y=c.EnumGenerator.create([{Blue:2},{Green:1},{InfraRed:6},{None:3},{Red:0},{UltraViolet:5},{White:4}],!1),Z=c.EnumGenerator.create([{Auto:1},{LonePixel:2},{MajorityRule:3},{None:0}],!1),$=c.EnumGenerator.create([{Auto:1},{Current:2},{None:0}],!1),aa=c.EnumGenerator.create([{Auto:4},{AutoPicture:6},{AutoText:5},{Landscape:3},{Portrait:0},{Rotation180:2},{Rotation90:1}],!1),ba=c.EnumGenerator.create([{A0:19},{A0x2:18},{A0x4:17},{A1:20},{A10:25},{A2:21},{A3:11},{A4:1},{A5:5},{A6:13}, {A7:22},{A8:23},{A9:24},{B3:12},{B4:6},{B5:2},{B6:7},{BUSINESSCARD:53},{C0:44},{C1:45},{C10:51},{C2:46},{C3:47},{C4:14},{C5:15},{C6:16},{C7:48},{C8:49},{C9:50},{ISOB0:26},{ISOB1:27},{ISOB10:33},{ISOB2:28},{ISOB3:12},{ISOB4:6},{ISOB5:29},{ISOB6:7},{ISOB7:30},{ISOB8:31},{ISOB9:32},{JISB0:34},{JISB1:35},{JISB10:43},{JISB2:36},{JISB3:37},{JISB4:38},{JISB6:39},{JISB7:40},{JISB8:41},{JISB9:42},{None:0},{USEXECUTIVE:10},{USLEDGER:9},{USLEGAL:4},{USLETTER:3},{USSTATEMENT:52}],!1),ca=c.EnumGenerator.create([{Chocolate:0}, {Vanilla:1}],!1),I=c.EnumGenerator.create([{BGR:12},{BW:0},{CIELAB:13},{CIELUV:14},{CIEXYZ:8},{CMY:4},{CMYK:5},{Gray:1},{Infrared:16},{Lab:9},{Palette:3},{RGB:2},{SRGB:10},{SRGB64:11},{YCBCR:15},{YUV:6},{YUVK:7}],!1),da=c.EnumGenerator.create([{File:1},{Memory:2},{Native:0}],!1),J=c.EnumGenerator.create([{BitFields:12},{Group31D:2},{Group31DEol:3},{Group32D:4},{Group4:5},{Jbig:8},{Jpeg:6},{Lzw:7},{None:0},{Packbits:1},{Png:9},{Rle4:10},{Rle8:11}],!1),ea=c.EnumGenerator.create([{Bmp:2},{Dejavu:14}, {EXIF:9},{FlashPix:5},{Jpeg:4},{Jpeg2000:11},{Jpeg2000JPN:12},{Jpeg2000JPX:13},{PDF:10},{PDFA:15},{Pict:1},{Png:7},{SamsungSrw:32770},{SPIFF:8},{Tiff:0},{TiffMulti:6},{XBM:3}],!1),fa=c.EnumGenerator.create([{Array:3},{Enum:4},{OneValue:5},{Range:6},{Undefined:0}],!1),ga=c.EnumGenerator.create([{Bool:6},{Fix32:7},{Frame:8},{Int16:1},{Int16Handle:44},{Int32:2},{Int8:0},{Str1024:13},{Str128:11},{Str255:12},{Str32:9},{Str64:10},{UInt16:4},{UInt32:5},{UInt32Handle:43},{UInt8:3},{UInt8Handle:15},{Undefined:-1}, {Uni512:14}],!1),ha=c.EnumGenerator.create([{Centimeters:1},{Inches:0},{Millimeters:6},{Picas:2},{Pixels:5},{Points:3},{Twips:4}],!1),la=c.EnumGenerator.create([{XferCount:1},{ICompression:256},{IPixelType:257},{IUnits:258},{IXferMech:259},{Author:4096},{Caption:4097},{FeederEnabled:4098},{FeederLoaded:4099},{TimeDate:4100},{SupportedCaps:4101},{ExtendedCaps:4102},{AutoFeed:4103},{ClearPage:4104},{FeedPage:4105},{RewindPage:4106},{Indicators:4107},{SupportedCapsExt:4108},{PaperDetectable:4109},{UIControllable:4110}, {DeviceOnline:4111},{AutoScan:4112},{ThumbnailsEnabled:4113},{Duplex:4114},{DuplexEnabled:4115},{EnableDsUiOnly:4116},{CustomDsData:4117},{EndOrSer:4118},{JobControl:4119},{Alarms:4120},{AlarmVolume:4121},{AutomaticCapture:4122},{TimeBeforeFirstCapture:4123},{TimeBetweenCaptures:4124},{ClearBuffers:4125},{MaxBatchBuffers:4126},{DeviceTimeDate:4127},{PowerSupply:4128},{CameraPreviewUI:4129},{DeviceEvents:4130},{SerialNumber:4132},{Printer:4134},{PrinterEnabled:4135},{PrinterIndex:4136},{PrinterMode:4137}, {PrinterString:4138},{PrinterSuffix:4139},{Language:4140},{FeederAlignment:4141},{FeederOrder:4142},{ReacquireAllowed:4144},{BatteryMinutes:4146},{BatteryPercentage:4147},{CameraSide:4148},{Segmented:4149},{AutomaticSenseMedium:4155},{CameraEnabled:4150},{CameraOrder:4151},{MicrEnabled:4152},{FeederPrep:4153},{FeederPocket:4154},{CustomInterfaceGuid:4156},{SupportedCapsSegmentUnique:4157},{SupportedDats:4158},{DoubleFeedDetection:4159},{DoubleFeedDetectionLength:4160},{DoubleFeedDetectionSensitivity:4161}, {DoubleFeedDetectionResponse:4162},{PaperHandling:4163},{IndicatorsMode:4164},{PrinterVerticalOffset:4165},{PowerSaveTime:4166},{ISupportedExtImageInfo:4446},{IAutoBright:4352},{IBrightness:4353},{IContrast:4355},{ICustomHalftone:4356},{IExposureTime:4357},{IFilter:4358},{IFlashUsed:4359},{IGamma:4360},{IHalftones:4361},{IHighlight:4362},{IImageFileFormat:4364},{ILampState:4365},{ILightSource:4366},{IOrientation:4368},{IPhysicalWidth:4369},{IPhysicalHeight:4370},{IShadow:4371},{IFrames:4372},{IXNativeResolution:4374}, {IYNativeResolution:4375},{IXResolution:4376},{IYResolution:4377},{IMaxFrames:4378},{ITiles:4379},{IBitOrder:4380},{ICcittKFactor:4381},{ILightPath:4382},{IPixelFlavor:4383},{IPlanarChunky:4384},{IRotation:4385},{ISupportedSizes:4386},{IThreshold:4387},{IXScaling:4388},{IYScaling:4389},{IBitOrderCodes:4390},{IPixelFlavorCodes:4391},{IJpegPixelType:4392},{ITimeFill:4394},{IBitDepth:4395},{IBitDepthReduction:4396},{IUndefinedImageSize:4397},{IImageDataSet:4398},{IExtImageInfo:4399},{IMinimumHeight:4400}, {IMinimumWidth:4401},{IFlipRotation:4406},{IBarCodeDetectionEnabled:4407},{ISupportedBarCodeTypes:4408},{IBarCodeMaxSearchPriorities:4409},{IBarCodeSearchPriorities:4410},{IBarCodeSearchMode:4411},{IBarCodeMaxRetries:4412},{IBarCodeTimeout:4413},{IZoomFactor:4414},{IPatchCodeDetectionEnabled:4415},{ISupportedPatchCodeTypes:4416},{IPatchCodeMaxSearchPriorities:4417},{IPatchCodeSearchPriorities:4418},{IPatchCodeSearchMode:4419},{IPatchCodeMaxRetries:4420},{IPatchCodeTimeout:4421},{IFlashUsed2:4422}, {IImageFilter:4423},{INoiseFilter:4424},{IOverScan:4425},{IAutomaticBorderDetection:4432},{IAutomaticDeskew:4433},{IAutomaticRotate:4434},{IJpegQuality:4435},{IFeederType:4436},{IIccProfile:4437},{IAutoSize:4438},{IAutoDiscardBlankPages:4404},{IAutomaticCropUsesFrame:4439},{IAutomaticLengthDetection:4440},{IAutomaticColorEnabled:4441},{IAutomaticColorNonColorPixelType:4442},{IColorManagementEnabled:4443},{IImageMerge:4444},{IImageMergeHeightThreshold:4445},{IFilmType:4447},{IMirror:4448},{IJpegSubsampling:4449}, {PrinterCharRotation:4167},{PrinterFontStyle:4168},{PrinterIndexLeadChar:4169},{PrinterIndexMaxValue:4170},{PrinterIndexNumDigits:4171},{PrinterIndexStep:4172},{PrinterIndexTrigger:4173},{PrinterStringPreview:4174}],!1),ma=c.EnumGenerator.create([{Afghanistan:1001},{Algeria:213},{Americansamoa:684},{Andorra:33},{Angola:1002},{Anguilla:8090},{Antigua:8091},{Argentina:54},{Aruba:297},{Ascensioni:247},{Australia:61},{Austria:43},{Bahamas:8092},{Bahrain:973},{Bangladesh:880},{Barbados:8093},{Belgium:32}, {Belize:501},{Benin:229},{Bermuda:8094},{Bhutan:1003},{Bolivia:591},{Botswana:267},{Britain:6},{Britvirginis:8095},{Brazil:55},{Brunei:673},{Bulgaria:359},{Burkinafaso:1004},{Burma:1005},{Burundi:1006},{Camaroon:237},{Canada:2},{Capeverdeis:238},{Caymanis:8096},{CentralAfRep:1007},{Chad:1008},{Chile:56},{China:86},{Christmasis:1009},{Cocosis:1009},{Colombia:57},{Comoros:1010},{Congo:1011},{Cookis:1012},{Costarica:506},{Cuba:5},{Cyprus:357},{Czechoslovakia:42},{Denmark:45},{Djibouti:1013},{Dominica:8097}, {Domincanrep:8098},{Easteris:1014},{Ecuador:593},{Egypt:20},{Elsalvador:503},{Eqguinea:1015},{Ethiopia:251},{Falklandis:1016},{Faeroeis:298},{FijiIslands:679},{Finland:358},{France:33},{Frantilles:596},{Frguiana:594},{Frpolyneisa:689},{Futanais:1043},{Gabon:241},{Gambia:220},{Germany:49},{Ghana:233},{Gibralter:350},{Greece:30},{Greenland:299},{Grenada:8099},{Grenedines:8015},{Guadeloupe:590},{Guam:671},{Guantanamobay:5399},{Guatemala:502},{Guinea:224},{Guineabissau:1017},{Guyana:592},{Haiti:509}, {Honduras:504},{Hongkong:852},{Hungary:36},{Iceland:354},{India:91},{Indonesia:62},{Iran:98},{Iraq:964},{Ireland:353},{Israel:972},{Italy:39},{Ivorycoast:225},{Jamaica:8010},{Japan:81},{Jordan:962},{Kenya:254},{Kiribati:1018},{Korea:82},{Kuwait:965},{Laos:1019},{Lebanon:1020},{Liberia:231},{Libya:218},{Liechtenstein:41},{Luxenbourg:352},{Macao:853},{Madagascar:1021},{Malawi:265},{Malaysia:60},{Maldives:960},{Mali:1022},{Malta:356},{Marshallis:692},{Mauritania:1023},{Mauritius:230},{Mexico:3},{Micronesia:691}, {Miquelon:508},{Monaco:33},{Mongolia:1024},{Montserrat:8011},{Morocco:212},{Mozambique:1025},{Namibia:264},{Nauru:1026},{Nepal:977},{Netherlands:31},{Nethantilles:599},{Nevis:8012},{Newcaledonia:687},{Newzealand:64},{Nicaragua:505},{Niger:227},{Nigeria:234},{Niue:1027},{Norfolki:1028},{Norway:47},{Oman:968},{Pakistan:92},{Palau:1029},{Panama:507},{Paraguay:595},{Peru:51},{Phillippines:63},{Pitcairnis:1030},{Pnewguinea:675},{Poland:48},{Portugal:351},{Qatar:974},{Reunioni:1031},{Romania:40},{Rwanda:250}, {Saipan:670},{Sanmarino:39},{Saotome:1033},{SaudiArabia:966},{Senegal:221},{Seychellesis:1034},{Sierraleone:1035},{Singapore:65},{Solomonis:1036},{Somali:1037},{SouthAfrica:27},{Spain:34},{Srilanka:94},{Sthelena:1032},{Stkitts:8013},{Stlucia:8014},{Stpierre:508},{Stvincent:8015},{Sudan:1038},{Suriname:597},{Swaziland:268},{Sweden:46},{Switzerland:41},{Syria:1039},{Taiwan:886},{Tanzania:255},{Thailand:66},{Tobago:8016},{Togo:228},{Tongais:676},{Trinidad:8016},{Tunisia:216},{Turkey:90},{Turkscaicos:8017}, {Tuvalu:1040},{Uganda:256},{UaEmirates:971},{UnitedKingdom:44},{Usa:1},{Uruguay:598},{Vanuatu:1041},{VaticanCity:39},{Venezuela:58},{Wake:1042},{Wallisis:1043},{WesternSahara:1044},{WesternSamoa:1045},{Yemen:1046},{Yugoslavia:38},{Zaire:243},{Zambia:260},{Zimbabwe:263},{Albania:355},{Armenia:374},{Azerbaijan:994},{Belarus:375},{Bosniaherzgo:387},{Cambodia:855},{Croatia:385},{CzechRepublic:420},{Diegogarcia:246},{Eritrea:291},{Estonia:372},{Georgia:995},{Latvia:371},{Lesotho:266},{Lithuania:370},{Macedonia:389}, {Mayotteis:269},{Moldova:373},{Myanmar:95},{NorthKorea:850},{Puertorico:787},{Russia:7},{Serbia:381},{Slovakia:421},{Slovenia:386},{SouthKorea:82},{Ukraine:380},{UsVirginis:340},{Vietnam:84}],!1),na=c.EnumGenerator.create([{UserLocale:-1},{Danish:0},{Dutch:1},{English:2},{FrenchCanadian:3},{Finnish:4},{French:5},{German:6},{Icelandic:7},{Italian:8},{Norwegian:9},{Portuguese:10},{Spanish:11},{Swedish:12},{EnglishUsa:13},{Afrikaans:14},{Albania:15},{Arabic:16},{ArabicAlgeria:17},{ArabicBahrain:18}, {ArabicEgypt:19},{ArabicIraq:20},{ArabicJordan:21},{ArabicKuwait:22},{ArabicLebanon:23},{ArabicLibya:24},{ArabicMorocco:25},{ArabicOman:26},{ArabicQatar:27},{ArabicSaudiArabia:28},{ArabicSyria:29},{ArabicTunisia:30},{ArabicUae:31},{ArabicYemen:32},{Basque:33},{Byelorussian:34},{Bulgarian:35},{Catalan:36},{Chinese:37},{ChineseHongkong:38},{ChinesePrc:39},{ChineseSingapore:40},{ChineseSimplified:41},{ChineseTaiwan:42},{ChineseTraditional:43},{Croatia:44},{Czech:45},{DutchBelgian:46},{EnglishAustralian:47}, {EnglishCanadian:48},{EnglishIreland:49},{EnglishNewZealand:50},{EnglishSouthAfrica:51},{EnglishUnitedKingdom:52},{Estonian:53},{Faeroese:54},{Farsi:55},{FrenchBelgian:56},{FrenchLuxembourg:57},{FrenchSwiss:58},{GermanAustrian:59},{GermanLuxembourg:60},{GermanLiechtenstein:61},{GermanSwiss:62},{Greek:63},{Hebrew:64},{Hungarian:65},{Indonesian:66},{ItalianSwiss:67},{Japanese:68},{Korean:69},{KoreanJihab:70},{Latvian:71},{Lithuanian:72},{NorwegianBokmal:73},{NorwegianNynorsk:74},{Polish:75},{PortugueseBrazil:76}, {Romanian:77},{Russian:78},{SerbianLatin:79},{Slovak:80},{Slovenian:81},{SpanishMexican:82},{SpanishModern:83},{Thai:84},{Turkish:85},{Ukrainian:86},{Assmese:87},{Bengali:88},{Bihari:89},{Bodo:90},{Dogri:91},{Gujarati:92},{Haryanvi:93},{Hindi:94},{Kannada:95},{Kashmiri:96},{Malayalam:97},{Marathi:98},{Marwari:99},{Meghalayan:100},{Mizo:101},{Naga:102},{Orissi:103},{Punjabi:104},{Pushtu:105},{SerbianCyrillic:106},{Sikkimi:107},{SwedishFinland:108},{Tamil:109},{Telugu:110},{Tripuri:111},{Urdu:112}, {Vietnamese:113}],!1),w=function(){};w._396=null;w._373=null;w._705=null;w._1280=null;w.register=function(b,c,e,m){w._396=b;w._373=c;w._705=e;w._1280=m};w.getUserOS=function(){var c=window.navigator,f=null,e=null;if(null!=c){var f=c.userAgent,m=c.userAgentData;null!=m&&(e=m.platform);null==e&&(e=c.platform)}var c=[b(0,2946,5),b(0,1062,9),b(0,3846,8),b(0,3436,6),b(0,383,6)],m=[b(0,463,5),b(0,1113,5),b(0,194,7),b(0,1660,5)],k=[b(0,69,6),b(0,1415,4),b(0,3075,4)],l=null;-1!==c.indexOf(e)?l=b(0,1533,6): -1!==k.indexOf(e)?l=b(0,3596,3):-1!==m.indexOf(e)?l=b(0,194,7):/Android/.test(f)?l=b(0,3839,7):/Linux/.test(e)&&(l=b(0,2861,5));return l};var R=function(a,f,e,m){var k=R.prototype;k.get_Left=function(){return this._1155};k.set_Left=function(b){c.pv.n(b);this._1155=b};k.get_Top=function(){return this._1178};k.set_Top=function(b){c.pv.n(b);this._1178=b};k.get_Right=function(){return this._968};k.set_Right=function(b){c.pv.n(b);this._968=b};k.get_Bottom=function(){return this._736};k.set_Bottom=function(b){c.pv.n(b); this._736=b};k.equals=function(b){return c.pv.ic(b,R)?this._1155===b._1155&&this._1178===b._1178&&this._968===b._968&&this._736===b._736:!1};k.toRectangle=function(){return{x:this._1155,y:this._1178,width:this._968-this._1155,height:this._736-this._1178}};k.toString=function(){return b(0,1598,1)+this._1155+b(0,193,1)+this._1178+b(0,1430,3)+this._968+b(0,193,1)+this._736+b(0,192,1)};c.pv.n(a,f,e,m);this._1155=a;this._1178=f;this._968=e;this._736=m},S=function(b,f,e){var m=S.prototype;c.pv.n(b,f,e); this._255=b;this._1310=f;this._185=e;m.get_MinValue=function(){return this._255};m.get_MaxValue=function(){return this._1310};m.get_StepSize=function(){return this._185}},K=function(b,f,e,m){var k=K.prototype;c.pv.n(b,f,e,m);this._502=b;this._146=f;this._68=e;this._797=m;k.get_X=function(){return this._502};k.get_Y=function(){return this._146};k.get_Width=function(){return this._68};k.get_Height=function(){return this._797}},ia=function(a,f,e,m,k,l,g){var d=ia.prototype;c.pv.s(a);c.pv.s(f);if(!c.pv.ic(e, fa))throw Error(b(0,3626,91));if(!c.pv.ic(m,ga))throw Error(b(0,885,78));this._983=a;this._769=f;this._659=e;this._623=m;this._56=k;this._1256=l;this._126=g;d.get_Id=function(){return this._983};d.get_Name=function(){return this._769};d.get_ContainerType=function(){return this._659};d.get_ValueType=function(){return this._623};d.get_CurrentValue=function(){return this._56};d.get_DefaultValue=function(){return this._1256};d.get_SupportedValues=function(){return this._126}},T=function(a,f){var e=T.prototype; null!=a&&0==Array.isArray(a)&&c.pv.te(b(0,389,60));if(null!=f&&!c.pv.ic(f,S))throw Error(b(0,3153,83));this._81=a;this._1057=f;e.get_SupportedValuesAsArray=function(){return this._81};e.get_SupportedValuesAsRange=function(){return this._1057}},G=function(){var b=G.prototype;b.get_IsTwain2Compatible=function(){return this._757};b.set_IsTwain2Compatible=function(b){c.pv.b(b);this._757=b};b.get_Is32BitDevicesSupported=function(){return this._900};b.set_Is32BitDevicesSupported=function(b){c.pv.b(b);this._900= b};b.get_Is64BitDevicesSupported=function(){return this._643};b.set_Is64BitDevicesSupported=function(b){c.pv.b(b);this._643=b};b.get_CountryCode=function(){return this._450};b.set_CountryCode=function(b){this._450=c.pv.e(b,n.WebCountryCodeEnumJS)};b.get_LanguageType=function(){return this._26};b.set_LanguageType=function(b){c.pv.e(b,n.WebLanguageTypeEnumJS);this._26=b};b.get_TopMostUiWindow=function(){return this._1239};b.set_TopMostUiWindow=function(b){c.pv.b(b);this._1239=b};b.get_AllowableSessionInactivityTime= function(){return this._350};b.set_AllowableSessionInactivityTime=function(b){c.pv.n(b);(100>b||36E5<b)&&pv.toe();this._350=b};this._643=this._900=this._757=!0;this._450=new ma(1);this._26=new na(2);this._1239=!0;this._350=6E4;this._1218=""};c.WebServiceJS.defaultTwainService=-1;var O=function(a){function f(a,g,d){var f=!1,q="",h=!1;null!=g&&null!=d&&(h=!0);var y={data:{twainSessionId:a._302}},y=new c.WebRequestJS(b(0,3401,14),function(b){var c=b.devices;b=b.defaultDeviceIndex;for(var d=[],h=0;h< c.length;h++){var q=c[h],q=new H(q.productName,q.productFamily,q.manufacturer,q.driverVersion,q.twainVersion,a,q.is64Bit);d.push(q)}if(null!=a._920)for(h=0;h<a._920.length;){c=a._920[h];for(q=0;q<d.length;q++)if(c._612===d[q]._612){d[q]=c;break}a._920.splice(h,1)}a._920=d;a._1129=d[b];f=!0;null!=g&&g(a,a._920,a._1129)},function(c){q=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,2475,48);null!=d&&d(a,q)},y,h);a._514.sendRequest(y);if(!h&&!f)throw Error(q);}function e(a){!1===a._755&& c.pv.te(b(0,2280,35))}function m(a){var g=new c.WebRequestJS(b(0,1665,19),null,null,{data:{twainSessionId:a._302}});a._514.sendRequest(g)}var k=O.prototype;null==a&&(a=c.WebServiceJS.defaultTwainService);c.pv.c(a,c.WebServiceJS,b(0,75,77));this._514=a;this._1129=this._559=this._920=this._319=this._302=this._268=null;this._755=!1;this._757=!0;k.get_IsOpened=function(){return this._755};k.get_IsTwain2Compatible=function(){return this._757};k.get_OpenedDevice=function(){return this._559};k.get_TwainServiceVersion= function(){return this._268};k.get_TwainApiVersion=function(){return n.version};k.get_TwainSessionId=function(){return this._302};k.get_Devices=function(){e(this);null==this._920&&f(this);return this._920};k.get_DefaultDevice=function(){e(this);null==this._920&&f(this);return this._1129};k.open=function(a){function g(){m(q)}function d(b){q._755=!0;q._757=a._757;y=!0}function f(c){e=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,2280,35)}c.pv.c(a,G);var q=this,h=!1,y=!1,e="",k={data:{isTwain2Compatible:a._757, regUser:w._396,regUrl:w._373,regCode:w._705,expirationDate:w._1280,is32BitDevicesSupported:a._900,is64BitDevicesSupported:a._643,applicationUrl:window.location.href,countryCode:a._450.valueOf(),languageType:a._26.valueOf()}},k=new c.WebRequestJS(b(0,3944,18),function(c){c.serviceVersion!==n.version?e=b(0,1824,37)+c.serviceVersion+b(0,517,55)+n.version+b(0,256,98):(q._268=c.serviceVersion,q._302=c.sessionId,q._319=setInterval(g,a._350),h=!0)},function(c){e=null!=c.serviceVersion&&c.serviceVersion!== n.version?b(0,1824,37)+c.serviceVersion+b(0,517,55)+n.version+b(0,256,98):void 0!==c.errorMessage&&""!==c.errorMessage?void 0!==c.Message?void 0!==c.MessageDetail?c.errorMessage+b(0,3819,1)+c.Message+b(0,3819,1)+c.MessageDetail:c.errorMessage+b(0,3819,1)+c.Message:c.errorMessage:b(0,3555,41)},k,!1);this._514.sendRequest(k);if(h){if(k={data:{twainSessionId:this._302,applicationProductName:a._1218,topMostUiWindow:a._1239}},k=new c.WebRequestJS(b(0,3962,17),d,f,k,!1),q._514.sendRequest(k),!y)throw Error(e); }else throw Error(e);};k.openAsync=function(a,g,d){function f(){m(e)}function q(b){e._755=!0;e._757=a._757;g(e)}function h(c){var a=b(0,2280,35);void 0!==c.errorMessage&&""!==c.errorMessage&&(a=c.errorMessage);d(e,a)}c.pv.c(a,G);s(g,d);var e=this,k={data:{isTwain2Compatible:a._757,regUser:w._396,regUrl:w._373,regCode:w._705,expirationDate:w._1280,is32BitDevicesSupported:a._900,is64BitDevicesSupported:a._643,applicationUrl:window.location.href,countryCode:a._450.valueOf(),languageType:a._26.valueOf()}}, p=new c.WebRequestJS(b(0,3944,18),function(g){g.serviceVersion!==n.version?(g=b(0,1824,37)+g.serviceVersion+b(0,517,55)+n.version+b(0,256,98),d(e,g)):(e._268=g.serviceVersion,e._302=g.sessionId,e._319=setInterval(f,a._350),k={data:{twainSessionId:e._302,applicationProductName:a._1218,topMostUiWindow:a._1239}},g=new c.WebRequestJS(b(0,3962,17),q,h,k),e._514.sendRequest(g))},function(c){var a=b(0,3555,41);void 0!==c.errorMessage&&""!==c.errorMessage&&(a=void 0!==c.Message?void 0!==c.MessageDetail?c.errorMessage+ b(0,3819,1)+c.Message+b(0,3819,1)+c.MessageDetail:c.errorMessage+b(0,3819,1)+c.Message:c.errorMessage);d(e,a)},k);this._514.sendRequest(p)};k.close=function(){e(this);var a=this,g=!1,d="";null!=this._319&&(clearInterval(this._319),this._319=null);var f={data:{twainSessionId:this._302}},f=new c.WebRequestJS(b(0,49,17),function(b){a._755=!1;a._268=null;a._302=null;a._920=null;a._559=null;a._1129=null;g=!0},function(c){d=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,1118,35)},f,!1); this._514.sendRequest(f);if(!g)throw Error(d);};k.closeAsync=function(a,g){s(a,g);e(this);var d=this;null!=this._319&&(clearInterval(this._319),this._319=null);var f={data:{twainSessionId:this._302}},f=new c.WebRequestJS(b(0,49,17),function(b){d._755=!1;d._268=null;d._302=null;d._920=null;d._559=null;d._1129=null;a(d)},function(c){var a="",a=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,1118,35);g(d,a)},f);this._514.sendRequest(f)};k.getDevicesAsync=function(b,c){s(b,c);e(this); null==this._920?f(this,b,c):b(this,this._920,this._1129)};k.findDeviceByName=function(b){for(var c=this.get_Devices(),a=0;a<c.length;a++)if(c[a].get_DeviceName()==b)return twainDevices[a];return null}},ja=function(b){function f(b,c){return b._1168.getCapability(c,4).get_CurrentValue()}var e=ja.prototype;c.pv.c(b,H);this._1168=b;e.get_Enabled=function(){return f(this,4098)};e.set_Enabled=function(b){c.pv.b(b);this._1168.setCapability(4098,b.toString())};e.get_PaperDetectable=function(){return f(this, 4109)};e.get_Loaded=function(){return f(this,4099)};e.get_DuplexMode=function(){return f(this,4114)};e.get_DuplexEnabled=function(){return f(this,4115)};e.set_DuplexEnabled=function(b){c.pv.b(b);this._1168.setCapability(4115,b.toString())};e.get_AutoFeed=function(){return f(this,4103)};e.set_AutoFeed=function(b){c.pv.b(b);this._1168.setCapability(4103,b.toString())};e.feedPage=function(){this._1168.setCapability(4105,(!0).toString())};e.clearPage=function(){this._1168.setCapability(4104,(!0).toString())}; e.rewindPage=function(){this._1168.setCapability(4106,(!0).toString())}},H=function(a,f,e,m,k,l,g){function d(r){if(null==r)throw Error(b(0,1251,49));if(c.pv.ic(r,c.WebEnumItemBaseJS))r=r.valueOf().toString();else if(c.pv.isn(r))r=r.toString();else if(!c.pv.iss(r))throw Error(b(0,1304,111));return r}function A(r){if(null==r)throw Error(b(0,4140,50));if(!Array.isArray(r))throw Error(b(0,4068,52));for(var a=[],g=0;g<r.length;g++){var d=r[g];if(c.pv.ic(d,c.WebEnumItemBaseJS))d=d.valueOf().toString(); else if(!c.pv.isn(d))throw Error(b(0,703,104));a.push(d)}return a}function q(r){if(null==r)throw Error(b(0,1684,53));if(!Array.isArray(r))throw Error(b(0,201,55));for(var a=0;a<r.length;a++){var g=r[a];if(null==g.capabilityId)throw Error(b(0,2708,82));if(!c.pv.iss(g.capabilityId))throw Error(b(0,1433,42));if(50<g.capabilityId.length)throw Error(b(0,1475,58));if(null==g.capabilityValue)throw Error(b(0,3442,85));}}function h(r){if(null==r)throw Error(b(0,2228,52));c.pv.ic(r,c.WebEnumItemBaseJS)&&(r= r.valueOf());return r}function y(r){if(null==r)r=(new p.Twain.WebTwainDeviceCapabilityUsageModeEnumJS(b(0,3079,3))).valueOf();else if(c.pv.ic(r,c.WebEnumItemBaseJS))r=r.valueOf();else if(!c.pv.isn(r))throw Error(b(0,2616,92));return r}function t(c,a){if(0!=c._447)throw Error(b(0,1913,27));return c.getCapability(a,4).get_CurrentValue()}function n(c,a){if(1!=c._447)throw Error(b(0,2039,26));return c.getCapability(a,4).get_CurrentValue()}function x(b,c){var a=b.getCapability(c,1)._126;return null!=a? null!=a._81?a._81:a._1057:null}function u(r,a,g){if(0!=r._447)throw Error(b(0,1913,27));c.pv.ic(g,c.WebEnumItemBaseJS)&&(g=g.valueOf());return r.setCapability(a,g.toString())}function w(r,a,g){if(1!=r._447)throw Error(b(0,2039,26));c.pv.ic(g,c.WebEnumItemBaseJS)&&(g=g.valueOf());return r.setCapability(a,g.toString())}function B(b){var c=b.id;null!=b.value&&E(c,b.value);null!=b.currentValue&&E(c,b.currentValue);null!=b.defaultValue&&E(c,b.defaultValue)}function E(b,a){try{a.containerType=c.pv.e(a.containerType, fa);a.valueType=c.pv.e(a.valueType,ga);var g=a.containerType.valueOf(),d=a.valueType.valueOf();if(0!==g)if(6===g)P(a,G);else{var z=H._518[b];if(null!=z)P(a,function(b){var r=b;try{r=c.pv.e(b,z)}catch(a){}return r});else switch(d){case 6:P(a,M);break;case 7:case 1:case 44:case 2:case 0:case 4:case 5:case 43:case 3:case 15:P(a,G);break;case 8:P(a,Q)}}}catch(h){}}function P(b,c){null!=b.value&&(b.value=c(b.value));null!=b.defaultValue&&(b.defaultValue=c(b.defaultValue));b.minValue&&(b.minValue=c(b.minValue)); b.maxValue&&(b.maxValue=c(b.maxValue));b.stepSize&&(b.stepSize=c(b.stepSize));var a=b.supportedValues;if(null!=a){for(var g=[],d=0;d<a.length;d++)g[d]=c(a[d]);b.supportedValues=g}}function G(b){return+b}function M(c){return c===b(0,3778,4)}function Q(b){var c=b.match(/\((.*);(.*)\)-\((.*);(.*)\)/);if(5==c.length){for(var a=[],g=1;g<c.length;g++)a.push(+c[g]);if(4===a.length)try{return new R(a[0],a[1],a[2],a[3])}catch(d){}}return b}function v(a){a._1259._559==a&&a._755||c.pv.te(b(0,487,21))}function C(b, c){var a=null,g=b.valueOf();0!=(g&1)?a=ka(c.id,c.name,c.value):0!=(g&4)?a=ka(c.id,c.name,c.currentValue):0!=(g&2)&&(a=ka(c.id,c.name,c.defaultValue));return a}function ka(b,c,a){var g=a.containerType.valueOf(),d=null;3==g||4==g?d=new T(a.supportedValues,null):6==g&&(d=new T(null,new S(a.minValue,a.maxValue,a.stepSize)));return new ia(b,c,a.containerType,a.valueType,a.value,a.defaultValue,d)}c.pv.c(l,O);c.pv.s(a,f,e,m,k);this._1259=l;this._755=!1;this._612=a;this._1109=f;this._712=e;this._286=m;this._415= k;this._524=g;this._681=this._927=this._1013=null;this._447=0;this._612.substring(0,4)==b(0,1177,4)&&(this._447=1);a=H.prototype;a.get_IsOpened=function(){return this._755};a.get_DeviceName=function(){return this._612};a.get_ProductFamily=function(){return this._1109};a.get_Manufacturer=function(){return this._712};a.get_DeviceName=function(){return this._612};a.get_DriverVersion=function(){return this._286};a.get_TwainVersion=function(){return this._415};a.get_IsTwain2Compatible=function(){return 2<= this._415};a.get_IsWIA=function(){var c=b(0,3147,6);return this._612.startsWith?this._612.startsWith(c):0===this._612.search(c)};a.get_Is64Bit=function(){return this._524};a.get_HasFeeder=function(){v(this);return this._1013};a.get_HasFlatbed=function(){v(this);return this._927};a.get_DocumentFeeder=function(){this.get_HasFeeder()||c.pv.te(b(0,354,29));null==this._681&&(this._681=new ja(this));return this._681};a.get_AutoBright=function(){return t(this,4352)};a.set_AutoBright=function(b){c.pv.b(b); u(this,4352,b)};a.get_AutoScan=function(){return t(this,4112)};a.set_AutoScan=function(b){c.pv.b(b);u(this,4112,b)};a.get_BitDepth=function(){return t(this,4395)};a.set_BitDepth=function(b){c.pv.n(b);u(this,4395,b)};a.get_BitDepthReductionMode=function(){return t(this,4396)};a.set_BitDepthReductionMode=function(b){b=c.pv.e(b,U);u(this,4396,b)};a.get_Brightness=function(){return t(this,4353)};a.set_Brightness=function(b){c.pv.n(b);u(this,4353,b)};a.get_BufferedImageCount=function(){return t(this,4125)}; a.set_ClearBuffers=function(b){b=c.pv.e(b,N);u(this,4125,b)};a.get_Contrast=function(){return t(this,4355)};a.set_Contrast=function(b){c.pv.n(b);u(this,4355,b)};a.get_FileFormat=function(){return t(this,4364)};a.set_FileFormat=function(b){b=c.pv.e(b,ea);u(this,4364,b)};a.get_FileJpegQuality=function(){return t(this,4435)};a.set_FileJpegQuality=function(b){c.pv.n(b);u(this,4435,b)};a.get_Halftones=function(){return t(this,4361)};a.set_Halftones=function(b){c.pv.s(b);u(this,4361,b)};a.get_ImageCompression= function(){return t(this,256)};a.set_ImageCompression=function(b){b=c.pv.e(b,J);u(this,256,b)};a.get_ImageFilter=function(){return t(this,4358)};a.set_ImageFilter=function(b){b=c.pv.e(b,V);u(this,4358,b)};a.get_JobControl=function(){return t(this,4119)};a.set_JobControl=function(b){b=c.pv.e(b,W);u(this,4119,b)};a.get_LampState=function(){return t(this,4365)};a.set_LampState=function(b){c.pv.b(b);u(this,4365,b)};a.get_LightPath=function(){return t(this,4382)};a.set_LightPath=function(b){b=c.pv.e(b, X);u(this,4382,b)};a.get_LightSource=function(){return t(this,4366)};a.set_LightSource=function(b){b=c.pv.e(b,Y);u(this,4366,b)};a.get_MaxBatchBuffers=function(){return t(this,4126)};a.set_MaxBatchBuffers=function(b){c.pv.n(b);u(this,4126,b)};a.get_NoiseFilter=function(){return t(this,4424)};a.set_NoiseFilter=function(b){b=c.pv.e(b,Z);u(this,4424,b)};a.get_Online=function(){return t(this,4111)};a.get_PageAutoSize=function(){return t(this,4438)};a.set_PageAutoSize=function(b){b=c.pv.e(b,$);u(this, 4438,b)};a.get_PageOrientation=function(){return t(this,4368)};a.set_PageOrientation=function(b){b=c.pv.e(b,aa);u(this,4368,b)};a.get_PageSize=function(){return t(this,4386)};a.set_PageSize=function(b){b=c.pv.e(b,ba);u(this,4386,b)};a.get_PixelFlavor=function(){return t(this,4383)};a.set_PixelFlavor=function(b){b=c.pv.e(b,ca);u(this,4383,b)};a.get_PixelType=function(){return t(this,257)};a.set_PixelType=function(b){b=c.pv.e(b,I);u(this,257,b)};a.get_XResolution=function(){return t(this,4376)};a.set_XResolution= function(b){c.pv.n(b);u(this,4376,b)};a.get_YResolution=function(){return t(this,4377)};a.set_YResolution=function(b){c.pv.n(b);u(this,4377,b)};a.get_Threshold=function(){return t(this,4387)};a.set_Threshold=function(b){c.pv.n(b);u(this,4387,b)};a.get_TransferMode=function(){return t(this,259)};a.set_TransferMode=function(b){b=c.pv.e(b,da);u(this,259,b)};a.get_UnitOfMeasure=function(){return t(this,258)};a.set_UnitOfMeasure=function(b){b=c.pv.e(b,ha);u(this,258,b)};a.get_XferCount=function(){return t(this, 1)};a.set_XferCount=function(b){c.pv.n(b);u(this,1,b)};a.get_SaneScanSource=function(){return n(this,b(0,3918,6))};a.set_SaneScanSource=function(a){c.pv.s(a);w(this,b(0,3918,6),a)};a.get_SaneScanMode=function(){return n(this,b(0,1300,4))};a.set_SaneScanMode=function(a){c.pv.s(a);w(this,b(0,1300,4),a)};a.get_SaneResolution=function(){return n(this,b(0,693,10))};a.set_SaneResolution=function(a){c.pv.n(a);w(this,b(0,693,10),a)};a.open=function(a,g){null!=this._1259._559&&c.pv.te(b(0,2459,16)+this._1259._559._612+ b(0,4120,20));null==a&&(a=!1);c.pv.b(a);null==g&&(g=!0);c.pv.b(g);var d=this,h=!1,z="",f={data:{deviceName:this._612,twainSessionId:this._1259._302,showUI:a,showIndicators:g}},f=new c.WebRequestJS(b(0,875,10),function(b){d._1259._559=d;d._1013=b.hasFeeder;d._927=b.hasFlatbed;h=d._755=!0},function(c){z=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,1539,27)},f,!1);this._1259._514.sendRequest(f);if(!h)throw Error(z);};a.openAsync=function(a,g,d,h){if(null==a)throw Error(b(0,2801,34)); if(null==g)throw Error(b(0,1071,42));c.pv.b(a);c.pv.b(g);s(d,h);null!=this._1259._559&&c.pv.te(b(0,2459,16)+this._1259._559._612+b(0,4120,20));var z=this;a={data:{twainSessionId:this._1259._302,deviceName:this._612,showUI:a,showIndicators:g}};a=new c.WebRequestJS(b(0,875,10),function(b){z._1259._559=z;z._1013=b.hasFeeder;z._927=b.hasFlatbed;z._755=!0;d(z)},function(c){var a="",a=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,1539,27);h(a)},a);this._1259._514.sendRequest(a)};a.close= function(){v(this);var a=this,g=!1,d="",h={data:{twainSessionId:this._1259._302,deviceName:this._612}},h=new c.WebRequestJS(b(0,2850,11),function(b){a._1259._559=null;a._755=!1;g=!0},function(c){a._1259._559=null;a._755=!1;d=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,1861,27)},h,!1);this._1259._514.sendRequest(h);if(!g)throw Error(d);};a.closeAsync=function(a,g){s(a,g);v(this);var d=this,h={data:{twainSessionId:this._1259._302}},h=new c.WebRequestJS(b(0,2850,11),function(b){d._1259._559= null;d._755=!1;a(d)},function(c){d._1259._559=null;d._755=!1;var a="",a=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,1861,27);g(d,a)},h);this._1259._514.sendRequest(h)};a.acquireModalSync=function(a){null==a&&(a=!1);v(this);var g=this,d=!1,h,f="";a={data:{twainSessionId:this._1259._302,deviceName:this._612,isProgressResponseEnabled:a}};a=new c.WebRequestJS(b(0,3268,12),function(b){var a=b.acquireModalState,f=c.pv.e(a,F);h=2===a?new L(f,b.imageAcquiringProgressValue,new D(g._1259, b.imageId)):new L(f,b.imageAcquiringProgressValue,null,b.errorMessage);d=!0},function(c){f=void 0!==c.errorMessage&&""!==c.errorMessage?c.errorMessage:b(0,2368,34)},a,!1);this._1259._514.sendRequest(a)