1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2908d95d-b345-50d1-851b-f8a66e0c517d")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8418],{26890:(e,t)=>{"use strict";self.Headers,self.Request,self.Response,self.fetch},68418:(e,t,n)=>{"use strict";n.d(t,{A:()=>ii}),n(26890);var r=n(80594);(i=o||(o={}))[i.DEBUG=1]="DEBUG",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR";var i,o,a,s=new(function(){function e(e){void 0===e&&(e=o.INFO),this.logLevel=e,this._debug=console.debug,this._info=console.info,this._warn=console.warn,this._error=console.error}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=o.DEBUG&&(e.unshift("[DEBUG]"),this._debug.apply(this,(0,r.fX)([],(0,r.zs)(e),!1)))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=o.INFO&&(e.unshift("[INFO]"),this._info.apply(this,(0,r.fX)([],(0,r.zs)(e),!1)))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=o.WARN&&(e.unshift("[WARN]"),this._warn.apply(this,(0,r.fX)([],(0,r.zs)(e),!1)))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=o.ERROR&&(e.unshift("[ERROR]"),this._error.apply(this,(0,r.fX)([],(0,r.zs)(e),!1)))},e}())(Number("3")),c=function(e,t){this._driver=e,this.liff=t,this.hooks=this._driver.hooks,this.internalHooks=this._driver.internalHooks},u=function(e,t){this._driver=e,this.liff=t,this.hooks=this._driver.hooks},l=function(){function e(e,t){this.pluginCtx=new u(e,t),this.moduleCtx=new c(e,t)}return Object.defineProperty(e.prototype,"pluginContext",{get:function(){return this.pluginCtx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moduleContext",{get:function(){return this.moduleCtx},enumerable:!1,configurable:!0}),e}(),f=function(){function e(){this.modules=new Map,this.hooks={},this.internalHooks={}}return e.prototype.addModule=function(e,t){this.modules.set(e,t),t.hooks&&(this.hooks[e]=Object.entries(t.hooks).reduce(function(e,t){var n,i=(0,r.zs)(t,2),o=i[0],a=i[1];return(0,r.Cl)((0,r.Cl)({},e),((n={})[o]=a.on.bind(a),n))},{})),"internalHooks"in t&&t.internalHooks&&(this.internalHooks[e]=Object.entries(t.internalHooks).reduce(function(e,t){var n,i=(0,r.zs)(t,2),o=i[0],a=i[1];return(0,r.Cl)((0,r.Cl)({},e),((n={})[o]=a.on.bind(a),n))},{}))},e.prototype.hasModule=function(e){return this.modules.has(e)},e}(),d=function(){},h=function(e){return e instanceof d},p=function(e){function t(t,n,r){var i=e.call(this)||this;return i.driver=t,i.contextHolder=n,i.option=r,i}return(0,r.C6)(t,e),t.prototype.install=function(){return this.factory(this.driver,this.contextHolder)},Object.defineProperty(t.prototype,"name",{get:function(){return"use"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultOption",{get:function(){return{namespacePrefix:"$"}},enumerable:!1,configurable:!0}),t.prototype.factory=function(e,t){var n=Object.assign({},this.defaultOption,this.option).namespacePrefix;return function(r,i){if(!r||"function"!=typeof r.install||"string"!=typeof r.name)return s.warn("To install the plugin, you need to define the `name` property and the `install` method."),this;var o=h(r)?r.name:"".concat(n).concat(r.name);if(e.hasModule(o))return this;var a=h(r)?r.install.call(r,t.moduleContext,i):r.install.call(r,t.pluginContext,i);return this["".concat(o)]?(s.warn("There is a duplicate plugin name. `".concat(o,"` plugin namespace will be override.")),this["".concat(o)]=a):void 0!==a&&(this["".concat(o)]=a),e.addModule(o,r),this}},t}(d),v=new Promise(function(e){a=e}),m="UNKNOWN",g="UNAUTHORIZED",w="INVALID_ARGUMENT",b="INIT_FAILED",y="FORBIDDEN",I="INVALID_CONFIG",C="INVALID_ID_TOKEN",S="UNSPECIFIED",E="CREATE_SUBWINDOW_FAILED",T="EXCEPTION_IN_SUBWINDOW",k="liffEvent",P="LIFF_STORE",O="https://liff.".concat("line.me","/"),H="https://miniapp.".concat("line.me","/"),_={ACCESS_TOKEN:"accessToken",ID_TOKEN:"IDToken",DECODED_ID_TOKEN:"decodedIDToken",FEATURE_TOKEN:"featureToken",LOGIN_TMP:"loginTmp",CONFIG:"
3config",CONTEXT:"context",EXPIRES:"expires",RAW_CONTEXT:"rawContext",CLIENT_ID:"clientId",IS_SUBSEQUENT_LIFF_APP:"isSubsequentLiffApp",MST_CHALLENGE:"mstChallenge",MSIT:"msit",MST:"mst",MST_VERIFIER:"mstVerifier",APP_DATA:"appData"},L="isInClient",A=["context_token","feature_token","access_token","id_token","client_id","mst_verifier","mst_challenge","msit"],F=["liff.ref.source","liff.ref.medium","liff.ref.campaign","liff.ref.term","liff.ref.content"],x={INIT:"init",SUBMIT:"submit",CANCEL:"cancel",CLOSE:"close",ERROR:"error"},N="liff.subwindow",R="healthCheck",j=["profile","chat_message.write","openid","email"];function U(e){return window.atob(e.replace(/-/g,"+").replace(/_/g,"/"))}function D(e,t){if(e===t)return 0;for(var n=e.split("."),r=t.split("."),i=Math.max(n.length,r.length),o=0;o<i;o++){n[o]||(n[o]="0"),r[o]||(r[o]="0");var a=parseInt(n[o])-parseInt(r[o]);if(0!==a)return a>0?1:-1}return 0}function M(e){var t=e.replace("#","").match(/.{2}/g)||[];if(4!==t.length)return s.warn("convertArgbToRgba: Received invalid ARGB color"),"";var n=Math.round(W(t[0])/255*100)/100,r=W(t[1]),i=W(t[2]),o=W(t[3]);return"rgba(".concat(r,", ").concat(i,", ").concat(o,", ").concat(n,")")}function W(e){return parseInt(e,16)}function Y(e){var t=e.replace("#","").match(/.{2}/g)||[];if(3!==t.length)return s.warn("convertArgbToRgba: Received invalid hex color"),"";var n=W(t[0]),r=W(t[1]),i=W(t[2]);return"".concat(n,", ").concat(r,", ").concat(i)}function B(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}var V=function(e){var t=new RegExp("(?:(?:^|.*;\\s*)".concat(e,"\\s*\\=\\s*([^;]*).*$)|^.*$"));return document.cookie.replace(t,"$1")},G=function(e,t,n){var r=e+"="+t;if(n)for(var i in n){var o=n[i]?"=".concat(n[i]):"";r+="; ".concat(i).concat(o)}s.debug("set cookie",r),document.cookie=r},z=function(e,t){var n="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT");if(t)for(var r in t)n+="; ".concat(r,"=").concat(t[r]);document.cookie=n},K=new Set(["400","401","403","404","429","500"]),J=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.code=t,i}return(0,r.C6)(t,e),t}(Error);function X(e,t,n){return(null==n?void 0:n.cause)&&console.error("This is the cause of LiffError described below.",n.cause),new J(e,t||"",n||{})}function q(e){var t=e.match(/([^-]+)-[^-]+/);return t&&t[1]}var $,Q=function(){function e(){this.map={}}return e.prototype.clear=function(){this.map={}},e.prototype.getItem=function(e){var t=this.map[e];return void 0===t?null:t},e.prototype.setItem=function(e,t){this.map[e]=t},e.prototype.removeItem=function(e){delete this.map[e]},e.prototype.key=function(e){var t=Object.keys(this.map)[e];return void 0===t?null:t},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.map).length},enumerable:!1,configurable:!0}),e}(),Z=function(e){return e.replace(/^\?/,"").replace(/^#\/?/,"").split(/&+/).filter(function(e){return e.length>0}).reduce(function(e,t){var n=(0,r.zs)(t.split("=").map(decodeURIComponent),2),i=n[0],o=n[1],a=e[i];return Array.isArray(a)?a.push(o):Object.prototype.hasOwnProperty.call(e,i)?e[i]=[a,o]:e[i]=o,e},{})},ee=function(e){return Object.keys(e).map(function(t){var n=e[t],r=function(e){return void 0!==e?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e)):encodeURIComponent(t)};return Array.isArray(n)?n.map(function(e){return r(e)}).join("&"):r(n)}).join("&")};function et(e){for(var t="",n=0;n<e;n++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[Math.floor(62*(window.crypto.getRandomValues(new Uint32Array(1))[0]/0x100000000))];return t}function en(e){var t=new URL(e),n=t.hash.slice(1).split("&").filter(function(e){return!A.some(function(t){return e.startsWith("".concat(t,"="))})}).join("&");return t.hash=n,t.toString()}var er=function(e){var t=(Array.from((n=new URL(en(e))).searchParams.keys()).forEach(function(e){e.startsWith("liff.utm_")&&n.searchParams.delete(e)}),n.toString());if(t!==e){var n,i,o=(i=new URL(t)).toString().replace(new RegExp(String.raw(eo||(eo=(0,r.ue)(["^",""],["^",""])),i.origin)),"");window.history.replaceState(history.state,"",o)}};function ei(e,t){if(!e)throw Error("addParamsToUrl: invalid URL");var n=new URL(e);return Object.entries(t).forEach(function(e){var t=(0,r.zs)(e,2),i=t[0],o=t[1];n.searchParams.set(i,o)}),n.toString()}var eo,ea=(($={})[O]=function(){var e=ec(O);return new RegExp("^".concat(e,"(\\d+-\\w+)"))},$[H]=function(){var e=ec(H);return new RegExp("^".concat(e,"((\\d+-\\w+)|(\\w+$))"))},$);function es(e){for(var t in ea){var n=e.match(ea[t]());if(n)return n[1]}return null}function ec(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eu(e){return e.startsWith("line:")}function el(e){return void 0===e&&(e=window.navigator.userAgent),/ipad/.test(e.toLowerCase())}function ef(e){return void 0===e&&(e=window.navigator.userAgent),/Line\/\d+\.\d+\.\d+/.test(e)}function ed(e){return void 0===e&&(e=window.navigator.userAgent),/Line\/\d+\.\d+\.\d+ LIFF/.test(e)}var eh=function(){return"u"<typeof window};function ep(e,t,n){return(0,r.sH)(this,void 0,void 0,function(){var i,o;return(0,r.YH)(this,function(r){switch(r.label){case 0:o=new Promise(function(e,r){i=setTimeout(function(){null==n||n.abort(),r(Error("Operation timed out after ".concat(t,"ms")))},t)}),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,Promise.race([e,o])];case 2:return[2,r.sent()];case 3:return void 0!==i&&clearTimeout(i),[7];case 4:return[2]}})})}var ev=null;function em(){return null===ev&&(ev=ed()||ef()&&/[#|&]access_token=/.test(location.hash)||"1"===sessionStorage.getItem("".concat(P,":").concat(L)),sessionStorage.setItem("".concat(P,":").concat(L),ev?"1":"0")),!!ev}function eg(){return null!==d&&d.apply(this,arguments)||this}function ew(){var e;return null!=(e=window.__liffConfig)?e:{}}function eb(e){var t=ew().liffId;if(!t)throw X(I,"liffId is necessary for liff.init()");var n=(em()?sessionStorage:localStorage).getItem("".concat(P,":").concat(t,":").concat(e));try{return null===n?null:JSON.parse(n)}catch(e){return null}}function ey(e,t){var n=ew().liffId;if(!n)throw X(I,"liffId is necessary for liff.init()");(em()?sessionStorage:localStorage).setItem("".concat(P,":").concat(n,":").concat(e),JSON.stringify(t))}function eI(){return eb(_.CONTEXT)}function eC(e){ey(_.CONTEXT,e)}(0,r.C6)(eg,d),Object.defineProperty(eg.prototype,"name",{get:function(){return"isInClient"}
3,enumerable:!1,configurable:!0}),eg.prototype.install=function(){return function(){return em()}};function eS(){return null!==d&&d.apply(this,arguments)||this}function eE(){return((eI()||{}).d||{}).aId}(0,r.C6)(eS,d),Object.defineProperty(eS.prototype,"name",{get:function(){return"getContext"},enumerable:!1,configurable:!0}),eS.prototype.install=function(){return function(){return eI()}};function eT(){return null!==d&&d.apply(this,arguments)||this}function ek(){return((eI()||{}).d||{}).autoplay||!1}(0,r.C6)(eT,d),Object.defineProperty(eT.prototype,"name",{get:function(){return"getAId"},enumerable:!1,configurable:!0}),eT.prototype.install=function(){return function(){return eE()}};function eP(){return null!==d&&d.apply(this,arguments)||this}function eO(){return(eI()||{}).profilePlus}(0,r.C6)(eP,d),Object.defineProperty(eP.prototype,"name",{get:function(){return"getIsVideoAutoPlay"},enumerable:!1,configurable:!0}),eP.prototype.install=function(){return function(){return ek()}};function eH(){return null!==d&&d.apply(this,arguments)||this}function e_(e){ey(_.APP_DATA,e)}function eL(){return eb(_.MST)}function eA(){return eb(_.MST_CHALLENGE)}function eF(){return eb(_.CLIENT_ID)}function ex(e){ey(_.CLIENT_ID,e)}function eN(){return eb(_.FEATURE_TOKEN)}function eR(e){ey(_.FEATURE_TOKEN,e)}function ej(){return eb(_.ID_TOKEN)}function eU(e){ey(_.ID_TOKEN,e)}(0,r.C6)(eH,d),Object.defineProperty(eH.prototype,"name",{get:function(){return"getProfilePlus"},enumerable:!1,configurable:!0}),eH.prototype.install=function(){return function(){return eO()}};function eD(){return null!==d&&d.apply(this,arguments)||this}function eM(){return eb(_.ACCESS_TOKEN)}function eW(e){ey(_.ACCESS_TOKEN,e)}(0,r.C6)(eD,d),Object.defineProperty(eD.prototype,"name",{get:function(){return"getIDToken"},enumerable:!1,configurable:!0}),eD.prototype.install=function(){return function(){return ej()}};function eY(){return null!==d&&d.apply(this,arguments)||this}function eB(e){var t=ew().liffId;if(!t)throw X(I,"liffId is necessary for liff.init()");(em()?sessionStorage:localStorage).removeItem("".concat(P,":").concat(t,":").concat(e))}function eV(){return eb(_.LOGIN_TMP)}function eG(){eB(_.LOGIN_TMP)}function ez(e){var t=ew();G("".concat(P,":").concat(_.EXPIRES,":").concat(t.liffId),e.getTime(),{expires:e.toUTCString(),path:"/",secure:null})}function eK(){return eb(_.DECODED_ID_TOKEN)}function eJ(e){ey(_.DECODED_ID_TOKEN,e)}(0,r.C6)(eY,d),Object.defineProperty(eY.prototype,"name",{get:function(){return"getAccessToken"},enumerable:!1,configurable:!0}),eY.prototype.install=function(){return function(){return eM()}};function eX(){return null!==d&&d.apply(this,arguments)||this}function eq(){return!!eM()}(0,r.C6)(eX,d),Object.defineProperty(eX.prototype,"name",{get:function(){return"getDecodedIDToken"},enumerable:!1,configurable:!0}),eX.prototype.install=function(){return function(){return eK()}};function e$(){return null!==d&&d.apply(this,arguments)||this}function eQ(){return"2.29.2"}(0,r.C6)(e$,d),Object.defineProperty(e$.prototype,"name",{get:function(){return"isLoggedIn"},enumerable:!1,configurable:!0}),e$.prototype.install=function(){return function(){return eq()}};function eZ(){return null!==d&&d.apply(this,arguments)||this}function e0(){var e=navigator.userAgent.match(/Line\/\d+(\.\d+)*/i);return e?e[0].slice(5):null}(0,r.C6)(eZ,d),Object.defineProperty(eZ.prototype,"name",{get:function(){return"getVersion"},enumerable:!1,configurable:!0}),eZ.prototype.install=function(){return function(){return"2.29.2"}};function e1(){return null!==d&&d.apply(this,arguments)||this}(0,r.C6)(e1,d),Object.defineProperty(e1.prototype,"name",{get:function(){return"getLineVersion"},enumerable:!1,configurable:!0}),e1.prototype.install=function(){return function(){return e0()}};var e2=function(){function e(){}return e.prototype.invoke=function(){var e;return void 0===e&&(e=window.navigator.userAgent),/LIFF\/SubWindow/.test(e)},e}(),e4=function(){function e(e){this.storage=e}return Object.defineProperty(e,"IN_SUB_WINDOW_KEY",{get:function(){return"inSubWindow"},enumerable:!1,configurable:!0}),e.prototype.invoke=function(){return new URLSearchParams(window.location.search).has(N)&&this.setInSubWindow(!0),!(!this.getInSubWindow()&&!this.getSubWindowIdentifier())},e.prototype.getInSubWindow=function(){var t=this.storage.getItem("".concat(P,":").concat(this.getLiffId(),":").concat(e.IN_SUB_WINDOW_KEY));return null!==t&&JSON.parse(t)},e.prototype.getSubWindowIdentifier=function(){var e,t="liff.subwindow.identifier",n=new URLSearchParams(window.location.search);return n.get(t)||((e=n.get("liff.state"))?new URLSearchParams(e).get(t):null)||null},e.prototype.setInSubWindow=function(t){this.storage.setItem("".concat(P,":").concat(this.getLiffId(),":").concat(e.IN_SUB_WINDOW_KEY),String(t))},e.prototype.getLiffId=function(){var e=ew().liffId;if(!e)throw X(I,"liffId is necessary for liff.init()");return e},e}(),e3=new(function(e){function t(){var t=e.call(this)||this;return eh()?t.impl={invoke:function(){return!1}}:em()?t.impl=new e2:t.impl=new e4(window.sessionStorage),t}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"isSubWindow"}
3,enumerable:!1,configurable:!0}),t.prototype.install=function(){return this.impl.invoke.bind(this.impl)},t}(d)),e6=e3.install();function e5(){if(!t0){var e=window.navigator.userAgent.toLowerCase();t0=/iphone|ipad|ipod/.test(e)?"ios":/android/.test(e)?"android":"web"}return t0}function e8(){return d.call(this)||this}function e9(e){var t,n=eI();return null==(t=null==n?void 0:n.availability)?void 0:t[e]}function e7(e,t,n){var r,i=e9(e),o=n||e;if(!i)return{available:!1,error:{code:y,message:"".concat(o," is not allowed in this LIFF app")}};var a=i.minVer,s=i.unsupportedFromVer,c=!a||!!(r=e0())&&!(s&&D(r,s)>0)&&D(r,a)>=0,u=em();return u&&!c?{available:!1,error:{code:y,message:"".concat(o," is unavailable in this client version.")}}:i.permission?u&&c||t?{available:!0}:{available:!1,error:{code:y,message:"".concat(o," is not allowed in external browser")}}:{available:!1,error:{code:y,message:"".concat(o," is not allowed in this LIFF app")}}}(0,r.C6)(e8,d),Object.defineProperty(e8.prototype,"name",{get:function(){return"getOS"},enumerable:!1,configurable:!0}),e8.prototype.install=function(){return function(){return e5()}};var te=function(){return eq()?!ed()&&ef()?{available:!1,error:{code:y,message:"Subwindow is not supported in this browser"}}:e6()?{available:!1,error:{code:y,message:"this api can be only called
3in parent window"}}:e7("subwindowOpen",!0):{available:!1,error:{code:g,message:"Need access_token for api call, Please login first"}}},tt=["subwindowOpen","shareTargetPicker","multipleLiffTransition","scanCode","scanCodeV2","getAdvertisingId","addToHomeScreen","bluetoothLeFunction","skipChannelVerificationScreen","createShortcutOnHomeScreen","internalCreateShortcutOnHomeScreen","iap","requestFriendship","activityGetCallState","activityGetRecordingState"],tn={scanCode:function(){return e7("scanCode")},getAdvertisingId:function(){return e7("getAdvertisingId")},bluetoothLeFunction:function(){return e7("bluetoothLeFunction")},shareTargetPicker:function(){return e6()?{available:!1,error:{code:y,message:"this api can be only called in parent window"}}:eq()?e7("shareTargetPicker",!0):{available:!1,error:{code:g,message:"Need access_token for api call, Please login first"}}},multipleLiffTransition:function(){var e=e9("multipleLiffTransition");return e&&e.permission?em()?{available:!0}:{available:!1,error:{code:y,message:"multipleLiffTransition is available only in the LINE App browser"}}:{available:!1,error:{code:y,message:"multipleLiffTransition is not allowed in this LIFF app"}}},subwindowOpen:te,scanCodeV2:function(){if(!eq())return{available:!1,error:{code:g,message:"Need access_token for api call, Please login first"}};var e=te();return e.available?e7("scanCodeV2",!0):e},addToHomeScreen:function(){return e6()?{available:!1,error:{code:y,message:"this api can be only called
3in parent window"}}:e7("addToHomeScreen")},skipChannelVerificationScreen:function(){var e=eI();return e?"square_chat"===e.type?{available:!1,error:{code:y,message:"skipChannelVerificationScreen is not allowed in OpenChat"}}:e7("skipChannelVerificationScreen"):{available:!1,error:{code:y,message:"Context is not found"}}},createShortcutOnHomeScreen:function(){if(e6())return{available:!1,error:{code:y,message:"this api can be only called in parent window"}};if(!eq())return{available:!1,error:{code:g,message:"Need access_token for api call, Please login first"}};var e=e5();return"android"!==e&&"ios"!==e?{available:!1,error:{code:y,message:"this api can be only called in mobile device"}}:e7("addToHomeV2",!0,"createShortcutOnHomeScreen")},internalCreateShortcutOnHomeScreen:function(){if(e6())return{available:!1,error:{code:y,message:"this api can be only called in parent window"}};if(!eq())return{available:!1,error:{code:g,message:"Need access_token for api call, Please login first"}};var e=e5();if("android"!==e&&"ios"!==e)return{available:!1,error:{code:y,message:"this api can be only called
3in mobile device"}};var t=e7("addToHomeV2",!0,"internalCreateShortcutOnHomeScreen");return t.available?e7("addToHomeLineScheme",!0,"internalCreateShortcutOnHomeScreen"):t},iap:function(){return em()?eq()?e6()?{available:!1,error:{code:y,message:"this api can be only called in parent window"}}:e7("iap",!1,"In-App Purchase"):{available:!1,error:{code:g,message:"Need access_token for api call, Please login first"}}:{available:!1,error:{code:y,message:"In-App Purchase is not allowed in external browser"}}},requestFriendship:function(){if(!eq())return{available:!1,error:{code:g,message:"Need access_token for api call, Please login first"}};var e=eI();return(null==e?void 0:e.hasLinkedBot)?te():{available:!1,error:{code:y,message:"requestFriendship requires a linked Official Account (bot) for this LIFF app"}}},activityGetCallState:function(){return e7("activityGetCallState",!1,"liff.activity.getCallState")},activityGetRecordingState:function(){return e7("activityGetRecordingState",!1,"liff.activity.getRecordingState")}},tr=function(e){return function(){var t=e();if(!t.available)throw X(t.error.code,t.error.message)}},ti={scanCode:tr(tn.scanCode),getAdvertisingId:tr(tn.getAdvertisingId),bluetoothLeFunction:tr(tn.bluetoothLeFunction),shareTargetPicker:tr(tn.shareTargetPicker),multipleLiffTransition:tr(tn.multipleLiffTransition),subwindowOpen:tr(tn.subwindowOpen),scanCodeV2:tr(tn.scanCodeV2),addToHomeScreen:tr(tn.addToHomeScreen),skipChannelVerificationScreen:tr(tn.skipChannelVerificationScreen),createShortcutOnHomeScreen:tr(tn.createShortcutOnHomeScreen),internalCreateShortcutOnHomeScreen:tr(tn.internalCreateShortcutOnHomeScreen),iap:tr(tn.iap),requestFriendship:tr(tn.requestFriendship),activityGetCallState:tr(tn.activityGetCallState),activityGetRecordingState:tr(tn.activityGetRecordingState)};function to(e){if(!tt.some(function(t){return t===e}))throw X(w,"Unexpected API name.");var t=tn[e];return!t||t().available}function ta(){var e=d.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return e.hooks={},e}(0,r.C6)(ta,d),Object.defineProperty(ta.prototype,"name",{get:function(){return"isApiAvailable"},enumerable:!1,configurable:!0}),ta.prototype.install=function(){return function(e){return to(e)}};var ts=function(){function e(){}return e.prototype.invoke=function(e){var t=ti[e];return!!t&&(t(),!0)},e}(),tc=function(){function e(e){this.liff=e}return e.prototype.invoke=function(e){return this.liff.checkFeature(e)},e}(),tu=function(){function e(t){D(eQ(),e.SDK_VERSION_SUPPORTING_NEW)>=0?this.impl=new ts:this.impl=new tc(t)}return Object.defineProperty(e,"SDK_VERSION_SUPPORTING_NEW",{get:function(){return"2.11.0"},enumerable:!1,configurable:!0}),e.prototype.invoke=function(e){return this.impl.invoke(e)},e}(),tl=function(e,t){return(tl=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var tf=!1,td=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}tl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"_legacyExtensionsEnabled"},enumerable:!1,configurable:!0}),t.prototype.install=function(){tf=!0},t}(d);function th(){var e;Object.keys(_).forEach(function(e){eB(_[e])}),e=ew(),z("".concat(P,":").concat(_.EXPIRES,":").concat(e.liffId),{path:"/"})}function tp(){return null!==d&&d.apply(this,arguments)||this}(0,r.C6)(tp,d),Object.defineProperty(tp.prototype,"name",{get:function(){return"logout"},enumerable:!1,configurable:!0}),tp.prototype.install=function(){return function(){return th()}};var tv=/([\x90\x9D\x81\x8D\x8F<"{|}>\\^`ââºââ¢âŽŠâ¦ââžââââ¡â¢â°ÅšŸâ¹Åâ ¥¿©áÃýÃÃðô]|\n|.*#.*#|%(?![0-9A-Fa-f]{2})[^%]{0,2})/,tm=function(e){if(tv.test(e))throw X(w,"invalid URL.");var t=new URL(e),n=t.username,r=t.password,i=t.hash,o=t.search;return{username:n,password:r,pathname:t.pathname,hash:i,origin:t.origin,search:o}},tg=function(e){return e.substring(1).split("&").filter(function(e){return!/^liff\./.test(e)&&!!e})},tw=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},tb=function(e,t){var n=(function(e,t){for(var n=(0,r.fX)([],(0,r.zs)(e),!1),i=0;i<t.length;i++){var o=t[i],a=n.indexOf(o);a>-1&&n.splice(a,1)}return n})(function(e){var t,n,i=new URLSearchParams(e.replace(/\+/g,"%2B")),o=[];try{for(var a=(0,r.Ju)(i.entries()),s=a.next();!s.done;s=a.next()){var c=(0,r.zs)(s.value,2),u=c[0],l=c[1];o.push("".concat(tw(u),"=").concat(tw(l)))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}if(0===o.length)return[""];var f=e.split("&");return o.map(function(e,t){return e.endsWith("=")&&!f[t].endsWith("=")?e.slice(0,-1):e})}(tg(e).join("&")),tg(t)).join("&");return""!==n?"?".concat(n):""}
3,ty=function(e,t){return 0===t.indexOf(e)&&(e.endsWith("/")&&(e=e.substring(0,e.length-1)),void 0===t[e.length]||"/"===t[e.length])},tI=function(e,t){var n=tm(e),r=new URL(t);if(n.username!==r.username||n.password!==r.password||r.origin!==n.origin||!ty(r.pathname,n.pathname))throw X(w,"invalid URL.")},tC=new(function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.extraParams="",t.getAndValidateContext=function(){var e=eI();if(!e)throw X(b,"Could not get Context from server.");if(!e.endpointUrl)throw X(b,"Could not get endpointUrl from server.");if(!e.permanentLinkPattern)throw X(b,"Could not get permanentLinkPattern from server.");return e},t.createUrl=function(){var e=t.getAndValidateContext(),n=window.location,r=n.pathname,i=n.search,o=n.hash,a=n.origin,s=new URL(e.endpointUrl);if(s.origin!==a||!ty(s.pathname,r))throw X(I,"Current page is not under entrypoint.");var c=r.substring(s.pathname.length);c.length>0&&"/"!==c[0]&&(c="/"+c);var u=new RegExp("^".concat(A.join("|"))),l=o.substring(1).split("&").filter(function(e){return!u.test(e)&&!!e}).join("&"),f=l===s.hash.substring(1)?"":l,d=function(e){return e.substring(1).split("&").filter(function(e){return!/liff\.state/.test(e)&&!!e})},h=d(i),p=d(s.search);t.extraParams&&h.push(t.extraParams);for(var v=0;v<p.length;v++){var m=p[v],g=h.indexOf(m);g>-1&&h.splice(g,1)}var w=h.join("&"),b="".concat(c).concat(""!==w?"?".concat(w):"").concat(f?"#".concat(f):"");return"".concat(O).concat(ew().liffId).concat(b)},t.createUrlBy=function(e){return(0,r.sH)(t,void 0,void 0,function(){var t,n,i,o,a,s;return(0,r.YH)(this,function(r){var c,u,l,f,d,h;if(!(t=ew().liffId))throw X(b,"Should run after liff init.");return tI(e,(n=this.getAndValidateContext()).endpointUrl),i=tm(e),o=new URL(n.endpointUrl),a=n.miniDomainAllowed?H:O,s=n.miniDomainAllowed&&n.miniAppId?n.miniAppId:t,[2,a.concat(s,(f=i.pathname,d=o.pathname,"/"===(h=f.substring(d.length))?"":(h.length>0&&"/"!==h[0]&&(h="/"+h),h)),tb(i.search,o.search),(c=i.hash,u=new RegExp("^".concat(A.join("|"))),(l=c.substring(1).split("&").filter(function(e){return!u.test(e)&&!!e}).join("&"))?"#".concat(l):""))]})})},t.setExtraQueryParam=function(e){t.extraParams=e},t.install=function(){return{createUrl:t.createUrl,createUrlBy:t.createUrlBy,setExtraQueryParam:t.setExtraQueryParam}},t}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"permanentLink"},enumerable:!1,configurable:!0}),t}(d));function tS(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i;return(0,r.YH)(this,function(r){switch(r.label){case 0:if(!e.ok)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.json()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,e];case 4:return t=String(e.status),n=K.has(t)?t:m,[4,e.json().catch(function(){throw X(n,e.statusText)})];case 5:throw X((i=r.sent()).error||i.errorCode||n,i.error_description||i.message)}})})}function tE(e){var t=function(e){if(e)return e;var t=eM();if(!t)throw X(g,"Need access_token for api call, Please login first");return{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer ".concat(t)}}(e&&e.headers);return(0,r.Cl)((0,r.Cl)({},e),{headers:t})}function tT(e,t){var n;try{n=tE(t)}catch(e){return Promise.reject(e)}return fetch(e,n).then(tS)}function tk(e,t){var n;try{n=tE(t)}catch(e){return Promise.reject(e)}return fetch(e,n)}function tP(e){var t=e.subdomain,n=e.pathname;return"https://".concat(void 0===t?"api":t,".").concat("line.me","/").concat(n)}var tO={token:tP({pathname:"oauth2/v2.1/token"}),certs:tP({pathname:"oauth2/v2.1/certs"}),"openid-configuration":tP({subdomain:"access",pathname:".well-known/openid-configuration"}),authorize:tP({subdomain:"access",pathname:"liff/v1/authorize"}),profile:tP({pathname:"v2/profile"}),message:tP({pathname:"message/v3/share"}),friendship:tP({pathname:"friendship/v1/status"}),shareTargetPicker:tP({subdomain:"access",pathname:"oauth2/v2.1/liff/shareTargetPicker"}),shareTargetPickerOtt:tP({pathname:"liff/v2/apps"}),shareTargetPickerResult:tP({subdomain:"access",pathname:"oauth2/v2.1/liff/shareTargetPicker/result"}),apps:tP({pathname:"liff/v2/apps"}),subWindowGetMSIT:tP({pathname:"liff/v2/sub/msit"}),subWindowGetMSTByMSIT:tP({pathname:"liff/v2/sub/mst"}),subWindowSubscribe:tP({subdomain:"liff",pathname:"liff/v2/sub/waitResult"}),subWindowPost:tP({pathname:"liff/v2/sub/result"}),subWindowGetAppData:tP({pathname:"liff/v2/sub/appData"}),subWindowGetOrigin:function(e){return tP({pathname:"liff/v2/sub/".concat(e,"/origin")})},accessTokenVerify:tP({pathname:"oauth2/v2.1/verify"}),unauthorizedPermissions:tP({subdomain:"liff",pathname:"liff/v2/incrementalAgreement/unauthorizedPermissions"}),permanentLink:tP({subdomain:"liff",pathname:"liff/v2/permanentLink"}),createShortcutOnHomeScreen:tP({subdomain:"liff-shortcut",pathname:"api/shortcut"}),iapVirtualConfirm:tP({pathname:"iap/v1/product/virtualConfirm"}),oaAddFriendRateLimit:tP({subdomain:"liff",pathname:"liff/v2/oaadd/rateLimit"})};function tH(e){return tT("".concat(tO.accessTokenVerify,"?access_token=").concat(encodeURIComponent(e)),{headers:{"Content-Type":"application/json",Accept:"application/json"}})}var t_="liff.subwindow.identifier",tL="liff.subwindow.cryptokey",tA=(0,r.Cl)((0,r.Cl)({},x),{GET_DATA:"getData",SET_DATA:"setData",NOT_FOUND:"notFound",TEARDOWN:"teardown"}),tF="broadcast",tx="main",tN="AES-GCM",tR=function(e){return(0,r.sH)(void 0,void 0,void 0,function(){return(0,r.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,window.crypto.subtle.importKey("jwk",{kty:"oct",k:e,alg:"A128GCM",ext:!0},{name:tN},!1,["encrypt","decrypt"])];case 1:return[2,t.sent()];case 2:throw X(m,t.sent());case 3:return[2]}})})},tj=function(e){return"".concat(e.identifier,"-").concat(e.action,"-").concat(e.timestamp)};function tU(){var e=document.createElement("form");e.method="POST",e.action="$MESSAGE_HANDLER_URL";var t=document.createElement("input");t.type="hidden",t.name="identifier",t.value="$IDENTIFIER",e.appendChild(t),document.body.appendChild(e),e.submit()}var tD=function(e){void 0===e&&(e=tx);var t=this;this.identification={identifier:"",cryptoKey:""},this.messageHandlerInstance=null,this.listeners=new Map,this.sentMessages=[],this.generateIdentification=function(){return(0,r.sH)(t,void 0,void 0,function(){var e,t,n,i,o;return(0,r.YH)(this,function(a){switch(a.label){case 0:return e=new URLSearchParams(window.location.search),t=function(t){var n=e.get("liff.state");return n?new URLSearchParams(n).get(t):null},n=this,o={identifier:this.windowType===tx?et(12):e.get(t_)||t(t_)||""},this.windowType!==tx?[3,2]:[4,(0,r.sH)(void 0,void 0,void 0,function(){var e,t;return(0,r.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,window.crypto.subtle.generateKey({name:tN,length:128},!0,["encrypt","decrypt"])];case 1:return e=n.sent(),[4,window.crypto.subtle.exportKey("jwk",e)];case 2:if(!(t=n.sent())||!t.k)throw X(m,"failed to generate key");return[2,t.k];case 3:throw X(m,n.sent());case 4:return[2]}})})];case 1:return i=a.sent(),[3,3];case 2:i=e.get(tL)||t(tL)||"",a.label=3;case 3:return n.identification=(o.cryptoKey=i,o),[2]}})})}
3,this.hasIdentification=function(){var e=t.identification,n=e.identifier,r=e.cryptoKey;return"string"==typeof n&&"string"==typeof r&&n.length>0&&r.length>0},this.isReady=function(){return t.hasIdentification()&&!!t.messageHandlerInstance},this.setup=function(){return(0,r.sH)(t,void 0,void 0,function(){var e,t,n,i,o,a=this;return(0,r.YH)(this,function(r){switch(r.label){case 0:return this.messageHandlerInstance?[2]:[4,this.generateIdentification()];case 1:if(r.sent(),!(e=this.identification.identifier))return[2];if(t=/^[a-zA-Z0-9]+$/gm,!e.match(t))throw X(m,"Invalid identifier");return(n=document.createElement("iframe")).style.display="none",n.src="about:blank",document.body.appendChild(n),null==(o=null==n?void 0:n.contentWindow)||o.window.eval("(".concat(tU.toString().replace("$MESSAGE_HANDLER_URL","".concat("https://liff-subwindow.line.me/liff/v2/sub/messageHandler")).replace("$IDENTIFIER",e.split("'")[0]),")()")),i="iframe-".concat(e,"-ready"),[4,new Promise(function(e){var t=function(r){r.data[i]&&(a.messageHandlerInstance=n,window.addEventListener("message",a.proxyToListeners),e(),document.removeEventListener("message",t))};window.addEventListener("message",t)})];case 2:return[2,r.sent()]}})})},this.teardown=function(){return(0,r.sH)(t,void 0,void 0,function(){var e,t;return(0,r.YH)(this,function(n){switch(n.label){case 0:return this.isReady()?[4,this.send({eventName:tA.TEARDOWN})]:[3,2];case 1:n.sent(),window.removeEventListener("message",this.proxyToListeners),this.listeners.clear(),null==(t=null==(e=this.messageHandlerInstance)?void 0:e.parentNode)||t.removeChild(this.messageHandlerInstance),this.messageHandlerInstance=null,n.label=2;case 2:return[2]}})})},this.listen=function(e){t.listeners.set(e,e)},this.listenRepliedEvent=function(e,n){var r=function(i){var o;i.replyTarget&&(o=i.replyTarget,tj(o)===tj(e))&&(n(i),t.listeners.delete(r))};t.listeners.set(r,r)},this.send=function(e){return(0,r.sH)(t,void 0,void 0,function(){var t,n,i,o,a=this;return(0,r.YH)(this,function(r){switch(r.label){case 0:var s;if(!this.isReady())throw X("message bus is not ready to send message");return n={action:(s=e.eventName,Object.keys(x).map(function(e){return x[e]}).includes(s)?tF:"command"),identifier:this.identification.identifier||"",timestamp:(new Date).getTime()},[4,this.getEncryptedContext(e)];case 1:return n.context=r.sent(),t=n,null==(o=null==(i=this.messageHandlerInstance)?void 0:i.contentWindow)||o.postMessage({messageBusEvent:t},"*"),this.sentMessages.push(tj(t)),[4,new Promise(function(e){a.listenRepliedEvent(t,function(t){e(t.context)})})];case 2:return[2,r.sent()]}})})},this.reply=function(e,n){return(0,r.sH)(t,void 0,void 0,function(){var t,i,o,a;return(0,r.YH)(this,function(r){switch(r.label){case 0:if(!this.isReady())throw X("message bus is not ready to send message");if(!e.identifier||!e.timestamp)throw X(m,"target message is not valid");return i={action:tF},[4,this.getEncryptedContext(n)];case 1:return i.context=r.sent(),i.identifier=this.identification.identifier||"",i.timestamp=(new Date).getTime(),i.replyTarget={action:e.action,identifier:e.identifier,timestamp:e.timestamp},t=i,null==(a=null==(o=this.messageHandlerInstance)?void 0:o.contentWindow)||a.postMessage({messageBusEvent:t},"*"),this.sentMessages.push(tj(t)),[2]}})})},this.setData=function(e,n){void 0===e&&(e="appData"),t.send({eventName:tA.SET_DATA,key:e,data:n})},this.getData=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0,r.sH)(t,(0,r.fX)([],(0,r.zs)(e),!1),void 0,function(e){return void 0===e&&(e="appData"),(0,r.YH)(this,function(t){switch(t.label){case 0:return[4,this.send({eventName:tA.GET_DATA,key:e})];case 1:return[2,t.sent()]}})})},this.proxyToListeners=function(e){return(0,r.sH)(t,void 0,void 0,function(){var t,n=this;return(0,r.YH)(this,function(i){return t=e.data.messageBusEvent,"https://liff-subwindow.line.me"!==e.origin||t&&(this.sentMessages.includes(tj(t))||t.identifier!==this.identification.identifier||t.action!==tF&&!t.replyTarget||this.listeners.forEach(function(e){return(0,r.sH)(n,void 0,void 0,function(){var n,i,o;return(0,r.YH)(this,function(a){switch(a.label){case 0:return n=e,i=[(0,r.Cl)({},t)],o={},[4,this.getDecryptedContext(t.context)];case 1:return n.apply(void 0,[r.Cl.apply(void 0,i.concat([(o.context=a.sent(),o)])
3)]),[2]}})})})),[2]})})},this.getEncryptedContext=function(e){return(0,r.sH)(t,void 0,void 0,function(){var t,n,i,o,a,s,c;return(0,r.YH)(this,function(u){switch(u.label){case 0:var l;return n=(t=this.identification).identifier,i=t.cryptoKey,a=(o=JSON).stringify,c={eventName:e.eventName,key:e.key?e.key:void 0},e.data?[4,(l=JSON.stringify(e.data),(0,r.sH)(void 0,void 0,void 0,function(){var e,t;return(0,r.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),e=(new TextEncoder).encode(n),[4,tR(i)];case 1:return t=r.sent(),[4,window.crypto.subtle.encrypt({name:tN,iv:e},t,(new TextEncoder).encode(l))];case 2:return[2,btoa(new Uint8Array(r.sent()).reduce(function(e,t){return e+String.fromCharCode(t)},""))];case 3:throw X(m,r.sent());case 4:return[2]}})}))]:[3,2];case 1:return s=u.sent(),[3,3];case 2:s=void 0,u.label=3;case 3:return[2,a.apply(o,[(c.data=s,c)])]}})})},this.getDecryptedContext=function(e){return(0,r.sH)(t,void 0,void 0,function(){var t,n,i,o,a,s,c,u;return(0,r.YH)(this,function(l){switch(l.label){case 0:var f;return n=(t=this.identification).identifier,i=t.cryptoKey,(o=JSON.parse(e)).data&&"string"==typeof o.data?(u=(c=JSON).parse,[4,(f=o.data,(0,r.sH)(void 0,void 0,void 0,function(){var e,t,o,a,s,c;return(0,r.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),e=(new TextEncoder).encode(n),[4,tR(i)];case 1:for(t=r.sent(),a=new Uint8Array((o=atob(f)).length),s=0;s<o.length;s++)a[s]=o.charCodeAt(s);return[4,window.crypto.subtle.decrypt({name:tN,iv:e},t,a.buffer)];case 2:return c=r.sent(),[2,(new TextDecoder).decode(new Uint8Array(c))];case 3:throw X(m,r.sent());case 4:return[2]}})}))]):[3,2];case 1:return s=u.apply(c,[l.sent()]),[3,3];case 2:s=void 0,l.label=3;case 3:return a=s,[2,(0,r.Cl)((0,r.Cl)({},o),{data:a})]}})})},this.windowType=e};if("u">typeof window&&"function"!=typeof window.CustomEvent){function tM(e,t){var n=t||{},r=n.bubbles,i=n.cancelable,o=n.detail,a=document.createEvent("CustomEvent");return a.initCustomEvent(e,void 0!==r&&r,void 0!==i&&i,void 0===o?void 0:o),a}tM.prototype=Event.prototype,window.CustomEvent=tM}var tW={},tY=!1;function tB(e,t){tY||(tY=!0,window.addEventListener(k,function(e){e&&e.detail&&e.detail.type&&tW[e.detail.type]&&tW[e.detail.type].forEach(function(t){return t(e)})})),tW[e]?tW[e].push(t):tW[e]=[t]}function tV(e,t){var n=tW[e];if(n&&Array.isArray(n)){var r=n.indexOf(t);r>=0&&n.splice(r,1)}}function tG(e,t,n){void 0===t&&(t={}),void 0===n&&(n="");var r=eN();if(!r)throw X(y,"Invalid featureToken for client features");if(!window._liff||!window._liff.postMessage)throw X(w,"postMessage is not available from client");s.debug("[js postMessage to client]",e,n,t),window._liff.postMessage(e,r,n,JSON.stringify(t))}function tz(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={once:!0}),eN()?(n=(0,r.Cl)({callbackId:et(12),once:!0},n),new Promise(function(r,i){var o=function(t){if(t&&t.detail){var a=t.detail.callbackId===n.callbackId,c="string"!=typeof t.detail.callbackId;(a||c)&&(n.once&&tV(e,o),s.debug("[callback detail]",t.detail),t.detail.error?i(t.detail.error):t.detail.data?r(t.detail.data):i(t.detail))}i()};tB(e,o),tG(e,t,n.callbackId)})):Promise.reject(X(y,"Invalid featureToken for client features"))}function tK(){var e=e0();null!==e&&("ios"===e5()&&D(e,"9.19")>=0||"android"===e5()&&D(e,"11.6.0")>=0)?location.href="liff://close":window._liff&&window._liff.postMessage?null!==e&&D(e,"10.15.0")>=0?"ios"===e5()?window._liff.postMessage("closeWindow",""):window._liff.postMessage("closeWindow","","",""):tz("closeWindow"):window.close()}function tJ(){return null!==d&&d.apply(this,arguments)||this}function tX(e){return tT((0,tO.subWindowGetOrigin)(e))}(0,r.C6)(tJ,d),Object.defineProperty(tJ.prototype,"name",{get:function(){return"closeWindow"},enumerable:!1,configurable:!0}),tJ.prototype.install=function(){return function(){return tK()}};var tq={};function t$(e,t){e&&tq[e]&&tq[e].forEach(function(e){e(t)})}function tQ(e,t){tq[e]||(tq[e]=[]),tq[e].push(t)}function tZ(e,t){if(tq[e]){var n=tq[e].indexOf(t);n>=0&&tq[e].splice(n,1)}}var t0,t1,t2,t4,t3,t6,t5=function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem("".concat(this.getKeyPrefix(),":").concat(e))},e.prototype.setItem=function(e,t){this.storage.setItem("".concat(this.getKeyPrefix(),":").concat(e),t)},e.prototype.removeItem=function(e){this.storage.removeItem("".concat(this.getKeyPrefix(),":").concat(e))},e.prototype.clear=function(){this.storage.clear()},e.prototype.getKeyPrefix=function(){return"".concat(P,":").concat(this.getLiffId())},e.prototype.getLiffId=function(){var e=ew().liffId;if(!e)throw X(I,"liffId is necessary for liff.init()");return e},e}(),t8=new t5(new Q),t9="subWindowStatusUpdated";function t7(){var e=t8.getItem(t9);return null!==e&&JSON.parse(e)}function ne(e){t8.setItem(t9,String(e))}function nt(){return(0,r.sH)(this,arguments,void 0,function(e){return void 0===e&&(e=tx),(0,r.YH)(this,function(t){switch(t.label){case 0:return[4,(t6=new tD(e)).setup()];case 1:return t.sent(),[2,t6]}})})}var nn=new Q,nr=new t5(eh()?nn:window.sessionStorage),ni="mainWindowOrigin";function no(){return nr.getItem(ni)}function na(e){return(0,r.sH)(this,arguments,void 0,function(e,t){var n,i,o,a,c,u,l;return void 0===t&&(t={}),(0,r.YH)(this,function(r){switch(r.label){case 0:if(null==(n=t6)?void 0:n.isReady())return[3,5];if(i=JSON.stringify(t),o=ew().liffId,a=no(),!window.opener||!a||!o)throw X(T);c=!1,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,tX(o)];case 2:return c=r.sent().subwindowCommonModule,[3,4];case 3:throw u=r.sent(),s.debug(u),X(T);case 4:return l=c?a:location.origin,[2,new Promise(function(t){window.addEventListener("message",function n(r){(r.data&&"string"==typeof r.data.type&&[x.SUBMIT,x.CANCEL].includes(r.data.type)||0)&&
3(window.removeEventListener("message",n),t({status:e,result:i}))}),window.opener.postMessage({status:e,result:i},l)})];case 5:return n.send({eventName:e,data:t}),[4,new Promise(function(e){setTimeout(e,500)})];case 6:return r.sent(),[2,{status:e,result:JSON.stringify(t)}]}})})}function ns(e){var t,n=t3;if(e.origin===n){var r=e.data;if(r){var i,o=r.status,a=r.result;try{i=JSON.parse(a||"{}")}catch(e){i={}}switch(o){case R:window.clearInterval(t4),nf();break;case x.CANCEL:case x.SUBMIT:ne(!0),window.clearInterval(t4),window.removeEventListener("message",ns),t$(o,i),null==(t=t1)||t.postMessage({type:o},t3);break;default:s.debug("unexpected message")}}}}var nc=function(e){return(0,r.sH)(void 0,void 0,void 0,function(){var t,n,i,o;return(0,r.YH)(this,function(r){if(t7())return[2];switch(n=(t=e.context).eventName,i=t.data,o=t6,n){case x.INIT:nl(!i.hasOpener);break;case x.CANCEL:case x.SUBMIT:ne(!0),t$(n,i),null==o||o.reply(e,{eventName:n});break;case x.CLOSE:!1===t7()&&(ne(!0),t$(x.CLOSE,{})),nf()}return[2]})})};function nu(){window.clearInterval(t2),window.clearInterval(t4),window.removeEventListener("message",ns)}function nl(e){if(void 0===e&&(e=!1),nu(),ne(!1),e){var t=t1;t&&(t.close(),t1=null)}}function nf(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:return(e=t6)?[4,e.teardown()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}var nd=null;function nh(e){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.json()];case 1:return[2,t.sent()];case 2:return t.sent(),[2,null];case 3:return[2]}})})}var np={height:"full",closeButtonPosition:"right",closeButtonColor:"black",closeButtonLabel:""};function nv(e){var t,n,i,o,a,s,c,u,l,f,d,h,p,v;return ti.subwindowOpen(),em()?(f=(t=e).appData,d=t.native,h=ew().liffId,p=eA(),v=es(t.url),h?p?v?(a=(o={mainLiffId:h,subLiffId:v,mstChallenge:p,appData:f,view:(i={},Object.keys(n=Object.assign({},np,d)).forEach(function(e){"closeButtonColor"===e?"white"===n[e]?i[e]="#ffffff":i[e]="#000000":i[e]=n[e]}),i)}).mainLiffId,s=o.subLiffId,c=o.mstChallenge,u=o.appData,l=o.view,a&&c?tT(tO.subWindowGetMSIT,{method:"POST",body:JSON.stringify({mainLiffId:a,subLiffId:s,mstChallenge:c,appData:u,view:l})}):Promise.reject(X(w,"no proper argument"))).then(function(e){var t=e.msit;return function e(t){return(0,r.sH)(this,void 0,void 0,function(){var n,i,o,a,s,c,u,l,f,d,h,p,v,g,b=this;return(0,r.YH)(this,function(y){switch(y.label){case 0:if(n=t.msit,i=t.mstChallenge,a=void 0===(o=t.reconnectCount)?0:o,s=function(){return(0,r.sH)(b,void 0,void 0,function(){return(0,r.YH)(this,function(r){switch(r.label){case 0:return[4,new Promise(function(e){return setTimeout(e,1e3)})];case 1:return r.sent(),[4,e({msit:n,mstChallenge:i,onSuccess:t.onSuccess,onError:t.onError,reconnectCount:a+1})];case 2:return r.sent(),[2]}})})},c=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];nd=null,t.onSuccess.apply(t,(0,r.fX)([],(0,r.zs)(e),!1))},u=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];nd=null,t.onError.apply(t,(0,r.fX)([],(0,r.zs)(e),!1))},l=Date.now(),null===nd&&(nd=l),f=l-nd,a>=10||f>6e5)return u(X(m,"Failed to connect")),[2];y.label=1;case 1:return y.trys.push([1,3,,5]),[4,tk(tO.subWindowSubscribe,{method:"POST",body:JSON.stringify({msit:n,mstChallenge:i})})];case 2:return d=y.sent(),[3,5];case 3:return y.sent(),[4,s()];case 4:return y.sent(),[2];case 5:return d.status>=500?[4,s()]:[3,7];case 6:return y.sent(),[3,17];case 7:return d.status>=400&&500>d.status?[4,nh(d)]:[3,9];case 8:return h=(p=y.sent())?X(w,p.errorDetail):X(m,"Some error happened in the server"),u(h),[3,17];case 9:return 200!==d.status?[3,16]:[4,nh(d)];case 10:if(!(p=y.sent()))return u(X(m,"Some error happened in the server")),[2];switch(v=p.status,g=p.result,v){case x.ERROR:return[3,11];case x.CLOSE:case x.CANCEL:case x.SUBMIT:return[3,13]}return[3,14];case 11:return[4,s()];case 12:return y.sent(),[3,15];case 13:return c(v,g),[3,15];case 14:u(X(m,"Some error happened in the server")),y.label=15;case 15:return[3,17];case 16:u(X(m,"Some error happened in the server")),y.label=17;case 17:return[2]}})})}({msit:t,mstChallenge:p,onSuccess:function(e,t){t$(e,t)},onError:function(e){t$(x.ERROR,e)}}),t}).then(function(e){return function(e,t){return(0,r.sH)(this,void 0,void 0,function(){var n,i,o;return(0,r.YH)(this,function(r){switch(r.label){case 0:return n=e.url,(i=new URLSearchParams).set("msit",t),[4,null==(o=e.onBeforeTransition)?void 0:o.call(e)];case 1:return r.sent(),location.href="".concat("liff://subwindow","?url=").concat(encodeURIComponent(n),"&").concat(i.toString()),[2]}})})}(t,e)}):Promise.reject(X(w,"params.url must be liff url or mini url")):Promise.reject(X(g,"mst_challenge is invali
3d")):Promise.reject(X(g,"liffId is invalid"))):function(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i,o,a,s,c,u,l,f,d,h;return(0,r.YH)(this,function(p){var v,m,g,b,y,I,C,S;switch(p.label){case 0:return(t=es(e.url))?(nl(!0),[4,nf()]):[2,Promise.reject(X(w,"params.url must be liff url or mini url"))];case 1:return p.sent(),t1="ios"!==e5()||el()?window.open("","liffsubwindow","width=480, height=640, menubar=no, toolbar=no, scrollbars=yes"):window.open(),n=e.url,i=e.appData,(o=new URL(n)).searchParams.append(N,"true"),[4,nt()];case 2:return a=p.sent(),o.searchParams.append(t_,a.identification.identifier),o.searchParams.append(tL,a.identification.cryptoKey),o.hostname=(v=o.hostname,g=(m=(0,r.zs)(v.split(".")))[0],b=m.slice(1),(0,r.fX)(["".concat(g,"-ext")],(0,r.zs)(b),!1).join(".")),s=o.toString(),[4,tX(t)];case 3:if(u=(c=p.sent()).origin,l=c.subwindowCommonModule,!(f=t1))throw X(E);if(!l)return f.close(),[2];t3=u,a.listen(nc),a.setData("appData",i),window.addEventListener("message",ns),p.label=4;case 4:return p.trys.push([4,6,,7]),[4,null==(h=e.onBeforeTransition)?void 0:h.call(e)];case 5:return p.sent(),[3,7];case 6:throw d=p.sent(),f.close(),d;case 7:return f.location.href=s,y=u,I=i,C=t1,S={type:R},I&&(S.message=JSON.stringify(I)),t4=window.setInterval(function(){null==C||C.postMessage(S,y)},100),t2=window.setInterval(function(){var e=t1;e&&e.closed&&(nu(),t1=null,!1===t7()&&(ne(!0),t$(x.CLOSE,{})))},100),[2]}})})}(e)}function nm(e){if(!e.mst||!e.status)return Promise.reject(X(w,"no proper argument"));var t=JSON.stringify(e);return tT(tO.subWindowPost,{method:"POST",body:t})}
3function ng(){if(!e6())throw X(g,"this api can be only called in child window")}function nw(e){var t;return void 0===e&&(e={}),ng(),em()?function(){return(0,r.sH)(this,arguments,void 0,function(e){var t,n;return void 0===e&&(e={}),(0,r.YH)(this,function(r){switch(r.label){case 0:return(t=eL())?[4,nm({mst:t,status:x.CANCEL,result:e})]:[2,Promise.reject(X(g,"mst is invalid"))];case 1:return n=r.sent(),ne(!0),[2,n]}})})}(e):(void 0===(t=e)&&(t={}),na(x.CANCEL,t))}function nb(e){var t;return void 0===e&&(e={}),ng(),em()?function(){return(0,r.sH)(this,arguments,void 0,function(e){var t,n;return void 0===e&&(e={}),(0,r.YH)(this,function(r){switch(r.label){case 0:return(t=eL())?[4,nm({mst:t,status:x.SUBMIT,result:e})]:[2,Promise.reject(X(g,"mst is invalid"))];case 1:return n=r.sent(),ne(!0),[2,n]}})})}(e):(void 0===(t=e)&&(t={}),na(x.SUBMIT,t))}function ny(){return ng(),em()?function(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:return!1!==t7()?[3,2]:(e=eL())?[4,nm({mst:e,status:x.CLOSE,result:{}})]:[2,Promise.reject(X(g,"mst is invalid"))];case 1:t.sent(),t.label=2;case 2:return tK(),[2]}})})}():function(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){return(null==(e=t6)?void 0:e.isReady())?(e.send({eventName:x.CLOSE}),[2,new Promise(function(e){setTimeout(function(){tK(),e()},100)})]):(tK(),[2,Promise.resolve()])})})}()}function nI(){return ng(),function(){var e,t=eb(_.APP_DATA);try{e=t?JSON.parse(t):{}}catch(t){e={}}return Promise.resolve(e)}()}var nC={on:tQ,off:tZ,open:nv,cancel:nw,submit:nb,close:ny,getAppData:nI},nS=d;function nE(){return null!==nS&&nS.apply(this,arguments)||this}function nT(e,t){return(0,r.sH)(this,void 0,void 0,function(){var n,i,o,a,s,c,u,l,f,d,h,p,v,m,g;return(0,r.YH)(this,function(w){switch(w.label){case 0:if(n=e.split("."),o=(i=(0,r.zs)(n,3))[0],a=i[1],s=i[2],c=JSON.parse(U(o)),!(u=function(e){var t,n=e.split(".");if(3!==n.length||n.some(function(e){return 0===e.length}))return null;try{return JSON.parse((t=n[1],decodeURIComponent(U(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))))}catch(e){return null}}(e)))throw X(C,"Invalid payload in ID_TOKEN");return l=B(U(s)),f=B("".concat(o,".").concat(a)),[4,function(){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(e){switch(e.label){case 0:return[4,tT(tO.certs)];case 1:return[2,e.sent()]}})})}()];case 1:if(!(d=w.sent().keys.find(function(e){return e.kid===c.kid})))return[3,6];if(delete d.alg,"ES256"!==c.alg)throw X(C,'Invalid "alg" value in ID_TOKEN');h=void 0,w.label=2;case 2:return w.trys.push([2,4,,5]),[4,function(e,t,n){return(0,r.sH)(this,void 0,void 0,function(){var i;return(0,r.YH)(this,function(r){switch(r.label){case 0:return[4,crypto.subtle.importKey("jwk",e,{name:"ECDSA",namedCurve:"P-256"},!1,["verify"])];case 1:return i=r.sent(),[4,crypto.subtle.verify({name:"ECDSA",hash:{name:"SHA-256"}},i,n,t)];case 2:return[2,r.sent()]}})})}(d,f,l)];case 3:return h=w.sent(),[3,5];case 4:throw p=w.sent(),X(C,"".concat("Failed to use Crypto API to verify ID_TOKEN",": ").concat(p));case 5:if(h){if(v=u.iss!=="https://access.".concat("line.me"),m=u.aud!==t,g=1e3*u.exp<Date.now(),v)throw X(C,'Invalid "iss" value in ID_TOKEN');if(m)throw X(C,'Invalid "aud" value in ID_TOKEN');if(g)throw X(C,'Invalid "exp" value in ID_TOKEN');return[2,u]}throw X(C,"Invalid signature in ID_TOKEN");case 6:throw X(C,'Invalid "kid" value in ID_TOKEN');case 7:return[2]}})})}(0,r.C6)(nE,nS),Object.defineProperty(nE.prototype,"name",{get:function(){return"subWindow"},enumerable:!1,configurable:!0}),nE.prototype.install=function(){var e=this;return{on:tQ.bind(this),off:tZ.bind(this),open:function(t){return nv.call(e,(0,r.Cl)((0,r.Cl)({},t),{onBeforeTransition:void 0}))},cancel:nw.bind(this),submit:nb.bind(this),close:ny.bind(this),getAppData:nI.bind(this)}};var nk,nP=n(99963),nO=n.n(nP),nH=function(){var e=this;this.type="sync",this.fns=new Set,this.on=function(t){e.fns.add(t)},this.call=function(){for(var t,n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];try{for(var a=(0,r.Ju)(e.fns),s=a.next();!s.done;s=a.next())s.value.apply(void 0,(0,r.fX)([],(0,r.zs)(i),!1))}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},n_=function(){var e=this;this.type="async",this.fns=new Set,this.on=function(t){e.fns.add(t)},this.call=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0,r.sH)(e,void 0,void 0,function(){var e,n,i,o,a,s;return(0,r.YH)(this,function(c){switch(c.label){case 0:e=[];try{for(i=(n=(0,r.Ju)(this.fns)).next();!i.done;i=n.next())o=i.value,e.push(o.apply(void 0,(0,r.fX)([],(0,r.zs)(t),!1)))}catch(e){a={error:e}}finally{try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return[4,Promise.all(e)];case 1:return c.sent(),[2]}})})}},nL=function(e){var t,n,r,i=et(43),o=(t=nO()(i),n="",t.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ").forEach(function(e){n+=String.fromCharCode(parseInt(e))}),window.btoa(n)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),a=ew();if(!a||!a.liffId)throw X(I,"You need to define `liffId` for liff.login()");var c={app_id:a.liffId,state:et(12),response_type:"code",code_challenge_method:"S256",code_challenge:o,liff_sdk_version:eQ()};
3e&&e.redirectUri&&(c.redirect_uri=e.redirectUri),e6()&&!em()&&((null==(r=t6)?void 0:r.isReady())?c.redirect_uri=window.location.href:c.disable_auto_login="true"),ey(_.LOGIN_TMP,{codeVerifier:i});var u=tO.authorize+"?"+ee(c);s.debug("[Redirect] ".concat(u)),window.location.href=u},nA=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.hooks={before:new nH},t}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"login"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this._login.bind(this)},t.prototype._login=function(e){this.hooks.before.call(e),nL(e)},t}(d),nF="u"<typeof navigator?"en":null!=(nk=navigator.language)?nk:"en",nx=null,nN=!1;function nR(e){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(t){switch(t.label){case 0:return nF=e,[4,nj()];case 1:return t.sent(),[2]}})})}function nj(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n,i;return(0,r.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,,3,4]),e=new AbortController,[4,ep(tT("".concat("https://liffsdk.line-scdn.net/xlt/manifest.json"),{method:"GET",headers:{Accept:"application/json"},signal:e.signal}),5e3,e)];case 1:return t=r.sent(),n="".concat(nF),!t.languages[n]&&nF.includes("-")&&(n=nF.split("-")[0]),t.languages[n]||(n="en"),i=new AbortController,[4,ep(tT("".concat("https://liffsdk.line-scdn.net/xlt","/").concat(t.languages[n]),{method:"GET",headers:{Accept:"application/json"},signal:i.signal}),5e3,i)];case 2:return nx=r.sent(),[3,4];case 3:return nN=!0,[7];case 4:return[2]}})})}function nU(e){if(null===nx){if(nN)return e;throw X(b,"please call xlt after liff.init")}return nx[e]}var nD=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"i18n"},enumerable:!1,configurable:!0}),t.prototype.install=function(e){return e.internalHooks.init.beforeFinished(this.beforeInitFinished.bind(this)),{setLang:nR}},t.prototype.beforeInitFinished=function(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,nj()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),s.warn("[LIFF I18n] failed to load XLT data, falling back to raw keys",e),[3,3];case 3:return[2]}})})},t}(d)),nM={iconColor:"#111111",statusBarColor:"BLACK",titleTextColor:"#111111",titleSubtextColor:"#B7B7B7",titleButtonColor:"#111111",titleBackgroundColor:"#FFFFFF",progressBarColor:"#06C755",progressBackgroundColor:"#FFFFFF",titleButtonAreaBackgroundColor:"#1FFFFFFF",titleButtonAreaBorderColor:"#26000000",baseBackgroundColor:"#FFFFFF",baseTextColor:"#000000",lightButtonBorderColor:"rgba(0, 0, 0, 0.15)"},nW={iconColor:"#FFFFFF",statusBarColor:"WHITE",titleTextColor:"#FFFFFF",titleSubtextColor:"#949494",titleButtonColor:"#FFFFFF",titleBackgroundColor:"#111111",progressBarColor:"#06C755",progressBackgroundColor:"#111111",titleButtonAreaBackgroundColor:"#1FFFFFFF",titleButtonAreaBorderColor:"#26000000",baseBackgroundColor:"#000000",baseTextColor:"#FFFFFF",lightButtonBorderColor:"rgba(255, 255, 255, 0.5)"};function nY(e){var t=eI(),n=(null==t?void 0:t.menuColorSetting)||{adaptableColorSchemes:["light"],lightModeColor:nM,darkModeColor:nW},i=n.adaptableColorSchemes,o=n.lightModeColor,a=n.darkModeColor,s=i.includes("dark");e.matches&&s?nB((0,r.Cl)((0,r.Cl)({},nW),a)):nB((0,r.Cl)((0,r.Cl)({},nM),o))}function nB(e){var t=e.iconColor,n=e.statusBarColor,r=e.titleTextColor,i=e.titleSubtextColor,o=e.titleButtonColor,a=e.titleBackgroundColor,s=e.progressBarColor,c=e.progressBackgroundColor,u=e.titleButtonAreaBackgroundColor,l=e.titleButtonAreaBorderColor,f=e.baseBackgroundColor,d=e.baseTextColor,h=e.lightButtonBorderColor;nV("--liff-base-background-color",f),nV("--liff-base-text-color",d),nV("--liff-base-background-rgb-color",Y(f)),nV("--liff-base-text-rgb-color",Y(d)),nV("--liff-light-button-border-color",h),nV("--liff-title-text-color",r),nV("--liff-title-background-color",a),nV("--liff-title-button-color",o),nV("--liff-icon-color",t),nV("--liff-status-bar-color",n),nV("--liff-title-subtext-color",i),nV("--liff-progress-bar-color",s),nV("--liff-progress-background-color",c),nV("--liff-title-button-area-background-color",M(u)),nV("--liff-title-button-area-border-color",M(l))}function nV(e,t){document.documentElement.style.setProperty(e,t)}var nG={addToHomeScreen:function(e){if(!new tu(e).invoke("addToHomeScreen"))throw X(y,"No permission for liff.addToHomeScreen()")}
3,scanCode:function(e){if(!new tu(e).invoke("scanCode"))return Promise.reject(X(y,"No permission for liff.scanCode()"))},getAdvertisingId:function(e){if(!new tu(e).invoke("getAdvertisingId"))return Promise.reject(X(y,"No permission for liff.getAdvertisingId()"))},initPlugins:function(){}};function nz(e){var t=e.split(".");if(t[1])try{var n=t[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(window.atob(n))}catch(e){}return null}function nK(e){var t=e.pathname,n=e.query,r=n?"?".concat(ee(n)):"",i="".concat("liff://").concat(t).concat(r);location.href=i}var nJ=null;function nX(e){if(e.persisted&&to("multipleLiffTransition"))if("ios"===e5())window.location.reload();else{var t=ew().liffId,n=eN();if(!t)throw X(b,"Invalid LIFF ID.");if(!n)throw X(y,"Invalid featureToken for client features");nK({pathname:"app/".concat(t),query:{feature_token:n}})}}function nq(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:if(!(e=ew().liffId))throw X(b,"Invalid LIFF ID.");return[4,function(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i,o,a,s;return(0,r.YH)(this,function(r){switch(r.label){case 0:return t=tO.apps,n="".concat(t,"/").concat(e,"/contextToken"),i=eM(),o={"Content-Type":"application/json",Accept:"application/json"},i&&(o.Authorization="Bearer ".concat(i)),[4,tT(n,{headers:o})];case 1:if(!(a=r.sent().contextToken))throw X(b,"Can not get context from server.");if(!(s=nz(a)))throw X(b,"Invalid context token.");return[2,s]}})})}(e)];case 1:return eC(t.sent()),[2]}})})}var n$=new(function(){function e(){var e=this;this.getAndValidateContext=function(){var e=eI();if(!e)throw X(b,"Could not get Context from server.");if(!e.endpointUrl)throw X(b,"Could not get endpointUrl from server.");if(!e.permanentLinkPattern)throw X(b,"Could not get permanentLinkPattern from server.");return e},this.decodeState=function(t){var n=e.getAndValidateContext();t=t.replace(/\n/g,"%0D%0A");var r=e.hasTrailingSlash(n.endpointUrl)||e.hasTrailingSlash(t),i=new URL(n.endpointUrl),o=i.origin,a=i.pathname,s=i.search,c=new URL("".concat(o).concat(e.attachSlashAtStart(t))),u=c.pathname,l=c.search,f=c.hash,d="".concat(s).concat(s?l.replace(/\?/g,"&"):l),h="".concat(a).concat(e.attachSlashAtStart(u)).replace("//","/");return(h=e.attachSlashAtStart("".concat(h))).endsWith("/")&&!r&&(h=h.substring(0,h.length-1)),"".concat(o).concat(h).concat(d).concat(f).replace(/%0D%0A/g,"\n")}}return e.prototype.attachSlashAtStart=function(e){return"".concat(e&&e.length>0&&!e.startsWith("/")?"/":"").concat(e)},e.prototype.hasTrailingSlash=function(e){var t=e.indexOf("?"),n=e.indexOf("#"),r=-1;return(r=-1===t&&-1===n?e.length:-1===t?n:-1===n?t:Math.min(t,n))>0&&"/"===e[r-1]},e.prototype.invoke=function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n,i,o;return(0,r.YH)(this,function(r){switch(r.label){case 0:if("string"!=typeof(t=(e=Z(window.location.search))["liff.state"]))return[2];r.label=1;case 1:return r.trys.push([1,4,,5]),n=location.href,(i=this.decodeState(t))===n?[3,3]:(e["liff.hback"]?location.replace(ei(i,{"liff.hback":e["liff.hback"]})):location.replace(i),[4,new Promise(function(){})]);case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:if((o=r.sent()).code===b)throw o;return s.debug(o),[3,5];case 5:return[2]}})})},e}()),nQ=function(e,t){return new Promise(function(n,r){if(e){var i=document.createElement("script");i.type="module",i.onload=function(){n()},i.src=e,document.head.appendChild(i)}else r(X(I,t))})},nZ=function(e){var t="https://static.line-scdn.net/lui/edge/versions/1.13.0/lui-alert.js";return t&&e&&(t=t.replace(/\d{1,2}\.\d{1,2}\.\d{1,3}/,e)),nQ(t,"LUI_ALERT_URL is not defined")},n0="liffAlert",n1=function(){return(0,r.sH)(void 0,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){var n;switch(t.label){case 0:return(e=function(){var e,t=document.querySelector('script[src*="luivendor.js"]');if(t&&(null==(e=t.src.match(/\d{1,2}\.\d{1,2}\.\d{1,3}/g))?void 0:e.length))return t.src.match(/\d{1,2}\.\d{1,2}\.\d{1,3}/g)[0]}())?[3,2]:[4,nQ("https://static.line-scdn.net/lui/edge/versions/1.13.0/luivendor.js","LUI_VENDOR_URL is not defined")];case 1:t.sent(),t.label=2;case 2:return[4,nZ(e)];case 3:return t.sent(),[4,(n=et(6),new Promise(function(){var e=document.createElement("div");e.innerHTML='<lui-alert id="'.concat(n0,"-").concat(n,'" shown title="').concat(nU("alert.android.extBrowser.autoLoginWorkaround.title"),'" message="').concat(nU("alert.android.extBrowser.autoLoginWorkaround.desc"),'" button="').concat(nU("alert.android.extBrowser.autoLoginWorkaround.button.text"),'"></lui-alert>'),document.body.appendChild(e);var t=document.getElementById("".concat(n0,"-").concat(n));t&&t.addEventListener("lui-button-click",function(){var e=window.open(ei(window.location.href,{liffIsEscapedFromApp:"true"}),"_blank");e&&(e.location.href=ei(window.location.href,{liffIsEscapedFromApp:"true"}),window.close())})}))];case 4:return t.sent(),[2]}})})},n2=function(e){try{return new URL(e).searchParams.get("lineAppVersion")}catch(e){return null}},n4=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.hooks={before:new n_,after:new n_},t.internalHooks={beforeFinished:new n_,beforeSuccess:new n_,error:new n_},t}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"init"}
3,enumerable:!1,configurable:!0}),t.prototype.install=function(e){var t=e.liff;return this.liffForWindow=t,this.init.bind(this)},t.prototype.init=function(e,t,n){return(0,r.sH)(this,void 0,void 0,function(){var i;return(0,r.YH)(this,function(o){var c,u,l;switch(o.label){case 0:return[4,this.hooks.before.call()];case 1:o.sent(),c=this.liffForWindow,window&&!window.liff&&(window.liff=c),o.label=2;case 2:return o.trys.push([2,9,,11]),[4,Promise.all([function(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n;return(0,r.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,tf?function(){var e,t,n,r;return e=this,t=void 0,n=void 0,r=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){var u=[s,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[3,2];case 1:return[2,e.sent().default];case 2:return[2,ep(new Promise(function(e,t){var n,r=document.createElement("script");r.onload=function(){var n=window.liffClientExtension;n?e(n):t(X(b,"Unable to load client features. (Extension is empty)"))},r.onerror=function(e){t(X(b,"Unable to load client features.",{cause:e}))},r.src="ios"===e5()?(n=e0())&&0>D(n,"9.19.0")?"https://static.line-scdn.net/liff/edge/2/ios-918-extensions_2_22_0.js":"https://static.line-scdn.net/liff/edge/2/ios-extensions_2_22_0.js":"https://static.line-scdn.net/liff/edge/2/non-ios-extensions_2_22_0.js",r.type="text/javascript",document.body.appendChild(r)}),1e4)]}})},new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}():Promise.resolve(void 0)];case 1:return(t=r.sent())?(t.install(e,nG),[3,3]):[2];case 2:return n=r.sent(),s.warn("[LIFF Init] failed to load legacy extensions, related APIs will be unavailable",n),[3,3];case 3:return[2]}})})}(this.liffForWindow),function(e,t){return(0,r.sH)(this,void 0,void 0,function(){var n,i;return(0,r.YH)(this,function(o){var a,c,u,l,f;switch(o.label){case 0:if(!e.liffId)throw X(I,"liffId is necessary for liff.init()");return window.__liffConfig=e,!em()&&eq()&&(f=ew(),V("".concat(P,":").concat(_.EXPIRES,":").concat(f.liffId))||th()),n=Z(window.location.search),!e6()||em()?[3,2]:[4,function e(){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i,o,a,s,c=this;return(0,r.YH)(this,function(u){switch(u.label){case 0:return(n=t6)?[3,2]:[4,nt("sub")];case 1:n=u.sent(),u.label=2;case 2:return(t=n).isReady()?(i=et(8),[4,t.getData("appData")]):[3,8];case 3:return a=(o=u.sent()).eventName,s=o.data,a!==tA.NOT_FOUND?[3,6]:[4,t.teardown()];case 4:return u.sent(),[4,e()];case 5:return[2,u.sent()];case 6:s&&e_(JSON.stringify(s)),u.label=7;case 7:return t.listen(function(e){return(0,r.sH)(c,void 0,void 0,function(){var n,o;return(0,r.YH)(this,function(r){return o=(n=e.context).data,n.eventName===x.INIT&&(null==o?void 0:o.subWindowId)!==i&&tK(),n.eventName!==x.CANCEL&&n.eventName!==x.SUBMIT||t.teardown(),[2]})})}),eq()&&t.send({eventName:x.INIT,data:{subWindowId:i,hasOpener:!!window.opener}}),[3,10];case 8:return no()?[3,10]:[4,new Promise(function(e){window.addEventListener("message",function t(n){var r=n.data,i=n.source,o=n.origin;if(r){var a=r.type,s=r.message;a===R&&(window.removeEventListener("message",t),s&&e_(s),nr.setItem(ni,o),i&&i.postMessage&&i.postMessage({status:R},o),e())}})})];case 9:return[2,u.sent()];case 10:return[2]}})})}()];case 1:o.sent(),o.label=2;case 2:if(n.error&&n.liffOAuth2Error)throw u=n.error,l=n.error_description.replace(/\+/g," "),X(b,"".concat(u,": ").concat(l));return a=n.code,c=eV(),a&&!eq()&&c&&c.codeVerifier?[4,function(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i=this;return(0,r.YH)(this,function(o){switch(o.label){case 0:t=function(){return(0,r.sH)(i,void 0,void 0,function(){var t,n,i,o,a,s;return(0,r.YH)(this,function(r){var c,u,l,f;switch(r.label){case 0:return[4,(c=ew(),u=Z(window.location.search),l=eV(),f=ee({grant_type:"authorization_code",client_id:u.liffClientId,appId:c.liffId,code:u.code,code_verifier:l.codeVerifier,redirect_uri:c.redirectUri||u.liffRedirectUri,id_token_key_type:"JWK"}),tT(tO.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:f}))];case 1:return n=(t=r.sent()).access_token,i=t.id_token,o=t.expires_in,ex(e),eW(n),ez(new Date(Date.now()+1e3*o)),eG(),i?(eU(i),[4,nT(i,e)]):[3,3];case 2:(a=r.sent())&&eJ(a),r.label=3;case 3:return(s=Z(location.hash).context_token)?(eC(nz(s)),[3,6]):[3,4];case 4:return[4,nq()];case 5:r.sent(),r.label=6;case 6:return[2]}})})},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t()];case 2:return o.sent(),[3,4];case 3:throw n=o.sent(),eG(),n;case 4:return[2]}})})}(n.liffClientId)]:[3,4];case 3:o.sent(),o.label=4;case 4:return em()?[4,function(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i,o,a,c,u,l,f,d,h,p,v,m,g,y,I;return(0,r.YH)(this,function(C){var S,E,T,k;switch(C.label){case 0:return[4,new Promise(function(e){var t=e0();if(!t||0>D(t,"9.5.0"))e();else if(window._liff&&window._liff.features)e();else{s.debug("cannot find window._liff.features, listen to ready event");var n=function(){s.debug("ready event is fired"),tV("ready",n),e()};tB("ready",n)}})];case 1:return C.sent(),"boolean"==typeof nJ&&s.warn("liff.init is not expected to be called more than once"),nJ=!!eb(_.IS_SUBSEQUENT_LIFF_APP)||!(!em()||Z(window.location.hash).feature_token||eN())&&(ey(_.IS_SUBSEQUENT_LIFF_APP,!0),!0),[4,function(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i,o;return(0,r.YH)(this,function(a){switch(a.label){case 0:return t=Z(window.location.hash),n=function(e){for(var t,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var a=function(t){Object.keys(t).filter(function(e){return null!==t[e]&&void 0!==t[e]}
3).forEach(function(n){e[n]=t[n]})};try{for(var s=(0,r.Ju)(i),c=s.next();!c.done;c=s.next())a(c.value)}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return e}({access_token:eM(),context_token:eb(_.RAW_CONTEXT),feature_token:eN(),id_token:ej(),client_id:eF(),mst_challenge:eA(),mst_verifier:eb(_.MST_VERIFIER),msit:eb(_.MSIT)},t),nJ?eq()?[4,tT("".concat(tO.apps,"/").concat(e,"/featureToken"))]:[3,2]:[3,3];case 1:i=a.sent().featureToken,n.feature_token||(n.feature_token=i),a.label=2;case 2:(o=q(e))&&(n.client_id=o),a.label=3;case 3:return[2,n]}})})}(e.liffId)];case 2:if(n=(t=C.sent()).access_token,i=t.context_token,o=t.feature_token,a=t.id_token,c=t.client_id,u=t.mst_verifier,l=t.mst_challenge,f=t.msit,i){if("string"!=typeof i)throw X(b,"Cannot get context token, perhaps there is an incorrect parameter in permanent link");eC(nz(i))}if(void 0!==(null==(y=eI())?void 0:y.liffId)&&(null==(I=eI())?void 0:I.liffId)!==e.liffId)throw X(b,"Invalid LIFF ID");return!e6()&&o&&(S=e.liffId,E=o,to("multipleLiffTransition")&&nK({pathname:"app/".concat(S),query:{feature_token:E}}),nJ&&eR(o)),l&&ey(_.MST_CHALLENGE,l),u&&(T=u,ey(_.MST_VERIFIER,T)),c&&ex(c),f&&(k=f,ey(_.MSIT,k)),window.addEventListener("pageshow",nX),eq()||o&&n?[3,5]:nJ?(nL({redirectUri:e
3i(location.href,{"liff.hback":"2"})}),[4,new Promise(function(){})]):[3,4];case 3:C.sent(),C.label=4;case 4:throw nL(),X(b,"Failed to parse feature_token or access_token");case 5:return n&&o?[4,tH(n)]:[3,7];case 6:if(h=(d=C.sent()).client_id,p=d.expires_in,h!==q(e.liffId))throw nL(),X(b,"Failed to verify access_token");eR(o),ez(new Date(Date.now()+1e3*p)),eW(n),C.label=7;case 7:return[4,function(e,t){return(0,r.sH)(this,void 0,void 0,function(){var n;return(0,r.YH)(this,function(r){switch(r.label){case 0:var i,o,a;return(n=eL())?[2,n]:e&&t?[4,(o=(i={msit:e,mstVerifier:t}).msit,a=i.mstVerifier,o&&a?tT(tO.subWindowGetMSTByMSIT,{method:"POST",body:JSON.stringify({msit:o,mstVerifier:a})}):Promise.reject(X(w,"no proper argument")))]:[3,2];case 1:return[2,r.sent().mst];case 2:return[2,null]}})})}(f,u)];case 8:return(v=C.sent())?(ey(_.MST,v),[4,v?tT(tO.subWindowGetAppData,{method:"POST",body:JSON.stringify({mst:v})}):Promise.reject(X(w,"no proper argument"))]):[3,10];case 9:(m=C.sent().data)&&e_(JSON.stringify(m)),C.label=10;case 10:return a&&!ej()&&eU(a),a&&c&&!eK()?[4,nT(a,c)]:[3,12];case 11:(g=C.sent())&&eJ(g),C.label=12;case 12:return[2]}})})}(e)]:[3,6];case 5:return o.sent(),[3,8];case 6:return eq()?[3,8]:[4,nq()];case 7:o.sent(),o.label=8;case 8:return[4,n$.invoke()];case 9:if(o.sent(),i=eI())try{tI(location.href,i.endpointUrl)}catch(e){s.warn("liff.init() was called with a current URL that is not related to the endpoint URL.\n".concat(location.href," is not under ").concat(i.endpointUrl))}return[4,t()];case 10:return o.sent(),er(window.location.href),[2]}})})}(e,this.internalHooks.beforeFinished.call)])];case 3:return o.sent(),nV("color-scheme",((null==(u=eI())?void 0:u.menuColorSetting)||{adaptableColorSchemes:["light"]}).adaptableColorSchemes.join(" ")),nY({matches:null==(l=window.matchMedia("(prefers-color-scheme: dark)"))?void 0:l.matches,media:null==l?void 0:l.media}),l.addEventListener?l.addEventListener("change",nY):l.addListener&&l.addListener(nY),[4,this.internalHooks.beforeSuccess.call()];case 4:return o.sent(),!e.withLoginOnExternalBrowser||eq()?[3,6]:(nL(),[4,new Promise(function(){})]);case 5:o.sent(),o.label=6;case 6:return[4,function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n;return(0,r.YH)(this,function(r){switch(r.label){case 0:return(e=null!=(n=n2(window.location.href))?n:n2(window.document.referrer))&&D(e,"13.10.0")>=0||em()||"android"!==e5()||(t=Z(window.location.search))[t_]||t.liffIsEscapedFromApp?[2]:t.liffClientId&&document.referrer.includes("access.".concat("line.me"))?(window.location.href=ei(window.location.href,{liffIsEscapedFromApp:"true"}),[2]):t.liffClientId&&document.referrer.includes("android-app://")?[4,n1()]:[3,2];case 1:r.sent(),r.label=2;case 2:return t.liffClientId&&""===document.referrer&&1===window.history.length?[4,n1()]:[3,4];case 3:r.sent(),r.label=4;case 4:return!document.referrer.includes("liffClientId")||document.referrer.includes("liffIsEscapedFromApp")?[3,6]:[4,n1()];case 5:r.sent(),r.label=6;case 6:return[2]}})})}()];case 7:return o.sent(),[4,this.hooks.after.call()];case 8:return o.sent(),"function"==typeof t&&t(),a(),[3,11];case 9:return i=o.sent(),[4,this.internalHooks.error.call(i)];case 10:throw o.sent(),"function"==typeof n&&n(i),i;case 11:return[2]}})})},t}(d);function n3(){return{liffApp:"https://liff.".concat("line.me"),liffServer:"https://api.".concat("line.me"),miniApp:"https://miniapp.".concat("line.me")}}function n6(){return null!==d&&d.apply(this,arguments)||this}function n5(){return navigator.language}(0,r.C6)(n6,d),Object.defineProperty(n6.prototype,"name",{get:function(){return"getOrigins"},enumerable:!1,configurable:!0}),n6.prototype.install=function(){return function(){return n3()}};function n8(){return null!==d&&d.apply(this,arguments)||this}function n9(){var e=e0();if(!e||!em()||"ios"!==e5())return navigator.language;if(D(e,"14.11.0")>=0){var t=window.prompt("LIFF:GET_APP_LANGUAGE");if(t)return t}return navigator.language}(0,r.C6)(n8,d),Object.defineProperty(n8.prototype,"name",{get:function(){return"getLanguage"},enumerable:!1,configurable:!0}),n8.prototype.install=function(){return function(){return n5()}};function n7(){return null!==d&&d.apply(this,arguments)||this}function re(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n,i,o,a,s;return(0,r.YH)(this,function(c){switch(c.label){case 0:return!function(e){if(!j.includes(e))throw X(w,"Unexpected permission name.");var t=eI();return!!(null==t?void 0:t.scope.includes(e))}(e)?[2,{state:"unavailable"}]:(t=eM())?[4,tH(t)]:[3,2];case 1:n=unescape(c.sent().scope).split(" ");try{for(o=(i=(0,r.Ju)(n)).next();!o.done;o=i.next())if(o.value.includes(e))return[2,{state:"granted"}]}catch(e){a={error:e}}finally{try{o&&!o.done&&(s=i.return)&&s.call(i)}finally{if(a)throw a.error}}return[2,{state:"prompt"}];case 2:throw X(g,"Need access_token for api call, Please login first")}})})}function rt(){var e,t,n=eI();return!!n&&"square_chat"!==n.type&&(to("skipChannelVerificationScreen")||!em()&&
3(null==(t=null==(e=n.availability)?void 0:e.skipChannelVerificationScreen)?void 0:t.permission))}(0,r.C6)(n7,d),Object.defineProperty(n7.prototype,"name",{get:function(){return"getAppLanguage"},enumerable:!1,configurable:!0}),n7.prototype.install=function(){return function(){return n9()}};var rn,rr=nC.on,ri=nC.off,ro=nC.open,ra=function(){function e(e,t){var n=this;this.onSubmit=function(e){return(0,r.sH)(n,[e],void 0,function(e){var t=e.newAccessToken,n=e.newIdToken,i=e.ICA_ERROR;return(0,r.YH)(this,function(e){return t?this.resolve({newAccessToken:t,newIdToken:n}):i&&this.reject(X(m,i)),this.teardown(),[2]})})},this.onClose=function(){return(0,r.sH)(n,void 0,void 0,function(){return(0,r.YH)(this,function(e){return this.reject(X(g,"user didn't allow the agreement")),this.teardown(),[2]})})},this.onCancel=function(){return(0,r.sH)(n,void 0,void 0,function(){return(0,r.YH)(this,function(e){return this.reject(X(g,"user didn't allow the agreement")),this.teardown(),[2]})})},this.onError=function(e){return(0,r.sH)(n,void 0,void 0,function(){return(0,r.YH)(this,function(t){return this.reject(e),this.teardown(),[2]})})},this.resolve=e,this.reject=t,this.setup()}return e.prototype.setup=function(){rr("submit",this.onSubmit),rr("close",this.onClose),rr("cancel",this.onCancel),rr("error",this.onError)},e.prototype.teardown=function(){ri("submit",this.onSubmit),ri("close",this.onClose),ri("cancel",this.onCancel),ri("error",this.onError),rn=void 0},e.prototype.open=function(e){var t=ew().liffId;t?ro({url:"".concat("https://liff.line.me/1656032314-Xgrw5Pmk"),appData:{liffId:t,channelId:q(t),accessToken:eM()},onBeforeTransition:e}).catch(this.reject):this.reject(X(g,"liffId is required"))},e}();function rs(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n,i,o,a,s=this;return(0,r.YH)(this,function(c){switch(c.label){case 0:if(!rt())throw X(y,"SkipChannelVerificationScreen is unavailable.");return rn&&rn.teardown(),e=function(){return(0,r.sH)(s,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:return[4,function(){var e=ew().liffId;if(e)return tT("".concat(tO.unauthorizedPermissions,"?liffId=").concat(e),{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer ".concat(eM())}});throw X(g,"liffId is required")}()];case 1:if(e=t.sent(),(em()?e:e.filter(function(e){return"chat_message.write"!==e})).length<=0)throw X(y,"All permissions have already been approved.");return[2]}})})},[4,new Promise(function(t,n){(rn=new ra(t,n)).open(e)})];case 1:return n=(t=c.sent()).newAccessToken,i=t.newIdToken,eW(n),i&&(o=eF())?[4,nT(i,o)]:[3,3];case 2:(a=c.sent())&&(eU(i),eJ(a)),c.label=3;case 3:return[2]}})})}function rc(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:if(!(e=eM()))throw X(g,"Need access_token for api call, Please login first");return[4,tH(e)];case 1:return[2,decodeURIComponent(t.sent().scope).split(" ").filter(function(e){return""!==e})]}})})}function ru(e,t){var n=this;return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return(0,r.sH)(n,void 0,void 0,function(){var n,o,a;return(0,r.YH)(this,function(s){switch(s.label){case 0:return o=void 0!==(n=(i.length>0?i[i.length-1]:{}).ignorePermissionCheck)&&n,[4,re(t)];case 1:if("unavailable"!==(a=s.sent().state))return[3,2];throw X(y,"The permission is not in LIFF app scope.");case 2:return"prompt"===a&&rt()&&!o&&(em()||"chat_message.write"!==t)?[4,rs()]:[3,4];case 3:return s.sent(),[3,5];case 4:o&&i.pop(),s.label=5;case 5:return[4,e.apply(void 0,(0,r.fX)([],(0,r.zs)(i),!1))];case 6:return[2,s.sent()]}})})}}var rl=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"permission"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return{query:re,requestAll:rs,getGrantedAll:rc}},t}(d));function rf(){return tT(tO.profile)}function rd(){return null!==d&&d.apply(this,arguments)||this}(0,r.C6)(rd,d),Object.defineProperty(rd.prototype,"name",{get:function(){return"getProfile"}
3,enumerable:!1,configurable:!0}),rd.prototype.install=function(){return ru(rf,"profile")};var rh="is_liff_external_open_window";function rp(e){if(!function(e){if(!e||"object"!=typeof e)return!1;var t=e.url,n=e.external,i=(0,r.zs)([typeof t,typeof n],2),o=i[0],a=i[1];return"string"===o&&""!==t&&("undefined"===a||"boolean"===a)}(e))throw X(w,"Invalid parameters for liff.openWindow()");var t=e0();if(em())if(null!==t&&"ios"===e5()&&D(t,"9.19")>=0||!window._liff.postMessage){var n,i,o,a,s,c,u,l,f,d,h,p,v,m=e.url,g=e.external;window.open((n=void 0!==g&&g,-1!==m.indexOf("#")&&-1!==m.indexOf("?")&&m.indexOf("#")<m.indexOf("?")||-1===m.indexOf("?")&&-1!==m.indexOf("#")?(d=(a=(0,r.zs)(m.split("#"),2))[0],s=a[1],h=(c=(0,r.zs)((void 0===s?"":s).split("?"),2))[0],p=c[1]):(d=(u=(0,r.zs)(m.split("?"),2))[0],l=u[1],p=(f=(0,r.zs)((void 0===l?"":l).split("#"),2))[0],h=f[1]),i=p,o=h,v=i?"&".concat(i.split("&").filter(function(e){return -1===e.indexOf(rh)}).join("&").concat("".concat(o?"#".concat(o):""))):"".concat(o?"#".concat(o):""),"".concat(d,"?").concat(rh,"=").concat(!!n).concat(v)))}else tz("openWindow",e);else window.open(e.url,"_blank")}function rv(){return null!==d&&d.apply(this,arguments)||this}(0,r.C6)(rv,d),Object.defineProperty(rv.prototype,"name",{get:function(){return"openWindow"},enumerable:!1,configurable:!0}),rv.prototype.install=function(){return function(e){return rp(e)}};var rm=function(e){var t;return"object"==typeof e&&null!==e&&("string"==typeof(t=e.type)||t instanceof String)};function rg(e){return Promise.reject(X(w,e))}function rw(e){if(!(Array.isArray(e)&&e.every(rm)))return rg("Parameter 'messages' must be an array of { type, ... }");var t=e.length;return t<1||t>5?rg("Number of messages should be in range 1 to ".concat(5,".")):tT(tO.message,{method:"POST",body:JSON.stringify({messages:e})}).catch(rb)}var rb=function(e){if("403"===e.code){var t="12.0.0"===e0(),n="ios"===e5(),r=el();t&&(n||r)&&window.alert("LINEã¢ããªãLINE 12.0.1以éã«ã¢ãããã¼ããã¦ãã ããã\nPlease update your LINE app to LINE 12.0.1 or later.")}throw e};function ry(){return tT(tO.friendship)}var rI=d;function rC(){return null!==rI&&rI.apply(this,arguments)||this}(0,r.C6)(rC,rI),Object.defineProperty(rC.prototype,"name",{get:function(){return"sendMessages"},enumerable:!1,configurable:!0}),rC.prototype.install=function(){return ru(rw,"chat_message.write")};function rS(){return null!==d&&d.apply(this,arguments)||this}(0,r.C6)(rS,d),Object.defineProperty(rS.prototype,"name",{get:function(){return"getFriendship"},enumerable:!1,configurable:!0}),rS.prototype.install=function(){return ru(ry,"profile")};var rE,rT=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.utsExtra={isLiffSuccessful:!1,isLoggedIn:!1,id:"",version:""},t.injected=!1,t}return(0,r.C6)(t,e),Object.defineProperty(t,"CUSTOMPLACEID_INIT",{get:function(){return"liff.init"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"CUSTOMTYPE",{get:function(){return"liffSdk"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"LiffUtsLoginStatus",{get:function(){return{isLoggedIn:1,isLiffSuccessful:2}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return"analytics"},enumerable:!1,configurable:!0}),t.prototype.install=function(e){var t=e.liff,n=e.internalHooks;this.liffCore=t,n.init.beforeFinished(this.beforeInitFinished.bind(this)),n.init.beforeSuccess(this.beforeInitSuccess.bind(this)),n.init.error(this.initError.bind(this))},t.prototype.createDeprecatedUtsProxy=function(e){return new Proxy(e,{get:function(e,t){var n=e[t];return"function"==typeof n?function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return s.warn("[LIFF Analytics] ".concat("LIFF Analytics is deprecated and will be removed in a future version. Please migrate to alternative analytics solutions."," Called method: ").concat(String(t))),n.apply(e,r)}:n}})},t.prototype.changeRatioToUTSFormat=function(e){if(e&&Number.isFinite(e))return Math.round(100*e)},t.prototype.setExtra=function(){var e,n=this.utsExtra,r=n.isLiffSuccessful,i=n.isLoggedIn,o=n.id,a=n.version,s=(i?t.LiffUtsLoginStatus.isLoggedIn:0)|(r?t.LiffUtsLoginStatus.isLiffSuccessful:0);null==(e=this.uts)||e.setExtra("liff",{id:o,loginStatus:s,version:a})},t.prototype.assignUtsExtra=function(e){Object.assign(this.utsExtra,e)},t.prototype.setVersion=function(e){this.assignUtsExtra({version:e}
3),s.debug("[LIFFUTS][SDK version] ".concat(e)),this.setExtra()},t.prototype.setLiffId=function(e){this.assignUtsExtra({id:e}),s.debug("[LIFFUTS][LIFFID] ".concat(e)),this.setExtra()},t.prototype.setIsLoggedIn=function(e){this.assignUtsExtra({isLoggedIn:e}),s.debug("[LIFFUTS][isLoggedIn] ".concat(e)),this.setExtra()},t.prototype.sendLiffInit=function(){var e;s.debug("[LIFFUTS][sendCustom] liff.init"),null==(e=this.uts)||e.sendCustom({type:t.CUSTOMTYPE,params:{placeId:t.CUSTOMPLACEID_INIT}})},t.prototype.setIsLiffSuccessful=function(e){this.assignUtsExtra({isLiffSuccessful:e}),s.debug("[LIFFUTS][isLiffInitSuccessful] ".concat(e)),this.setExtra()},t.prototype.prepareReferrer=function(e){var t={};Object.keys(e).forEach(function(n){if(F.includes(n)){var r=e[n];"string"==typeof r&&r&&(t[n.replace(/^liff\.ref\./,"")]=r)}}),Object.keys(t).length>0&&(this.referrer=t)},t.prototype.beforeInitFinished=function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n,i,o,a,c,u,l,f,d,h;return(0,r.YH)(this,function(p){switch(p.label){case 0:if(e=Z(window.location.search),this.prepareReferrer(e),!(n=null==(t=eI())?void 0:t.utsTracking))return[2];if(o=(i=ew()).liffId,a=i.analytics,"auto"!==n.mode||!a)return[3,6];s.warn("[LIFF Analytics] LIFF Analytics is deprecated and will be removed in a future version. Please migrate to alternative analytics solutions."),s.debug("[LIFFUTS] ".concat((new Date).toUTCString())),p.label=1;case 1:return p.trys.push([1,3,,4]),c=this,[4,new Promise(function(e,t){var n=window.uts,r=document.createElement("script");r.type="text/javascript",r.src="https://static.line-scdn.net/uts/edge/4.1.0/uts.js",r.onload=function(){e(window.uts),window.uts=n},r.onerror=function(e){t(e)},document.getElementsByTagName("head")[0].appendChild(r)})];case 2:return c.uts=p.sent(),[3,4];case 3:return u=p.sent(),s.debug("[LIFFUTS] cannot load UTS, reason: ".concat(u)),[2];case 4:return l=(0,r.Cl)((0,r.Cl)({}
3,a.context),{utsId:a.context.utsId,appName:a.context.appName,appEnv:a.context.appEnv||"release"}),f=(0,r.Cl)((0,r.Cl)({endpoint:"https://uts-front.line-apps.com"},a.options),{sampleRate:this.changeRatioToUTSFormat(n.sendRatio),version:"current"}),this.uts.init(l,f),[4,function(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:return[4,function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t;return(0,r.YH)(this,function(n){switch(n.label){case 0:if(!eq())return[3,6];n.label=1;case 1:return n.trys.push([1,5,,6]),(e=eK())&&e.sub?[2,e.sub]:[3,2];case 2:return[4,rf()];case 3:if((t=n.sent())&&t.userId)return[2,t.userId];n.label=4;case 4:return[3,6];case 5:return n.sent(),s.debug("can't retrieve Mid/Uid because of something wrong"),[3,6];case 6:return[2]}})})}()];case 1:return(e=t.sent())&&"u"===e.substring(0,1)?[2,e]:[2]}})})}()];case 5:(d=p.sent())&&(s.debug("[LIFFUTS][mid] ".concat(d)),this.uts.setMid(d)),(null==t?void 0:t.tid)&&(s.debug("[LIFFUTS][tid] ".concat(t.tid)),this.uts.setTid(t.tid)),this.referrer&&(s.debug("liff.ref.referrer",this.referrer),this.uts.setSessionParams(this.referrer)),o&&this.setLiffId(o),this.setIsLoggedIn(eq()),this.setVersion(eQ()),h=en(location.href),s.debug("[LIFFUTS][url] ".concat(h)),this.uts.setUrl(h),this.liffCore.analytics=this.createDeprecatedUtsProxy(this.uts),this.injected=!0,p.label=6;case 6:return[2]}})})},t.prototype.beforeInitSuccess=function(){return this.injected&&(this.setIsLiffSuccessful(!0),this.sendLiffInit()),Promise.resolve()},t.prototype.initError=function(){return this.injected&&(this.setIsLiffSuccessful(!1),this.sendLiffInit()),Promise.resolve()},t}(d),rk=function(e){s.warn("[LIFF Analytics] LIFF Analytics is deprecated and will be removed in a future version. Please migrate to alternative analytics solutions. Called function: sendShareTargetPicker"),s.debug("[LIFFUTS][sendCustom] liff.shareTargetPicker"),e.sendCustom({type:"liffSdk",params:{placeId:"liff.shareTargetPicker"}})},rP=function(){function e(e,t){var n=this;this.resolve=e,this.reject=t,this.onSubmit=function(e){var t=e.message;n.resolve({value:t}),n.destroy()},this.onClose=function(){n.resolve({value:null}),n.destroy()},this.onCancel=function(){n.resolve({value:null}),n.destroy()},this.onError=function(e){n.reject(e),n.destroy()},this.start()}return e.prototype.start=function(){nC.on("submit",this.onSubmit),nC.on("close",this.onClose),nC.on("cancel",this.onCancel),nC.on("error",this.onError)},e.prototype.destroy=function(){nC.off("submit",this.onSubmit),nC.off("close",this.onClose),nC.off("cancel",this.onCancel),nC.off("error",this.onError),rE=void 0},e}();function rO(){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(e){return ti.scanCodeV2(),rE&&rE.destroy(),[2,new Promise(function(e,t){rE=new rP(e,t),nC.open({url:"https://liff.line.me/1656359117-jxmx5e11"}).catch(function(e){null==rE||rE.destroy(),t(e)})})]})})}var rH=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"scanCodeV2"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return rO},t}(d)),r_={},rL=!1,rA=!1;function rF(e,t,n,r){if(void 0===n&&(n={}),"object"!=typeof e||!e.postMessage)throw X(w,"target must be window object");if("string"!=typeof t)throw X(w,"keyname must be string");if("object"!=typeof n)throw X(w,"incorrect body format. It should be Object or Array comprised of Object");if(!r)throw X(w,"serverEndPointUrl isn't passed. please fill up with proper url");if("*"===r)throw Error("serverEndPointUrl doesn't allow to set '*'");var i={name:t,body:n};e.postMessage(i,r)}var rx=function(){function e(){this.payloadToShareTargetPicker=null,this.popupWindow=null,this.doesWaitForSubwindowResult=!1}return e.getInstance=function(){return e.instance?e.instance.reset():e.instance=new e,e.instance},e.prototype.init=function(e){return(0,r.sH)(this,void 0,void 0,function(){var t,n;return(0,r.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),this.liffId=e.referrer.liffId,this.doesWaitForSubwindowResult=!(!e.options||!e.options.waitForSubwindowResult),this.allowPostMessageOrigin=this.initAllowPostMessageOrigin(),this.payloadToShareTargetPicker=this.buildPayloadToShareTargetPicker(e),window.AbortController&&(this.abortController=new window.AbortController),this.prepareAnotherWindow(),[4,this.initOtt()];
3case 1:return r.sent(),this.initListener(),this.openAnotherWindow(),this.doesWaitForSubwindowResult?[4,this.pollingShareResult()]:[3,3];case 2:return t=r.sent(),this.finalize(),[2,t];case 3:case 6:return[2];case 4:return[3,6];case 5:if(n=r.sent(),this.finalize(),"AbortError"!==n.name)throw n;return[3,6]}})})},e.prototype.resetAllVariables=function(){this.liffId="",this.allowPostMessageOrigin="",this.payloadToShareTargetPicker=null,this.ott="",this.popupWindow=null,this.timeoutIDForHealthCheck=null,this.abortController=null,this.internalError=null,this.doesWaitForSubwindowResult=!1},e.prototype.reset=function(){this.finalize(),this.resetAllVariables()},e.prototype.finalize=function(){var e,t,n,i,o,a;this.abortController&&this.abortController.abort(),em()||(e=this.timeoutIDForHealthCheck,t=this.popupWindow,n=window,i="message.receivedHealthcheck",o=(0,r.zs)(i.split("."),1)[0],(a=r_[i])&&n.removeEventListener(o,a),r_[i]=null,e&&clearTimeout(e),t&&!t.closed&&t.close())},e.prototype.buildPayloadToShareTargetPicker=function(e){return{messages:e.messages,isMultiple:e.isMultiple,referrer:e.referrer}},e.prototype.initAllowPostMessageOrigin=function(e){var t;return void 0===e&&(e=tO.shareTargetPicker),(t=e.match(/^(https?:\/\/.*?)\//))&&t[1]||""},e.prototype.initOtt=function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t,n;return(0,r.YH)(this,function(r){switch(r.label){case 0:return this.abortController&&(e=this.abortController.signal),t="".concat(tO.shareTargetPickerOtt,"/").concat(this.liffId,"/ott"),n=this,[4,tT(t,{method:"GET",signal:e}).then(function(e){return e.ott})];case 1:return n.ott=r.sent(),[2]}})})},e.prototype.prepareAnotherWindow=function(){em()||("ios"!==e5()||el()?this.popupWindow=window.open("","liffpopup","width=480, height=640, menubar=no, toolbar=no, scrollbars=yes"):this.popupWindow=window.open())},e.prototype.openAnotherWindow=function(){var e,t,n,r,i;if(em()&&this.payloadToShareTargetPicker)e=this.liffId,t={liffId:e,ott:this.ott,data:JSON.stringify(this.payloadToShareTargetPicker),closeModals:!1},location.href="".concat("line://picker","?").concat(ee(t));else{if(this.timeoutIDForHealthCheck=window.setTimeout(this.healthCheck.bind(this),1e3),!this.popupWindow)throw X(E);n=this.popupWindow,r=this.liffId,i=this.ott,n.location.href="".concat(tO.shareTargetPicker,"?").concat(ee({liffId:r,ott:i}))}},e.prototype.initListener=function(){var e,t,n,i,o,a,c;em()||(e=this.onReceivedHealthcheck.bind(this),t=this.allowPostMessageOrigin,i="receivedHealthcheck",n=window,o="message.".concat(i),a=function(n){s.debug("messageReceive",n),n.origin===t&&n.data.name===i&&e(n)},rL||(rA=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,!1}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}(),rL=!0),c=(0,r.zs)(o.split("."),1)[0],new Promise(function(e){var t=function(t){e(t),a&&a(t)};r_[o]=t,n.addEventListener(c,t,!!rA&&void 0)}))},e.prototype.healthCheck=function(){return(0,r.sH)(this,void 0,void 0,function(){var e;return(0,r.YH)(this,function(t){switch(t.label){case 0:if(this.popupWindow&&!this.popupWindow.closed)return[3,7];if(!this.doesWaitForSubwindowResult)return[3,5];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.onCanceled()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),this.internalError=e,[3,4];case 4:return[3,6];case 5:this.finalize(),t.label=6;case 6:return[3,8];case 7:rF(this.popupWindow,"healthcheck",void 0,this.allowPostMessageOrigin),this.timeoutIDForHealthCheck=window.setTimeout(this.healthCheck.bind(this),1e3),t.label=8;case 8:return[2]}})})},e.prototype.onReceivedHealthcheck=function(){var e;if(!this.popupWindow||!this.payloadToShareTargetPicker)throw X(E);e=this.popupWindow,rF(e,"ready",this.payloadToShareTargetPicker,this.allowPostMessageOrigin)},e.prototype.onCanceled=function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t;return(0,r.YH)(this,function(n){switch(n.label){case 0:if(em()||!this.ott)throw Error("need to call with ott in client");return this.abortController&&(e=this.abortController.signal),t={liffId:this.liffId,ott:this.ott},[4,tT("".concat(tO.shareTargetPickerResult,"?").concat(ee(t)),{method:"POST",signal:e,headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:"result=CANCEL"})];case 1:return[2,"ok"===n.sent().status]}})})},e.prototype.getShareResult=function(){return(0,r.sH)(this,void 0,void 0,function(){var e,t;return(0,r.YH)(this,function(n){if(!this.ott)throw Error("need to call with ott in client");return this.abortController&&(e=this.abortController.signal),t={liffId:this.liffId,ott:this.ott},s.debug("fetch: getShareResult"),[2,tT("".concat(tO.shareTargetPickerResult,"?").concat(ee(t)),{method:"GET",headers:{Accept:"application/json"},signal:e})]})})},e.isPollingTimeOut=function(e,t){return(t-e)/6e4>=10},e.prototype.pollingShareResult=function(){return(0,r.sH)(this,void 0,void 0,function(){var t,n;return(0,r.YH)(this,function(r){switch(r.label){case 0:t=Date.now(),r.label=1;case 1:if(e.isPollingTimeOut(t,Date.now()))return[3,4];if(this.internalError)throw this.internalError;
3return[4,this.getShareResult()];case 2:if((n=r.sent())&&n.result)switch(n.result){case"SUCCESS":return[2,{status:"success"}];case"CANCEL":return[2];default:throw Error(n.resultDescription)}return[4,new Promise(function(e){setTimeout(e,500)})];case 3:return r.sent(),[3,1];case 4:throw Error("Timeout: not finished within ".concat(10,"min"))}})})},e}(),rN=new(function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.shareTargetPicker=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return(0,r.sH)(t,(0,r.fX)([e],(0,r.zs)(n),!1),void 0,function(e,t){var n,i,o,a,s,c,u;return void 0===t&&(t={}),(0,r.YH)(this,function(r){switch(r.label){case 0:if(ti.shareTargetPicker(),!e||!Array.isArray(e)||0===e.length)throw X(w,"no proper argument");if(e.length>5)throw X(w,"exceed the limit of num of messages");if(!(n=ew().liffId))throw X(I);window.liff&&(i=window.liff).analytics&&rk(i.analytics),o=void 0===t.isMultiple||t.isMultiple,r.label=1;case 1:return r.trys.push([1,3,,4]),a=rx.getInstance(),s=e0(),c={waitForSubwindowResult:!0},em()&&s&&0>D(s,"10.11.0")&&(c.waitForSubwindowResult=!1),[4,a.init({messages:e,isMultiple:o,referrer:{liffId:n,url:location.origin},options:c})];case 2:return[2,r.sent()];case 3:throw(u=r.sent())instanceof J?u:X(T,u.message);case 4:return[2]}})})},t}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"shareTargetPicker"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this.shareTargetPicker},t}(d));function rR(e,t){return(0,r.sH)(this,void 0,void 0,function(){var n;return(0,r.YH)(this,function(r){switch(r.label){case 0:return(n=new URL(tO.createShortcutOnHomeScreen)).searchParams.append("liffId",e),n.searchParams.append("url",t.url),t.description&&n.searchParams.append("description",t.description),[4,tT(n.toString())];case 1:return[2,r.sent().shortcutPageUrl]}})})}function rj(e){if(eu(e))throw X(w,"LINE URL scheme are not supported in the current environment.")}function rU(e){if(void 0===e.url||null===e.url||""===e.url)throw X(w,"no proper argument");var t,n=eI();if(!(null==(t=null==n?void 0:n.availability.addToHomeLineScheme)?void 0:t.permission)){if(eu(e.url))throw X(y,"No permission to specify line schema in url.");if(e.description)throw X(y,"No permission to specify description.")}if(!eu(e.url)){if(!n)throw X(y,"Could not get Context from server.");n.liffId!==es(e.url)&&tI(e.url,n.endpointUrl)}}function rD(e){return(0,r.sH)(this,void 0,void 0,function(){var t;return(0,r.YH)(this,function(n){switch(n.label){case 0:if(!(t=ew().liffId))throw X(b,"Invalid LIFF ID.");return"ios"===e5()?[4,function(e,t){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(n){switch(n.label){case 0:return rj(t.url),[4,rR(e,t)];case 1:return rp({url:n.sent(),external:!0}),[2]}})})}(t,e)]:[3,2];case 1:return n.sent(),[3,4];case 2:return[4,function(e,t){return(0,r.sH)(this,void 0,void 0,function(){var n,i;return(0,r.YH)(this,function(o){switch(o.label){case 0:return n={liffId:e,targetUrl:t.url,description:t.description},i="".concat("line://shortcut/liff","?").concat(ee(n)),location.href=i,[4,function(e,t){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(n){switch(n.label){case 0:return em()?[2]:[4,new Promise(function(e){setTimeout(e,1e3)})];case 1:return n.sent(),"hidden"===document.visibilityState?[2]:(rj(t.url),[4,rR(e,t)]);case 2:return rp({url:n.sent(),external:!0}),[2]}})})}(e,t)];case 1:return o.sent(),[2]}})})}(t,e)];case 3:n.sent(),n.label=4;case 4:return[2]}})})}var rM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"createShortcutOnHomeScreen"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(e){return function(e){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(t){switch(t.label){case 0:return rU(e),ti.createShortcutOnHomeScreen(),[4,rD(e)];case 1:return t.sent(),[2]}})})}(e)}},t}(d),rW=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"internalCreateShortcutOnHomeScreen"}
3,enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(e){return function(e){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(t){switch(t.label){case 0:return rU(e),ti.internalCreateShortcutOnHomeScreen(),[4,rD(e)];case 1:return t.sent(),[2]}})})}(e)}},t}(d);function rY(e){return(0,r.sH)(this,arguments,void 0,function(e){var t=e.productIds;return(0,r.YH)(this,function(e){switch(e.label){case 0:return[4,tz("iap.getPlatformProducts",{productIds:t}).catch(function(e){if(e.code&&e.description)throw X(e.code,e.description);throw X(m,"Failed to get platform products",{cause:e})})];case 1:return[2,e.sent().products]}})})}var rB,rV=function(e){return(0,r.sH)(void 0,[e],void 0,function(e){var t,n=e.productId,i=e.orderId;return(0,r.YH)(this,function(e){switch(e.label){case 0:var o;return(null==(t=eI())?void 0:t.isIapSandbox)?[4,(o={productId:n,orderId:i},(0,r.sH)(void 0,[o],void 0,function(e){var t=e.productId,n=e.orderId;return(0,r.YH)(this,function(e){switch(e.label){case 0:if(!window.confirm("Proceed with a test in-app purchase?"))throw X("CANCELED","Transaction was canceled.");return[4,tT(tO.iapVirtualConfirm,{method:"POST",body:JSON.stringify({productId:t,orderId:n})})];case 1:return e.sent(),[2]}})}))]:[3,2];case 1:case 3:return e.sent(),[2];case 2:return[4,tz("iap.createPayment",{productId:n,orderId:i}).catch(function(e){if(e.code&&e.description)throw X(e.code,e.description);throw X(m,"Failed to get platform products",{cause:e})})]}})})},rG=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"iap"},enumerable:!1,configurable:!0}),t.prototype.install=function(){var e=this;return{getPlatformProducts:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0,r.sH)(e,void 0,void 0,function(){return(0,r.YH)(this,function(e){return ti.iap(),[2,rY.apply(void 0,(0,r.fX)([],(0,r.zs)(t),!1))]})})},createPayment:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0,r.sH)(e,void 0,void 0,function(){return(0,r.YH)(this,function(e){return ti.iap(),[2,rV.apply(void 0,(0,r.fX)([],(0,r.zs)(t),!1))]})})},requestConsentAgreement:function(){return(0,r.sH)(e,void 0,void 0,function(){return(0,r.YH)(this,function(e){return ti.iap(),[2,(0,r.sH)(void 0,void 0,void 0,function(){return(0,r.YH)(this,function(e){switch(e.label){case 0:return[4,tz("iap.requestConsentAgreement").catch(function(e){if(e.code&&e.description)throw X(e.code,e.description);throw X(m,"Failed to request consent agreement",{cause:e})})];case 1:return e.sent(),[2]}})})]})})}}},t}(d),rz=nC.on,rK=nC.off,rJ=nC.open,rX=function(){function e(e,t){var n=this;this.onSubmit=function(e){return(0,r.sH)(n,void 0,void 0,function(){return(0,r.YH)(this,function(t){return e.ADD_FRIEND_ERROR?this.reject(X(T,e.ADD_FRIEND_ERROR_MESSAGE||e.ADD_FRIEND_ERROR)):this.resolve(),this.teardown(),[2]})})},this.onClose=function(){return(0,r.sH)(n,void 0,void 0,function(){return(0,r.YH)(this,function(e){return this.resolve(),this.teardown(),[2]})})},this.onCancel=function(){return(0,r.sH)(n,void 0,void 0,function(){return(0,r.YH)(this,function(e){return this.reject(X(g,"user didn't complete the friend request")),this.teardown(),[2]})})},this.onError=function(e){return(0,r.sH)(n,void 0,void 0,function(){return(0,r.YH)(this,function(t){return this.reject(e),this.teardown(),[2]})})},this.resolve=e,this.reject=t,this.setup()}return e.prototype.setup=function(){rz("submit",this.onSubmit),rz("close",this.onClose),rz("cancel",this.onCancel),rz("error",this.onError)},e.prototype.teardown=function(){rK("submit",this.onSubmit),rK("close",this.onClose),rK("cancel",this.onCancel),rK("error",this.onError),rB=void 0},e.prototype.open=function(e){var t=ew().liffId;t?rJ({url:"".concat("https://liff.line.me/1656032314-CWSCEjzU"),appData:{liffId:t,accessToken:eM()},onBeforeTransition:e}).catch(this.reject):this.reject(X(I,"liffId is required"))},e}();function rq(){return(0,r.sH)(this,void 0,void 0,function(){var e,t;return(0,r.YH)(this,function(n){switch(n.label){case 0:e=ew().liffId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,tk("".concat(tO.oaAddFriendRateLimit,"?liffId=").concat(e),{method:"POST"})];case 2:return t=n.sent(),[3,4];case 3:throw n.sent(),X(m,"Failed to check rate limit");case 4:if(429===t.status)throw X("RATE_LIMIT_EXCEEDED","Rate limit exceeded for friend request");
3if(!t.ok)throw X(m,"Failed to check rate limit");return[2]}})})}function r$(){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(e){switch(e.label){case 0:return ti.requestFriendship(),rB&&rB.teardown(),[4,new Promise(function(e,t){(rB=new rX(e,t)).open(rq)})];case 1:return e.sent(),[2]}})})}var rQ=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"requestFriendship"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return r$},t}(d)),rZ=new Q,r0="activityCallState",r1="activityRecordingState",r2=function(e){rZ.setItem(r0,JSON.stringify(e))},r4=function(){var e=rZ.getItem(r0);return null===e?null:JSON.parse(e)},r3=function(e){rZ.setItem(r1,JSON.stringify(e))},r6=function(){var e=rZ.getItem(r1);return null===e?null:JSON.parse(e)};function r5(){ti.activityGetCallState();var e=r4();if(null===e)throw X(S,"Call state has not been received from the native client yet");return e}function r8(){ti.activityGetRecordingState();var e=r6();if(null===e)throw X(S,"Recording state has not been received from the native client yet");return e}var r9=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"activity"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return!eh()&&em()&&(tB("activityCallStateChange",function(e){var t;(null==(t=null==e?void 0:e.detail)?void 0:t.data)&&r2(e.detail.data)}),tB("activityRecordingStateChange",function(e){var t;(null==(t=null==e?void 0:e.detail)?void 0:t.data)&&r3(e.detail.data)})),{getCallState:r5,getRecordingState:r8}},t}(d)),r7=Object.defineProperties({},{getOS:{value:e5,enumerable:!0,writable:!0},getVersion:{value:eQ,enumerable:!0,writable:!0},getLanguage:{value:n5,enumerable:!0,writable:!0},getAppLanguage:{value:n9,enumerable:!0,writable:!0},getOrigins:{value:n3,enumerable:!0,writable:!0},isInClient:{value:em,enumerable:!0,writable:!0},isLoggedIn:{value:eq,enumerable:!0,writable:!0},logout:{value:th,enumerable:!0,writable:!0},getAccessToken:{value:eM,enumerable:!0,writable:!0},getIDToken:{value:ej,enumerable:!0,writable:!0},getDecodedIDToken:{value:eK,enumerable:!0,writable:!0},getContext:{value:eI,enumerable:!0,writable:!0},openWindow:{value:rp,enumerable:!0,writable:!0},closeWindow:{value:tK,enumerable:!0,writable:!0},getFriendship:{value:ru(ry,"profile"),enumerable:!0,writable:!0},getAId:{value:eE,enumerable:!0,writable:!0},getProfilePlus:{value:eO,enumerable:!0,writable:!0},getIsVideoAutoPlay:{value:ek,enumerable:!0,writable:!0},getLineVersion:{value:e0,enumerable:!0,writable:!0},isApiAvailable:{value:to,enumerable:!0,writable:!0},getProfile:{value:ru(rf,"profile"),enumerable:!0,writable:!0},sendMessages:{value:ru(rw,"chat_message.write"),enumerable:!0,writable:!0},subWindow:{value:nC,enumerable:!0,writable:!0},ready:{value:v,enumerable:!0,writable:!0},id:{get:function(){return ew().liffId||null},enumerable:!0},_dispatchEvent:{value:function(e){var t={};try{t=JSON.parse(e)}catch(e){throw X(w,e.message)}var n=new CustomEvent(k,{detail:t});s.debug("[client dispatchEvent to js]",{type:n.type,detail:n.detail}),window.dispatchEvent(n)},enumerable:!0,writable:!0},_call:{value:tz,enumerable:!0,writable:!0},_addListener:{value:tB,enumerable:!0,writable:!0},_removeListener:{value:tV,enumerable:!0,writable:!0},_postMessage:{value:tG,enumerable:!0,writable:!0}}),ie=new f,it=new l(ie,r7),ir=new p(ie,it).install();[new p(ie,it),new nA,new n4,new rT,rH,tC,e3,rl,rN,nD,new td,new rM,new rW,new rG,rQ,r9].forEach(function(e){ir.call(r7,e)});var ii=r7},99963:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){var e=function e(t){function n(e,t){return e>>>t|e<<32-t}for(var r,i,o=Math.pow,a=o(2,32),s="length",c="",u=[],l=8*t[s],f=e.h=e.h||[],d=e.k=e.k||[],h=d[s],p={},v=2;h<64;v++)if(!p[v]){for(r=0;r<313;r+=v)p[r]=v;f[h]=o(v,.5)*a|0,d[h++]=o(v,1/3)*a|0}for(t+="\x80";t[s]%64-56;)t+="\0";for(r=0;r<t[s];r++){if((i=t.charCodeAt(r))>>8)return;u[r>>2]|=i<<(3-r)%4*8}for(u[u[s]]=l/a|0,u[u[s]]=l,i=0;i<u[s];){var m=u.slice(i,i+=16),g=f;for(f=f.slice(0,8),r=0;r<64;r++){var w=m[r-15],b=m[r-2],y=f[0],I=f[4],C=f[7]+(n(I,6)^n(I,11)^n(I,25))+(I&f[5]^~I&f[6])+d[r]+(m[r]=r<16?m[r]:m[r-16]+(n(w,7)^n(w,18)^w>>>3)+m[r-7]+(n(b,17)^n(b,19)^b>>>10)|0);(f=[C+((n(y,2)^n(y,13)^n(y,22))+(y&f[1]^y&f[2]^f[1]&f[2]))|0].concat(f))[4]=f[4]+C|0}for(r=0;r<8;r++)f[r]=f[r]+g[r]|0}for(r=0;r<8;r++)for(i=3;i+1;
3i--){var S=f[r]>>8*i&255;c+=(S<16?0:"")+S.toString(16)}return c};return e.code='var sha256=function a(b){function c(a,b){return a>>>b|a<<32-b}for(var d,e,f=Math.pow,g=f(2,32),h="length",i="",j=[],k=8*b[h],l=a.h=a.h||[],m=a.k=a.k||[],n=m[h],o={},p=2;64>n;p++)if(!o[p]){for(d=0;313>d;d+=p)o[d]=p;l[n]=f(p,.5)*g|0,m[n++]=f(p,1/3)*g|0}for(b+="\\x80";b[h]%64-56;)b+="\\x00";for(d=0;d<b[h];d++){if(e=b.charCodeAt(d),e>>8)return;j[d>>2]|=e<<(3-d)%4*8}for(j[j[h]]=k/g|0,j[j[h]]=k,e=0;e<j[h];){var q=j.slice(e,e+=16),r=l;for(l=l.slice(0,8),d=0;64>d;d++){var s=q[d-15],t=q[d-2],u=l[0],v=l[4],w=l[7]+(c(v,6)^c(v,11)^c(v,25))+(v&l[5]^~v&l[6])+m[d]+(q[d]=16>d?q[d]:q[d-16]+(c(s,7)^c(s,18)^s>>>3)+q[d-7]+(c(t,17)^c(t,19)^t>>>10)|0),x=(c(u,2)^c(u,13)^c(u,22))+(u&l[1]^u&l[2]^l[1]&l[2]);l=[w+x|0].concat(l),l[4]=l[4]+w|0}for(d=0;8>d;d++)l[d]=l[d]+r[d]|0}for(d=0;8>d;d++)for(e=3;e+1;e--){var y=l[d]>>8*e&255;i+=(16>y?0:"")+y.toString(16)}return i};',e})?n.apply(t,[]):n)||(e.exports=r)}}]); 4//# sourceMappingURL=8418-d9f1a3de043d744a.js.map 5//# debugId=2908d95d-b345-50d1-851b-f8a66e0c517d
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.